:root {
  --wine: #3d2b10;
  --wine-2: #9a6d18;
  --wine-3: #d5a747;
  --gold: #c99731;
  --gold-light: #f7de9d;
  --cream: #fffaf0;
  --paper: #fffdf8;
  --ink: #23180d;
  --muted: #7a6750;
  --line: #ead9c0;
  --green: #2b916a;
  --red: #b43f54;
  --shadow: 0 18px 50px rgba(110, 79, 16, .10);
  --serif: "STSong", "Songti SC", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--sans); background: #f5f0e9; }
body.dark { color: var(--cream); background: radial-gradient(circle at 14% 0%, rgba(241, 210, 130, .26), transparent 26%), linear-gradient(135deg, #1e1307, #45310f 55%, #170f05); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.topbar { position: sticky; top: 14px; z-index: 20; width: min(1380px, calc(100% - 36px)); margin: 14px auto 0; display: flex; align-items: center; gap: 22px; padding: 12px 16px; border: 1px solid rgba(217, 168, 79, .26); border-radius: 18px; color: var(--cream); background: rgba(39, 26, 9, .92); box-shadow: 0 14px 40px rgba(73, 45, 10, .18); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 235px; }
.brand img { width: 42px; height: 42px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(255, 240, 201, .72); background: rgba(255, 248, 228, .08); }
.brand strong { display: block; letter-spacing: .08em; font-size: 15px; }
.brand small { display: block; margin-top: 3px; color: #cdb5ad; font-size: 10px; letter-spacing: .12em; }
.nav { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; }
.nav a, .nav button { border: 0; border-radius: 999px; padding: 9px 12px; color: #decac3; background: transparent; font-size: 13px; }
.nav a:hover, .nav button:hover, .nav a.active { color: #fff3c9; background: rgba(255,255,255,.10); }
.top-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.status { padding: 8px 10px; border: 1px solid rgba(217,168,79,.26); border-radius: 999px; color: #f6dd9f; font-size: 12px; white-space: nowrap; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #67d49c; box-shadow: 0 0 12px #67d49c; }

.container { width: min(1380px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 72px; }
.container.narrow { width: min(1020px, calc(100% - 36px)); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid rgba(217,168,79,.35); border-radius: 999px; color: var(--gold); background: rgba(217,168,79,.08); font-size: 12px; letter-spacing: .06em; }
.eyebrow::before { content: "✦"; }
h1, h2, h3 { margin: 0; font-family: var(--serif); }
h1 { font-size: clamp(34px, 5vw, 68px); line-height: 1.05; letter-spacing: -.04em; }
h2 { font-size: 25px; }
h3 { font-size: 17px; }
.lede { color: var(--muted); line-height: 1.85; }
body.dark .lede { color: #d5bfc0; }
.muted { color: var(--muted); font-size: 13px; }
body.dark .muted { color: #cfb7b7; }

.hero { display: grid; grid-template-columns: 1.04fr .96fr; gap: 22px; align-items: stretch; margin-top: 24px; }
.hero-card { position: relative; overflow: hidden; padding: 54px 48px; border-radius: 28px; color: var(--cream); background: linear-gradient(135deg, #2c1b08, #8d6819 55%, #4b2f09); box-shadow: 0 28px 70px rgba(84, 55, 13, .24); }
.hero-card::after { content: "HQ"; position: absolute; right: -15px; bottom: -54px; color: rgba(255, 241, 190, .08); font: 240px/1 var(--serif); writing-mode: vertical-rl; pointer-events: none; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h1 { margin: 24px 0 18px; }
.hero-card h1 span { color: var(--gold-light); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-visual { position: relative; overflow: hidden; min-height: 390px; padding: 28px; border-radius: 28px; background: linear-gradient(145deg, #fffaf1, #ead8c3); box-shadow: var(--shadow); }
.hero-visual::before { content: ""; position: absolute; width: 260px; height: 260px; top: -80px; right: -80px; border-radius: 50%; background: rgba(217, 168, 79, .14); }
.visual-mark { position: absolute; right: 30px; bottom: 24px; width: 170px; height: 170px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(90,18,40,.16); color: var(--wine-2); font: 62px var(--serif); transform: rotate(-10deg); }
.visual-panel { position: relative; z-index: 1; width: 78%; padding: 22px; border: 1px solid rgba(90,18,40,.13); border-radius: 18px; background: rgba(255,255,255,.68); box-shadow: 0 16px 40px rgba(90, 18, 40, .10); }
.visual-panel strong { display: block; color: var(--wine-2); font: 22px var(--serif); }
.visual-panel p { margin: 12px 0 0; color: #80676a; line-height: 1.75; font-size: 13px; }
.visual-row { display: flex; gap: 8px; margin-top: 18px; }
.visual-chip { padding: 8px 10px; border-radius: 999px; color: #6b2440; background: #f3dfbd; font-size: 11px; }

.card { border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: var(--shadow); }
body.dark .card { border-color: rgba(217,168,79,.22); color: var(--cream); background: linear-gradient(145deg, rgba(81, 17, 39, .88), rgba(40, 7, 18, .88)); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
body.dark .card-head { border-color: rgba(255,255,255,.10); }
.card-body { padding: 20px 21px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { min-height: 126px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); box-shadow: var(--shadow); }
body.dark .metric { border-color: rgba(217,168,79,.20); background: rgba(83, 16, 38, .64); }
.metric small { display: block; color: var(--muted); font-size: 12px; }
body.dark .metric small { color: #d0babb; }
.metric b { display: block; margin-top: 12px; color: var(--wine-2); font: 800 32px/1 var(--serif); }
body.dark .metric b { color: var(--gold-light); }
.metric span { display: block; margin-top: 8px; color: var(--green); font-size: 12px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 32px 0 15px; }
.section-head p { margin: 7px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 9px 14px; border: 1px solid #d9c6b9; border-radius: 10px; color: #612235; background: #fffaf4; transition: .18s ease; font-size: 13px; }
.btn:hover { transform: translateY(-1px); border-color: #ad7659; box-shadow: 0 8px 18px rgba(77, 23, 35, .08); }
.btn.primary { border-color: #b88a28; color: #fff7e3; background: linear-gradient(135deg, #7d5a10, #e0b456); }
.btn.gold { border-color: #c99740; color: #43200e; background: linear-gradient(135deg, #fff1bf, #d6a23d); }
.btn.danger { color: var(--red); border-color: #e3b8bb; background: #fff4f3; }
.btn.ghost { color: inherit; background: transparent; }
.btn.small { min-height: 33px; padding: 7px 10px; font-size: 12px; }
.btn.wide { width: 100%; }

.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: 12px; }
body.dark .field label { color: #d6bfc0; }
.field input, .field textarea, .field select, .search { width: 100%; padding: 11px 12px; border: 1px solid #dccbc1; border-radius: 10px; outline: none; color: var(--ink); background: #fffdfa; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus, .search:focus { border-color: #a66b51; box-shadow: 0 0 0 3px rgba(166,107,81,.10); }
.checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #e4d6cc; border-radius: 9px; color: #634852; background: #fffaf5; font-size: 12px; }
.check input { accent-color: var(--wine-2); }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 18% 5%, rgba(242, 214, 138, .22), transparent 30%), linear-gradient(135deg, #20140a, #4d3310 55%, #150e05); }
.login-box { display: grid; grid-template-columns: 1.05fr .95fr; width: min(1060px, 100%); overflow: hidden; border: 1px solid rgba(231, 191, 104, .30); border-radius: 27px; background: rgba(43, 29, 10, .90); box-shadow: 0 30px 90px rgba(24, 13, 3, .32); }
.login-intro { padding: 52px 46px; color: var(--cream); background: linear-gradient(145deg, rgba(179, 134, 38, .28), rgba(58, 39, 11, .70)); }
.login-intro img { width: 66px; height: 66px; border-radius: 18px; border: 1px solid rgba(255,240,201,.72); background: rgba(255, 248, 228, .08); }
.login-intro h1 { margin-top: 28px; font-size: 45px; }
.login-intro h1 span { color: var(--gold-light); }
.login-intro p { max-width: 470px; color: #d7c1c0; line-height: 1.9; }
.login-points { display: grid; gap: 12px; margin-top: 30px; color: #ecd6cf; font-size: 13px; }
.login-points span::before { content: "✓"; display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: 8px; border-radius: 50%; color: #4c1d19; background: var(--gold-light); font-weight: 900; }
.login-form { padding: 52px 46px; color: var(--cream); background: rgba(21, 14, 5, .52); }
.login-form h2 { margin: 11px 0 8px; font-size: 31px; }
.login-form .intro { color: #cdb4b5; line-height: 1.7; font-size: 13px; }
.login-form .field label { color: #d8c0c2; }
.login-form .field input, .login-form .field select { border-color: rgba(255,255,255,.14); color: var(--cream); background: rgba(255,255,255,.08); }
.login-form .field input::placeholder { color: #af9298; }
.login-error { min-height: 22px; color: #ffb1a8; font-size: 12px; }
.demo { margin: 14px 0 18px; padding: 11px 12px; border: 1px solid rgba(217,168,79,.25); border-radius: 10px; color: #e9d5b5; background: rgba(217,168,79,.08); font-size: 12px; line-height: 1.7; }
.login-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: #d5b9b8; font-size: 12px; }
.login-links a { color: var(--gold-light); }

.portal { min-height: 100vh; padding: 28px max(18px, 4vw) 80px; background: radial-gradient(circle at 8% 0%, rgba(242, 214, 138, .18), transparent 27%), linear-gradient(135deg, #1b1207, #4d3510 47%, #1b1207); color: var(--cream); }
.portal-inner { width: min(1240px, 100%); margin: auto; }
.portal-brand { display: flex; align-items: center; gap: 13px; }
.portal-brand img { width: 54px; height: 54px; border-radius: 16px; border: 1px solid rgba(255,240,201,.72); background: rgba(255, 248, 228, .08); }
.portal-brand strong { display: block; font-size: 18px; letter-spacing: .08em; }
.portal-brand small { display: block; margin-top: 4px; color: #ecd7a6; font-size: 11px; letter-spacing: .12em; }
.portal-hero { max-width: 820px; margin: 70px 0 30px; }
.portal-hero h1 { margin-top: 22px; }
.portal-hero h1 span { color: var(--gold-light); }
.portal-hero p { max-width: 720px; color: #d3babb; line-height: 1.9; }
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.entry { position: relative; overflow: hidden; min-height: 220px; padding: 30px; border: 1px solid rgba(217,168,79,.22); border-radius: 22px; color: var(--cream); background: linear-gradient(145deg, rgba(96,20,45,.82), rgba(45,7,20,.86)); box-shadow: 0 22px 55px rgba(11,1,6,.24); }
.entry:hover { transform: translateY(-3px); border-color: rgba(245,216,152,.48); }
.entry .number { color: var(--gold-light); font: 33px var(--serif); }
.entry h2 { margin-top: 14px; }
.entry p { color: #d3bab9; line-height: 1.75; font-size: 13px; }
.entry em { display: inline-block; margin-top: 12px; color: var(--gold-light); font-size: 12px; font-style: normal; }
.portal-note { margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(217,168,79,.19); border-radius: 14px; color: #d8c2bb; background: rgba(255,255,255,.05); font-size: 12px; line-height: 1.7; }

.app-layout { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 15px; color: var(--cream); background: linear-gradient(165deg, #221507, #533711 58%, #2b1b09); }
.sidebar .brand { padding: 2px 8px 26px; }
.sidebar .nav-label { padding: 10px 11px; color: #cbaeb0; font-size: 10px; letter-spacing: .15em; }
.sidebar .nav { display: grid; gap: 4px; }
.sidebar .nav button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 10px; padding: 11px; color: #e6d3d1; background: transparent; text-align: left; }
.sidebar .nav button.active, .sidebar .nav button:hover { color: #fff5dc; background: rgba(255, 244, 208, .16); }
.sidebar .nav button::before { content: ""; width: 7px; height: 7px; border: 1px solid var(--gold-light); border-radius: 50%; }
.side-user { position: absolute; right: 15px; bottom: 18px; left: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.12); color: #d9c3c1; font-size: 12px; line-height: 1.7; }
.side-user strong { display: block; color: #fff4dd; font-size: 14px; }
.main { min-width: 0; padding: 30px clamp(20px, 4vw, 58px) 60px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 24px; }
.page-head h1 { color: var(--wine-2); font-size: clamp(34px,4vw,51px); }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.view { display: none; }
.view.active { display: block; }
.agent-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.agent-card + .agent-card { margin-top: 10px; }
.agent-card-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.agent-card-main img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; border: 1px solid #d6b98b; }
.agent-card-main strong { display: block; color: var(--wine-2); }
.agent-card-main small { display: block; margin-top: 4px; color: var(--muted); }
.agent-card-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; color: var(--green); background: #e7f6ed; font-size: 11px; }
.pill.off { color: var(--red); background: #ffeaeb; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; min-width: 680px; border-collapse: collapse; background: var(--paper); }
th, td { padding: 12px 13px; border-bottom: 1px solid #efe2d8; text-align: left; vertical-align: top; font-size: 12px; }
th { color: #866d72; background: #fbf4ec; font-size: 11px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.statline { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.statline span { padding: 8px 10px; border-radius: 9px; color: #6f5159; background: #f7ede3; font-size: 12px; }
.empty { padding: 30px 15px; text-align: center; color: var(--muted); font-size: 13px; }
.notice { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: 380px; padding: 12px 15px; border: 1px solid #e2c38b; border-radius: 11px; color: #5b3519; background: #fff3cc; box-shadow: 0 16px 40px rgba(71, 30, 9, .18); font-size: 13px; }
.chat-layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(310px,.7fr); gap: 18px; }
.chat-card { overflow: hidden; }
.chat-input { min-height: 125px !important; }
.answer { min-height: 280px; color: #4d333a; line-height: 1.9; white-space: pre-wrap; }
.answer p { margin: 0 0 12px; }
.answer .source { display: inline-block; margin-bottom: 12px; padding: 5px 8px; border-radius: 999px; color: #6f4d21; background: #f8e9c4; font-size: 11px; line-height: 1; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.tabs button { border: 1px solid #e0cec4; border-radius: 999px; padding: 8px 11px; color: #7e5f68; background: #fffaf5; font-size: 12px; }
.tabs button.active { border-color: var(--wine-2); color: #fff7e4; background: var(--wine-2); }
.quick-list { display: grid; gap: 8px; }
.quick-item { width: 100%; padding: 11px 12px; border: 1px solid #ebddd4; border-radius: 10px; color: #5f3e48; background: #fffaf6; text-align: left; font-size: 12px; line-height: 1.6; }
.quick-item:hover { border-color: #b77b60; }
.progress { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #f0e4d9; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--wine-2), var(--gold)); }
.modal-backdrop { position: fixed; inset: 0; z-index: 40; display: none; place-items: center; padding: 20px; background: rgba(25, 3, 11, .52); }
.modal-backdrop.open { display: grid; }
.modal { width: min(620px, 100%); max-height: min(86vh, 780px); overflow: auto; padding: 23px; border: 1px solid #ead6c6; border-radius: 18px; background: #fffaf4; box-shadow: 0 30px 80px rgba(24, 5, 12, .25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 50%; color: #7b5b63; background: #f2e5d8; }
.modal-actions { display: flex; justify-content: end; gap: 9px; margin-top: 18px; }
.file-box { padding: 15px; border: 1px dashed #d3b49e; border-radius: 12px; color: #80646a; background: #fffaf4; font-size: 12px; line-height: 1.7; }
.file-box input { max-width: 100%; }
.footer { margin-top: 34px; color: var(--muted); text-align: center; font-size: 12px; }

@media (max-width: 980px) {
  .hero, .login-box, .chat-layout { grid-template-columns: 1fr; }
  .hero-visual { min-height: 260px; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 13px 15px; }
  .sidebar .brand { padding-bottom: 12px; }
  .sidebar .nav { display: flex; overflow-x: auto; }
  .sidebar .nav-label, .side-user { display: none; }
  .sidebar .nav button { white-space: nowrap; }
}
@media (max-width: 700px) {
  .topbar { width: calc(100% - 20px); flex-wrap: wrap; top: 5px; margin-top: 5px; }
  .top-actions { width: 100%; margin-left: 0; justify-content: space-between; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .container, .container.narrow { width: calc(100% - 24px); padding-top: 23px; }
  .grid-2, .grid-3, .grid-4, .entry-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 38px 24px; }
  .login-intro, .login-form { padding: 35px 25px; }
  .login-intro h1 { font-size: 37px; }
  .page-head { align-items: start; flex-direction: column; }
  .main { padding: 22px 12px 45px; }
  .agent-card { align-items: start; flex-direction: column; }
  .agent-card-actions { justify-content: start; }
}

body.dark[data-theme="gold-premium"] {
  background: radial-gradient(circle at 14% 0%, rgba(241, 210, 130, .26), transparent 26%), linear-gradient(135deg, #1e1307, #45310f 55%, #170f05);
}
body.dark[data-theme="champagne-gold"] {
  background: radial-gradient(circle at 12% 0%, rgba(255, 244, 211, .50), transparent 28%), linear-gradient(135deg, #fffbf0, #f0ddb3 55%, #e7c981);
}
body.dark[data-theme="midnight-gold"] {
  background: radial-gradient(circle at 12% 0%, rgba(248, 208, 115, .18), transparent 28%), linear-gradient(135deg, #120b05, #271806 55%, #100a04);
}
body.dark[data-theme="champagne-gold"] .topbar {
  color: #4d3411;
  background: rgba(255, 250, 238, .92);
  border-color: rgba(201, 150, 47, .18);
}
body.dark[data-theme="champagne-gold"] .hero-card,
body.dark[data-theme="champagne-gold"] .login-box,
body.dark[data-theme="champagne-gold"] .login-intro,
body.dark[data-theme="champagne-gold"] .login-form,
body.dark[data-theme="champagne-gold"] .portal,
body.dark[data-theme="champagne-gold"] .sidebar {
  color: #3c2a10;
}
body.dark[data-theme="champagne-gold"] .hero-card {
  background: linear-gradient(135deg, #fff6df, #e8bd65 55%, #d39b2c);
}
body.dark[data-theme="champagne-gold"] .login-shell {
  background: radial-gradient(circle at 18% 5%, rgba(255, 239, 189, .55), transparent 30%), linear-gradient(135deg, #fffdf8, #f0e0b3 55%, #dfbc6d);
}
body.dark[data-theme="champagne-gold"] .login-box {
  background: rgba(255, 250, 242, .92);
}
body.dark[data-theme="champagne-gold"] .login-intro,
body.dark[data-theme="champagne-gold"] .portal,
body.dark[data-theme="champagne-gold"] .sidebar {
  background: linear-gradient(135deg, rgba(255, 247, 220, .92), rgba(242, 213, 140, .90));
}
body.dark[data-theme="champagne-gold"] .login-form {
  background: rgba(255, 252, 246, .90);
}
body.dark[data-theme="champagne-gold"] .portal-brand small,
body.dark[data-theme="champagne-gold"] .login-form .intro,
body.dark[data-theme="champagne-gold"] .login-intro p,
body.dark[data-theme="champagne-gold"] .portal-hero p {
  color: #6a5430;
}
body.dark[data-theme="champagne-gold"] .btn.primary {
  color: #fffdf7;
  background: linear-gradient(135deg, #a6761c, #e3b858);
}
body.dark[data-theme="midnight-gold"] .topbar,
body.dark[data-theme="midnight-gold"] .login-box {
  background: rgba(22, 15, 7, .92);
}
body.dark[data-theme="midnight-gold"] .hero-card {
  background: linear-gradient(135deg, #1f1407, #6a4c11 55%, #2e1d08);
}
body.dark[data-theme="midnight-gold"] .login-shell,
body.dark[data-theme="midnight-gold"] .portal,
body.dark[data-theme="midnight-gold"] .sidebar {
  background: linear-gradient(135deg, #120b05, #2e1d08 55%, #140d05);
}


body.dark[data-theme="gold-premium"] {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 236, 171, .34), transparent 22%),
    radial-gradient(circle at 85% 2%, rgba(217, 168, 79, .25), transparent 18%),
    radial-gradient(circle at 52% 108%, rgba(108, 72, 18, .28), transparent 26%),
    linear-gradient(135deg, #0f0b05, #24180a 48%, #120d07);
}
body.dark[data-theme="gold-premium"] .topbar,
body.dark[data-theme="gold-premium"] .sidebar,
body.dark[data-theme="gold-premium"] .portal,
body.dark[data-theme="gold-premium"] .login-box {
  color: #fff7de;
  border-color: rgba(255, 225, 146, .28);
  background: linear-gradient(145deg, rgba(33, 23, 11, .96), rgba(60, 40, 15, .92));
  box-shadow: 0 30px 90px rgba(18, 10, 4, .42);
}
body.dark[data-theme="gold-premium"] .brand small,
body.dark[data-theme="gold-premium"] .portal-brand small,
body.dark[data-theme="gold-premium"] .login-form .intro,
body.dark[data-theme="gold-premium"] .login-intro p,
body.dark[data-theme="gold-premium"] .portal-hero p,
body.dark[data-theme="gold-premium"] .muted,
body.dark[data-theme="gold-premium"] .lede {
  color: #e7d0a0;
}
body.dark[data-theme="gold-premium"] .hero-card {
  background: linear-gradient(135deg, #6e4a10, #dfb24f 42%, #9f6d18 72%, #2e1d08);
  box-shadow: 0 32px 90px rgba(123, 82, 21, .34);
}
body.dark[data-theme="gold-premium"] .hero-card::after { color: rgba(255, 242, 193, .09); }
body.dark[data-theme="gold-premium"] .hero-visual,
body.dark[data-theme="gold-premium"] .entry,
body.dark[data-theme="gold-premium"] .card,
body.dark[data-theme="gold-premium"] .metric,
body.dark[data-theme="gold-premium"] .agent-card,
body.dark[data-theme="gold-premium"] .table-wrap,
body.dark[data-theme="gold-premium"] .modal {
  color: #f8efd1;
  border-color: rgba(248, 209, 117, .20);
  background: linear-gradient(145deg, rgba(24, 17, 9, .96), rgba(13, 9, 5, .96));
  box-shadow: 0 24px 70px rgba(12, 7, 3, .34);
}
body.dark[data-theme="gold-premium"] .hero-visual::before { background: rgba(255, 223, 146, .18); }
body.dark[data-theme="gold-premium"] .visual-panel {
  border-color: rgba(255, 231, 167, .22);
  color: #4f3512;
  background: rgba(255, 246, 220, .92);
}
body.dark[data-theme="gold-premium"] .visual-panel strong { color: #8e6014; }
body.dark[data-theme="gold-premium"] .visual-panel p { color: #6d5120; }
body.dark[data-theme="gold-premium"] .visual-chip {
  color: #6a4711;
  background: #f5dfb0;
}
body.dark[data-theme="gold-premium"] .section-head p,
body.dark[data-theme="gold-premium"] .agent-card-main small,
body.dark[data-theme="gold-premium"] .empty,
body.dark[data-theme="gold-premium"] .footer { color: #dcbc82; }
body.dark[data-theme="gold-premium"] .status,
body.dark[data-theme="gold-premium"] .eyebrow {
  color: #ffe6a5;
  border-color: rgba(255, 225, 146, .30);
  background: rgba(255, 229, 162, .08);
}
body.dark[data-theme="gold-premium"] .nav a,
body.dark[data-theme="gold-premium"] .nav button,
body.dark[data-theme="gold-premium"] .sidebar .nav button {
  color: #e9d4a0;
}
body.dark[data-theme="gold-premium"] .nav a:hover,
body.dark[data-theme="gold-premium"] .nav button:hover,
body.dark[data-theme="gold-premium"] .nav a.active,
body.dark[data-theme="gold-premium"] .sidebar .nav button.active,
body.dark[data-theme="gold-premium"] .sidebar .nav button:hover {
  color: #fff8de;
  background: rgba(255, 229, 162, .14);
}
body.dark[data-theme="gold-premium"] .sidebar .nav button::before { border-color: #f2d78c; }
body.dark[data-theme="gold-premium"] .side-user { color: #e5cf9b; }
body.dark[data-theme="gold-premium"] .side-user strong,
body.dark[data-theme="gold-premium"] .agent-card-main strong,
body.dark[data-theme="gold-premium"] .metric b,
body.dark[data-theme="gold-premium"] th,
body.dark[data-theme="gold-premium"] .entry h2,
body.dark[data-theme="gold-premium"] .login-intro h1 span,
body.dark[data-theme="gold-premium"] .portal-hero h1 span,
body.dark[data-theme="gold-premium"] .hero-card h1 span,
body.dark[data-theme="gold-premium"] .login-links a,
body.dark[data-theme="gold-premium"] .entry em {
  color: #ffe8a8;
}
body.dark[data-theme="gold-premium"] .btn {
  border-color: rgba(255, 225, 146, .32);
  color: #2d1b06;
  background: linear-gradient(135deg, #fff8e7, #ead19a);
  box-shadow: 0 12px 28px rgba(96, 63, 12, .18);
}
body.dark[data-theme="gold-premium"] .btn:hover {
  border-color: rgba(255, 233, 172, .48);
  box-shadow: 0 16px 34px rgba(96, 63, 12, .24);
}
body.dark[data-theme="gold-premium"] .btn.primary,
body.dark[data-theme="gold-premium"] .btn.gold {
  color: #2a1806;
  border-color: #f1dc9d;
  background: linear-gradient(135deg, #fff5ca, #e2ba63 44%, #c98f27);
  box-shadow: 0 14px 32px rgba(155, 110, 25, .24);
}
body.dark[data-theme="gold-premium"] .btn.ghost {
  color: #f6e3b4;
  background: transparent;
  box-shadow: none;
}
body.dark[data-theme="gold-premium"] .btn.danger {
  color: #ffcdc5;
  border-color: rgba(255, 178, 171, .28);
  background: rgba(117, 39, 39, .26);
}
body.dark[data-theme="gold-premium"] .field label,
body.dark[data-theme="gold-premium"] .check,
body.dark[data-theme="gold-premium"] .demo,
body.dark[data-theme="gold-premium"] .file-box,
body.dark[data-theme="gold-premium"] .portal-note,
body.dark[data-theme="gold-premium"] .statline span,
body.dark[data-theme="gold-premium"] .pill,
body.dark[data-theme="gold-premium"] .pill.off,
body.dark[data-theme="gold-premium"] .notice {
  border-color: rgba(255, 226, 157, .24);
}
body.dark[data-theme="gold-premium"] .field input,
body.dark[data-theme="gold-premium"] .field textarea,
body.dark[data-theme="gold-premium"] .field select,
body.dark[data-theme="gold-premium"] .search {
  color: #2a1a08;
  border-color: #d7b97b;
  background: rgba(255, 248, 232, .96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34);
}
body.dark[data-theme="gold-premium"] .field input::placeholder,
body.dark[data-theme="gold-premium"] .field textarea::placeholder { color: #8a6b35; }
body.dark[data-theme="gold-premium"] .field input:focus,
body.dark[data-theme="gold-premium"] .field textarea:focus,
body.dark[data-theme="gold-premium"] .field select:focus,
body.dark[data-theme="gold-premium"] .search:focus {
  border-color: #c58c24;
  box-shadow: 0 0 0 3px rgba(197, 140, 36, .16);
}
body.dark[data-theme="gold-premium"] .login-shell {
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 244, 205, .68), transparent 24%),
    radial-gradient(circle at 83% 0%, rgba(228, 182, 78, .34), transparent 18%),
    linear-gradient(135deg, #120d06 0%, #2d1e08 34%, #f5e5b7 100%);
}
body.dark[data-theme="gold-premium"] .login-box {
  background: linear-gradient(135deg, rgba(35, 24, 11, .96) 0%, rgba(255, 252, 244, .94) 52%, rgba(242, 220, 165, .98) 100%);
  border-color: rgba(255, 226, 157, .46);
  box-shadow: 0 32px 96px rgba(20, 12, 4, .44);
}
body.dark[data-theme="gold-premium"] .login-intro {
  background: linear-gradient(155deg, rgba(46, 31, 10, .98) 0%, rgba(102, 69, 18, .96) 48%, rgba(185, 135, 32, .92) 100%);
}
body.dark[data-theme="gold-premium"] .login-form {
  color: #2f1b08;
  background: linear-gradient(180deg, rgba(255, 253, 247, .98), rgba(248, 236, 203, .96));
}
body.dark[data-theme="gold-premium"] .login-form h2 { color: #9a6616; }
body.dark[data-theme="gold-premium"] .login-form .intro { color: #6e5830; }
body.dark[data-theme="gold-premium"] .login-form .field label { color: #705016; }
body.dark[data-theme="gold-premium"] .login-form .field input,
body.dark[data-theme="gold-premium"] .login-form .field select {
  color: #2f1b08;
  border-color: #d5b163;
  background: rgba(255, 255, 255, .94);
}
body.dark[data-theme="gold-premium"] .login-form .field input::placeholder { color: #927033; }
body.dark[data-theme="gold-premium"] .demo {
  color: #6f500f;
  border-color: rgba(196, 142, 36, .34);
  background: linear-gradient(135deg, rgba(255, 244, 201, .74), rgba(238, 200, 100, .28));
}
body.dark[data-theme="gold-premium"] .login-links { color: #7c5a19; }
body.dark[data-theme="gold-premium"] .login-links a { color: #b97d15; }
body.dark[data-theme="gold-premium"] .page-head h1 {
  color: #c98b19;
  text-shadow: 0 2px 16px rgba(255, 223, 138, .10);
}
body.dark[data-theme="gold-premium"] .login-intro img,
body.dark[data-theme="gold-premium"] .portal-brand img,
body.dark[data-theme="gold-premium"] .brand img,
body.dark[data-theme="gold-premium"] .agent-card-main img {
  border-color: rgba(255, 231, 167, .72);
  box-shadow: 0 10px 24px rgba(53, 34, 10, .22);
}
body.dark[data-theme="gold-premium"] .login-points,
body.dark[data-theme="gold-premium"] .login-links,
body.dark[data-theme="gold-premium"] .login-error { color: #efdbaf; }
body.dark[data-theme="gold-premium"] .login-points span::before {
  color: #2c1b08;
  background: #ffe08e;
}
body.dark[data-theme="gold-premium"] .portal {
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 232, 163, .16), transparent 22%),
    radial-gradient(circle at 86% 0%, rgba(198, 143, 37, .18), transparent 16%),
    linear-gradient(135deg, #130d06, #2a1c09 45%, #150f07);
}
body.dark[data-theme="gold-premium"] .entry {
  position: relative;
  background: linear-gradient(145deg, rgba(40, 28, 12, .96), rgba(18, 12, 7, .96));
}
body.dark[data-theme="gold-premium"] .entry:hover { border-color: rgba(255, 225, 146, .38); }
body.dark[data-theme="gold-premium"] .card-head,
body.dark[data-theme="gold-premium"] .modal-head {
  border-color: rgba(255, 225, 146, .14);
}
body.dark[data-theme="gold-premium"] .table-wrap {
  border-color: rgba(255, 225, 146, .16);
}
body.dark[data-theme="gold-premium"] table {
  background: rgba(18, 12, 7, .96);
}
body.dark[data-theme="gold-premium"] th,
body.dark[data-theme="gold-premium"] td {
  border-bottom-color: rgba(255, 225, 146, .10);
  color: #f8efd1;
}
body.dark[data-theme="gold-premium"] thead th {
  background: rgba(255, 231, 165, .07);
}
body.dark[data-theme="gold-premium"] tbody tr:hover { background: rgba(255, 229, 162, .06); }
body.dark[data-theme="gold-premium"] .pill { color: #6a470c; background: #ffe39a; }
body.dark[data-theme="gold-premium"] .pill.off { color: #ffd7d4; background: rgba(146, 54, 54, .30); }
body.dark[data-theme="gold-premium"] .statline span,
body.dark[data-theme="gold-premium"] .demo,
body.dark[data-theme="gold-premium"] .file-box,
body.dark[data-theme="gold-premium"] .portal-note {
  color: #edd6a4;
  background: rgba(255, 229, 162, .08);
}
body.dark[data-theme="gold-premium"] .notice {
  color: #3f250a;
  background: linear-gradient(135deg, #ffeaa8, #e7bf5f);
  box-shadow: 0 16px 40px rgba(80, 53, 12, .22);
}
body.dark[data-theme="gold-premium"] .modal-close {
  color: #3d2810;
  background: #ffe4a0;
}
body.dark[data-theme="gold-premium"] .footer,
body.dark[data-theme="gold-premium"] .empty {
  color: #cfb37a;
}
