:root {
  --ink: #172033;
  --muted: #697386;
  --line: #dfe5ec;
  --surface: #ffffff;
  --canvas: #f4f6f8;
  --brand: #087f72;
  --brand-dark: #05675d;
  --accent: #d79520;
  --sidebar: #172235;
  --sidebar-muted: #9eafc4;
}

* { box-sizing: border-box; }
body { color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
body.admin-page { direction: ltr; text-align: left; }
.eyebrow { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { display: inline-grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #fff; background: var(--brand); font-size: 1.1rem; font-weight: 800; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #eef2f5; }
.login-shell { display: grid; grid-template-columns: minmax(340px, 1.05fr) minmax(360px, .95fr); width: min(960px, 100%); overflow: hidden; border: 1px solid #d9e0e8; border-radius: 8px; background: #fff; box-shadow: 0 20px 50px rgba(20, 30, 46, .12); }
.login-intro { display: flex; align-items: center; gap: 20px; min-height: 500px; padding: 56px; color: #fff; background: var(--sidebar); }
.login-intro .brand-mark { border-color: rgba(255,255,255,.28); background: #cf9224; }
.login-intro .eyebrow { color: #a8d6d0; }
.login-intro h1 { margin: 0 0 12px; color: #fff; font-size: 2rem; font-weight: 700; }
.intro-copy { max-width: 280px; margin: 0; color: #bdc9d8; line-height: 1.8; }
.login-card { display: flex; align-items: center; background: #fff; }
.login-card .card-body { width: 100%; }
.login-card h2 { color: var(--ink); font-weight: 700; }
.login-card .form-control { min-height: 46px; border-color: #cfd8e3; border-radius: 6px; }
.login-card .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(8,127,114,.12); }
.login-card .btn-primary { border-color: var(--brand); border-radius: 6px; background: var(--brand); font-weight: 700; }
.login-card .btn-primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); }

.admin-layout { display: flex; min-height: 100vh; }
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; display: flex; flex-direction: column; width: 256px; padding: 24px 14px 18px; border-right: 1px solid rgba(255,255,255,.08); color: #d7e1ed; background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; color: #fff; font-size: 1rem; font-weight: 700; text-decoration: none; }
.brand .brand-mark { width: 36px; height: 36px; border-radius: 7px; background: var(--brand); font-size: 1rem; }
.sidebar-nav { display: grid; gap: 4px; margin-top: 38px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; color: var(--sidebar-muted); font-size: .9rem; text-decoration: none; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.sidebar-nav a:hover { color: #f7fbff; background: rgba(255,255,255,.06); }
.sidebar-nav a.active { border-color: rgba(119, 213, 199, .2); color: #f3fffd; background: rgba(8, 127, 114, .34); }
.sidebar-nav a.disabled { cursor: default; color: #718097; }
.sidebar-nav a span:last-child { margin-left: auto; font-size: .68rem; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.sidebar-nav a.active .nav-dot { color: #65d0c2; }
.sidebar-bottom { margin-top: auto; padding: 0 12px; color: #718097; font-size: .74rem; }

.main-content { width: calc(100% - 256px); margin-left: 256px; padding: 30px clamp(24px, 4vw, 64px) 52px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 54px; margin-bottom: 26px; }
.topbar h1 { margin: 0; color: #172033; font-size: 1.55rem; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.date-label, .admin-user { color: var(--muted); font-size: .84rem; }
.admin-user { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-weight: 600; }
.topbar .btn { border-radius: 5px; }

.welcome-panel { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 190px; padding: 32px 38px; border: 1px solid #c9e5df; border-radius: 8px; color: var(--ink); background: #eaf6f3; }
.welcome-panel .eyebrow { color: var(--brand); }
.welcome-panel h2 { margin: 0 0 10px; color: var(--ink); font-size: 1.55rem; font-weight: 700; }
.welcome-panel p:not(.eyebrow) { max-width: 620px; margin: 0; color: #42615e; line-height: 1.75; }
.status-ring { display: grid; flex: 0 0 auto; width: 84px; height: 84px; border: 7px solid #bee4dc; border-top-color: var(--brand); border-radius: 50%; place-items: center; color: var(--brand); font-size: .83rem; font-weight: 700; }
.metric-card, .action-card { height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 2px 8px rgba(20,30,46,.025); }
.metric-card p { margin: 0 0 12px; color: var(--muted); font-size: .84rem; }
.metric-card strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 1.32rem; font-weight: 700; }
.metric-card small { color: var(--brand); }
.quick-section { margin-top: 38px; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 1.18rem; font-weight: 700; }
.step-number { display: inline-grid; width: 28px; height: 28px; margin-bottom: 18px; border-radius: 50%; place-items: center; color: var(--brand); background: #e5f4f1; font-size: .72rem; font-weight: 700; }
.action-card h3 { margin: 0 0 9px; font-size: 1rem; font-weight: 700; }
.action-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.7; }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; min-height: auto; padding: 16px; }
  .admin-layout { display: block; }
  .sidebar-nav { display: flex; gap: 6px; margin-top: 18px; overflow-x: auto; padding-bottom: 2px; }
  .sidebar-nav a { flex: 0 0 auto; min-height: 38px; }
  .sidebar-bottom { display: none; }
  .main-content { width: 100%; margin-left: 0; padding: 26px 20px 42px; }
}

@media (max-width: 640px) {
  .login-page { padding: 16px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: auto; padding: 30px; }
  .login-intro h1 { font-size: 1.5rem; }
  .topbar, .topbar-actions { align-items: flex-start; flex-direction: column; }
  .topbar { margin-bottom: 20px; }
  .topbar-actions { gap: 8px; }
  .welcome-panel { align-items: flex-start; padding: 24px; }
  .status-ring { width: 58px; height: 58px; border-width: 5px; }
}
