:root {
  color-scheme: light;
  --ink: #0a1a14;
  --green: #1d9e75;
  --mint: #5dcaa5;
  --pale: #e3f5ef;
  --blue: #378add;
  --orange: #d85a30;
  --paper: #f1efe8;
  --line: #d7d3ca;
  --muted: #777a75;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(10, 26, 20, .08);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1080px; min-height: 100vh; color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.eyebrow { margin: 0; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .16em; }

.login-view { display: grid; min-height: 100vh; place-items: center; padding: 36px; background: radial-gradient(circle at 15% 10%, #176149 0, transparent 28%), var(--ink); }
.login-card { width: 430px; padding: 44px; background: var(--white); border-radius: 28px; box-shadow: 0 30px 90px rgba(0, 0, 0, .28); }
.brand-orbit { display: grid; width: 86px; height: 86px; margin-bottom: 26px; overflow: hidden; background: var(--green); border: 8px solid var(--pale); border-radius: 50%; place-items: center; }
.brand-orbit img { width: 100%; height: 100%; object-fit: cover; }
.login-card h1 { margin: 7px 0 8px; font-size: 34px; letter-spacing: -.04em; }
.login-copy { margin: 0 0 30px; color: var(--muted); line-height: 1.7; }
.login-card label { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; font-weight: 700; }
.login-card input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.login-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29, 158, 117, .13); }
.login-card button { width: 100%; height: 50px; margin-top: 24px; color: var(--white); font-weight: 800; background: var(--green); border: 0; border-radius: 12px; }
.form-error { min-height: 20px; margin: 10px 0 -10px; color: var(--orange); font-size: 13px; }

.app-view { display: grid; min-height: 100vh; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 28px 18px 20px; color: var(--white); background: var(--ink); }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { display: grid; width: 42px; height: 42px; overflow: hidden; background: var(--green); border: 2px solid rgba(255,255,255,.28); border-radius: 50%; place-items: center; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 15px; }
.sidebar-brand span { margin-top: 4px; color: rgba(255,255,255,.5); font-size: 11px; }
nav { display: grid; gap: 6px; margin-top: 26px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; color: rgba(255,255,255,.64); text-align: left; background: transparent; border: 0; border-radius: 12px; }
.nav-item span { display: grid; width: 30px; height: 30px; border: 1px solid currentColor; border-radius: 9px; place-items: center; }
.nav-item:hover, .nav-item.active { color: var(--white); background: rgba(93,202,165,.16); }
.nav-item.active span { color: var(--ink); background: var(--mint); border-color: var(--mint); }
.logout-button { margin-top: auto; padding: 11px; color: rgba(255,255,255,.65); background: transparent; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; }

.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 112px; padding: 0 38px; background: rgba(241,239,232,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar h2 { margin: 6px 0 0; font-size: 29px; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.status-pill { padding: 7px 11px; color: var(--muted); font-size: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.status-pill.online { color: var(--green); background: var(--pale); border-color: var(--mint); }
.ghost-button, .text-button { color: var(--green); font-weight: 700; background: transparent; border: 0; }
.ghost-button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; }
.content { padding: 32px 38px 56px; }
.metrics-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card span, .metric-card small, .metric-card strong { display: block; }
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { margin-top: 13px; font-size: 34px; letter-spacing: -.04em; }
.metric-card small { margin-top: 8px; color: var(--muted); }
.metric-card.primary { color: var(--white); background: var(--green); border-color: var(--green); }
.metric-card.primary span, .metric-card.primary small { color: rgba(255,255,255,.7); }
.dashboard-grid { display: grid; gap: 18px; margin-top: 18px; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .7fr); }
.panel { padding: 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel h3 { margin: 5px 0 0; font-size: 21px; }
.empty-state { padding: 58px 16px; color: var(--muted); text-align: center; }
.notice-list { display: grid; gap: 14px; margin-top: 22px; }
.notice-list > div { display: flex; gap: 12px; padding: 15px; background: var(--paper); border-radius: 13px; }
.notice-list p, .notice-list strong, .notice-list small { display: block; margin: 0; }
.notice-list small { margin-top: 5px; color: var(--muted); line-height: 1.5; }
.notice-dot { width: 10px; height: 10px; margin-top: 5px; background: var(--green); border-radius: 50%; }
.notice-dot.orange { background: var(--orange); }
.notice-dot.blue { background: var(--blue); }
.table-wrap { margin-top: 20px; overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 14px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: left; background: var(--paper); }
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
td { padding: 15px 14px; border-bottom: 1px solid #ebe8e0; vertical-align: middle; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.data-status { display: inline-block; padding: 5px 9px; color: var(--muted); font-size: 11px; font-weight: 800; background: var(--paper); border-radius: 999px; white-space: nowrap; }
.data-status.paid, .data-status.verified, .data-status.available, .data-status.ready { color: var(--green); background: var(--pale); }
.data-status.pending, .data-status.promo { color: var(--blue); background: #e7f1fc; }
.data-status.refunded, .data-status.cancelled, .data-status.expired, .data-status.locked, .data-status.failed, .data-status.leak { color: var(--orange); background: #fff0e8; }
.filter-row { display: flex; align-items: center; gap: 9px; }
.filter-row input, .filter-row select { height: 38px; padding: 0 10px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 9px; }
.solid-button { min-height: 39px; padding: 0 16px; color: var(--white); font-weight: 800; background: var(--green); border: 0; border-radius: 9px; }
.table-button { padding: 7px 10px; color: var(--green); font-size: 12px; font-weight: 700; background: var(--pale); border: 0; border-radius: 8px; }
.table-button.danger { color: var(--orange); background: #fff0e8; }
.schedule-grid { display: grid; gap: 13px; margin-top: 24px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.slot-card { display: flex; min-height: 152px; align-items: flex-start; justify-content: space-between; padding: 19px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; }
.slot-card.promo { background: #f0f7ff; border-color: #9fc8f2; }
.slot-card.leak { background: #fff5ef; border-color: #e9a586; }
.slot-card.locked { opacity: .62; background: var(--paper); }
.slot-card h4 { margin: 14px 0 6px; font-size: 17px; }
.slot-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.slot-card > strong { color: var(--green); font-size: 20px; }
.split-layout, .pricing-grid { display: grid; gap: 18px; align-items: start; grid-template-columns: minmax(0, 1.6fr) minmax(340px, .8fr); }
.pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-form { display: grid; gap: 15px; margin-top: 22px; }
.admin-form.compact { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.admin-form h4 { margin: 0; font-size: 16px; }
.form-hint { margin: -7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.admin-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.admin-form input, .admin-form select { width: 100%; height: 42px; padding: 0 11px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 9px; outline: none; }
.admin-form input:focus, .admin-form select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,158,117,.1); }
.form-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.promo-admin-list { display: grid; gap: 10px; margin-top: 20px; }
.promo-admin-list > div { display: flex; align-items: center; gap: 11px; padding: 13px; background: var(--paper); border-radius: 11px; }
.promo-admin-list p { min-width: 0; flex: 1; margin: 0; }
.promo-admin-list strong, .promo-admin-list small { display: block; }
.promo-admin-list small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.promo-admin-list b { color: var(--green); }
.error-panel { max-width: 520px; padding: 34px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.error-panel p { color: var(--muted); }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 1000; min-width: 220px; padding: 14px 18px; color: var(--white); background: var(--green); border-radius: 11px; box-shadow: var(--shadow); }
.toast.error { background: var(--orange); }

@media (max-width: 1200px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .schedule-grid { grid-template-columns: repeat(3, 1fr); }
  .split-layout, .pricing-grid { grid-template-columns: 1fr; }
}
