  /* ============================================================
   Driving Tests · Instructor Portal — design system
   Bootstrap 5 augmentation. Class names match the existing
   learner portal (dt-card, dt-badge-*, btn-brand) so this lifts
   cleanly into ASP.NET Core Razor / _Layout.cshtml.
   ============================================================ */

:root {
  /* Brand */
  --brand:        #6366f1;
  --brand-hover:  #4f46e5;
  --brand-deep:   #4338ca;
  --brand-ink:    #312e81;
  --brand-soft:   #eef2ff;

  /* Sky — used for "match offer" highlights (sits in same blue family) */
  --sky:          #0ea5e9;
  --sky-soft:     #e0f2fe;
  --sky-ink:      #075985;

  /* Semantic */
  --success:      #10b981; --success-soft: #d1fae5; --success-ink: #065f46;
  --warning:      #f59e0b; --warning-soft: #fef3c7; --warning-ink: #92400e;
  --danger:       #ef4444; --danger-soft:  #fee2e2; --danger-ink:  #991b1b;
  --info:         #3b82f6; --info-soft:    #dbeafe; --info-ink:    #1e40af;
  --teal:         #06b6d4; --teal-soft:    #ecfeff; --teal-ink:    #155e75;

  /* Neutrals */
  --bg:           #f5f6fb;
  --surface:      #ffffff;
  --surface-alt:  #fafbfd;
  --border:       #e2e8f0;
  --border-soft:  #eef0f5;
  --ink:          #0f172a;
  --ink-2:        #334155;
  --ink-3:        #64748b;
  --ink-4:        #94a3b8;
  --ink-5:        #cbd5e1;

  /* Layout */
  --sidebar-w:    264px;
  --topbar-h:     60px;

  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    14px;
  --radius-xl:    20px;

  --shadow-1:     0 1px 2px rgba(15,23,42,0.04);
  --shadow-2:     0 1px 2px rgba(15,23,42,0.04), 0 6px 18px rgba(15,23,42,0.06);
  --shadow-3:     0 12px 30px rgba(15,23,42,0.18);
}

/* ============================================================ Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: #c7d2fe; color: var(--brand-ink); }

/* Slim scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-5); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }
::-webkit-scrollbar-track { background: transparent; }

/* Focus ring */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ============================================================ Sidebar */
.dt-sidebar {
  position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 1030;
  transition: transform 0.22s ease;
}
.dt-sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.dt-sidebar-brand .logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  box-shadow: 0 6px 18px rgba(99,102,241,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.dt-sidebar-brand .name { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.dt-sidebar-brand .sub  { font-size: 10.5px; color: var(--ink-4); font-weight: 500; }

.dt-sidebar-nav {
  flex: 1; padding: 14px 10px; overflow-y: auto;
}
.dt-sidebar-section {
  font-size: 10.5px; font-weight: 700; color: var(--ink-4);
  letter-spacing: 0.08em; padding: 6px 10px; text-transform: uppercase;
}
.dt-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ink-2); font-weight: 500; font-size: 13.5px;
  text-decoration: none; margin-bottom: 2px;
  border: none; background: transparent; width: 100%; text-align: left;
}
.dt-nav-link:hover { background: #f8fafc; color: var(--ink); }
.dt-nav-link i { font-size: 17px; color: var(--ink-3); width: 20px; text-align: center; }
.dt-nav-link.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.dt-nav-link.active i { color: var(--brand); }
.dt-nav-link .badge-count {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; color: #fff; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.dt-nav-link .badge-count.sky    { background: var(--sky); }
.dt-nav-link .badge-count.danger { background: var(--danger); }

.dt-sidebar-stat {
  margin: 18px 8px 0; padding: 14px; border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid #e0e7ff;
}
.dt-sidebar-stat .label { font-size: 10.5px; font-weight: 700; color: var(--brand-deep); letter-spacing: 0.04em; text-transform: uppercase; }
.dt-sidebar-stat .value { font-size: 22px; font-weight: 800; color: var(--brand-deep); letter-spacing: -0.02em; line-height: 1; margin-top: 6px; }
.dt-sidebar-stat .desc  { font-size: 11.5px; color: var(--brand-hover); margin-top: 4px; font-weight: 500; }

.dt-sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-top: 1px solid var(--border-soft);
}
.dt-sidebar-user .name { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.dt-sidebar-user .meta { font-size: 10.5px; color: var(--ink-4); }
.dt-sidebar-user .truncate { min-width: 0; flex: 1; }
.dt-sidebar-user .truncate > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================ Top bar + main */
.dt-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.dt-topbar {
  position: sticky; top: 0; z-index: 1020;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: rgba(245,246,251,0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.dt-topbar-toggle { display: none; }   /* shown on mobile */
.dt-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-3); font-weight: 500;
}
.dt-breadcrumb .sep { color: var(--ink-5); font-size: 13px; }
.dt-breadcrumb a { color: var(--ink-3); }
.dt-breadcrumb a:hover { color: var(--ink-2); }
.dt-breadcrumb .current { color: var(--ink); font-weight: 600; }

.dt-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 0 12px; height: 34px; width: 280px;
  max-width: 32vw;
}
.dt-search input {
  flex: 1; min-width: 0; border: none; outline: none;
  background: transparent; font-size: 13px; color: var(--ink);
}
.dt-search i { color: var(--ink-4); font-size: 14px; }
.dt-search kbd {
  font-size: 10.5px; color: var(--ink-4); padding: 1px 5px;
  border-radius: 4px; background: #f1f5f9; border: 1px solid var(--border);
  font-family: ui-monospace, monospace; font-weight: 600;
}

.dt-content {
  padding: 24px 28px 60px;
  max-width: 1320px; width: 100%; margin: 0 auto;
}

/* ============================================================ Page header */
.dt-page-header { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.dt-page-header .grow { flex: 1; min-width: 0; }
.dt-page-header .eyebrow {
  font-size: 11.5px; font-weight: 700; color: var(--brand);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px;
}
.dt-page-header h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -0.025em;
  margin: 0; line-height: 1.1;
}
.dt-page-header .sub {
  font-size: 13.5px; color: var(--ink-3); margin-top: 6px;
  max-width: 720px; line-height: 1.5;
}
.dt-page-header .actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ============================================================ Cards */
.dt-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.dt-card.padded   { padding: 20px; }
.dt-card.interactive { cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s; }
.dt-card.interactive:hover { box-shadow: var(--shadow-2); border-color: var(--ink-5); }

.dt-card-header {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px 14px; border-bottom: 1px solid var(--border-soft);
}
.dt-card-header .icon-tile {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 17px;
}
.dt-card-header .icon-tile.sky     { background: var(--sky-soft);     color: var(--sky); }
.dt-card-header .icon-tile.success { background: var(--success-soft); color: var(--success); }
.dt-card-header .icon-tile.warning { background: var(--warning-soft); color: var(--warning); }
.dt-card-header .icon-tile.danger  { background: var(--danger-soft);  color: var(--danger); }
.dt-card-header .icon-tile.teal    { background: var(--teal-soft);    color: var(--teal); }
.dt-card-header .grow { flex: 1; min-width: 0; }
.dt-card-header .title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.dt-card-header .desc  { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

.dt-card-body { padding: 20px; }

/* ============================================================ Buttons */
.btn-brand {
  background: var(--brand); color: #fff;
  border: 1px solid transparent;
  font-weight: 600; border-radius: 9px;
  height: 36px; padding: 0 14px; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 1px 2px rgba(67,56,202,0.25), 0 4px 12px rgba(99,102,241,0.22);
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-brand:hover { background: var(--brand-hover); color: #fff; }
.btn-brand:focus { color: #fff; }

.btn-soft {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border);
  font-weight: 600; border-radius: 9px;
  height: 36px; padding: 0 14px; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-soft:hover { background: #f8fafc; }

.btn-tinted {
  background: var(--brand-soft); color: var(--brand-deep);
  border: 1px solid transparent;
  font-weight: 600; border-radius: 9px;
  height: 36px; padding: 0 14px; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.btn-tinted:hover { background: #e0e7ff; color: var(--brand-deep); }

.btn-ghost {
  background: transparent; color: var(--ink-2);
  border: 1px solid transparent;
  font-weight: 600; border-radius: 9px;
  height: 36px; padding: 0 14px; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }

.btn-danger-soft {
  background: var(--danger-soft); color: var(--danger-ink);
  border: 1px solid #fecaca;
  font-weight: 600; border-radius: 9px;
  height: 36px; padding: 0 14px; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.btn-danger-soft:hover { background: #fecaca; color: var(--danger-ink); }

/* Sizes */
.btn-sm.btn-brand, .btn-sm.btn-soft, .btn-sm.btn-tinted, .btn-sm.btn-ghost, .btn-sm.btn-danger-soft {
  height: 30px; padding: 0 10px; font-size: 12.5px;
}

/* Icon-only square */
.btn-icon {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0; padding: 0;
}
.btn-icon:hover { background: #f8fafc; }
.btn-icon i { font-size: 16px; }
.btn-icon .badge-count {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 99px;
  background: var(--danger); color: #fff;
  font-size: 9.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--surface);
}

/* ============================================================ Badges */
.dt-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px;
  font-weight: 600; font-size: 11.5px;
  letter-spacing: -0.005em; white-space: nowrap;
  border: 1px solid transparent;
}
.dt-badge i { font-size: 11px; }
.dt-badge-sm { font-size: 10.5px; padding: 2px 7px; gap: 4px; }
.dt-badge-sm i { font-size: 10px; }

.dt-badge-neutral { background: #f1f5f9; color: var(--ink-2);    border-color: var(--border); }
.dt-badge-brand   { background: var(--brand-soft);   color: var(--brand-deep);   border-color: #dde0ff; }
.dt-badge-sky     { background: var(--sky-soft);     color: var(--sky-ink);      border-color: #bae6fd; }
.dt-badge-success { background: var(--success-soft); color: var(--success-ink);  border-color: #a7f3d0; }
.dt-badge-warning { background: var(--warning-soft); color: var(--warning-ink);  border-color: #fde68a; }
.dt-badge-danger  { background: var(--danger-soft);  color: var(--danger-ink);   border-color: #fecaca; }
.dt-badge-info    { background: var(--info-soft);    color: var(--info-ink);     border-color: #bfdbfe; }
.dt-badge-teal    { background: var(--teal-soft);    color: var(--teal-ink);     border-color: #a5f3fc; }

/* ============================================================ Avatar */
.dt-avatar {
  border-radius: 99px; color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  letter-spacing: -0.02em; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.dt-avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.dt-avatar.md { width: 36px; height: 36px; font-size: 13px; }
.dt-avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.dt-avatar.xl { width: 64px; height: 64px; font-size: 24px; }

/* ============================================================ Status dot */
.dt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
.dt-dot.success { background: var(--success); }
.dt-dot.warning { background: var(--warning); }
.dt-dot.danger  { background: var(--danger); }
.dt-dot.sky     { background: var(--sky); }
.dt-dot.neutral { background: var(--ink-4); }
.dt-dot.pulse {
  position: relative;
  animation: dt-pulse 1.6s infinite;
}
@keyframes dt-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ============================================================ Tabs (segmented) */
.dt-tabs {
  display: inline-flex; background: #eef0f5; padding: 3px; border-radius: 10px; gap: 2px;
}
.dt-tabs .tab {
  padding: 6px 12px; border: none; background: transparent;
  color: var(--ink-3); font-weight: 600; font-size: 12.5px;
  border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.dt-tabs .tab i { font-size: 13px; }
.dt-tabs .tab .pill {
  font-size: 10.5px; padding: 1px 6px; border-radius: 99px;
  background: #fff; color: var(--ink-3); font-weight: 700;
}
.dt-tabs .tab.active {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}
.dt-tabs .tab.active .pill { background: var(--brand-soft); color: var(--brand-deep); }

/* Underlined tabs (sub-nav on student detail) */
.dt-tabs-u {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
}
.dt-tabs-u .tab {
  padding: 10px 14px; border: none; background: transparent;
  color: var(--ink-3); font-weight: 600; font-size: 13px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  position: relative; margin-bottom: -1px;
}
.dt-tabs-u .tab i { font-size: 14px; }
.dt-tabs-u .tab.active { color: var(--brand); }
.dt-tabs-u .tab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--brand); border-radius: 2px 2px 0 0;
}
.dt-tabs-u .tab .pill {
  font-size: 10.5px; padding: 1px 6px; border-radius: 99px;
  background: #f1f5f9; color: var(--ink-3); font-weight: 700;
}
.dt-tabs-u .tab.active .pill { background: var(--brand-soft); color: var(--brand-deep); }

/* ============================================================ Stat tile */
.dt-stat {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-1);
}
.dt-stat .head { display: flex; align-items: center; gap: 10px; }
.dt-stat .icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.dt-stat .icon.brand   { background: var(--brand-soft);   color: var(--brand); }
.dt-stat .icon.sky     { background: var(--sky-soft);     color: var(--sky); }
.dt-stat .icon.success { background: var(--success-soft); color: var(--success); }
.dt-stat .icon.warning { background: var(--warning-soft); color: var(--warning); }
.dt-stat .icon.info    { background: var(--info-soft);    color: var(--info); }
.dt-stat .label { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: -0.005em; }
.dt-stat .value { font-size: 28px; font-weight: 800; letter-spacing: -0.025em; line-height: 1; }
.dt-stat .sub   { font-size: 11.5px; color: var(--ink-4); margin-top: -4px; }
.dt-stat .trend {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 11.5px; font-weight: 700;
  margin-left: 8px;
}
.dt-stat .trend.up   { color: var(--success-ink); }
.dt-stat .trend.down { color: var(--danger-ink); }

/* ============================================================ Toggle */
.dt-toggle {
  display: inline-block; width: 38px; height: 22px; border-radius: 99px;
  background: var(--ink-5); position: relative; cursor: pointer;
  flex-shrink: 0; transition: background 0.18s;
  border: none; padding: 0;
}
.dt-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 99px;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: left 0.18s;
}
.dt-toggle[aria-checked="true"] { background: var(--brand); }
.dt-toggle[aria-checked="true"]::after { left: 18px; }
.dt-toggle:disabled { opacity: 0.55; cursor: not-allowed; }
.dt-toggle.sm { width: 32px; height: 18px; }
.dt-toggle.sm::after { width: 14px; height: 14px; }
.dt-toggle.sm[aria-checked="true"]::after { left: 16px; }

/* ============================================================ Form fields */
.dt-field { display: block; margin-bottom: 14px; }
.dt-field-label {
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 6px; letter-spacing: -0.005em;
}
.dt-field-control {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 9px; padding: 0 12px; height: 38px; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dt-field-control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.dt-field-control input,
.dt-field-control select {
  flex: 1; min-width: 0; border: none; outline: none;
  background: transparent; font-size: 13.5px; color: var(--ink);
  font-family: inherit; padding: 0;
}
.dt-field-control select { cursor: pointer; appearance: none; padding-right: 22px; }
.dt-field-control i { color: var(--ink-4); font-size: 15px; }
.dt-field-hint  { font-size: 11.5px; color: var(--ink-4); margin-top: 5px; }
.dt-field-error { font-size: 11.5px; color: var(--danger); margin-top: 5px; font-weight: 500; }

.dt-textarea {
  width: 100%; min-height: 110px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 13px; color: var(--ink); font-family: inherit;
  resize: vertical; outline: none; line-height: 1.5;
  background: var(--surface-alt);
}
.dt-textarea:focus { border-color: var(--brand); background: var(--surface); }

/* ============================================================ Modal (no JS lib — vanilla [hidden] toggle) */
.dt-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1050; padding: 20px;
  animation: dt-fade-in 0.15s ease-out;
}
.dt-modal {
  background: var(--surface); border-radius: 16px;
  width: 100%; max-width: 540px; max-height: 90vh;
  box-shadow: 0 20px 60px rgba(15,23,42,0.25);
  display: flex; flex-direction: column;
  animation: dt-fade-in 0.18s ease-out;
}
.dt-modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 12px;
}
.dt-modal-header .title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.dt-modal-header .desc  { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.dt-modal-body { padding: 20px; overflow: auto; flex: 1; }
.dt-modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--border-soft);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--surface-alt); border-radius: 0 0 16px 16px;
}
[hidden] { display: none !important; }

/* ============================================================ Toast */
.dt-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 1100;
  padding: 10px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 600; color: #fff;
  box-shadow: var(--shadow-3);
  display: flex; align-items: center; gap: 10px;
  animation: dt-fade-in 0.18s ease-out;
}
.dt-toast.success { background: var(--success); }
.dt-toast.info    { background: var(--brand); }
.dt-toast.danger  { background: var(--danger); }

@keyframes dt-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================ Empty state */
.dt-empty {
  padding: 36px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.dt-empty .icon-tile {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 4px;
}
.dt-empty .title { font-size: 15px; font-weight: 700; }
.dt-empty .desc  { font-size: 13px; color: var(--ink-3); max-width: 360px; line-height: 1.5; }

/* ============================================================ Section title */
.dt-section-title { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.dt-section-title .grow { flex: 1; min-width: 0; }
.dt-section-title .title { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.dt-section-title .sub   { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ============================================================ Progress bar */
.dt-progress {
  flex: 1; height: 6px; border-radius: 99px;
  background: #eef0f5; overflow: hidden;
}
.dt-progress > span {
  display: block; height: 100%; border-radius: 99px;
  background: var(--brand);
}
.dt-progress > span.success { background: var(--success); }
.dt-progress > span.warning { background: var(--warning); }

/* ============================================================ Roster table */
.dt-table {
  width: 100%; border-collapse: collapse;
}
.dt-table thead th {
  font-size: 10.5px; font-weight: 700; color: var(--ink-4);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 10px 20px; text-align: left;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
  white-space: nowrap;
}
.dt-table tbody td {
  padding: 14px 20px; font-size: 13px; color: var(--ink);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.dt-table tbody tr { cursor: pointer; transition: background 0.1s; }
.dt-table tbody tr:hover { background: var(--surface-alt); }
.dt-table tbody tr:last-child td { border-bottom: none; }
.dt-table tbody tr.selected { background: var(--brand-soft); }

/* ============================================================ Match offer card */
.dt-match-card {
  border-radius: var(--radius); padding: 16px;
  background: linear-gradient(135deg, #e0f2fe 0%, #eef2ff 100%);
  border: 1px solid #bae6fd;
  display: flex; flex-direction: column; gap: 12px;
}
.dt-match-card .swap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: #fff;
  border-radius: 8px; border: 1px solid #bae6fd;
}
.dt-match-card .swap .label {
  font-size: 10.5px; color: var(--ink-4); font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.dt-match-card .swap .from {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  text-decoration: line-through; text-decoration-color: var(--danger);
}
.dt-match-card .swap .to {
  font-size: 12.5px; font-weight: 700; color: var(--sky-ink);
}
.dt-match-card .saved { font-size: 12px; color: var(--sky-ink); font-weight: 600; }
.dt-match-card .saved strong { font-size: 16px; font-weight: 800; }
.dt-match-card .expires { font-size: 11px; color: var(--ink-4); font-weight: 500; }

/* ============================================================ Checkboxes */
.dt-check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--ink-5); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 0;
  transition: background 0.12s, border-color 0.12s;
}
.dt-check[aria-checked="true"] { background: var(--brand); border-color: var(--brand); }
.dt-check[aria-checked="true"]::before {
  content: '\F633'; font-family: 'bootstrap-icons';
  color: #fff; font-size: 12px; font-weight: bold;
}
.dt-check[aria-checked="mixed"] { background: var(--brand); border-color: var(--brand); }
.dt-check[aria-checked="mixed"]::before {
  content: ''; width: 9px; height: 2px; background: #fff; border-radius: 2px;
}

/* ============================================================ Chip / pill toggle (used for centres) */
.dt-chip {
  padding: 7px 12px; border-radius: 99px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--ink-2); font-weight: 600; font-size: 12.5px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.12s;
}
.dt-chip:hover { border-color: var(--ink-5); }
.dt-chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }
.dt-chip i { font-size: 11px; }

/* Weekday box */
.dt-day-box {
  flex: 1; padding: 10px 0; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--ink-2); font-weight: 700; font-size: 12px;
  cursor: pointer; letter-spacing: 0.02em;
  transition: all 0.12s;
}
.dt-day-box:hover { border-color: var(--ink-5); }
.dt-day-box[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }

/* ============================================================ Mini calendar */
.dt-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.dt-cal-dow {
  text-align: center; font-size: 10.5px; color: var(--ink-4); font-weight: 700;
  padding-bottom: 4px;
}
.dt-cal-day {
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; border: none; background: transparent;
  color: var(--ink); font-weight: 600; font-size: 12.5px;
  cursor: pointer; padding: 0;
  position: relative;
}
.dt-cal-day:hover { background: var(--surface-alt); }
.dt-cal-day.today { border: 1.5px solid var(--brand); }
.dt-cal-day.blocked {
  background: var(--danger-soft); color: var(--danger-ink);
  border: 1px solid #fca5a5; text-decoration: line-through;
}
.dt-cal-day.partial {
  background: var(--warning-soft); color: var(--warning-ink);
  border: 1px solid #fcd34d;
  position: relative;
}
.dt-cal-day.partial::after {
  content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 99px; background: var(--warning);
}
.dt-cal-day.sel { box-shadow: 0 0 0 2px var(--brand); }

/* Time-slot chips (instructor partial-day blocking) */
.dt-slot {
  padding: 7px 0; border-radius: 8px; text-align: center;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--ink-2); font-weight: 600; font-size: 12px;
  cursor: pointer; transition: all 0.12s;
}
.dt-slot:hover { border-color: var(--ink-5); }
.dt-slot[aria-pressed="true"] {
  border-color: #fca5a5; background: var(--danger-soft);
  color: var(--danger-ink); text-decoration: line-through;
}
.dt-slot:disabled { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }

/* ============================================================ Sidebar overlay (mobile) */
.dt-sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(15,23,42,0.4);
  z-index: 1029; animation: dt-fade-in 0.15s;
}

/* ============================================================ Responsive */
@media (max-width: 992px) {
  :root { --sidebar-w: 0px; }
  .dt-sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: 0 0 30px rgba(15,23,42,0.18);
  }
  .dt-sidebar.show { transform: translateX(0); }
  .dt-sidebar-backdrop.show { display: block; }
  .dt-main { margin-left: 0; }
  .dt-topbar { padding: 0 16px; }
  .dt-topbar-toggle { display: inline-flex; }
  .dt-content { padding: 18px 16px 100px; }
  .dt-page-header h1 { font-size: 22px; }
  .dt-search { width: 0; max-width: 0; padding: 0; border: none; overflow: hidden; }
  .dt-page-header { flex-wrap: wrap; }
  .dt-page-header .actions .label-only { display: none; }
}
@media (max-width: 768px) {
  .dt-card.padded { padding: 16px; }
  .dt-card-header { padding: 14px 16px 12px; }
  .dt-card-body { padding: 16px; }
  .dt-table thead { display: none; }
  .dt-table, .dt-table tbody, .dt-table tr, .dt-table td { display: block; width: 100%; }
  .dt-table tbody tr { padding: 10px 14px; }
  .dt-table tbody td { padding: 6px 0; border: none; }
}

/* ============================================================ Helpers */
.dt-text-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.dt-text-tabular { font-variant-numeric: tabular-nums; }
.dt-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-divider { height: 1px; background: var(--border-soft); margin: 18px 0; }

/* Bootstrap overrides — use our brand colour for primary */
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-hover); border-color: var(--brand-hover); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

