/* 超豪AI · 清晰的收益工作台。此文件只负责视觉呈现。 */
:root {
  --bg: #f5f6fc;
  --panel: #ffffff;
  --text: #20243e;
  --muted: #69738b;
  --line: #e5e8f3;
  --green: #5b50e8;
  --green-dark: #4437ba;
  --shadow: 0 4px 20px rgba(28, 48, 70, .035);
  --soft-green: #f0eeff;
  --sidebar: #191c37;
  --radius: 16px;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, a, input, select {
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

button { font-weight: 600; }
input[type=text], input[type=password], input[type=date], input[type=file], select {
  height: 48px;
  border-radius: 10px;
  border-color: #dbe4ec;
  font-size: 14px;
  font-weight: 500;
}
input::placeholder { color: #748397; }
input:hover, select:hover { border-color: #b5b4eb; }
input:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(91,80,232,.10);
}
input[type=file] { height: auto; min-height: 50px; padding: 7px; }
input[type=file]::file-selector-button {
  border: 0;
  background: #f0eeff;
  border-radius: 6px;
  color: #4437ba;
  padding: 8px 14px;
  margin-right: 12px;
  cursor: pointer;
  font: inherit;
}
.primary {
  min-height: 48px;
  border-radius: 10px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(91,80,232,.12);
}
.primary:hover { box-shadow: 0 4px 12px rgba(91,80,232,.18); }
.ghost-btn, .ghost-link {
  height: 40px;
  border: 1px solid #dfe7ee;
  border-radius: 9px;
  background: #fff;
  color: #405169;
  font-size: 13px;
  font-weight: 500;
  padding: 0 15px;
}
.ghost-btn:hover, .ghost-link:hover { background: #f5f3ff; border-color: #c9c2f1; color: var(--green-dark); }

.ui-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: inline-block;
  background-color: currentColor;
  mask: var(--icon) center / contain no-repeat;
  -webkit-mask: var(--icon) center / contain no-repeat;
}
.icon-upload { --icon: url('icons/upload.svg'); }
.icon-trend { --icon: url('icons/trending-up.svg'); }
.icon-search { --icon: url('icons/search.svg'); }
.icon-users { --icon: url('icons/users.svg'); }
.icon-building { --icon: url('icons/building.svg'); }
.icon-history { --icon: url('icons/history.svg'); }
.icon-external { --icon: url('icons/arrow-up-right.svg'); }
.icon-shield { --icon: url('icons/shield-check.svg'); }

/* 用户查询页 */
.topbar { background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
.brand { width: min(1080px,100%); padding: 18px 24px; gap: 14px; }
.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}
.brand-title { font-size: 19px; font-weight: 650; letter-spacing: .3px; }
.brand-subtitle { font-size: 12px; line-height: 1.6; }
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #425971;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  background: #fff;
  min-height: 44px;
}
.header-link:hover { border-color: #c6c1f0; color: var(--green-dark); background: var(--soft-green); }
.shell { width: min(1080px,100%); padding: 34px 24px 48px; }
.panel, .summary-card { border-radius: var(--radius); }
.panel { padding: 26px; margin-bottom: 22px; }
.panel-head { margin-bottom: 24px; gap: 14px; }
.eyebrow { color: var(--green-dark); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; margin-bottom: 8px; }
.query-panel h1 { font-size: 24px; font-weight: 650; letter-spacing: -.3px; }
.panel h2, .panel-title { font-size: 17px; font-weight: 650; }
.panel p, .panel-head span { font-size: 13px; line-height: 1.7; }
.query-security { display: flex; align-items: center; gap: 7px; color: #606589!important; white-space: nowrap; }
.query-security .ui-icon { width: 17px; height: 17px; flex-basis: 17px; }
.query-grid { grid-template-columns: 1.45fr 1fr 1fr 110px; gap: 14px; }
.query-grid label { margin: 0; font-size: 13px; font-weight: 500; color: #42556b; }
.query-grid input { margin-top: 8px; }
.quick-row { gap: 8px; margin-top: 20px; }
.quick-row button {
  min-height: 40px;
  height: auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  color: #4d5e73;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
}
.quick-row button.active { background: var(--soft-green); border-color: #cdc7f5; color: #493abb; box-shadow: none; }
.query-panel .hint { margin-top: 14px; font-size: 12px; line-height: 1.7; }
.summary-card {
  padding: 30px;
  border-left: 1px solid var(--line);
  gap: 24px;
  min-height: 220px;
  background: #f0f2ff;
  border-color: #d9defb;
  box-shadow: none;
  margin-bottom: 22px;
}
.summary-label { color: #596387; font-size: 13px; font-weight: 500; }
.data-date { background: rgba(255,255,255,.7); border: 1px solid #d7ddf5; border-radius: 7px; color: #566487; font-size: 12px; font-weight: 500; padding: 5px 9px; }
.summary-money { font-size: clamp(38px,5vw,54px); font-weight: 650; letter-spacing: -1.5px; line-height: 1.18; margin-top: 14px; }
.summary-meta { color: #647094; margin-top: 13px; font-size: 12px; }
.summary-side { gap: 16px; padding-left: 30px; border-left: 1px solid #d6ddf3; }
.summary-mini span { font-weight: 400; color: #647094; }
.summary-mini strong { font-size: 25px; font-weight: 600; letter-spacing: -.5px; }
.day-badge { background: #e2e6fb; font-size: 12px; font-weight: 500; height: 28px; min-width: 60px; border-radius: 6px; }
.day-row { border-radius: 11px; }
.day-main { min-height: 66px; padding: 14px 18px; }
.day-main:hover { background: #f8f8ff; }
.day-date, .day-money { font-weight: 600; }
.day-money i { font-size: 0; display: flex; align-items: center; gap: 4px; }
.day-money i::after { content:""; width:16px; height:16px; background:currentColor; mask:url('icons/chevron-down.svg') center/contain no-repeat; -webkit-mask:url('icons/chevron-down.svg') center/contain no-repeat; transition:transform 180ms ease; }
.day-row[open]>.day-main .day-money i::after { transform:rotate(180deg); }
.day-children { padding: 12px 18px 18px; background: #f7f7fe; }
.source-block { border-left-width: 2px; padding: 10px 0 10px 14px; background: transparent; }
.source-main { font-weight: 600; }
.show-summary { padding: 12px; font-size: 13px; border-radius: 8px; }
.show-summary:hover { background: #eeedfc; }
.show-meta { font-size: 12px; line-height: 1.6; }
.video-row { padding: 14px; }
.coverage, .footer-note { font-size: 12px; color: #617286; line-height: 1.9; }
.footer-note { border-top: 1px solid var(--line); padding-top: 14px; }

/* 管理后台 */
.admin-body { grid-template-columns: 240px minmax(0,1fr); background: var(--bg); }
.admin-sidebar {
  background: var(--sidebar);
  border: 0;
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.admin-logo { gap: 12px; margin: 0 6px 36px; }
.admin-logo strong { color: #f4f8fc; font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.admin-logo span { color: #a3b2c4; font-size: 11px; margin-top: 5px; }
.admin-logo .brand-icon { background: #5b50e8; }
.nav-caption { color: #99a8bb; font-size: 11px; letter-spacing: 1px; padding-left: 14px; margin-bottom: 12px; }
.admin-nav { gap: 7px; }
.admin-nav button, .admin-nav a {
  color: #becada;
  min-height: 46px;
  gap: 12px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 450;
  border: 1px solid transparent;
  border-radius: 10px;
}
.admin-nav button .ui-icon, .admin-nav a .ui-icon { color: #97aabd; width: 18px; height: 18px; flex-basis: 18px; }
.admin-nav button.active { color: #e0ddff; background: #35315e; border-color: #514881; font-weight: 550; }
.admin-nav button.active .ui-icon { color: #bdb3ff; }
.admin-nav button:hover, .admin-nav a:hover { background: #203148; color: #fff; }
.admin-nav button.active:hover { background: #433a76; }
.admin-nav a { margin-top: 17px; border-top: 1px solid #2b3a4f; border-radius: 0; padding-top: 18px; min-height: 62px; }
.sidebar-note { color: #a0b0c2; font-size: 11px; line-height: 1.9; margin-top: auto; padding: 22px 12px 0; }
.sidebar-status { display: block; color: #d1e1ee; font-size: 12px; margin-bottom: 7px; font-weight: 500; }
.sidebar-status::before { content:""; display:inline-block; width:6px; height:6px; background:#a699ff; border-radius:50%; margin-right:8px; vertical-align:middle; }
.admin-main { padding: 28px 36px 48px; max-width: 1500px; width: 100%; margin: 0 auto; }
.admin-topbar { min-height: 80px; align-items: center; margin-bottom: 22px; }
.workspace-path { font-size: 12px; color: #68798c; margin-bottom: 9px; }
.workspace-path span { padding: 0 9px; color: #a0abba; }
.admin-topbar h1 { font-size: 25px; font-weight: 650; letter-spacing: -.5px; }
.admin-topbar p { font-size: 12px; margin-top: 6px; }
.admin-topbar .ghost-btn { background: var(--text); border-color: var(--text); color: #fff; padding: 0 20px; min-height: 44px; }
.admin-topbar .ghost-btn:hover { background: #304760; }
.status-note { border-color: #e2ddf6; border-left: 3px solid #b5a8ed; border-radius: 10px; background: #f3f0fc; padding: 12px 16px; font-size: 12px; color: #625880; line-height: 1.7; margin-bottom: 26px; }
.overview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.overview-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.overview-head span { color: var(--muted); font-size: 12px; }
.admin-stats { margin: 22px 0; gap: 14px; }
.admin-stats>div { padding: 20px; border: 1px solid #e5ebf1; border-radius: 12px; background: #f7f9fb; }
.admin-stats strong { font-size: 25px; font-weight: 600; letter-spacing: -.65px; line-height: 1.4; }
.admin-stats span { font-size: 12px; margin-top: 9px; }
.overview-stats { margin: 0 0 26px; }
.overview-stats>div { background: #fff; box-shadow: var(--shadow); position: relative; }
.overview-stats>div:nth-child(2) { background: #f0edff; border-color: #ded8fa; }
.overview-stats>div::before { content:""; display:block; width:20px; height:3px; border-radius:2px; background:#dbe4ed; margin-bottom:14px; }
.overview-stats>div:nth-child(2)::before { background:#5b50e8; }
.admin-card { padding: 26px; margin-bottom: 22px; background: #fff; border-color: var(--line); border-radius: 14px; }
.admin-card h2 { font-size: 17px; font-weight: 650; }
.section-head { margin-bottom: 22px; gap: 18px; }
.section-head p { font-size: 12px; margin-top: 7px; }
.admin-card label { font-size: 12px; font-weight: 550; color: #44556b; }
.admin-card label input, .admin-card label select { margin-top: 8px; }
.admin-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
#uploadForm .admin-filter-grid { grid-template-columns: 1fr 1fr; }
#uploadForm .admin-filter-grid>div:empty { display: none; }
.tag { background: #f0edff; border: 1px solid #ded8fa; border-radius: 6px; font-weight: 500; color: #6650a5; padding: 4px 9px; }
.tag-neutral { background: #f1f4f7; border-color: #e1e7ed; color: #667589; }
.upload-box { border: 1px dashed #c9c3ed; border-radius: 12px; background: #faf9ff; padding: 22px; margin-top: 22px; }
.upload-box label { font-size: 13px; font-weight: 600; }
.upload-box input[type=file] { margin-top: 12px; max-width: 670px; }
.small-note { color: #64778b; font-size: 12px; line-height: 1.8; }
.checkbox-label { gap: 10px; margin: 20px 0; font-size: 12px!important; }
.checkbox-label input { width: 18px; height: 18px; }
.simple-row { padding: 16px 2px; gap: 18px; }
.simple-row strong { font-size: 13px; font-weight: 600; }
.simple-row span { font-size: 12px; line-height: 1.65; }
.simple-row:last-child { border-bottom: 0; }
.table-wrap { border-radius: 10px; border-color: #e4eaf0; }
table { font-size: 13px; }
th { background: #f5f8fa; color: #65768b; font-size: 12px; font-weight: 500; }
th, td { padding: 16px; border-color: #edf1f5; }
td.account-cell strong { font-weight: 550; font-size: 13px; }
td.account-cell code { font-size: 11px; color: #60748a; }
td .money { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #f8f7ff; }
td .ghost-btn { font-size: 12px; padding: 0 12px; height: 34px; }
.trend-track { height: 12px; border-radius: 6px; background: #eeecfb; }
.trend-bar { border-radius: 6px; }
.auth-dialog { border-radius: 18px; padding: 30px; box-shadow: 0 20px 80px rgba(15,35,53,.18); }
.auth-dialog h2 { font-size: 22px; font-weight: 600; }
.auth-dialog::backdrop { background: rgba(13,29,46,.4); }
.preview-box { background: #f4f1ff; border-color: #d8cff4; border-radius: 12px; }
.query-output .summary-card { min-height: 210px; }

@media(max-width:1100px) {
  .admin-body { grid-template-columns: 210px minmax(0,1fr); }
  .admin-sidebar { padding: 24px 14px; }
  .admin-main { padding: 24px; }
  .admin-stats { gap: 10px; }
  .admin-stats>div { padding: 16px; }
  .admin-stats strong { font-size: 22px; }
}
@media(max-width:900px) {
  .admin-body { grid-template-columns: minmax(0,1fr); }
  .admin-sidebar { height: auto; position: static; padding: 16px 20px; display: block; }
  .admin-logo { margin: 0 0 18px; }
  .nav-caption { display: none; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 7px; overflow: visible; padding: 0; }
  .admin-nav button, .admin-nav a { min-height: 44px; padding: 0 10px; gap: 7px; font-size: 12px; }
  .admin-nav a { margin: 0; border: 1px solid transparent; border-radius: 8px; padding-top: 0; }
  .sidebar-note { display: none; }
  .admin-main { padding: 24px; }
  .admin-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:720px) {
  .brand { padding: 16px; gap: 10px; flex-wrap: wrap; }
  .brand-title { font-size: 17px; }
  .brand-subtitle { font-size: 11px!important; }
  .brand-icon { width: 40px; height: 40px; border-radius: 10px; }
  .header-link { font-size: 11px; padding: 7px 9px; }
  .header-link .ui-icon { display: none; }
  .shell { padding: 22px 14px 36px; }
  .panel { padding: 22px; margin-bottom: 18px; }
  .panel-head { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .query-panel h1 { font-size: 21px; }
  .query-security { display: none; }
  .query-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .query-grid input { font-size: 16px; }
  .quick-row { gap: 8px; }
  .quick-row button { min-height: 44px; padding: 9px 12px; }
  .summary-card { padding: 24px; flex-direction: column; gap: 24px; margin-bottom: 18px; }
  .summary-money { font-size: 44px; }
  .summary-side { border-left: 0; border-top: 1px solid #d6ddf3; padding: 18px 0 0; width: 100%; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .summary-mini strong { font-size: 23px; }
  .day-badge { justify-self: start; grid-column: 1 / -1; }
  .day-main { gap: 9px; }
  .day-money { gap: 6px; font-size: 13px; }
  .show-summary { padding: 12px 6px; }
  .show-name { max-width: 60%; }
  .show-meta { font-size: 11px; }
  .video-list { margin-left: 0; }
  .video-row { padding: 12px; }
  .admin-sidebar { padding: 18px 14px 14px; }
  .admin-logo { margin: 0 4px 18px; }
  .admin-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-nav button, .admin-nav a { justify-content: center; padding: 8px 4px; min-height: 44px; gap: 5px; font-size: 11px; }
  .admin-nav .ui-icon { width: 15px; height: 15px; flex-basis: 15px; }
  .admin-main { padding: 22px 14px 36px; }
  .admin-topbar { margin-bottom: 20px; gap: 10px; }
  .admin-topbar h1 { font-size: 23px; }
  .workspace-path { font-size: 10px; }
  .admin-topbar .ghost-btn { font-size: 12px; padding: 0 13px; }
  .admin-topbar p { font-size: 11px; }
  .status-note { padding: 12px; font-size: 11px; margin-bottom: 22px; }
  .overview-head { flex-direction: column; align-items: flex-start; gap: 5px; }
  .overview-head span { font-size: 11px; }
  .overview-stats { gap: 10px; margin-bottom: 22px; }
  .admin-stats>div { padding: 16px; }
  .admin-stats strong { font-size: 21px; }
  .admin-stats span { font-size: 11px; }
  .admin-card { padding: 20px; border-radius: 13px; margin-bottom: 18px; }
  .admin-filter-grid, #uploadForm .admin-filter-grid { grid-template-columns: minmax(0,1fr); }
  .admin-filter-grid input, .admin-filter-grid select { font-size: 16px; }
  .upload-box { padding: 16px; margin-top: 18px; }
  .upload-box input[type=file] { font-size: 12px; max-width: 100%; }
  input[type=file]::file-selector-button { padding: 8px 10px; margin-right: 7px; }
  .section-head { gap: 10px; }
  .section-head p { font-size: 11px; }
  .tag { font-size: 10px; padding: 4px 7px; }
  .ghost-btn { min-height: 44px; }
  .row-actions { gap: 6px; }
  td .ghost-btn { min-height: 44px; }
  .simple-row { gap: 10px; }
  .simple-row strong { font-size: 12px; }
  .simple-row span { font-size: 11px; }
  .auth-dialog { padding: 24px; }
  .auth-dialog input { font-size: 16px; }
}
