:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --border: #e2e8f0; --text: #0f172a; --muted: #64748b;
  --brand: #1e3a8a; --brand-2: #2563eb; --brand-soft: #e8efff; --side: #0b1f44; --side-text: #c7d2fe; --side-active: #1d3a78;
  --red: #dc2626; --red-soft: #fee2e2; --orange: #ea580c; --orange-soft: #ffedd5; --yellow: #a16207; --yellow-soft: #fef9c3;
  --green: #15803d; --green-soft: #dcfce7; --grey-soft: #eef2f7; --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--brand-2); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; } h2 { font-size: 17px; margin: 0 0 12px; } h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { color: #fff; font-weight: 700; font-size: 15px; padding: 4px 10px 16px; line-height: 1.3; }
.side .logo small { display: block; font-weight: 400; color: var(--side-text); font-size: 11px; margin-top: 2px; }
.side a { display: flex; align-items: center; justify-content: space-between; color: var(--side-text); padding: 7px 10px; border-radius: 7px; font-size: 13px; }
.side a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.side a.active { background: var(--side-active); color: #fff; }
.side .phase { font-size: 10px; padding: 1px 6px; border-radius: 99px; background: rgba(255,255,255,.1); }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar .grow { flex: 1; }
.sample-banner { background: #fff7ed; color: #9a3412; border-bottom: 1px solid #fed7aa; padding: 6px 24px; font-size: 12px; }
.content { padding: 20px 24px 60px; max-width: 1400px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.split { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 14px; }
.stat { cursor: pointer; } .stat .v { font-size: 26px; font-weight: 700; margin-top: 4px; } .stat .l { color: var(--muted); font-size: 12px; }
.stat.red .v { color: var(--red); } .stat.orange .v { color: var(--orange); } .stat.green .v { color: var(--green); } .stat.blue .v { color: var(--brand-2); }
.bar { height: 8px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; }
.bar.green > i { background: var(--green); } .bar.red > i { background: var(--red); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr.click { cursor: pointer; } tr.click:hover td { background: #f1f5ff; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--grey-soft); color: #334155; white-space: nowrap; }
.badge.red { background: var(--red-soft); color: var(--red); } .badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow); } .badge.green { background: var(--green-soft); color: var(--green); }
.badge.blue { background: var(--brand-soft); color: var(--brand); } .badge.purple { background: #f3e8ff; color: #7e22ce; }
.alert-row { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; }
.alert-row:hover { background: #f8fafc; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: none; }
.dot.RED { background: var(--red); } .dot.ORANGE { background: var(--orange); } .dot.YELLOW { background: #eab308; } .dot.GREEN { background: var(--green); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; } .btn.primary:hover { background: #1d4ed8; }
.btn.danger { color: var(--red); border-color: #fecaca; } .btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 6px 12px; font: inherit; cursor: pointer; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; } .seg button.on { background: var(--brand-2); color: #fff; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: var(--text); width: 100%; }
textarea { min-height: 70px; resize: vertical; }
label { display: block; font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 4px; }
.field { margin-bottom: 12px; } .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .filters select, .filters input { width: auto; min-width: 130px; padding: 5px 8px; font-size: 12.5px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; } .kv div:nth-child(odd) { color: var(--muted); font-size: 12.5px; }
.box-red { background: var(--red-soft); border: 1px solid #fecaca; color: #7f1d1d; padding: 10px 12px; border-radius: 8px; }
.box-red ul, .box-yellow ul { margin: 6px 0 0; padding-left: 18px; }
.box-yellow { background: #fefce8; border: 1px solid #fde68a; color: #713f12; padding: 10px 12px; border-radius: 8px; }
.box-blue { background: var(--brand-soft); border: 1px solid #c7d2fe; color: #1e3a8a; padding: 10px 12px; border-radius: 8px; }
.stepper { display: flex; gap: 0; flex-wrap: wrap; margin: 4px 0 14px; }
.stepper span { padding: 5px 12px 5px 18px; background: var(--grey-soft); color: var(--muted); font-size: 12px; font-weight: 600; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%); margin-right: -4px; }
.stepper span.done { background: var(--green-soft); color: var(--green); } .stepper span.cur { background: var(--brand-2); color: #fff; }
.timeline { border-left: 2px solid var(--border); margin-left: 6px; padding-left: 16px; }
.timeline .ev { position: relative; padding-bottom: 12px; } .timeline .ev::before { content: ""; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin: 18px 0 8px; }
.item-row { display: grid; grid-template-columns: 1fr 140px 110px auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 640px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { max-width: 980px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.toast-wrap { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: 420px; }
.toast { background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; }
.toast.err { background: #7f1d1d; } .toast ul { margin: 6px 0 0; padding-left: 18px; }
.notif-panel { position: absolute; right: 24px; top: 52px; width: 380px; max-height: 480px; overflow-y: auto; z-index: 20; }
.notif { padding: 8px 4px; border-bottom: 1px solid var(--border); } .notif.unread { background: #f1f5ff; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0b1f44, #1e3a8a); padding: 16px; }
.login { width: 100%; max-width: 420px; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.kpi .v { font-size: 22px; font-weight: 700; } .kpi .l { font-size: 12.5px; font-weight: 600; } .kpi .b { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.quiz-q { padding: 10px 0; border-bottom: 1px solid var(--border); } .quiz-q label { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.quiz-q input { width: auto; }
.handbook h3 { margin-top: 16px; } .sample-tag { background: #fff7ed; color: #9a3412; padding: 6px 10px; border-radius: 6px; font-size: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; } .check input { width: auto; margin-top: 3px; }
@media (max-width: 1100px) { .g5, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .split, .g3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; } .side { position: static; height: auto; } .content { padding: 16px; }
  .g2, .form-grid { grid-template-columns: 1fr; } .item-row { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; }
  .topbar, .sample-banner { padding-left: 16px; padding-right: 16px; } .notif-panel { right: 8px; width: calc(100vw - 16px); }
}
