:root {
  --navy: #0E2C45;
  --navy-2: #16395A;
  --navy-ink: #1C2B30;
  --text-body: #46565A;
  --text-soft: #5F747C;
  --bg: #FFFFFF;
  --bg-soft: #F3F5F6;
  --card: #FFFFFF;
  --border: #DBE1E3;
  --gold: #E0701C;
  --gold-dark: #C45E12;
  --gold-soft: #FCEADB;
  --gold-grad: linear-gradient(120deg, #EA8A3C 0%, #C45E12 100%);
  --teal: #0E8A86;
  --teal-dark: #0B6F6C;
  --teal-soft: #D6EFEE;
  --blue: #2563EB;
  --blue-soft: #E4ECFD;
  --violet: #7C3AED;
  --violet-soft: #EEE7FC;
  --amber: #D99405;
  --amber-soft: #FBF1D8;
  --green: #2A9D6F;
  --green-soft: #E3F4EC;
  --danger: #D6485A;
  --danger-soft: #FBE9EB;
  --shadow-sm: 0 10px 24px -16px rgba(14, 44, 69, 0.22);
  --shadow: 0 24px 48px -24px rgba(14, 44, 69, 0.3);
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text-body);
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: inherit; color: var(--navy-ink); margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex: none; }
button { font-family: inherit; }

/* ---------- Topbar ---------- */
header.topbar { position: sticky; top: 0; z-index: 40; background: var(--navy); box-shadow: 0 2px 10px rgba(8,20,33,.2); }
.topbar-inner {
  max-width: 1600px; margin: 0 auto; display: flex; align-items: center; gap: 18px;
  padding: 10px clamp(1rem, 3vw, 2rem);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: none; }
.brand .icon { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; flex: none; }
.brand .name { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1.15; }
.brand .name .hl { color: var(--gold); }
.brand .name .hl { color: var(--gold); }
.brand .tagline { font-size: 0.66rem; color: #9FB0CB; letter-spacing: 0.02em; }
@media (max-width: 700px) { .brand .tagline { display: none; } }

.mainnav { display: flex; align-items: center; gap: 2px; margin: 0 auto; flex-wrap: wrap; }
.mainnav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; color: #C8D3E6;
  font-size: 0.88rem; font-weight: 600; border-radius: 8px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.mainnav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.mainnav a.active { color: #fff; border-bottom-color: var(--gold); border-radius: 6px 6px 0 0; }
.mainnav a .count {
  background: var(--gold); color: #fff; font-size: 0.66rem; font-weight: 800; border-radius: 999px;
  min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center;
}
@media (max-width: 980px) { .mainnav { display: none; } }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 9px; background: rgba(255,255,255,.08);
  border: none; color: #C8D3E6; cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot {
  position: absolute; top: -3px; right: -3px; width: 16px; height: 16px; border-radius: 999px;
  background: var(--gold); color: #fff; font-size: 0.6rem; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--navy);
}
@media (max-width: 560px) { .icon-btn.search-only { display: none; } }

.user-trigger {
  display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 4px 10px 4px 4px; cursor: pointer;
}
.user-trigger .avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-weight: 800; font-size: 0.72rem; background: var(--gold-grad); flex: none;
}
.user-trigger .meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-trigger .u-name { color: #fff; font-weight: 700; font-size: 0.82rem; }
.user-trigger .u-role { color: #9FB0CB; font-size: 0.68rem; }
.user-trigger .caret { color: #9FB0CB; width: 14px; height: 14px; transition: transform .15s; }
@media (max-width: 560px) { .user-trigger .meta { display: none; } }

.user-menu { position: relative; }
.user-menu.open .user-trigger .caret { transform: rotate(180deg); }
.user-dropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 260px; z-index: 60;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  overflow: hidden;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown .ud-head { display: flex; align-items: center; gap: 10px; padding: 1rem 1.1rem; }
.user-dropdown .ud-head .avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-weight: 800; font-size: 0.86rem; background: var(--gold-grad); flex: none;
}
.user-dropdown .ud-head .n { font-size: 0.92rem; font-weight: 800; color: var(--navy-ink); }
.user-dropdown .ud-head .r { font-size: 0.76rem; color: var(--text-soft); margin-top: 1px; }
.user-dropdown .ud-head .e { font-size: 0.76rem; color: var(--text-soft); margin-top: 1px; word-break: break-all; }
.user-dropdown .ud-divider { height: 1px; background: var(--border); }
.user-dropdown .ud-item {
  display: flex; align-items: center; gap: 10px; padding: 0.75rem 1.1rem; font-size: 0.86rem;
  font-weight: 600; color: var(--text-body);
}
.user-dropdown .ud-item svg { width: 17px; height: 17px; color: var(--text-soft); flex: none; }
.user-dropdown .ud-item:hover { background: var(--bg-soft); }
.user-dropdown .ud-logout { color: var(--danger); background: var(--danger-soft); font-weight: 700; }
.user-dropdown .ud-logout svg { color: var(--danger); }
.user-dropdown .ud-logout:hover { background: #F6D3D8; }

.nav-toggle {
  display: none; width: 36px; height: 36px; border-radius: 9px; background: rgba(255,255,255,.08);
  border: none; color: #fff; cursor: pointer; align-items: center; justify-content: center; flex: none;
}
@media (max-width: 980px) { .nav-toggle { display: inline-flex; } }
.nav-toggle svg { width: 18px; height: 18px; }
.mobile-nav { display: none; flex-direction: column; background: var(--navy); border-top: 1px solid rgba(255,255,255,.12); padding: 0.4rem clamp(1rem, 3vw, 2rem) 1rem; }
.mobile-nav.open { display: flex; }
.mobile-nav a { color: #C8D3E6; padding: 0.75rem 0; font-size: 0.92rem; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; }
.mobile-nav a.active { color: #fff; font-weight: 700; }
@media (min-width: 981px) { .mobile-nav { display: none !important; } }

/* ---------- Layout: sidebar + main ---------- */
.dash-layout { max-width: 1600px; margin: 0 auto; display: flex; align-items: flex-start; }
.sidebar {
  width: 236px; flex: none; padding: 1.4rem 1rem; position: sticky; top: 61px;
  height: calc(100vh - 61px); display: none; flex-direction: column; justify-content: space-between;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-body); font-size: 0.88rem; font-weight: 600;
}
.sidebar-nav a svg { width: 18px; height: 18px; flex: none; color: var(--text-soft); }
.sidebar-nav a:hover { background: var(--bg); }
.sidebar-nav a.active { background: var(--gold-soft); color: var(--gold-dark); border-left: 3px solid var(--gold); padding-left: 9px; }
.sidebar-nav a.active svg { color: var(--gold-dark); }
.sidebar-nav a .badge-num {
  margin-left: auto; background: var(--gold); color: #fff; font-size: 0.66rem; font-weight: 800;
  border-radius: 999px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center;
}
.sidebar-divider { height: 1px; background: var(--border); margin: 0.9rem 4px; }
.sidebar-support {
  background: var(--gold-soft); border-radius: var(--radius); padding: 1rem; margin-top: auto;
}
.sidebar-support p.t { font-size: 0.84rem; font-weight: 700; color: var(--navy-ink); }
.sidebar-support p.d { font-size: 0.78rem; color: var(--text-soft); margin-top: 0.25rem; margin-bottom: 0.8rem; }

.sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text-soft); cursor: pointer; margin-bottom: 0.9rem; flex: none; }
.sidebar-toggle:hover { background: var(--bg-soft); color: var(--navy-ink); }
.sidebar-toggle svg { width: 16px; height: 16px; }
@media (min-width: 981px) {
  .dash-layout.collapsed .sidebar { width: 68px; padding-left: 0.6rem; padding-right: 0.6rem; overflow: hidden; }
  .dash-layout.collapsed .sidebar-nav a { overflow: hidden; white-space: nowrap; }
  .dash-layout.collapsed .sidebar-support { display: none; }
}

.main { flex: 1; min-width: 0; padding: 1.6rem clamp(1rem, 3vw, 2rem) 3rem; }
.page-head { margin-bottom: 1.4rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.55rem; font-weight: 800; }
.page-head p.d { color: var(--text-soft); font-size: 0.9rem; margin-top: 0.3rem; }
.wave { display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.6em 1.1em; border-radius: 8px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer; border: 1.5px solid transparent; white-space: nowrap;
}
.btn-gold { background: var(--gold-grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(140,106,30,0.5); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--navy-ink); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn-sm { padding: 0.45em 0.85em; font-size: 0.78rem; }
.btn-blue { background: linear-gradient(120deg, #4C8DF6, var(--blue)); color: #fff; box-shadow: 0 8px 18px -10px rgba(37,99,235,0.5); }
.btn-blue:hover { background: var(--blue); }

/* ---------- Cards / grids ---------- */
.card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.2rem 1.3rem;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 0.8rem; }
.card-head h2 { font-size: 1.02rem; font-weight: 800; }
.card-head .more { font-size: 0.82rem; font-weight: 700; color: var(--gold-dark); display: inline-flex; align-items: center; gap: 4px; }
.card-head .more:hover { text-decoration: underline; }

.stat-grid { display: grid; gap: 0.9rem; margin-bottom: 1.2rem; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1180px) { .stat-grid.cols-3, .stat-grid.cols-4, .stat-grid.cols-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stat-grid.cols-3, .stat-grid.cols-4, .stat-grid.cols-5 { grid-template-columns: 1fr; } }
.stat-card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1rem 1.1rem; display: flex; align-items: center; gap: 0.8rem;
}
.stat-card .ic { flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.stat-card .ic svg { width: 20px; height: 20px; }
.stat-card .ic.blue { background: linear-gradient(120deg, #5B9BFA, var(--blue)); }
.stat-card .ic.green { background: linear-gradient(120deg, #34D399, var(--green)); }
.stat-card .ic.amber { background: linear-gradient(120deg, #E6AC2E, var(--amber)); }
.stat-card .ic.violet { background: linear-gradient(120deg, #A78BFA, var(--violet)); }
.stat-card .ic.gold { background: var(--gold-grad); }
.stat-card .ic.teal { background: linear-gradient(120deg, #14A29D, var(--teal-dark)); }
.stat-card .n { font-size: 1.3rem; font-weight: 800; color: var(--navy-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-card .l { font-size: 0.78rem; color: var(--text-soft); margin-top: 2px; }
.stat-card .sub { font-size: 0.72rem; color: var(--text-soft); margin-top: 1px; }

/* ---------- Progress bars ---------- */
.pbar { height: 8px; border-radius: 5px; background: var(--bg-soft); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 5px; }
.pbar i.gold { background: var(--gold-grad); }
.pbar i.blue { background: linear-gradient(90deg, #5B9BFA, var(--blue)); }
.pbar i.green { background: linear-gradient(90deg, #34D399, var(--green)); }
.pbar i.violet { background: linear-gradient(90deg, #A78BFA, var(--violet)); }

.chapter-progress { display: flex; flex-direction: column; gap: 0.9rem; }
.chapter-progress .row { display: flex; align-items: center; gap: 0.7rem; }
.chapter-progress .row .lbl { font-size: 0.85rem; font-weight: 600; color: var(--navy-ink); width: 160px; flex: none; }
.chapter-progress .row .pbar { flex: 1; }
.chapter-progress .row .pct { width: 42px; text-align: right; font-size: 0.82rem; font-weight: 700; color: var(--text-soft); flex: none; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.data-table th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-soft);
  font-weight: 700; padding: 0.6rem 0.8rem; border-bottom: 1.5px solid var(--border); white-space: nowrap;
}
table.data-table td { padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
.cell-item { display: flex; align-items: center; gap: 0.7rem; }
.cell-item .ic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.cell-item .ic svg { width: 16px; height: 16px; }
.cell-item .t { font-weight: 700; color: var(--navy-ink); font-size: 0.86rem; }
.cell-item .s { font-size: 0.76rem; color: var(--text-soft); margin-top: 1px; }
.due-soon { color: var(--danger); font-weight: 700; }
.due-cell { display: flex; align-items: center; gap: 6px; color: var(--text-body); }
.due-cell svg { width: 14px; height: 14px; color: var(--text-soft); }

.badge {
  display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 700; padding: 0.32rem 0.65rem;
  border-radius: 999px; white-space: nowrap;
}
.badge.b-new { background: var(--blue-soft); color: var(--blue); }
.badge.b-progress { background: var(--amber-soft); color: var(--amber); }
.badge.b-review { background: var(--violet-soft); color: var(--violet); }
.badge.b-done { background: var(--green-soft); color: var(--green); }

.mentor-chip { display: flex; align-items: center; gap: 8px; }
.mentor-chip .av {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-size: 0.66rem; font-weight: 800; flex: none; background: linear-gradient(120deg, #A78BFA, var(--violet));
}
.mentor-chip .info { line-height: 1.3; }
.mentor-chip .info .n { display: block; font-size: 0.82rem; font-weight: 700; color: var(--navy-ink); white-space: nowrap; }
.mentor-chip .info .r { display: block; font-size: 0.7rem; color: var(--text-soft); }

.row-action-btn { display: inline-block; white-space: nowrap; padding: 0.4em 0.85em; border-radius: 7px; font-size: 0.78rem; font-weight: 700; border: 1.5px solid var(--border); background: var(--card); color: var(--navy-ink); cursor: pointer; }
.row-action-btn.primary { background: var(--gold-grad); color: #fff; border-color: transparent; }
.row-more { width: 30px; height: 30px; border-radius: 7px; border: none; background: transparent; color: var(--text-soft); cursor: pointer; display: grid; place-items: center; }
.row-more:hover { background: var(--bg-soft); }

/* ---------- Generic form field ---------- */
.tfield { margin-bottom: 1rem; }
.tfield label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--navy-ink); margin-bottom: 0.4rem; }
.tfield input, .tfield select, .tfield textarea {
  width: 100%; padding: 0.65em 0.85em; border-radius: 9px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--navy-ink); font-size: 0.86rem; font-family: inherit;
}
.tfield textarea { resize: vertical; min-height: 90px; }
.tfield input:focus-visible, .tfield select:focus-visible, .tfield textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.toggle-row:first-child { border-top: none; padding-top: 0; }
.toggle-row .t { font-size: 0.85rem; font-weight: 700; color: var(--navy-ink); }
.toggle-row .d { font-size: 0.76rem; color: var(--text-soft); margin-top: 2px; }
.switch { position: relative; flex: none; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border); border-radius: 999px; cursor: pointer; transition: background .15s; }
.switch .slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + .slider { background: var(--gold); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 1.6rem; border-bottom: 1.5px solid var(--border); margin-bottom: 1.2rem; }
.tabs a { padding: 0.7rem 0.1rem; font-size: 0.88rem; font-weight: 700; color: var(--text-soft); border-bottom: 2px solid transparent; margin-bottom: -1.5px; }
.tabs a.active { color: var(--gold-dark); border-bottom-color: var(--gold); }

/* ---------- Rubric ---------- */
.rubric-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-top: 0.6rem; }
.rubric-table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; color: var(--text-soft); font-weight: 700; padding: 0.5rem 0.6rem; border-bottom: 1.5px solid var(--border); }
.rubric-table td { padding: 0.6rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-body); }
.rubric-table td:first-child { font-weight: 700; color: var(--navy-ink); }
.rubric-table select { border: 1.5px solid var(--border); border-radius: 7px; padding: 0.3em 0.5em; font-family: inherit; font-size: 0.82rem; }
.rubric-total { display: flex; justify-content: flex-end; gap: 0.6rem; align-items: baseline; padding: 0.8rem 0.6rem 0; font-weight: 800; color: var(--navy-ink); }
.rubric-total .val { font-size: 1.25rem; color: var(--gold-dark); }

/* ---------- Rich text toolbar (decorative) ---------- */
.rte-toolbar { display: flex; gap: 4px; padding: 0.5rem; border: 1.5px solid var(--border); border-bottom: none; border-radius: 9px 9px 0 0; background: var(--bg-soft); }
.rte-toolbar button { width: 28px; height: 28px; border: none; background: transparent; border-radius: 6px; color: var(--text-soft); cursor: pointer; display: grid; place-items: center; }
.rte-toolbar button:hover { background: var(--border); color: var(--navy-ink); }
.rte-toolbar button svg { width: 15px; height: 15px; }
.rte-body { border: 1.5px solid var(--border); border-radius: 0 0 9px 9px; padding: 0.8rem; min-height: 150px; font-size: 0.86rem; font-family: inherit; width: 100%; resize: vertical; color: var(--navy-ink); }
.rte-body:focus-visible { outline: none; border-color: var(--gold); }

.overdue-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.overdue-row:first-child { border-top: none; padding-top: 0; }
.overdue-row .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-top: 6px; }
.overdue-row .t { font-size: 0.85rem; font-weight: 700; color: var(--navy-ink); }
.overdue-row .s { font-size: 0.76rem; color: var(--text-soft); margin-top: 1px; }
.overdue-row .warn { color: var(--danger); font-weight: 700; font-size: 0.74rem; margin-left: auto; flex: none; white-space: nowrap; }

/* ---------- Student picker list ---------- */
.student-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.6rem; border-radius: 10px; cursor: pointer; }
.student-row:hover { background: var(--bg-soft); }
.student-row.active { background: var(--gold-soft); }
.student-row .av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.76rem; }
.student-row .body { flex: 1; min-width: 0; }
.student-row .n { font-size: 0.86rem; font-weight: 700; color: var(--navy-ink); }
.student-row .p { font-size: 0.74rem; color: var(--text-soft); margin: 2px 0 4px; }
.student-row .pbar { height: 5px; }

/* ---------- Path step (learning path designer) ---------- */
.path-list { position: relative; }
.path-step { display: flex; gap: 0.9rem; padding-bottom: 1.4rem; position: relative; }
.path-step:last-child { padding-bottom: 0; }
.path-step::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--border); }
.path-step:last-child::before { display: none; }
.path-step .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 800; z-index: 1; color: #fff;
}
.path-step .body2 { flex: 1; min-width: 0; background: var(--bg-soft); border-radius: 12px; padding: 0.8rem 1rem; }
.path-step .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; }
.path-step .top .t { font-size: 0.92rem; font-weight: 800; color: var(--navy-ink); }
.path-step .top .d { font-size: 0.78rem; color: var(--text-soft); margin-top: 2px; }
.path-step .right { text-align: right; flex: none; }
.path-step .right .due { font-size: 0.72rem; color: var(--text-soft); }
.path-step .pbar-row { display: flex; align-items: center; gap: 8px; margin-top: 0.6rem; }
.path-step .pbar-row .pbar { flex: 1; }
.path-step .pbar-row .pct { font-size: 0.78rem; font-weight: 700; color: var(--text-soft); flex: none; width: 34px; text-align: right; }

.path-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.path-header .av { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.path-header .name { font-size: 1.1rem; font-weight: 800; color: var(--navy-ink); display: flex; align-items: center; gap: 8px; }
.path-header .meta { font-size: 0.82rem; color: var(--text-soft); margin-top: 2px; }
.path-header .overall { margin-left: auto; text-align: right; }
.path-header .overall .lbl { font-size: 0.76rem; color: var(--text-soft); }
.path-header .overall .val { font-size: 1.1rem; font-weight: 800; color: var(--navy-ink); }
.path-header .overall .pbar { width: 160px; margin-top: 4px; }

/* ---------- Filters ---------- */
.filter-row { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.search {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1.5px solid var(--border); border-radius: 9px; padding: 0.55em 0.8em;
}
.search svg { width: 16px; height: 16px; color: var(--text-soft); flex: none; }
.search input { border: none; outline: none; font-size: 0.86rem; width: 100%; font-family: inherit; background: transparent; }
.filter-row select {
  border: 1.5px solid var(--border); border-radius: 9px; padding: 0.55em 0.8em; font-size: 0.84rem;
  font-family: inherit; background: var(--card); color: var(--navy-ink);
}

/* ---------- Notifications / activity feed ---------- */
.feed { display: flex; flex-direction: column; gap: 0.9rem; }
.feed-item { display: flex; gap: 0.7rem; }
.feed-item .av {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-size: 0.64rem; font-weight: 800; background: linear-gradient(120deg, #A78BFA, var(--violet));
}
.feed-item .av.sys { background: var(--gold-grad); }
.feed-item p { font-size: 0.84rem; color: var(--text-body); line-height: 1.4; }
.feed-item p b { color: var(--navy-ink); }
.feed-item .t { font-size: 0.72rem; color: var(--text-soft); margin-top: 2px; }

/* ---------- Deliverables ---------- */
.deliverable-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.deliverable-row:first-child { border-top: none; padding-top: 0; }
.deliverable-row .ic { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.deliverable-row .name { flex: 1; font-size: 0.85rem; font-weight: 600; color: var(--navy-ink); }
.deliverable-row .stat { font-size: 0.74rem; font-weight: 700; }
.deliverable-row .stat.done { color: var(--green); }
.deliverable-row .stat.pending { color: var(--text-soft); }
.deliverable-row a.dl { color: var(--text-soft); flex: none; }
.deliverable-row a.dl svg { width: 15px; height: 15px; }

/* ---------- Step tracker ---------- */
.step-tracker { display: flex; flex-direction: column; }
.step { display: flex; gap: 0.8rem; padding-bottom: 1.1rem; position: relative; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border);
}
.step:last-child::before { display: none; }
.step .num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; z-index: 1;
}
.step.done .num { background: var(--green); color: #fff; }
.step.active .num { background: var(--gold-grad); color: #fff; }
.step.todo .num { background: var(--card); border: 2px solid var(--border); color: var(--text-soft); }
.step .txt .t { font-size: 0.86rem; font-weight: 700; color: var(--navy-ink); }
.step .txt .s { font-size: 0.76rem; margin-top: 1px; }
.step.done .txt .s { color: var(--green); }
.step.active .txt .s { color: var(--gold-dark); }
.step.todo .txt .s { color: var(--text-soft); }

/* ---------- Goal / checklist ---------- */
.goal-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0; }
.goal-row .ic { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.goal-row .ic svg { width: 15px; height: 15px; }
.goal-row .body { flex: 1; min-width: 0; }
.goal-row .top { display: flex; align-items: center; justify-content: space-between; font-size: 0.84rem; margin-bottom: 4px; }
.goal-row .top .lbl { font-weight: 600; color: var(--navy-ink); }
.goal-row .top .frac { color: var(--text-soft); font-weight: 700; }

.check-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; font-size: 0.86rem; }
.check-row .dot-check { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.check-row.done .dot-check { background: var(--green); color: #fff; }
.check-row.pending .dot-check { border: 2px solid var(--border); }
.check-row.done span.lbl { color: var(--text-body); }
.check-row.pending span.lbl { color: var(--text-soft); }
.check-row .dot-check svg { width: 11px; height: 11px; }

.streak-banner {
  display: flex; align-items: center; gap: 0.6rem; background: var(--gold-soft); border-radius: 10px;
  padding: 0.7rem 0.9rem; margin-top: 0.9rem; font-size: 0.82rem; font-weight: 700; color: var(--gold-dark);
}

/* ---------- Milestone list ---------- */
.milestone-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.milestone-row:first-child { border-top: none; padding-top: 0; }
.milestone-row .ic { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.milestone-row .ic svg { width: 17px; height: 17px; }
.milestone-row .t { font-size: 0.85rem; font-weight: 700; color: var(--navy-ink); }
.milestone-row .d { font-size: 0.74rem; color: var(--text-soft); margin-top: 1px; }
.milestone-row .check { margin-left: auto; color: var(--green); flex: none; }
.milestone-row .check svg { width: 18px; height: 18px; }

/* ---------- Improve list ---------- */
.improve-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; }
.improve-row .body { flex: 1; min-width: 0; }
.improve-row .top { display: flex; justify-content: space-between; font-size: 0.83rem; margin-bottom: 4px; }
.improve-row .top .lbl { font-weight: 600; color: var(--navy-ink); }
.improve-row .top .pct { color: var(--text-soft); font-weight: 700; }

/* ---------- Due-soon tile list ---------- */
.due-tile-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0; border-top: 1px solid var(--border); }
.due-tile-row:first-child { border-top: none; padding-top: 0; }
.due-tile-row .date-box {
  flex: none; width: 42px; height: 42px; border-radius: 9px; background: var(--gold-soft); color: var(--gold-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.due-tile-row .date-box .d { font-size: 0.92rem; font-weight: 800; }
.due-tile-row .date-box .m { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; }
.due-tile-row .body .t { font-size: 0.84rem; font-weight: 700; color: var(--navy-ink); }
.due-tile-row .body .s { font-size: 0.75rem; color: var(--text-soft); margin-top: 2px; }
.due-tile-row .body .s .warn { color: var(--danger); font-weight: 700; }

/* ---------- Feedback list ---------- */
.fb-row { padding: 0.7rem 0; border-top: 1px solid var(--border); }
.fb-row:first-child { border-top: none; padding-top: 0; }
.fb-row .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.fb-row p { font-size: 0.83rem; color: var(--text-body); line-height: 1.45; }
.fb-row p b { color: var(--navy-ink); }
.fb-row .t { font-size: 0.72rem; color: var(--text-soft); margin-top: 3px; }

.help-card { background: var(--gold-soft); border: none; }
.help-card p.t { font-size: 0.86rem; font-weight: 700; color: var(--navy-ink); }
.help-card p.d { font-size: 0.8rem; color: var(--text-body); margin: 0.35rem 0 0.9rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; flex-wrap: wrap; gap: 0.8rem; }
.pagination .pages { display: flex; align-items: center; gap: 4px; }
.pagination .pages button {
  width: 30px; height: 30px; border-radius: 7px; border: 1.5px solid var(--border); background: var(--card);
  color: var(--navy-ink); font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.pagination .pages button.active { background: var(--gold-grad); color: #fff; border-color: transparent; }
.pagination .pages button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination .info { font-size: 0.8rem; color: var(--text-soft); }
.pagination .per-page { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-soft); }
.pagination .per-page select { border: 1.5px solid var(--border); border-radius: 7px; padding: 0.3em 0.5em; font-family: inherit; }

/* ---------- Portfolio tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.tile {
  background: var(--bg-soft); border-radius: 10px; padding: 0.7rem 0.6rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.tile .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.tile .ic svg { width: 15px; height: 15px; }
.tile .lbl { font-size: 0.76rem; font-weight: 700; color: var(--navy-ink); }
.tile .frac { font-size: 0.72rem; color: var(--text-soft); }

/* ---------- Donut ring stat ---------- */
.ring-card { display: flex; align-items: center; gap: 1rem; }
.ring-wrap { position: relative; width: 84px; height: 84px; flex: none; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.05rem; font-weight: 800; color: var(--navy-ink); }
.ring-card .n { font-size: 1.3rem; font-weight: 800; color: var(--navy-ink); }
.ring-card .l { font-size: 0.8rem; color: var(--text-soft); margin-top: 2px; }
.ring-card .sub { font-size: 0.76rem; color: var(--text-soft); margin-top: 6px; }
.ring-card .sub b { color: var(--gold-dark); }

/* ---------- Line chart ---------- */
.chart-legend { display: flex; align-items: center; gap: 1.2rem; font-size: 0.78rem; color: var(--text-soft); margin-bottom: 0.8rem; }
.chart-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; }
.chart-x span { font-size: 0.7rem; color: var(--text-soft); text-align: center; line-height: 1.4; }
.chart-foot { display: flex; gap: 0.8rem; margin-top: 1rem; }
.chart-foot .box { flex: 1; background: var(--bg-soft); border-radius: 9px; padding: 0.6rem 0.8rem; display: flex; align-items: center; gap: 0.6rem; }
.chart-foot .box .ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.chart-foot .box .t { font-size: 0.8rem; font-weight: 800; color: var(--navy-ink); }
.chart-foot .box .s { font-size: 0.7rem; color: var(--text-soft); }

/* ==================================================
   Teacher shell — navy full-height sidebar + light topbar
   ================================================== */
.t-shell { display: flex; align-items: stretch; min-height: 100vh; }
.t-sidebar {
  width: 258px; flex: none; background: var(--navy); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 1.2rem 1rem 1rem;
}
@media (max-width: 980px) { .t-sidebar { display: none; } .t-sidebar.open { display: flex; position: fixed; z-index: 50; height: 100vh; } }
.t-brand { display: flex; align-items: center; gap: 10px; padding: 0.3rem 0.4rem 1.1rem; }
.t-brand .icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: #fff; }
.t-brand .name { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; line-height: 1.15; }
.t-brand .name .hl { color: var(--gold); }
.t-brand .tagline { font-size: 0.64rem; color: #9FB0CB; letter-spacing: 0.02em; }

.t-profile { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.06); border-radius: 12px; padding: 0.7rem 0.8rem; margin-bottom: 1rem; }
.t-profile .ph { position: relative; flex: none; }
.t-profile .avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.86rem; background: var(--gold-grad); }
.t-profile .status-dot { position: absolute; bottom: 0; right: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--navy); }
.t-profile .role { font-size: 0.68rem; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 0.03em; }
.t-profile .name { font-size: 0.9rem; font-weight: 700; color: #fff; margin-top: 1px; }
.t-profile .online { font-size: 0.7rem; color: #9FB0CB; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.t-profile .online .d { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.t-nav { display: flex; flex-direction: column; gap: 2px; }
.t-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: #C8D3E6; font-size: 0.86rem; font-weight: 600;
}
.t-nav a svg { width: 17px; height: 17px; flex: none; }
.t-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.t-nav a.active { background: var(--gold-soft); color: var(--gold-dark); }
.t-nav a .badge-num { margin-left: auto; background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 800; border-radius: 999px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; }
.t-nav-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 0.8rem 4px; }

.t-support { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }
.t-support .row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.78rem; color: #C8D3E6; }
.t-support .row svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--gold); }
.t-support a { color: var(--gold); font-weight: 700; }

.t-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t-topbar { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.t-topbar-inner { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1.4rem; }
.t-hamburger { display: inline-flex; width: 36px; height: 36px; border-radius: 9px; border: none; background: var(--bg-soft); color: var(--navy-ink); cursor: pointer; align-items: center; justify-content: center; }
.t-hamburger svg { width: 18px; height: 18px; }
@media (min-width: 981px) { .t-hamburger { display: none; } }
.t-topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.t-topbar .icon-btn { background: var(--bg-soft); color: var(--text-soft); }
.t-topbar .icon-btn:hover { background: var(--border); color: var(--navy-ink); }

/* ---------- Top horizontal quick-nav (mirrors sidebar) — hidden, sidebar is the single nav ---------- */
.t-mainnav { display: none; }

/* ---------- Sidebar collapse toggle (desktop) ---------- */
.t-sidebar-head { display: flex; align-items: center; gap: 6px; }
.t-sidebar-head .t-brand { flex: 1; min-width: 0; }
.t-sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px; border: none; background: rgba(255,255,255,0.08); color: #C8D3E6; cursor: pointer; flex: none; }
.t-sidebar-toggle:hover { background: rgba(255,255,255,0.16); color: #fff; }
.t-sidebar-toggle svg { width: 15px; height: 15px; }
@media (max-width: 980px) { .t-sidebar-toggle { display: none; } }
@media (min-width: 981px) {
  .t-shell.collapsed .t-sidebar { width: 74px; padding-left: 0.6rem; padding-right: 0.6rem; overflow: hidden; }
  .t-shell.collapsed .t-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .t-shell.collapsed .t-brand .name, .t-shell.collapsed .t-brand .tagline { display: none; }
  .t-shell.collapsed .t-sidebar-head { justify-content: center; }
  .t-shell.collapsed .t-profile { justify-content: center; padding: 0.6rem 0.4rem; }
  .t-shell.collapsed .t-profile > div:last-child { display: none; }
  .t-shell.collapsed .t-nav a { overflow: hidden; white-space: nowrap; }
  .t-shell.collapsed .t-support { display: none; }
}
.t-topbar .icon-btn .dot { border-color: var(--card); }
.t-user-trigger { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.t-user-trigger .avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.78rem; background: var(--gold-grad); }
.t-user-trigger .meta { line-height: 1.25; text-align: left; }
.t-user-trigger .u-name { display: block; font-size: 0.84rem; font-weight: 700; color: var(--navy-ink); white-space: nowrap; }
.t-user-trigger .u-role { display: block; font-size: 0.7rem; color: var(--text-soft); }
.t-user-trigger .caret { width: 14px; height: 14px; color: var(--text-soft); }
@media (max-width: 560px) { .t-user-trigger .meta { display: none; } }

.t-main { flex: 1; padding: 1.6rem clamp(1rem, 3vw, 2rem) 3rem; }

/* ---------- Chat (Mentor của tôi) ---------- */
.chat-card { display: flex; flex-direction: column; height: 640px; }
.chat-window { flex: 1; overflow-y: auto; padding-right: 4px; }
.chat-day-divider { text-align: center; font-size: 0.72rem; color: var(--text-soft); margin: 0.4rem 0 1rem; }
.chat-msg { display: flex; gap: 0.6rem; margin-bottom: 1.1rem; max-width: 80%; }
.chat-msg.mine { margin-left: auto; flex-direction: row-reverse; }
.chat-msg .av { width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover; }
.chat-msg .col { display: flex; flex-direction: column; }
.chat-msg.mine .col { align-items: flex-end; }
.chat-msg .bubble { background: var(--bg-soft); border-radius: 14px 14px 14px 4px; padding: 0.7rem 0.9rem; font-size: 0.86rem; color: var(--navy-ink); line-height: 1.5; }
.chat-msg.mine .bubble { background: var(--gold-grad); color: #fff; border-radius: 14px 14px 4px 14px; }
.chat-msg .time { font-size: 0.68rem; color: var(--text-soft); margin-top: 4px; display: flex; align-items: center; gap: 3px; }
.chat-msg .time svg { width: 12px; height: 12px; color: var(--teal); }
.chat-input-row { display: flex; align-items: center; gap: 0.6rem; border-top: 1px solid var(--border); padding-top: 0.9rem; margin-top: 0.6rem; }
.chat-input-row input { flex: 1; border: 1.5px solid var(--border); border-radius: 999px; padding: 0.62em 1.1em; font-size: 0.86rem; font-family: inherit; }
.chat-input-row input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.chat-round-btn { width: 38px; height: 38px; border-radius: 50%; border: none; display: grid; place-items: center; cursor: pointer; flex: none; }
.chat-round-btn.send { background: var(--gold-grad); color: #fff; }
.chat-round-btn.attach { background: var(--bg-soft); color: var(--text-soft); }

/* ---------- Mentor profile ---------- */
.mentor-photo { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 0.9rem; position: relative; }
.mentor-photo img, .mentor-photo .ph-fallback { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mentor-photo .ph-fallback { background: var(--gold-grad); color: #fff; font-weight: 800; font-size: 1.4rem; display: grid; place-items: center; }
.mentor-photo .dot { position: absolute; bottom: 3px; right: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--green); border: 3px solid var(--card); }
.tag-pill { display: inline-flex; font-size: 0.74rem; font-weight: 700; padding: 0.32rem 0.7rem; border-radius: 999px; margin: 0 6px 6px 0; }
.tag-pill.c1 { background: var(--blue-soft); color: var(--blue); }
.tag-pill.c2 { background: var(--green-soft); color: var(--green); }
.tag-pill.c3 { background: var(--amber-soft); color: var(--amber); }
.tag-pill.c4 { background: var(--violet-soft); color: var(--violet); }
.info-line { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.82rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.info-line:first-of-type { border-top: none; }
.info-line svg { width: 16px; height: 16px; color: var(--text-soft); flex: none; margin-top: 1px; }
.info-line .l { color: var(--text-soft); }
.info-line .v { font-weight: 700; color: var(--navy-ink); }

.appt-date { text-align: center; background: var(--gold-soft); border-radius: 12px; padding: 0.8rem; margin-bottom: 0.9rem; }
.appt-date .mo { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; color: var(--gold-dark); text-transform: uppercase; }
.appt-date .day { font-size: 1.7rem; font-weight: 800; color: var(--navy-ink); line-height: 1.1; }
.appt-date .dow { font-size: 0.74rem; color: var(--text-soft); }

.chip-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.65rem 0; border-top: 1px solid var(--border); font-size: 0.83rem; color: var(--text-body); cursor: pointer; }
.chip-row:first-child { border-top: none; padding-top: 0; }
.chip-row:hover { color: var(--gold-dark); }
.chip-row svg { width: 15px; height: 15px; color: var(--text-soft); flex: none; }

/* ---------- Documents ---------- */
.doc-icon { flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--bg-soft); display: grid; place-items: center; }
.doc-icon svg { width: 18px; height: 18px; }
.doc-star { background: none; border: none; cursor: pointer; color: var(--border); display: grid; place-items: center; flex: none; padding: 2px; }
.doc-star.fav { color: var(--gold); }
.doc-star svg { width: 15px; height: 15px; }
.type-tag { display: inline-flex; font-size: 0.72rem; font-weight: 700; padding: 0.28rem 0.6rem; border-radius: 7px; white-space: nowrap; }
.doc-row-list { display: flex; flex-direction: column; }
.doc-row-list .item { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0; border-top: 1px solid var(--border); font-size: 0.83rem; }
.doc-row-list .item:first-child { border-top: none; padding-top: 0; }
.doc-row-list .item .name { flex: 1; min-width: 0; color: var(--navy-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row-list .item .date { flex: none; font-size: 0.72rem; color: var(--text-soft); }

/* ---------- Admin: approve/reject icon buttons ---------- */
.icon-action { width: 30px; height: 30px; border-radius: 8px; border: none; cursor: pointer; display: grid; place-items: center; flex: none; }
.icon-action svg { width: 15px; height: 15px; }
.icon-action.approve { background: var(--green-soft); color: var(--green); }
.icon-action.approve:hover { background: var(--green); color: #fff; }
.icon-action.reject { background: var(--danger-soft); color: var(--danger); }
.icon-action.reject:hover { background: var(--danger); color: #fff; }
.icon-action.view { background: var(--blue-soft); color: var(--blue); }
.icon-action.view:hover { background: var(--blue); color: #fff; }
.icon-action.edit { background: var(--gold-soft); color: var(--gold-dark); }
.icon-action.edit:hover { background: var(--gold-grad); color: #fff; }
.icon-action.delete { background: var(--danger-soft); color: var(--danger); }
.icon-action.delete:hover { background: var(--danger); color: #fff; }
.action-pair { display: flex; align-items: center; gap: 6px; }

/* ---------- Admin: multi-segment donut ---------- */
.donut-wrap { position: relative; width: 130px; height: 130px; margin: 0 auto; }
.donut-wrap .ring { width: 100%; height: 100%; border-radius: 50%; }
.donut-wrap .hole {
  position: absolute; inset: 18px; background: var(--card); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-wrap .hole .n { font-size: 1.3rem; font-weight: 800; color: var(--navy-ink); }
.donut-wrap .hole .l { font-size: 0.68rem; color: var(--text-soft); }
.donut-legend { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.donut-legend .row { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; }
.donut-legend .row .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend .row .lbl { flex: 1; color: var(--text-body); }
.donut-legend .row .val { font-weight: 700; color: var(--navy-ink); }

/* ---------- Admin: permission matrix ---------- */
.perm-group { border-bottom: 1px solid var(--border); }
.perm-group:last-child { border-bottom: none; }
.perm-group-head { display: flex; align-items: center; gap: 8px; padding: 0.7rem 0.2rem; cursor: pointer; font-size: 0.86rem; font-weight: 700; color: var(--navy-ink); }
.perm-group-head svg.chev { width: 14px; height: 14px; color: var(--text-soft); transition: transform .15s; flex: none; }
.perm-group.open .chev { transform: rotate(90deg); }
.perm-group-body { display: none; padding-bottom: 0.4rem; }
.perm-group.open .perm-group-body { display: block; }
.perm-row { display: grid; grid-template-columns: 1fr repeat(4, 56px); align-items: center; padding: 0.55rem 0.2rem 0.55rem 1.6rem; font-size: 0.84rem; color: var(--text-body); }
.perm-row-head { display: grid; grid-template-columns: 1fr repeat(4, 56px); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--text-soft); padding: 0 0.2rem 0.5rem 1.6rem; }
.perm-row-head span:not(:first-child), .perm-row span.chk { text-align: center; }
.perm-row input[type=checkbox], .perm-row-head input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }

/* ---------- Admin: breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-soft); margin-top: 0.3rem; }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--gold-dark); }
.breadcrumb span.sep { color: var(--border); }
.breadcrumb span.cur { color: var(--navy-ink); font-weight: 600; }

/* ---------- Admin: table checkbox ---------- */
.data-table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
.data-table th:first-child, .data-table td:first-child.chk-col { width: 34px; }

/* ---------- Admin: number stepper ---------- */
.stepper { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 9px; overflow: hidden; width: fit-content; }
.stepper button { width: 36px; height: 38px; border: none; background: var(--bg-soft); color: var(--navy-ink); font-size: 1rem; font-weight: 700; cursor: pointer; }
.stepper button:hover { background: var(--border); }
.stepper input { width: 60px; border: none; text-align: center; font-size: 0.9rem; font-weight: 700; color: var(--navy-ink); font-family: inherit; }
.stepper input:focus-visible { outline: none; }

/* ---------- Admin: role summary card ---------- */
.role-card { display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.9rem 0; border-top: 1px solid var(--border); }
.role-card:first-child { border-top: none; padding-top: 0; }
.role-card .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.role-card .t { font-size: 0.9rem; font-weight: 800; color: var(--navy-ink); }
.role-card .d { font-size: 0.8rem; color: var(--text-soft); margin-top: 2px; }
.role-card .count { margin-left: auto; flex: none; text-align: right; }
.role-card .count .n { font-size: 1.05rem; font-weight: 800; color: var(--navy-ink); }
.role-card .count .l { font-size: 0.68rem; color: var(--text-soft); }

/* ---------- Two-col grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.2rem; }
@media (max-width: 1180px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-main-side { display: grid; grid-template-columns: 2.3fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 1180px) { .grid-main-side { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 1.2rem; }
