@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");

:root {
  --red: #dc143c;
  --red-dark: #b8102c;
  --red-soft: #fdeef1;
  --ink: #171a20;
  --ink-2: #2c313a;
  --muted: #6b7280;
  --muted-2: #98a0ad;
  --line: #e6e8ec;
  --line-2: #eef0f3;
  --bg: #f4f5f7;
  --card: #ffffff;
  --green: #12805c;
  --green-soft: #e7f6ef;
  --amber: #a86400;
  --amber-soft: #fdf3e1;
  --blue: #1d5bd7;
  --blue-soft: #eaf1ff;
  --purple: #6d4bd8;
  --purple-soft: #f0ecff;
  --sidebar-w: 264px;
  --topbar-h: 68px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 24, 40, .04), 0 8px 26px -16px rgba(18, 24, 40, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: "Plus Jakarta Sans", Inter, sans-serif; letter-spacing: -.02em; }
.ico { flex: none; vertical-align: -2px; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11.5px; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.text-danger { color: var(--red); }

/* ---------- Shell ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.brand {
  display: flex; align-items: center; gap: 11px; padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line-2);
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(145deg, var(--red), #8f0b22);
  color: #fff; display: grid; place-items: center;
  font-family: "Plus Jakarta Sans"; font-weight: 800; font-size: 19px;
  box-shadow: 0 8px 18px -10px rgba(220, 20, 60, .8);
}
.brand-text strong { display: block; font-family: "Plus Jakarta Sans"; font-size: 16px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.brand-logo { display: block; height: 34px; width: auto; max-width: 100%; object-fit: contain; }
.brand-text span { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.branch-line {
  display: flex; align-items: center; gap: 8px; margin: 14px 16px 4px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 600; color: var(--ink-2);
  background: #fbfbfc;
}
.branch-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.branch-line select { margin-left: auto; border: 0; background: transparent; font-size: 10.5px; font-weight: 600; color: var(--muted); outline: none; max-width: 85px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }
.sidebar-nav::-webkit-scrollbar { width: 7px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #dfe2e8; border-radius: 9px; }
.nav-section { margin-top: 13px; }
.nav-label {
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2);
  font-weight: 800; padding: 0 10px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8.5px 10px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500; color: #4b5260; margin-bottom: 1px; position: relative;
  transition: background .14s, color .14s;
}
.nav-item .ico { color: #8a91a0; }
.nav-item:hover { background: #f5f6f8; color: var(--ink); }
.nav-item.active { background: var(--red-soft); color: var(--red-dark); font-weight: 700; }
.nav-item.active .ico { color: var(--red); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav-badge {
  margin-left: auto; font-style: normal; font-size: 9.5px; font-weight: 800; min-width: 17px; height: 17px;
  padding: 0 5px; border-radius: 9px; background: #eef0f4; color: var(--muted); display: grid; place-items: center;
}
.nav-item.active .nav-badge { background: #fff; color: var(--red-dark); }
.sidebar-foot { border-top: 1px solid var(--line-2); padding: 11px 12px; }
.user-card { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 10px; }
.user-card:hover { background: #f7f8fa; }
.user-meta { min-width: 0; flex: 1; }
.user-meta strong { display: block; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 10px; color: var(--muted); }
.reset-link { display: block; text-align: center; font-size: 9.5px; color: var(--muted-2); margin-top: 6px; }
.reset-link:hover { color: var(--red); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px;
  padding: 0 26px; position: sticky; top: 0; z-index: 30;
}
.mobile-menu { display: none; border: 0; background: transparent; padding: 6px; border-radius: 7px; cursor: pointer; }
.crumbs { min-width: 150px; }
.crumbs span { display: block; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); font-weight: 800; }
.crumbs strong { font-family: "Plus Jakarta Sans"; font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.global-search { position: relative; margin-left: auto; width: min(320px, 30vw); }
.global-search > .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.global-search input {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px 0 34px;
  background: #fafbfc; font-size: 12px; outline: none;
}
.global-search input:focus { border-color: #c9ced8; background: #fff; box-shadow: 0 0 0 3px rgba(220, 20, 60, .07); }
.search-results {
  display: none; position: absolute; top: 42px; left: 0; right: 0; background: #fff;
  border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 18px 40px -18px rgba(20, 25, 35, .32);
  padding: 5px; z-index: 60; max-height: 340px; overflow: auto;
}
.search-results.open { display: block; }
.search-result { display: flex; flex-direction: column; gap: 1px; width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.search-result:hover { background: #f6f7f9; }
.search-result strong { font-size: 12px; }
.search-result span { font-size: 10.5px; color: var(--muted); }
.search-empty { padding: 14px; font-size: 11.5px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.role-switch { display: flex; align-items: center; gap: 7px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.role-switch select { border: 1px solid var(--line); background: #fff; border-radius: 8px; height: 34px; padding: 0 26px 0 10px; font-size: 11.5px; font-weight: 600; color: var(--ink); outline: none; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 20px; background: #f6f7f9; font-size: 10px; font-weight: 700; color: var(--muted); }
.role-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.role-dot.blue { background: var(--blue); } .role-dot.green { background: var(--green); } .role-dot.amber { background: var(--amber); } .role-dot.purple { background: var(--purple); }
.branch-select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: #fff; font-size: 11px; font-weight: 600; outline: none; max-width: 120px; }
.bell { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 9px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.bell em { position: absolute; top: -4px; right: -4px; font-style: normal; background: var(--red); color: #fff; font-size: 8px; font-weight: 800; min-width: 15px; height: 15px; border-radius: 8px; display: grid; place-items: center; border: 2px solid #fff; }
.top-avatar { display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.content { padding: 24px 26px 56px; max-width: 1560px; width: 100%; }

/* ---------- Common ---------- */
.avatar { width: 30px; height: 30px; border-radius: 9px; background: #eef0f4; color: #49505d; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; letter-spacing: .02em; }
.avatar.lg { width: 38px; height: 38px; border-radius: 11px; font-size: 12px; }
.avatar.xl { width: 54px; height: 54px; border-radius: 14px; font-size: 16px; background: var(--red-soft); color: var(--red-dark); }
.eyebrow { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); font-weight: 800; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(22px, 2.1vw, 29px); font-weight: 800; letter-spacing: -.035em; }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 12.5px; max-width: 760px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 13px;
  border-radius: 8px; border: 1px solid transparent; background: #eef0f4; color: var(--ink-2);
  font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 7px 16px -10px rgba(220, 20, 60, .9); }
.btn.primary:hover { background: var(--red-dark); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: #cfd4dc; background: #fafbfc; }
.btn.danger { background: #fff0f2; color: var(--red-dark); border-color: #f6cdd5; }
.btn.tiny { height: 28px; padding: 0 9px; font-size: 10.5px; border-radius: 7px; }
.btn.full { width: 100%; }
.icon-btn { width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 7px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: #cfd4dc; }
.icon-btn.ok { color: var(--green); background: var(--green-soft); border-color: #c9ecdd; }
.icon-btn.bad { color: var(--red-dark); background: var(--red-soft); border-color: #f6cbd4; }
.link { color: var(--red-dark); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; background: #f0f1f4; color: #5c6472; }
.pill.success { background: var(--green-soft); color: var(--green); }
.pill.danger { background: var(--red-soft); color: var(--red-dark); }
.pill.warning { background: var(--amber-soft); color: var(--amber); }
.pill.info, .pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.primary { background: #ffe9ee; color: var(--red-dark); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.neutral { background: #f0f1f4; color: #5c6472; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px 0; }
.panel-head h2 { font-size: 13.5px; font-weight: 800; }
.panel-actions { display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 14px 18px 18px; }
.panel.flush .panel-body { padding: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; inset: auto -20px -34px auto; width: 90px; height: 90px; border-radius: 50%; background: var(--red-soft); opacity: .5; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; }
.stat-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f4f5f7; color: var(--muted); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-value { font-family: "Plus Jakarta Sans"; font-size: 24px; font-weight: 800; letter-spacing: -.04em; margin-top: 10px; line-height: 1; }
.stat-note { font-size: 10px; color: var(--muted); margin-top: 5px; }
.stat-foot { margin-top: 9px; font-size: 10px; font-weight: 700; color: var(--red-dark); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2-1 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; }
.grid-3-1 { display: grid; grid-template-columns: 2.1fr .9fr; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 0; }
.stack-list { display: flex; flex-direction: column; }
.mini-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 11.5px; }
.mini-item:last-child { border-bottom: 0; }
.mini-item strong { font-weight: 700; }
.mini-item span { color: var(--muted); margin-left: auto; }
.split-stats { display: flex; gap: 22px; margin-bottom: 14px; }
.split-stats div { display: flex; flex-direction: column; }
.split-stats strong { font-family: "Plus Jakarta Sans"; font-size: 24px; }
.split-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { text-align: left; padding: 11px 12px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfbfc; }
.data-table small { color: var(--muted); font-size: 10.5px; }
.data-table strong { font-weight: 700; }
.empty-cell { text-align: center; color: var(--muted); padding: 28px !important; }
.cell-link { display: block; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; width: 100%; }
.cell-link:hover strong { color: var(--red-dark); }
.cell-person { display: inline-flex; align-items: center; gap: 8px; }
.cell-person span { display: flex; flex-direction: column; line-height: 1.35; }
.cell-person strong { font-size: 11.5px; }
.cell-person small { font-size: 9.5px; }
.row-actions { display: flex; gap: 4px; align-items: center; }
.chip { display: inline-block; background: #f0f1f4; border-radius: 5px; padding: 2px 6px; font-size: 9.5px; font-weight: 700; color: var(--muted); margin-right: 3px; }
.order { font-family: ui-monospace, monospace; font-size: 10px; font-weight: 700; color: var(--muted-2); }

/* ---------- Progress / bars ---------- */
.progress { height: 6px; border-radius: 9px; background: #eef0f4; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--red); }
.progress.green span { background: var(--green); }
.progress.amber span { background: #e0a11b; }
.progress.blue span { background: var(--blue); }
.progress.purple span { background: var(--purple); }
.progress-cell { min-width: 94px; }
.progress-cell small { display: block; margin-top: 4px; font-size: 9px; color: var(--muted); }
.progress-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.progress-top { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; margin-bottom: 9px; }
.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; flex-direction: column; gap: 5px; }
.bar-label { display: flex; justify-content: space-between; font-size: 11px; }
.bar-label span { color: var(--ink-2); font-weight: 600; }
.bar-label strong { font-weight: 800; }
.bars-chart { display: flex; align-items: flex-end; gap: 13px; height: 150px; padding-top: 14px; }
.bars-chart div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars-chart i { display: block; width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #f26b84, var(--red)); }
.bars-chart span { font-size: 9px; color: var(--muted); }

/* ---------- Specialized ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.toolbar .search, .search { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fafbfc; border-radius: 8px; padding: 0 10px; height: 34px; min-width: 220px; flex: 1; }
.toolbar .search input, .search input { border: 0; background: transparent; outline: none; font-size: 11.5px; width: 100%; }
.toolbar .search .ico, .search .ico { color: var(--muted-2); }
.toolbar select { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 11px; font-weight: 600; padding: 0 8px; outline: none; max-width: 170px; }
.tabs { display: flex; gap: 4px; padding: 12px 18px 0; border-bottom: 1px solid var(--line-2); }
.tab { border: 0; background: none; padding: 7px 10px 9px; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: var(--red-dark); border-bottom-color: var(--red); }
.note { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border-radius: 9px; background: var(--blue-soft); color: #1f3f83; font-size: 11.5px; margin-bottom: 16px; border: 1px solid #d8e4ff; }
.note.success { background: var(--green-soft); color: #0c6146; border-color: #c9ecdd; }
.note.danger { background: var(--red-soft); color: var(--red-dark); border-color: #f6cbd4; }
.empty-inline { padding: 22px; text-align: center; color: var(--muted); font-size: 11.5px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 46px 20px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--ink); font-size: 16px; }
.empty-state p { max-width: 380px; font-size: 12px; }
.empty-state .btn { margin-top: 8px; }
.sync { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 6px 9px; border-radius: 7px; }
.approval-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.approval-row:last-child { border-bottom: 0; }
.approval-row .cell-person span { max-width: 160px; }
.timeline-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-row .time { font-family: "Plus Jakarta Sans"; font-weight: 800; font-size: 12px; min-width: 56px; display: flex; flex-direction: column; }
.timeline-row .time small { font-family: Inter; font-size: 8.5px; color: var(--muted); font-weight: 600; }
.timeline-main { flex: 1; display: flex; flex-direction: column; }
.timeline-main strong { font-size: 11.5px; }
.timeline-main small { font-size: 9.5px; color: var(--muted); }
.feed { display: flex; flex-direction: column; }
.feed-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.feed-row:last-child { border-bottom: 0; }
.feed-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-top: 5px; flex: none; box-shadow: 0 0 0 3px var(--red-soft); }
.feed-row strong { font-size: 11px; display: block; }
.feed-row small { font-size: 10px; color: var(--muted); }
.intake-mini { margin-bottom: 13px; }
.intake-mini:last-child { margin-bottom: 0; }
.intake-mini div { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 5px; }
.intake-mini strong { font-weight: 800; }
.notice-strip { display: flex; flex-direction: column; gap: 9px; }
.notice-strip span { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.notice-strip small { margin-left: auto; color: var(--muted); font-size: 10px; }
.status-list { display: flex; flex-direction: column; }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.status-row:last-child { border-bottom: 0; }
.status-row strong { font-size: 13px; }
.dept-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dept-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 9px; }
.dept-top { display: flex; justify-content: space-between; align-items: center; }
.dept-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.dept-card h3 { font-size: 14px; }
.dept-card p { font-size: 10.5px; color: var(--muted); line-height: 1.5; min-height: 30px; }
.dept-meta { display: flex; flex-direction: column; gap: 4px; font-size: 10px; color: var(--muted); }
.dept-meta span { display: flex; align-items: center; gap: 5px; }
.dept-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 10px; color: var(--muted); }
.uni-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.uni-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.uni-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.uni-mark { display: inline-grid; place-items: center; min-width: 42px; height: 34px; padding: 0 8px; border-radius: 8px; background: #171a20; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.uni-card h3 { font-size: 13px; line-height: 1.3; min-height: 34px; }
.uni-card p { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin: 5px 0 10px; }
.uni-stats { display: flex; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 9px; font-size: 9.5px; color: var(--muted); }
.uni-stats strong { color: var(--ink); font-size: 12px; }
.uni-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; font-size: 9px; color: var(--muted-2); }
.uni-card .btn.full { margin-top: 10px; }
.intake-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.intake-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.intake-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.intake-head h3 { font-size: 14px; margin-top: 3px; }
.intake-card p { font-size: 10.5px; color: var(--muted); margin: 8px 0; line-height: 1.5; min-height: 30px; }
.intake-dates { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); margin-bottom: 11px; }
.intake-dates span { display: flex; align-items: center; gap: 4px; }
.intake-cap { border-top: 1px solid var(--line-2); padding-top: 10px; }
.intake-cap > div { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 5px; }
.intake-cap small { display: block; font-size: 9px; color: var(--muted); margin-top: 4px; }
.intake-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-2); margin-top: 11px; padding-top: 9px; font-size: 9px; color: var(--muted); }
.intake-foot span { display: flex; align-items: center; gap: 4px; }
.notice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.notice-card { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow); }
.notice-card.urgent { border-left-color: var(--red); }
.notice-card.high { border-left-color: #e0a11b; }
.notice-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.notice-card h3 { font-size: 12.5px; line-height: 1.35; min-height: 34px; }
.notice-meta { display: flex; flex-direction: column; gap: 4px; margin: 9px 0; font-size: 9.5px; color: var(--muted); }
.notice-meta span { display: flex; align-items: center; gap: 5px; }
.notice-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 9px; font-size: 9px; color: var(--muted); }
.branch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.branch-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.branch-top { display: flex; justify-content: space-between; align-items: center; }
.branch-code { font-family: ui-monospace, monospace; font-size: 10px; font-weight: 800; background: #171a20; color: #fff; padding: 4px 7px; border-radius: 5px; }
.branch-card h3 { font-size: 14px; margin-top: 11px; }
.branch-card p { font-size: 9.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin: 5px 0 12px; }
.branch-stats { display: flex; gap: 18px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.branch-stats span { font-size: 9.5px; color: var(--muted); display: flex; flex-direction: column; }
.branch-stats strong { color: var(--ink); font-size: 15px; }
.branch-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; font-size: 9px; color: var(--muted); }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.role-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.role-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.role-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.role-card h3 { font-size: 14px; }
.role-card p { font-size: 10px; color: var(--muted); line-height: 1.5; min-height: 42px; margin: 6px 0 10px; }
.role-stats { display: flex; gap: 16px; border-top: 1px solid var(--line-2); padding-top: 9px; margin-bottom: 10px; font-size: 9.5px; color: var(--muted); }
.role-stats strong { color: var(--ink); font-size: 13px; }
.eval-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.eval-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.eval-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.eval-head .cell-person { gap: 9px; }
.score { font-family: "Plus Jakarta Sans"; font-weight: 800; font-size: 12px; color: var(--amber); background: var(--amber-soft); padding: 3px 7px; border-radius: 6px; }
.score.big { font-size: 20px; }
.score.excellent { color: var(--green); background: var(--green-soft); }
.score.good { color: var(--blue); background: var(--blue-soft); }
.score.low { color: var(--red-dark); background: var(--red-soft); }
.eval-bars { display: flex; flex-direction: column; gap: 6px; }
.eval-bar { display: grid; grid-template-columns: 92px 1fr 22px; gap: 8px; align-items: center; font-size: 9px; color: var(--muted); }
.eval-bar small { text-align: right; font-weight: 700; }
.dist { display: flex; flex-direction: column; gap: 9px; }
.dist-row { display: flex; justify-content: space-between; font-size: 11px; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
.student-hero { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.student-hero h2 { font-size: 18px; margin: 2px 0; }
.student-hero p { font-size: 11px; color: var(--muted); }
.counselor-card { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.counselor-card div { display: flex; flex-direction: column; gap: 2px; font-size: 10px; color: var(--muted); }
.counselor-card strong { font-size: 12px; color: var(--ink); }
.check-row, .doc-row, .question-row, .setting-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.check-row:last-child, .doc-row:last-child, .question-row:last-child, .setting-row:last-child { border-bottom: 0; }
.check-row .grow, .doc-row .grow { display: flex; flex-direction: column; }
.check-row strong, .doc-row strong { font-size: 11.5px; }
.check-row small, .doc-row small { font-size: 9.5px; color: var(--muted); }
.check { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.check.done { background: var(--green-soft); border-color: #c9ecdd; color: var(--green); }
.doc-icon { width: 34px; height: 34px; border-radius: 9px; background: #f4f5f7; color: var(--muted); display: grid; place-items: center; flex: none; }
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.profile-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.profile-card .avatar { margin: 0 auto 10px; }
.profile-card h3 { font-size: 16px; }
.profile-card p { font-size: 10.5px; color: var(--muted); margin: 4px 0 10px; }
.profile-card .btn { margin: 12px 0; }
.profile-card .stack-list { text-align: left; }
.program-hero { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.program-hero h2 { font-size: 17px; margin: 3px 0; }
.program-hero p { font-size: 10.5px; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.detail-grid div { border-top: 1px solid var(--line-2); padding-top: 9px; display: flex; flex-direction: column; gap: 3px; }
.detail-grid span { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.detail-grid strong { font-size: 12px; }
.sequence { list-style: none; padding: 0; margin: 0; }
.sequence li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.sequence li > span { width: 20px; height: 20px; border-radius: 50%; background: #f0f1f4; font-size: 9px; font-weight: 800; display: grid; place-items: center; color: var(--muted); flex: none; }
.sequence li div { flex: 1; display: flex; flex-direction: column; }
.sequence strong { font-size: 10.5px; }
.sequence small { font-size: 9px; color: var(--muted); }
.faq-list { display: flex; flex-direction: column; }
.faq { border-bottom: 1px solid var(--line-2); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 0; font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { transition: transform .2s; color: var(--muted); }
.faq[open] summary span { transform: rotate(180deg); }
.faq p { padding: 0 0 14px; font-size: 11.5px; color: var(--muted); line-height: 1.6; max-width: 780px; }
.hotline { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: 12px; background: linear-gradient(135deg, var(--red), #8f0b22); color: #fff; margin-bottom: 14px; }
.hotline div { display: flex; flex-direction: column; }
.hotline strong { font-family: "Plus Jakarta Sans"; font-size: 19px; }
.hotline span { font-size: 9.5px; opacity: .8; }
.eval-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.eval-q { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eval-q .grow { display: flex; flex-direction: column; }
.eval-q strong { font-size: 11.5px; }
.eval-q small { font-size: 9px; color: var(--muted); }
.rating-row { display: flex; gap: 4px; }
.rating { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 5px 7px; font-size: 9px; font-weight: 700; color: var(--muted); cursor: pointer; }
.rating.active { background: var(--red-soft); border-color: #f6cbd4; color: var(--red-dark); }
.setting-list { display: flex; flex-direction: column; }
.setting-row { justify-content: space-between; }
.setting-row div { display: flex; flex-direction: column; }
.setting-row strong { font-size: 11.5px; }
.setting-row small { font-size: 9.5px; color: var(--muted); }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #dfe2e8; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::after { transform: translateX(16px); }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f6cbd4; }
.danger-zone strong { font-size: 11px; color: var(--red-dark); }
.danger-zone p { font-size: 10px; color: var(--muted); margin: 4px 0 9px; }
.approval-queue { display: flex; flex-direction: column; }
.queue-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); }
.queue-row:last-child { border-bottom: 0; }
.queue-check input { accent-color: var(--red); }
.queue-row .grow { display: flex; flex-direction: column; }
.queue-row strong { font-size: 11.5px; }
.queue-row small { font-size: 9.5px; color: var(--muted); }
.queue-amount { font-family: "Plus Jakarta Sans"; font-weight: 800; font-size: 13px; min-width: 110px; text-align: right; }
.cash-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { --p: 50; width: 116px; height: 116px; border-radius: 50%; background: conic-gradient(var(--red) calc(var(--p) * 1%), #eef0f4 0); display: grid; place-items: center; flex: none; }
.donut-inner { width: 82px; height: 82px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-inner strong { font-family: "Plus Jakarta Sans"; font-size: 19px; }
.donut-inner span { font-size: 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.status-summary { display: flex; gap: 18px; padding: 12px 18px 0; font-size: 10px; color: var(--muted); }
.status-summary strong { color: var(--ink); }

/* ---------- Modal / drawer / toast ---------- */
.modal-layer, .drawer-layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-layer { background: rgba(18, 22, 30, .35); backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 16px; width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 70px -20px rgba(10, 15, 25, .45); animation: pop .16s ease-out; }
.modal.wide { width: min(760px, 100%); }
.modal header, .drawer header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal header h2 { font-size: 16px; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal footer { padding: 13px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 10px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 11.5px; font-weight: 500; color: var(--ink); background: #fff; outline: none; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #c9ced8; box-shadow: 0 0 0 3px rgba(220, 20, 60, .06); }
.field textarea { resize: vertical; }
.field small { font-weight: 500; color: var(--muted-2); }
.form-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.drawer-layer { justify-content: flex-end; padding: 0; }
.drawer-overlay { position: absolute; inset: 0; background: rgba(18, 22, 30, .3); backdrop-filter: blur(2px); }
.drawer { position: relative; width: min(520px, 94vw); height: 100%; background: #fff; box-shadow: -20px 0 60px -20px rgba(10, 15, 25, .35); display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer.wide { width: min(720px, 96vw); }
.drawer header { border-bottom: 0; padding-bottom: 0; justify-content: flex-end; }
.drawer-body { padding: 0 22px 28px; overflow: auto; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.drawer-head h2 { font-size: 19px; margin: 2px 0 3px; }
.drawer-head p { font-size: 10.5px; color: var(--muted); }
.drawer-head .pill { margin-left: auto; }
.drawer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #fafbfc; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.drawer-stats div { display: flex; flex-direction: column; }
.drawer-stats strong { font-family: "Plus Jakarta Sans"; font-size: 16px; }
.drawer-stats span { font-size: 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.drawer-grid div { display: flex; flex-direction: column; gap: 2px; background: #fafbfc; border-radius: 7px; padding: 8px 10px; }
.drawer-grid span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.drawer-grid strong { font-size: 10.5px; }
.drawer-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; }
.drawer-note { font-size: 11px; color: var(--ink-2); line-height: 1.6; background: #fafbfc; border-radius: 8px; padding: 10px 12px; }
.drawer-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; background: #171a20; color: #fff; padding: 11px 14px; border-radius: 10px; font-size: 11.5px; font-weight: 600; box-shadow: 0 16px 36px -14px rgba(10, 15, 25, .4); opacity: 0; transform: translateY(8px); transition: .2s; max-width: 340px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success .ico { color: #4ade80; }
.toast.danger .ico { color: #fca5a5; }
.notif-list { display: flex; flex-direction: column; }
.notif-row { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.notif-row:last-child { border-bottom: 0; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: #d0d4db; margin-top: 5px; flex: none; }
.notif-row.unread .notif-dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.notif-row strong { font-size: 11.5px; display: block; }
.notif-row p { font-size: 10.5px; color: var(--muted); margin: 2px 0; }
.notif-row small { font-size: 9px; color: var(--muted-2); }

@keyframes pop { from { opacity: 0; transform: scale(.98) translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { transform: translateX(24px); opacity: .5; } to { transform: none; opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uni-grid, .branch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .global-search { width: 240px; }
  .role-chip { display: none; }
}
@media (max-width: 1100px) {
  .dept-grid, .role-grid, .notice-grid, .intake-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-3-1 { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .role-switch span { display: none; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 20px 0 50px -30px rgba(0, 0, 0, .4); }
  body.nav-open .sidebar { transform: none; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(18, 22, 30, .35); z-index: 35; }
  body.nav-open .sidebar-overlay { display: block; }
  .main { margin-left: 0; }
  .mobile-menu { display: grid; place-items: center; }
  .content { padding: 20px 18px 48px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .global-search { width: 210px; margin-left: auto; }
  .branch-select { display: none; }
  .uni-grid, .branch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .stat-grid, .grid-2, .dept-grid, .role-grid, .notice-grid, .intake-grid, .eval-grid, .uni-grid, .branch-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 22px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px; }
  .crumbs { order: 1; }
  .global-search { order: 3; width: 100%; }
  .top-actions { order: 2; margin-left: auto; }
  .role-switch select { max-width: 118px; }
  .content { padding: 16px 12px 40px; }
  .form-grid, .drawer-grid, .detail-grid { grid-template-columns: 1fr; }
  .toolbar { padding: 11px 12px; }
  .toolbar .search { min-width: 100%; }
  .toolbar select { flex: 1; max-width: none; }
  .tab { font-size: 10px; padding: 7px 7px 9px; }
  .modal { max-height: 94vh; }
  .modal-layer { padding: 10px; }
  .drawer { width: 100%; }
  .queue-row { flex-wrap: wrap; }
  .queue-amount { margin-left: 28px; }
  .split-stats { gap: 14px; }
  .student-hero { align-items: flex-start; }
  .student-hero .pill { display: none; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
}
