/* ==================================================================
   DV Group - Employee Panel
   Same design language as the SMS panel. No AdminLTE, no Bootstrap.
   Part 1: tokens, shell, navigation, components.
   ================================================================== */

:root {
  --brand: #2563eb;
  --brand-accent: #0ea5e9;
  --brand-soft: rgba(37, 99, 235, 0.1);
  --brand-ring: rgba(37, 99, 235, 0.28);

  --bg: #f6f7f9;
  --bg-elevated: #ffffff;
  --bg-sunken: #f0f2f5;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --sidebar-bg: #0f1729;
  --sidebar-fg: #94a3b8;
  --sidebar-fg-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);

  --text: #101828;
  --text-muted: #667085;
  --text-subtle: #98a2b3;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;

  --ok: #059669;
  --ok-bg: #ecfdf5;
  --warn: #b54708;
  --warn-bg: #fffaeb;
  --bad: #d92d20;
  --bad-bg: #fef3f2;
  --info: #175cd3;
  --info-bg: #eff8ff;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);

  --sidebar-w: 262px;
  --header-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #0b1020;
  --bg-elevated: #131a2c;
  --bg-sunken: #090d19;
  --surface: #131a2c;
  --surface-2: #182135;
  --sidebar-bg: #080c17;
  --sidebar-fg: #7d8ba4;
  --sidebar-hover: rgba(255, 255, 255, 0.05);

  --text: #e6ebf5;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border: #232c42;
  --border-strong: #2f3a54;

  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.12);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, 0.12);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.12);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 4px; font-weight: 600; letter-spacing: -0.011em; color: var(--text); }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }
p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
img { max-width: 100%; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
}

.sidebar-head {
  padding: 16px 18px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* The DV mark is a blue monogram on a white background and the sidebar is
   navy, so it is set on a white tile. Sized by height with the width left
   to follow, because the mark is close to 2:1 and squashing it to a square
   would distort it. */
.sidebar-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 5px 8px;
  background: #fff;
  border-radius: 8px;
  line-height: 0;
}

.sidebar-logo img {
  display: block;
  height: 20px;
  width: auto;
}

.sidebar-mark {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-accent));
  color: #fff; font-weight: 700; font-size: 13px;
  flex: 0 0 32px;
}

.sidebar-name {
  color: #fff; font-weight: 600; font-size: 14.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-nav { padding: 10px 10px 20px; flex: 1; }

/* ---------- Collapsible menu ---------- */
.nav-section { margin-bottom: 2px; }

.nav-section-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-fg);
  font-family: inherit;
  font-size: 12.6px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.nav-section-toggle:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.nav-section.open > .nav-section-toggle { color: #e2e8f0; }

.nav-section-toggle .nav-ico { opacity: 0.8; }

.nav-caret {
  margin-left: auto;
  width: 14px; height: 14px;
  flex: 0 0 14px;
  opacity: 0.6;
  transition: transform 0.18s ease;
}
.nav-section.open > .nav-section-toggle .nav-caret { transform: rotate(90deg); }

.nav-section-items {
  display: none;
  padding: 2px 0 6px 8px;
  margin-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-section.open > .nav-section-items { display: block; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--sidebar-fg);
  font-size: 13.4px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background 0.12s, color 0.12s;
}

.nav-item:hover { background: var(--sidebar-hover); color: #e2e8f0; text-decoration: none; }
.nav-item.active { background: var(--brand); color: var(--sidebar-fg-active); }
.nav-item.active .nav-ico { opacity: 1; }
.nav-ico { width: 17px; height: 17px; flex: 0 0 17px; opacity: 0.75; }

.nav-badge {
  margin-left: auto;
  background: var(--bad);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}
.nav-badge.ok { background: var(--ok); }

.sidebar-foot {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px;
  color: #4d5b74;
}

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 23, 0.55);
  z-index: 39;
}
.sidebar-scrim.open { display: block; }

/* ---------- Topbar ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-title { font-weight: 600; font-size: 16px; }
.topbar-spacer { flex: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 500;
}
.chip:hover { text-decoration: none; color: var(--text); }
.chip.chip-bad { background: var(--bad-bg); color: var(--bad); border-color: currentColor; }
.chip.chip-ok { background: var(--ok-bg); color: var(--ok); border-color: currentColor; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: grid; place-items: center;
  cursor: pointer;
  position: relative;
  transition: background 0.12s, color 0.12s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

.icon-btn .dot {
  position: absolute; top: 5px; right: 5px;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 20px;
  background: var(--bad); color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 15px;
  text-align: center;
}

.menu { position: relative; }
.menu-trigger {
  display: flex; align-items: center; gap: 9px;
  background: transparent; border: 1px solid transparent;
  padding: 5px 8px; border-radius: 9px; cursor: pointer;
  color: var(--text); font-family: inherit; font-size: 13.5px;
}
.menu-trigger:hover { background: var(--surface-2); border-color: var(--border); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-accent));
  color: #fff; font-weight: 600; font-size: 12px;
  flex: 0 0 32px;
}

.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 232px;
  padding: 6px;
  display: none;
  z-index: 60;
}
.menu-panel.open { display: block; }
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text);
  font-size: 13.5px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); text-decoration: none; }
.menu-head { padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head strong { display: block; font-size: 13.5px; }
.menu-head span { color: var(--text-muted); font-size: 12px; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 0; }

.content { padding: 22px; flex: 1; width: 100%; max-width: 1600px; }

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-head .page-sub { color: var(--text-muted); font-size: 13.5px; margin: 0; }
.page-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.card-head h3 { margin: 0; }
.card-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; gap: 10px; align-items: center;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Stats ---------- */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.stat-label { color: var(--text-muted); font-size: 12.5px; font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.stat-meta { font-size: 12px; color: var(--text-subtle); margin-top: 5px; }
.stat-ico {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  position: absolute; top: 15px; right: 15px;
}
.stat.ok .stat-ico { background: var(--ok-bg); color: var(--ok); }
.stat.bad .stat-ico { background: var(--bad-bg); color: var(--bad); }
.stat.warn .stat-ico { background: var(--warn-bg); color: var(--warn); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
label.lbl, .lbl { display: block; font-size: 12.8px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="time"],
input[type="search"], input[type="url"], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.12s, box-shadow 0.12s;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--bg-sunken); color: var(--text-subtle); cursor: not-allowed;
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.12s, background 0.12s, color 0.12s;
}
.btn:hover { text-decoration: none; color: #fff; filter: brightness(0.93); }
.btn:disabled, .btn.is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); filter: none; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-success { background: var(--ok); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); filter: none; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-lg { padding: 11px 20px; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.2px;
  color: var(--text);
  background: var(--surface);
}
table.table thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.4px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap;
}
table.table tbody td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
table.table tbody tr:hover { background: var(--surface-2); }
table.table tfoot td { padding: 10px 12px; border-top: 1px solid var(--border); font-weight: 600; }

.empty { padding: 42px 20px; text-align: center; color: var(--text-muted); }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 11.6px;
  font-weight: 600;
  white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-muted { background: var(--surface-2); color: var(--text-subtle); border-color: var(--border); }
.pill-plain::before { display: none; }

/* ---------- Alerts ---------- */
.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13.4px;
}
.alert strong { display: block; margin-bottom: 2px; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: currentColor; }
.alert-error, .alert-danger { background: var(--bad-bg); color: var(--bad); border-color: currentColor; }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: currentColor; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: currentColor; }
.alert a { color: inherit; text-decoration: underline; }
.alert-body { min-width: 0; flex: 1; }
.alert .close {
  background: none; border: 0; color: inherit; opacity: 0.6;
  font-size: 19px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.alert .close:hover { opacity: 1; }

/* ---------- Pager ---------- */
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager-btn {
  display: inline-flex; align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12.8px; font-weight: 600;
}
.pager-btn:hover { background: var(--surface-2); text-decoration: none; }
.pager-btn.is-disabled { opacity: 0.45; pointer-events: none; }
.pager-info { color: var(--text-muted); font-size: 12.5px; }

/* ---------- Misc utilities ---------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: 12.4px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.text-ok { color: var(--ok); }
.text-bad { color: var(--bad); }
.text-warn { color: var(--warn); }
.hidden { display: none !important; }
.mobile-only { display: none; }

/* ---------- Sign in ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(14, 165, 233, 0.1), transparent 55%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 410px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px;
}
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
/* Same mark, bigger, on the white sign-in card - no tile needed here. */
.auth-brand img { display: block; height: 38px; width: auto; }
.auth-logo-mark {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-accent));
  color: #fff; font-weight: 700; font-size: 16px;
}
.auth-brand strong { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; }
.auth-title { font-size: 19px; font-weight: 600; margin-bottom: 3px; }
.auth-sub { color: var(--text-muted); margin-bottom: 20px; font-size: 13.4px; }
.auth-foot { margin-top: 18px; text-align: center; color: var(--text-subtle); font-size: 12.4px; }

.input-icon { position: relative; }
.input-icon svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-subtle); pointer-events: none;
}
.input-icon input { padding-left: 36px; }

/* ---------- 403 ---------- */
.dv-error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 500px at 50% -20%, var(--brand-soft), transparent 60%),
    var(--bg);
}
.dv-error-card {
  max-width: 440px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 34px 30px;
}
.dv-error-mark {
  width: 62px; height: 62px; margin: 0 auto 14px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--bad-bg); color: var(--bad);
  font-size: 20px; font-weight: 700;
}
.dv-error-card h1 { font-size: 20px; margin-bottom: 8px; }
.dv-error-card .btn { margin-top: 16px; }

/* ==================================================================
   Part 2: compatibility layer.

   The page bodies were written against AdminLTE/Bootstrap class names.
   Rather than rewrite thirty-one pages, those names are re-implemented
   here in the new design language, so the markup keeps working and the
   look is the panel's own.
   ================================================================== */

/* ---------- page scaffold ---------- */
.content-wrapper { display: block; width: 100%; }

.content-header { padding: 18px 22px 0; }
.content-header h1 { font-size: 21px; font-weight: 600; margin: 0; }

section.content { padding: 18px 22px 24px; }
.container-fluid { width: 100%; padding: 0; margin: 0; }

/* ---------- 12 column grid ---------- */
.row { display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; }
.row > [class*="col-"] { padding-left: 8px; padding-right: 8px; width: 100%; min-width: 0; }

.col-1  { flex: 0 0 8.3333%;  max-width: 8.3333%; }
.col-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-3  { flex: 0 0 25%;      max-width: 25%; }
.col-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-6  { flex: 0 0 50%;      max-width: 50%; }
.col-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-9  { flex: 0 0 75%;      max-width: 75%; }
.col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-12 { flex: 0 0 100%;     max-width: 100%; }
.col, .col-auto { flex: 1 1 0; max-width: 100%; }

@media (min-width: 576px) {
  .col-sm-1  { flex: 0 0 8.3333%;  max-width: 8.3333%; }
  .col-sm-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-sm-3  { flex: 0 0 25%;      max-width: 25%; }
  .col-sm-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-sm-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-sm-6  { flex: 0 0 50%;      max-width: 50%; }
  .col-sm-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-sm-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-sm-9  { flex: 0 0 75%;      max-width: 75%; }
  .col-sm-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-sm-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
  .col-sm-12 { flex: 0 0 100%;     max-width: 100%; }
}
@media (min-width: 768px) {
  .col-md-1  { flex: 0 0 8.3333%;  max-width: 8.3333%; }
  .col-md-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-md-3  { flex: 0 0 25%;      max-width: 25%; }
  .col-md-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-md-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-md-6  { flex: 0 0 50%;      max-width: 50%; }
  .col-md-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-md-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-md-9  { flex: 0 0 75%;      max-width: 75%; }
  .col-md-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-md-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
  .col-md-12 { flex: 0 0 100%;     max-width: 100%; }
}
@media (min-width: 992px) {
  .col-lg-1  { flex: 0 0 8.3333%;  max-width: 8.3333%; }
  .col-lg-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-lg-3  { flex: 0 0 25%;      max-width: 25%; }
  .col-lg-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-lg-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
  .col-lg-6  { flex: 0 0 50%;      max-width: 50%; }
  .col-lg-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
  .col-lg-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-lg-9  { flex: 0 0 75%;      max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-lg-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
  .col-lg-12 { flex: 0 0 100%;     max-width: 100%; }
}
.col-xs-12 { flex: 0 0 100%; max-width: 100%; }

/* ---------- legacy card ---------- */
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card-header.border-transparent { border-bottom-color: var(--border); }
.card-title { margin: 0; font-size: 14.5px; font-weight: 600; }
h3.card-title { font-size: 14.5px; }
.card-footer {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.card-tools, .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* The old theme painted card headers with a blue gradient. Keep that accent,
   drawn the way the rest of this panel is drawn. */
.bg-gradient-primary,
.card-header.bg-gradient-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-accent));
  border-bottom-color: transparent;
  color: #fff;
}
.bg-gradient-primary .card-title,
.bg-gradient-primary h3,
.bg-gradient-primary a { color: #fff; }
.elevation-1, .elevation-2, .elevation-3, .elevation-4 { box-shadow: var(--shadow-sm); }

/* ---------- legacy tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.2px;
  color: var(--text);
  background: var(--surface);
  margin-bottom: 0;
}
.table th, .table td { padding: 10px 12px; vertical-align: middle; text-align: left; }
.table thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.4px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table tbody td { border-top: 1px solid var(--border); }
.table-bordered th, .table-bordered td { border: 1px solid var(--border); }
.table-striped tbody tr:nth-of-type(odd) { background: var(--surface-2); }
.table-hover tbody tr:hover, .table tbody tr:hover { background: var(--brand-soft); }
.table-responsive { overflow-x: auto; width: 100%; }
.table a { color: var(--brand); }

/* ---------- legacy forms ---------- */
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
}
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.form-control-sm { padding: 6px 10px; font-size: 12.6px; }
.form-group { margin-bottom: 14px; }

.input-group { display: flex; width: 100%; }
.input-group > .form-control { flex: 1 1 auto; min-width: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group-append, .input-group-prepend { display: flex; }
.input-group-append .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group-append .btn + .btn { margin-left: -1px; }
.input-group-prepend .btn { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group-text {
  display: flex; align-items: center;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 13px;
}
.input-group-sm > .form-control { padding: 6px 10px; font-size: 12.6px; }

/* Bare submit buttons in the old pages still need to look like buttons. */
input[type="submit"], input[type="button"] {
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  width: auto;
}
input[type="submit"]:hover, input[type="button"]:hover { filter: brightness(0.93); }

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.8px;
  color: var(--text-subtle);
}
.breadcrumb-item + .breadcrumb-item::before { content: "/"; margin-right: 6px; color: var(--text-subtle); }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item a { color: var(--text-muted); }
.float-sm-right, .float-right { margin-left: auto; }

/* ---------- info boxes (dashboard tiles) ---------- */
.info-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
  overflow: hidden;
  min-height: 78px;
}
.info-box-icon {
  display: grid; place-items: center;
  width: 70px; flex: 0 0 70px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 24px;
}
.info-box-content { padding: 12px 16px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.info-box-text { color: var(--text-muted); font-size: 12.6px; font-weight: 500; }
.info-box-number { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.progress-description { color: var(--text-subtle); font-size: 12px; }

.progress { height: 7px; background: var(--bg-sunken); border-radius: 20px; overflow: hidden; margin: 6px 0; }
.progress-bar { height: 100%; background: var(--brand); border-radius: 20px; display: block; }

/* Old contextual colours, remapped onto the palette. */
.bg-primary, .bg-info    { background: var(--brand-soft) !important; color: var(--brand) !important; }
.bg-success, .bg-green   { background: var(--ok-bg) !important;    color: var(--ok) !important; }
.bg-danger, .bg-red      { background: var(--bad-bg) !important;   color: var(--bad) !important; }
.bg-warning, .bg-yellow  { background: var(--warn-bg) !important;  color: var(--warn) !important; }
.bg-secondary, .bg-gray  { background: var(--surface-2) !important; color: var(--text-muted) !important; }
.text-success { color: var(--ok) !important; }
.text-danger  { color: var(--bad) !important; }
.text-warning { color: var(--warn) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--brand) !important; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11.4px;
  font-weight: 600;
}
.badge-success { background: var(--ok-bg); color: var(--ok); }
.badge-danger  { background: var(--bad-bg); color: var(--bad); }
.badge-warning { background: var(--warn-bg); color: var(--warn); }
.badge-info, .badge-primary { background: var(--brand-soft); color: var(--brand); }

/* ---------- pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0; }
.page-item { display: inline-block; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12.8px; font-weight: 600;
}
.page-link:hover { background: var(--surface-2); text-decoration: none; }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-item.disabled .page-link { background: var(--bg-sunken); color: var(--text-subtle); pointer-events: none; }
.pagination-sm .page-link { min-width: 29px; padding: 4px 8px; font-size: 12.2px; }

/* ---------- todo list (dashboard) ---------- */
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list > li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--surface-2);
}

/* ---------- spacing / alignment utilities ---------- */
.p-0 { padding: 0 !important; }
.p-1 { padding: 6px !important; }
.p-2 { padding: 12px !important; }
.p-3 { padding: 18px !important; }
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 6px !important; }
.mb-2 { margin-bottom: 12px !important; }
.mb-3 { margin-bottom: 18px !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 6px !important; }
.mt-2 { margin-top: 12px !important; }
.mt-3 { margin-top: 18px !important; }
.mr-1 { margin-right: 6px !important; }
.mr-2 { margin-right: 12px !important; }
.ml-1 { margin-left: 6px !important; }
.ml-2 { margin-left: 12px !important; }
.ml-auto { margin-left: auto !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.clearfix::after { content: ""; display: table; clear: both; }
.fade { transition: opacity 0.15s linear; }
.fade.show { opacity: 1; }
.alert-dismissible { position: relative; }

/* ---------- DataTables (kept for the pages that page with it) ---------- */
.dataTables_wrapper { width: 100%; }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12.8px;
  color: var(--text-muted);
}
.dataTables_wrapper .dataTables_filter { float: right; }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  width: auto;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12.8px;
}
.dataTables_wrapper .dataTables_filter input { min-width: 200px; }
.dataTables_wrapper .dataTables_info {
  padding-top: 10px;
  color: var(--text-muted);
  font-size: 12.5px;
}
.dataTables_wrapper .dataTables_paginate { float: right; padding-top: 8px; display: flex; gap: 4px; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text) !important;
  font-size: 12.8px; font-weight: 600;
  cursor: pointer;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: var(--surface-2); text-decoration: none; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--brand); border-color: var(--brand); color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  background: var(--bg-sunken); color: var(--text-subtle) !important; pointer-events: none;
}
.dataTables_wrapper::after { content: ""; display: table; clear: both; }
table.dataTable { width: 100% !important; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --sidebar-w: 232px; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .hide-sm { display: none !important; }
  .content { padding: 16px; }
  .content-header { padding: 14px 16px 0; }
  section.content { padding: 14px 16px 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_paginate { float: none; }
  .dataTables_wrapper .dataTables_filter input { min-width: 0; width: 100%; }
}

@media (max-width: 640px) {
  .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
  .topbar { padding: 0 12px; gap: 8px; }
  .card-body { padding: 14px; }
}

@media print {
  .sidebar, .topbar, .sidebar-scrim { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* ==================================================================
   Part 3: Today Calls.
   The one page with its own paging, bulk save bar and call actions.
   ================================================================== */

.dv-call-page .dv-card .card-body { background: var(--surface); padding: 0; }

.dv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.dv-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }

.dv-pill {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12.6px;
  font-weight: 600;
  line-height: 1.4;
  transition: all 0.14s ease-in-out;
}
.dv-pill:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.dv-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px var(--brand-ring);
}

.dv-search-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.dv-search-box { width: 260px; max-width: 100%; }
.dv-per-page { width: auto; min-width: 110px; }

.dv-table-wrap { overflow-x: auto; }
.dv-table { font-size: 13px; color: var(--text); width: 100%; border-collapse: collapse; }

.dv-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.4px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 10px 12px;
  text-align: left;
}

.dv-table tbody td { padding: 8px 12px; vertical-align: middle; border-top: 1px solid var(--border); }
.dv-table tbody tr:hover { background: var(--brand-soft); }

.dv-table .dv-name { font-weight: 600; white-space: nowrap; }
.dv-table .dv-mobile { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dv-table .dv-mobile:hover { color: var(--brand); }
.dv-table .dv-domain { word-break: break-all; max-width: 230px; }
.dv-table .dv-amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.dv-table .dv-date {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--info-bg);
  color: var(--info);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.dv-table .dv-col-remark { min-width: 250px; }
.dv-table .dv-remark-input { min-width: 200px; }
.dv-table .dv-remark-input.dv-changed {
  border-color: var(--warn);
  background: var(--warn-bg);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
}

.dv-table tr.dv-done { background: var(--ok-bg); }
.dv-table tr.dv-done .dv-name::after {
  content: "called";
  display: inline-block;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--ok);
  color: #fff;
  font-size: 9.6px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}

.dv-actions { white-space: nowrap; }

.dv-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  margin: 0 2px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  line-height: 1;
  transition: all 0.14s ease-in-out;
}
a.dv-icon-btn:hover, button.dv-icon-btn:hover { text-decoration: none; transform: translateY(-1px); }

.dv-icon-btn.dv-call-pending { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); cursor: pointer; }
.dv-icon-btn.dv-call-pending:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.dv-icon-btn.dv-call-done { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); cursor: default; }
.dv-icon-btn.dv-view:hover { border-color: var(--brand); background: var(--brand); color: #fff; }

.dv-empty { padding: 44px 16px !important; color: var(--text-muted); font-size: 14px; text-align: center; }

/* ---------- bulk save bar ---------- */
.dv-default-submit {
  position: absolute;
  width: 0; height: 0;
  padding: 0; border: 0;
  opacity: 0; overflow: hidden;
}

.dv-actionbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.dv-actionbar-info { color: var(--text-muted); font-size: 12.8px; }
.dv-actionbar-info.dv-dirty { color: var(--warn); font-weight: 600; }
.dv-save-all { min-width: 165px; }
.dv-save-all.dv-has-changes { box-shadow: 0 2px 10px var(--brand-ring); }

.dv-sticky-save {
  display: none;
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 50;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.dv-sticky-save.show { display: flex; }
.dv-sticky-text { color: var(--text); font-size: 12.8px; white-space: nowrap; }

/* ---------- pager ---------- */
.dv-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.dv-pager-info { color: var(--text-muted); font-size: 12.6px; }
.dv-pagination { display: flex; flex-wrap: wrap; gap: 4px; }

@media (max-width: 767px) {
  .dv-toolbar, .dv-pager, .dv-actionbar { flex-direction: column; align-items: stretch; }
  .dv-search-form { flex-wrap: wrap; }
  .dv-search-box, .dv-per-page { width: 100%; }
  .dv-table thead th { position: static; }
  .dv-pagination { justify-content: center; }
  .dv-save-all { width: 100%; }
  .dv-sticky-save { right: 12px; left: 12px; bottom: 12px; justify-content: space-between; }
}

/* ==================================================================
   Part 4: the employee policy, set as a document rather than a page.
   ================================================================== */

.dv-policy { max-width: 900px; }

.dv-policy-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 30px 20px;
  border-bottom: 3px solid var(--brand);
}

.dv-policy-kicker {
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dv-policy-title {
  margin: 4px 0 2px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dv-policy-sub { margin: 0; color: var(--text-muted); font-size: 13.6px; }
.dv-policy-head .btn { margin-left: auto; flex: 0 0 auto; }

.dv-policy-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.dv-policy-meta > div { padding: 12px 18px; border-right: 1px solid var(--border); }
.dv-policy-meta > div:last-child { border-right: 0; }
.dv-policy-meta dt {
  color: var(--text-subtle);
  font-size: 10.6px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.dv-policy-meta dd { margin: 0; font-size: 13.2px; font-weight: 600; color: var(--text); }

.dv-policy-toc {
  padding: 18px 30px;
  border-bottom: 1px solid var(--border);
}
.dv-policy-toc .lbl { display: block; margin-bottom: 8px; }
.dv-policy-toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding-left: 18px;
  font-size: 13.2px;
}
.dv-policy-toc li { margin-bottom: 4px; break-inside: avoid; }

.dv-policy-body { padding: 8px 30px 26px; }

.dv-policy-body section {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.dv-policy-body section:last-child { border-bottom: 0; }

.dv-policy-body h3 {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  scroll-margin-top: 80px;
}
.dv-policy-body > section > p { color: var(--text-muted); font-size: 13.8px; margin-bottom: 12px; }

.dv-clauses {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dv-clauses li {
  position: relative;
  padding: 0 0 0 46px;
  margin-bottom: 11px;
  font-size: 13.9px;
  line-height: 1.65;
  color: var(--text);
}
.dv-clauses li > strong:first-child {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.dv-clauses li strong { font-weight: 650; }

.dv-policy-foot {
  padding: 14px 30px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-subtle);
  font-size: 12.2px;
}

@media (max-width: 900px) {
  .dv-policy-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dv-policy-meta > div:nth-child(2) { border-right: 0; }
  .dv-policy-toc ol { columns: 1; }
  .dv-policy-head, .dv-policy-toc, .dv-policy-body, .dv-policy-foot { padding-left: 18px; padding-right: 18px; }
}

@media print {
  .dv-no-print { display: none !important; }
  .dv-policy { max-width: none; border: 0; box-shadow: none; }
  .dv-policy-body section { break-inside: avoid; }
}

/* ---------- dashboard: customer lookup ---------- */
.dv-lookup { max-width: 100%; }
.dv-lookup .card-title { display: inline-flex; align-items: center; gap: 8px; }

.dv-lookup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dv-lookup-form { margin: 0; }
.dv-lookup-form .lbl { margin-bottom: 7px; }
.dv-lookup-form .input-group > .form-control { min-width: 0; }
.dv-lookup-form .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.dv-lookup-form .hint { margin-top: 7px; }

@media (max-width: 800px) {
  .dv-lookup-grid { grid-template-columns: 1fr; gap: 16px; }
}
