/* 观星 · 命理服务平台 — 「星夜鎏金」主题：深夜蓝黑 + CSS 星点 / 鎏金主色 / 星盘圆环 / 烫金卡片 */
:root {
  --gold: #c9a86a;
  --gold-bright: #e6c98f;
  --gold-soft: rgba(201, 168, 106, .14);
  --gold-line: rgba(201, 168, 106, .38);
  --bg: #0d1026;
  --bg-deep: #090b1c;
  --surface: #141833;
  --surface-2: #1a1f3f;
  --text: #e9e8e4;
  --muted: #8d8fb0;
  --line: #262c4e;
  --success: #7fbf8e;
  --warning: #d9a441;
  --danger: #e06c5f;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 8, .4);
  --shadow-hover: 0 16px 44px rgba(0, 0, 8, .55);
  --serif: "Noto Serif SC", "Source Han Serif SC", STSong, SimSun, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-width: 1080px;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, .65) 1px, transparent 1.6px),
    radial-gradient(rgba(255, 255, 255, .35) 1px, transparent 1.6px),
    radial-gradient(rgba(201, 168, 106, .55) 1px, transparent 1.8px),
    linear-gradient(180deg, #0d1026 0%, #0c0f22 100%);
  background-size: 240px 200px, 360px 300px, 520px 420px, 100% 100%;
  background-position: 12px 24px, 70px 110px, 150px 60px, 0 0;
  background-attachment: fixed;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--gold); color: #0d1026; }

/* ============ 布局骨架（观星台侧栏：夜空更沉、鎏金点睛） ============ */
.app-shell { display: flex; height: 100%; min-height: 100vh; }
.app-sidebar {
  width: 236px;
  flex: 0 0 236px;
  background: linear-gradient(180deg, #0a0d1e 0%, #0d1130 100%);
  border-right: 1px solid var(--line);
  color: #c3c5dd;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #eed3a0, #c9a86a 58%, #94753e);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 18px; font-weight: 800; color: #1a1508;
  box-shadow: 0 0 0 2px rgba(201, 168, 106, .3), 0 6px 18px rgba(201, 168, 106, .28);
}
.brand-title { font-family: var(--serif); font-size: 15.5px; font-weight: 700; letter-spacing: 2px; color: #f0e9d8; }
.brand-sub { font-size: 10.5px; color: #6f74a0; margin-top: 3px; letter-spacing: 1.8px; }
.sidebar-nav { flex: 1; overflow-y: auto; }
.nav-group-title {
  font-size: 10.5px; letter-spacing: 2.5px; color: #565b8c;
  padding: 20px 12px 8px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; margin: 2px 0;
  border-radius: 10px; color: #b6b9d4; font-size: 14px;
  transition: background .16s ease, color .16s ease;
}
.nav-item i { font-size: 16px; }
.nav-item:hover { background: rgba(201, 168, 106, .08); color: #f0e9d8; }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(201, 168, 106, .2), rgba(201, 168, 106, .05));
  color: var(--gold-bright); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold);
}
.sidebar-foot { font-size: 11px; color: #4c517f; padding: 14px 12px 0; border-top: 1px solid rgba(201, 168, 106, .14); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  height: 72px; flex: 0 0 72px;
  background: rgba(13, 16, 38, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px;
}
.topbar-crumb { font-family: var(--serif); font-size: 17px; font-weight: 650; letter-spacing: 1.5px; color: #f0e9d8; }
.topbar-date { font-size: 12px; color: var(--muted); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.topbar-user { font-weight: 600; color: var(--text); }
.app-content { flex: 1; padding: 28px 34px 52px; overflow-y: auto; }
.page-inner { max-width: 1240px; margin: 0 auto; }

/* ============ 页面通用 ============ */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title { font-family: var(--serif); font-size: 23px; font-weight: 750; letter-spacing: 2px; color: #f4efe3; }
.page-desc { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.card {
  background: rgba(20, 24, 51, .88); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; margin-bottom: 20px;
}
.card.tight { padding: 18px 20px; }
.card-title { font-family: var(--serif); font-size: 16px; font-weight: 700; margin-bottom: 4px; letter-spacing: 1.5px; color: #f4efe3; }
.card-sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.section-title { font-family: var(--serif); font-size: 16px; font-weight: 700; margin: 4px 0 16px; display: flex; align-items: center; gap: 9px; letter-spacing: 1.5px; color: #f4efe3; }
.section-title::before { content: '✦'; font-size: 13px; color: var(--gold); }

/* ============ 统计卡 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card {
  background: rgba(20, 24, 51, .88); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--gold-line); }
.stat-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 28px; font-weight: 750; margin-top: 12px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
.stat-accent { color: var(--gold-bright); }
.stat-success { color: var(--success); }
.stat-warn { color: var(--warning); }
.stat-danger { color: var(--danger); }

/* ============ 工具类 ============ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar-spacer { flex: 1; }
.muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.gap-10 { gap: 10px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.w-full { width: 100%; }
.pager { display: flex; justify-content: flex-end; margin-top: 18px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty::before { content: '✦'; display: block; font-size: 18px; color: #565b8c; margin-bottom: 8px; }
.chart-box { height: 320px; width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 22px; }
.form-grid .span-2 { grid-column: span 2; }

.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hover-card { transition: transform .18s ease, box-shadow .18s ease; cursor: pointer; }
.hover-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

code { font-family: Consolas, Monaco, monospace; font-size: 12.5px; background: var(--gold-soft); color: var(--gold-bright); padding: 2px 6px; border-radius: 6px; }

/* ============ 时间线 / 配置行 ============ */
.timeline { padding-left: 4px; }
.timeline-item { position: relative; padding: 10px 0 12px 18px; border-left: 1px solid var(--line); margin-left: 5px; }
.timeline-dot { position: absolute; left: -5px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.config-line { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.config-line span { color: var(--muted); }

/* ============ 表格 / 徽标 / 鎏金按钮 ============ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; font-size: 12px; color: #7c80a8; font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  letter-spacing: 1px;
}
.data-table td { padding: 12px; border-bottom: 1px solid #1c2140; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(201, 168, 106, .05); }
.data-table .note-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; line-height: 1.4; border: 1px solid transparent; white-space: nowrap;
}
.badge.b-primary { color: var(--gold-bright); background: var(--gold-soft); border-color: var(--gold-line); }
.badge.b-success { color: var(--success); background: rgba(127, 191, 142, .1); border-color: rgba(127, 191, 142, .3); }
.badge.b-info { color: #a9adc9; background: rgba(255, 255, 255, .05); border-color: #2e3560; }
.badge.b-warning { color: var(--warning); background: rgba(217, 164, 65, .12); border-color: rgba(217, 164, 65, .35); }
.badge.b-danger { color: var(--danger); background: rgba(224, 108, 95, .1); border-color: rgba(224, 108, 95, .3); }

.link-btn { color: var(--gold-bright); font-size: 13px; cursor: pointer; }
.link-btn.success { color: var(--success); }
.link-btn.warning { color: var(--warning); }
.link-btn.danger { color: var(--danger); }
.link-btn:hover { opacity: .8; }

/* layui 控件：金色实底黑字主按钮 + 描边次按钮 */
.layui-btn {
  background: linear-gradient(135deg, #e6c98f, #c9a86a);
  color: #1a1508; font-weight: 700; border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(201, 168, 106, .3);
  transition: filter .16s ease, transform .16s ease;
}
.layui-btn:hover { filter: brightness(1.08); transform: translateY(-1px); opacity: 1; color: #1a1508; }
.layui-btn-primary { background: transparent; color: #d8daea; border: 1px solid #3a4068; box-shadow: none; font-weight: 500; }
.layui-btn-primary:hover { border-color: var(--gold); color: var(--gold-bright); background: var(--gold-soft); transform: none; }
.layui-btn-normal, .layui-btn-warm { background: linear-gradient(135deg, #e6c98f, #c9a86a); color: #1a1508; }
.layui-btn-danger { background: transparent; border: 1px solid rgba(224, 108, 95, .5); color: var(--danger); box-shadow: none; font-weight: 500; }
.layui-btn-danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(224, 108, 95, .1); }

input.layui-input, select.layui-input, textarea.layui-textarea {
  border-radius: var(--radius-sm);
  background: rgba(9, 11, 28, .7); border-color: #2e3560; color: var(--text);
}
input.layui-input::placeholder, textarea.layui-textarea::placeholder { color: #61668f; }
input.layui-input:focus, select.layui-input:focus, textarea.layui-textarea:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 3px rgba(201, 168, 106, .14); }
.layui-form-select .layui-edge { border-top-color: #8d8fb0; }
.layui-form-select dl { background: var(--surface-2); border: 1px solid #2e3560; box-shadow: var(--shadow); }
.layui-form-select dl dd { color: #c3c5dd; }
.layui-form-select dl dd:hover { background: #232953; color: var(--gold-bright); }
.layui-form-select dl dd.layui-this { background: var(--gold-soft); color: var(--gold-bright); }
.layui-form-radio > i:hover, .layui-form-radioed > i { color: var(--gold) !important; }
.layui-form-radio { color: #c3c5dd !important; }
.layui-form-checkbox[lay-skin="primary"] > i:hover, .layui-form-checked[lay-skin="primary"] > i { background-color: var(--gold) !important; border-color: var(--gold) !important; }
.layui-form-checkbox > div { color: #c3c5dd; }
.layui-form-switch { border-radius: 999px; background: #2e3560; }
.layui-form-switch > div { color: #8d8fb0; }
.layui-form-onswitch { background-color: var(--gold) !important; border-color: var(--gold) !important; }
.layui-form-onswitch > em { color: #1a1508 !important; }
.layui-laypage a, .layui-laypage span, .layui-laypage button { background: transparent !important; border: 1px solid #2e3560; color: #c3c5dd; border-radius: 8px; margin: 0 3px; }
.layui-laypage a:hover { color: var(--gold-bright); }
.layui-laypage .layui-laypage-curr { border: none; }
.layui-laypage .layui-laypage-curr .layui-laypage-em { background: linear-gradient(135deg, #e6c98f, #c9a86a) !important; border-radius: 8px; color: #1a1508; font-weight: 700; }
.layui-laypage .layui-laypage-curr em { color: #1a1508; }

/* 弹窗 / 日期面板 深色化 */
.layui-layer { border-radius: 12px !important; box-shadow: 0 18px 50px rgba(0, 0, 8, .65) !important; }
.layui-layer-title {
  background: var(--surface-2) !important; color: #f4efe3 !important;
  border-bottom: 1px solid var(--line) !important;
  font-family: var(--serif); letter-spacing: 1px;
  border-radius: 12px 12px 0 0 !important;
}
.layui-layer-content { background: var(--surface) !important; }
.layui-layer-btn { background: var(--surface) !important; border-top: 1px solid var(--line) !important; }
.layui-layer-btn a { background: transparent !important; border: 1px solid #3a4068 !important; color: #d8daea !important; border-radius: 8px !important; }
.layui-layer-btn .layui-layer-btn0 { background: linear-gradient(135deg, #e6c98f, #c9a86a) !important; border-color: var(--gold) !important; color: #1a1508 !important; font-weight: 700; }
.layui-layer-btn a:hover { border-color: var(--gold) !important; color: var(--gold-bright) !important; }
.layui-layer-btn .layui-layer-btn0:hover { color: #1a1508 !important; }
.layui-layer-msg { background: #1c2140 !important; color: var(--text) !important; border: 1px solid var(--line) !important; }
.layui-layer-dialog .layui-layer-content { color: var(--text) !important; }

.layui-laydate { background: var(--surface-2) !important; color: var(--text) !important; box-shadow: var(--shadow-hover) !important; }
.layui-laydate * { color: #c3c5dd; }
.layui-laydate-header i:hover, .laydate-prev-m:hover, .laydate-next-m:hover { background: #232953 !important; }
.layui-laydate-content td, .layui-laydate-content th { color: #b6b9d4 !important; }
.layui-laydate-content td.laydate-selected { background: var(--gold-soft) !important; color: var(--gold-bright) !important; }
.layui-laydate-content td:hover, .layui-laydate-content td.layui-this { background: var(--gold) !important; color: #1a1508 !important; }
.layui-laydate-footer { border-top: 1px solid var(--line) !important; }
.layui-laydate-footer span:hover { color: var(--gold-bright) !important; }
.layui-laydate-list { background: var(--surface-2) !important; }

/* ============ 观星：首页 Hero 星盘 / 先生卡烫金 / 席位 / 头像 ============ */
.hero {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; gap: 40px; padding: 38px 40px;
  background: linear-gradient(120deg, #131840 0%, #1b2148 55%, #252c5c 100%);
  border: 1px solid rgba(201, 168, 106, .28);
}
/* 右侧星盘装饰圆环（纯 CSS，不引图） */
.hero::before {
  content: '';
  position: absolute; right: -90px; top: -90px;
  width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(201, 168, 106, .4);
  box-shadow:
    0 0 0 26px rgba(201, 168, 106, .07),
    0 0 0 52px rgba(201, 168, 106, .045),
    0 0 0 80px rgba(201, 168, 106, .03),
    inset 0 0 70px rgba(201, 168, 106, .12);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; right: -40px; bottom: -110px;
  width: 240px; height: 240px; border-radius: 50%;
  border: 1px dashed rgba(201, 168, 106, .3);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-family: var(--serif); letter-spacing: 2px; color: #f4efe3; }
.hero-stat { display: flex; gap: 36px; align-items: center; }
.hero-stat div { text-align: center; }
.hero-stat strong { display: block; font-size: 30px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 12px; color: var(--muted); }

/* 头像：鎏金圆徽 */
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #eed3a0, #c9a86a 58%, #94753e);
  color: #1a1508; font-family: var(--serif);
  display: grid; place-items: center; font-weight: 800;
  box-shadow: 0 0 0 2px rgba(201, 168, 106, .35);
}

.info-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.info-line span { color: var(--muted); }
.info-line strong { font-weight: 500; }

/* 席位卡 */
.seat-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px;
  background: rgba(20, 24, 51, .88);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.seat-card:hover { border-color: var(--gold-line); box-shadow: var(--shadow-hover); }

/* 入驻先生卡：烫金双边框 */
.grid-cards > .card {
  position: relative;
  border-color: rgba(201, 168, 106, .34);
}
.grid-cards > .card::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1px solid rgba(201, 168, 106, .16);
  border-radius: 9px;
  pointer-events: none;
}
.grid-cards > .card:hover { border-color: rgba(201, 168, 106, .6); }

/* 登录页表单 */
.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.auth-field .layui-input { height: 46px; border-radius: 12px; }
.auth-submit { height: 46px; border-radius: 12px; font-size: 15px; }

/* 登录/注册左右分栏（星夜侧） */
.auth-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--bg-deep);
}
.auth-visual {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, #090b1c 0%, #131840 55%, #232a5c 130%);
  color: #f4efe3; padding: 64px 68px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual::before {
  content: '';
  position: absolute; right: -70px; bottom: -70px;
  width: 320px; height: 320px; border-radius: 50%;
  border: 1px solid rgba(201, 168, 106, .4);
  box-shadow: 0 0 0 24px rgba(201, 168, 106, .07), 0 0 0 48px rgba(201, 168, 106, .04);
}
.auth-visual::after {
  content: '';
  position: absolute; left: 40px; top: 40px;
  width: 140px; height: 140px; border-radius: 50%;
  border: 1px dashed rgba(201, 168, 106, .3);
}
.auth-panel {
  display: grid; place-items: center; padding: 48px;
  background: rgba(20, 24, 51, .55);
  border-left: 1px solid var(--line);
}
.auth-card { width: 400px; }

@media (max-width: 1180px) {
  .grid-cards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
