:root {
  --ink: #1d2733;
  --muted: #74808c;
  --line: #e7ebef;
  --surface: #ffffff;
  --canvas: #f5f7f8;
  --navy: #12253b;
  --teal: #0f8a88;
  --teal-soft: #dff3f1;
  --orange: #e88b46;
  --danger: #c74d57;
  --shadow: 0 12px 28px rgba(24, 42, 60, .06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.shell { display: flex; min-height: 100vh; }
.sidebar { width: 238px; padding: 22px 14px; background: var(--navy); color: #dbe6ee; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 12px 26px; color: #fff; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; background: #ef9e54; color: #15293e; border-radius: 10px; font-weight: 900; }
.brand small { display: block; color: #98acbd; font-weight: 500; margin-top: 3px; letter-spacing: 0; }
.nav { display: grid; gap: 4px; }
.nav button { border: 0; background: transparent; color: #afbeca; text-align: left; padding: 12px 13px; border-radius: 8px; display: flex; gap: 11px; align-items: center; }
.nav button:hover, .nav button.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-icon { width: 18px; text-align: center; font-size: 15px; }
.sidebar-foot { margin-top: auto; padding: 14px 12px 3px; color: #93a7b6; font-size: 12px; line-height: 1.55; }

.main { flex: 1; min-width: 0; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 17px; margin: 0; letter-spacing: -.02em; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--teal); font-weight: 700; }
.content { padding: 32px; max-width: 1380px; margin: 0 auto; }
.eyebrow { color: var(--teal); font-size: 12px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.page-title { font-size: 28px; letter-spacing: -.04em; margin: 6px 0 5px; }
.page-subtitle { color: var(--muted); margin: 0; font-size: 14px; }
.grid { display: grid; gap: 18px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 26px; }
.two { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); margin-top: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.stat { padding: 20px; min-height: 126px; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 790; letter-spacing: -.05em; margin: 10px 0 5px; }
.stat-note { color: var(--muted); font-size: 12px; }
.stat-accent { color: var(--teal); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 19px 20px 14px; }
.card-head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 0 20px 20px; }
.panel { padding: 22px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.btn { border: 1px solid transparent; border-radius: 6px; padding: 9px 13px; font-weight: 700; font-size: 13px; }
.btn-primary { color: #fff; background: var(--teal); }
.btn-primary:hover { background: #087674; }
.btn-secondary { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-danger { color: #fff; background: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #dce3e9; border-radius: 6px; padding: 10px 11px; background: #fff; color: var(--ink); outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,138,136,.1); }
.field textarea { min-height: 106px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.mini-panel { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fff; }
.check-list { display: grid; gap: 8px; }
.check-list.inline { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 2px 0 14px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid #dce3e9; border-radius: 6px; background: #fff; color: var(--ink); font-size: 13px; }
.check-row input { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--teal); }
.check-row span { display: grid; gap: 3px; line-height: 1.3; }
.check-row small { color: var(--muted); font-size: 11px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 0; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
td { color: #334150; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef2f4; color: #586774; font-size: 11px; font-weight: 700; }
.badge.good { background: var(--teal-soft); color: #087674; }
.badge.warn { background: #fff1de; color: #a7611f; }
.empty { padding: 34px 0; text-align: center; color: var(--muted); font-size: 13px; }
.trend { height: 210px; display: flex; align-items: end; gap: 8px; padding: 20px 0 6px; }
.bar-col { flex: 1; display: grid; gap: 7px; justify-items: center; align-items: end; height: 100%; }
.bar { width: 100%; max-width: 30px; min-height: 4px; border-radius: 5px 5px 2px 2px; background: var(--teal); opacity: .8; }
.bar-label { color: var(--muted); font-size: 10px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #edf3f3; }
.auth-card { width: min(430px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 30px; box-shadow: 0 24px 60px rgba(18,37,59,.13); }
.auth-card h1 { margin: 18px 0 8px; font-size: 26px; letter-spacing: -.04em; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); line-height: 1.6; font-size: 13px; }
.auth-switch { margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; }
.link { color: var(--teal); font-weight: 700; cursor: pointer; }
.notice { padding: 10px 12px; border-radius: 6px; background: #fff5e6; color: #9a5a1d; font-size: 12px; line-height: 1.5; margin-bottom: 14px; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 360px; padding: 13px 15px; border-radius: 7px; color: #fff; background: var(--navy); box-shadow: var(--shadow); z-index: 20; font-size: 13px; }
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .sidebar { width: 205px; }
  .content { padding: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .sidebar { display: none; }
  .topbar { height: 62px; padding: 0 18px; }
  .mobile-menu { display: inline-flex; }
  .content { padding: 20px 16px 32px; }
  .page-title { font-size: 24px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 15px; min-height: 110px; }
  .stat-value { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .check-list.inline { grid-template-columns: 1fr; }
  .user-chip span { display: none; }
}
