/* ============================================================================
   Telecalling CRM — "Precision CRM" Design System
   Bootstrap 5 custom layer. Corporate/modern SaaS aesthetic: Bootstrap Blue
   actions, surface-first white cards on a light gray canvas, Inter type,
   Material Symbols icons, soft ambient shadows.
   ========================================================================== */

:root {
  /* Brand */
  --primary: #0d6efd;
  --primary-dark: #0057cd;
  --primary-tint: rgba(13, 110, 253, 0.10);
  --secondary: #6161ff;
  --secondary-tint: rgba(97, 97, 255, 0.12);

  /* Surfaces */
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-low: #f3f4f5;
  --surface-container: #edeeef;
  --border: #dee2e6;
  --border-soft: #eef0f2;

  /* Text */
  --text: #212529;
  --text-muted: #6c757d;
  --text-variant: #424655;

  /* Status */
  --success: #198754;
  --success-tint: rgba(25, 135, 84, 0.12);
  --danger: #dc3545;
  --danger-tint: rgba(220, 53, 69, 0.12);
  --warning: #cf4b00;
  --warning-tint: rgba(207, 75, 0, 0.12);

  /* Shape & depth */
  --radius: 0.5rem;      /* inputs, buttons, nav items */
  --radius-lg: 0.75rem;  /* smaller cards */
  --radius-xl: 1rem;     /* page-level surfaces */
  --shadow-1: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.10);

  --sidebar-width: 260px;
  --topbar-height: 64px;

  /* Bootstrap overrides */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 13, 110, 253;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-font-sans-serif: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--bs-font-sans-serif);
  font-size: 14px;
  line-height: 20px;
  min-height: 100vh;
}

/* Material Symbols base */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}
.material-symbols-outlined.filled { font-variation-settings: 'FILL' 1; }
.ms-18 { font-size: 18px; }
.ms-20 { font-size: 20px; }
.ms-32 { font-size: 32px; }
.ms-48 { font-size: 48px; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Typography helpers ───────────────────────────────────────────────────*/
.headline-xl { font-size: 36px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; }
.headline-lg { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.headline-md { font-size: 20px; line-height: 28px; font-weight: 600; }
.label-md {
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.text-variant { color: var(--text-variant); }
.text-muted { color: var(--text-muted) !important; }

/* ── Buttons ──────────────────────────────────────────────────────────────*/
.btn {
  --bs-btn-border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  padding: 0.5rem 1.1rem;
}
.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-active-border-color: var(--primary-dark);
}
.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
}
/* Ghost/secondary button per design: subtle surface + border */
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-low); color: var(--text); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 13px; }
.btn-icon {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-variant);
}
.btn-icon:hover { background: var(--surface-low); color: var(--text); }

/* ── Cards / surfaces ─────────────────────────────────────────────────────*/
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
  background: var(--surface);
}
.card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================================
   APP SHELL
   ========================================================================== */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar — light. Static at lg+, offcanvas below lg. */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
/* Pin the sidebar to the viewport at lg+ so the nav + user/logout footer stay
   visible no matter how long the page content is. The middle nav area scrolls
   internally (see .flex-grow-1.overflow-auto in the partial). */
@media (min-width: 992px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
  }
}
.sidebar .sidebar-brand {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 1rem 3.25rem;
  border-bottom: 1px solid var(--border);
}
.sidebar .sidebar-logo { width: 168px; max-width: 100%; height: auto; display: block; }
.sidebar .brand-mark {
  width: 40px; height: 40px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #3d8bfd);
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
  box-shadow: var(--shadow-1);
}
.sidebar .brand-name { font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.sidebar .brand-sub { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }

.sidebar .nav-section {
  padding: 1rem 1.25rem 0.35rem;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
.sidebar .nav-link {
  display: flex; align-items: center; gap: 0.85rem;
  color: var(--text-variant);
  padding: 0.6rem 0.85rem; margin: 0.15rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 600; font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.sidebar .nav-link .material-symbols-outlined { color: var(--text-muted); transition: color 0.15s; }
.sidebar .nav-link:hover { background: var(--surface-low); color: var(--text); }
.sidebar .nav-link:hover .material-symbols-outlined { color: var(--text); }
.sidebar .nav-link.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-1); }
.sidebar .nav-link.active .material-symbols-outlined { color: #fff; font-variation-settings: 'FILL' 1; }

/* Collapsible parent + submenu */
.sidebar .nav-parent { cursor: pointer; }
.sidebar .nav-parent .nav-caret { transition: transform 0.2s; font-size: 20px; }
.sidebar .nav-parent[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.sidebar .nav-parent.active { background: var(--primary-tint); color: var(--primary-dark); box-shadow: none; }
.sidebar .nav-parent.active .material-symbols-outlined { color: var(--primary); font-variation-settings: 'FILL' 0; }
.sidebar .nav-sub .nav-link {
  padding-left: 3.1rem; font-size: 13.5px; margin-top: 0.1rem; margin-bottom: 0.1rem;
}
.sidebar .nav-sub .nav-link.active { background: var(--primary); color: #fff; }

.sidebar .sidebar-footer {
  margin-top: auto;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
}
.sidebar .user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-tint); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}

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

.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1.25rem;
  position: sticky; top: 0; z-index: 1020;
  box-shadow: var(--shadow-1);
}
.topbar .btn-sidebar-toggle {
  border: none; background: transparent; color: var(--text-variant);
  padding: 0.35rem; border-radius: var(--radius); line-height: 1;
}
.topbar .topbar-search {
  position: relative; flex: 1; max-width: 420px;
}
.topbar .topbar-search .material-symbols-outlined {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.topbar .topbar-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.6rem;
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
}
.topbar .topbar-search input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint); background: var(--surface);
}
.topbar .topbar-actions { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.topbar .icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: none; background: transparent; color: var(--text-variant);
}
.topbar .icon-btn:hover { background: var(--surface-container); }
.topbar .icon-btn .dot {
  position: absolute; top: 9px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--surface);
}
.topbar .topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--secondary-tint); color: var(--secondary);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  border: 1px solid var(--border);
}

.content { padding: 1.5rem; flex: 1; }
@media (min-width: 992px) { .content { padding: 1.5rem 1.5rem 2rem; } }

/* ── Page header + breadcrumb ─────────────────────────────────────────────*/
.page-header {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: space-between; align-items: flex-end;
  margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.page-header .subtitle { color: var(--text-muted); font-size: 13px; margin: 0.2rem 0 0; }
.breadcrumb-bar {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 13px; color: var(--text-muted); margin-bottom: 0.25rem;
}
.breadcrumb-bar a { color: var(--text-muted); }
.breadcrumb-bar a:hover { color: var(--primary); }
.breadcrumb-bar .sep { opacity: 0.6; }

/* ── Stat / KPI cards ─────────────────────────────────────────────────────*/
.stat-card { padding: 1.25rem; }
.stat-card .stat-top {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.6rem;
}
.stat-card .stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); }
.stat-card .stat-icon {
  width: 40px; height: 40px; border-radius: var(--radius);
  display: grid; place-items: center;
}
.stat-card .stat-value { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.stat-card .stat-trend { display: flex; align-items: center; gap: 0.25rem; margin-top: 0.5rem; font-size: 13px; }
.stat-card .stat-trend.up { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }
.stat-card .stat-trend.flat { color: var(--text-muted); }

.icon-tint-primary { background: var(--primary-tint); color: var(--primary); }
.icon-tint-secondary { background: var(--secondary-tint); color: var(--secondary); }
.icon-tint-success { background: var(--success-tint); color: var(--success); }
.icon-tint-warning { background: var(--warning-tint); color: var(--warning); }
.icon-tint-danger { background: var(--danger-tint); color: var(--danger); }

/* ── Tables ───────────────────────────────────────────────────────────────*/
.table { --bs-table-color: var(--text); margin-bottom: 0; }
.table > thead th {
  background: var(--surface-low);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 1rem; white-space: nowrap;
}
.table > tbody td {
  padding: 0.85rem 1rem; vertical-align: middle;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.table > tbody tr:last-child td { border-bottom: none; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #fafbfe; }
.table-actions .btn { --bs-btn-padding-y: 0.25rem; --bs-btn-padding-x: 0.55rem; --bs-btn-font-size: 13px; }

/* Avatar initials (table rows, cards) */
.avatar-initials {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  background: var(--primary-tint); color: var(--primary);
}
.avatar-initials.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-initials.secondary { background: var(--secondary-tint); color: var(--secondary); }
.avatar-initials.success { background: var(--success-tint); color: var(--success); }

/* ── Pills / badges ───────────────────────────────────────────────────────*/
.pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.65rem; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1;
}
.pill-primary { background: var(--primary-tint); color: var(--primary); }
.pill-secondary { background: var(--secondary-tint); color: var(--secondary); }
.pill-success { background: var(--success-tint); color: var(--success); }
.pill-warning { background: var(--warning-tint); color: var(--warning); }
.pill-danger { background: var(--danger-tint); color: var(--danger); }
.pill-muted { background: var(--surface-container); color: var(--text-variant); }

/* ── Forms ────────────────────────────────────────────────────────────────*/
.form-label { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-variant); margin-bottom: 0.35rem; text-transform: uppercase; }
.form-control, .form-select {
  border-radius: var(--radius); border-color: var(--border);
  padding: 0.55rem 0.85rem; font-size: 14px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint);
}
.form-switch .form-check-input { width: 2.6em; height: 1.4em; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ── Empty states ─────────────────────────────────────────────────────────*/
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-state .material-symbols-outlined { font-size: 40px; opacity: 0.35; display: block; margin: 0 auto 0.5rem; }

/* ── Pagination ───────────────────────────────────────────────────────────*/
.pagination { --bs-pagination-color: var(--text-variant); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); --bs-pagination-border-radius: var(--radius); }

/* ── Kanban ───────────────────────────────────────────────────────────────*/
.kanban-scroll { display: flex; gap: 1.25rem; overflow-x: auto; padding-bottom: 0.5rem; }
.kanban-col { flex: 0 0 300px; max-width: 300px; }
.kanban-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1rem; background: var(--surface);
  border: 1px solid var(--border); border-top: 3px solid var(--primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; font-weight: 600;
}
.kanban-col-body { background: var(--surface-low); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 0.75rem; min-height: 200px; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.85rem; box-shadow: var(--shadow-1); margin-bottom: 0.75rem; }
.kanban-count { background: var(--surface-container); color: var(--text-variant); border-radius: 999px; padding: 0.05rem 0.55rem; font-size: 12px; font-weight: 700; }

/* ── Auth (login) ─────────────────────────────────────────────────────────*/
.auth-wrapper {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background:
    radial-gradient(1200px 600px at 100% 0%, rgba(13, 110, 253, 0.07), transparent),
    radial-gradient(900px 500px at 0% 100%, rgba(97, 97, 255, 0.07), transparent),
    var(--bg);
}
.auth-card { width: 100%; max-width: 410px; }
.auth-logo { width: 240px; max-width: 80%; height: auto; display: inline-block; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 0.6rem; font-weight: 800; font-size: 20px; color: var(--primary); }
.auth-brand .brand-mark {
  width: 42px; height: 42px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #3d8bfd);
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-1);
}

/* Offcanvas sidebar width */
.offcanvas.sidebar { --bs-offcanvas-width: var(--sidebar-width); }

/* Coming-soon banner for stub pages */
.phase-banner {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--primary-tint); border: 1px solid rgba(13, 110, 253, 0.2);
  color: var(--primary-dark); border-radius: var(--radius-lg);
  padding: 0.75rem 1rem; font-size: 13px; margin-bottom: 1.5rem;
}
.phase-banner .material-symbols-outlined { color: var(--primary); }

/* Utility */
.min-w-0 { min-width: 0; }

/* ── DataTables (server-side) integration polish ──────────────────────────*/
.dt-container .dt-layout-row { margin-bottom: 0.75rem; align-items: center; }
.dt-container .dt-search input,
.dt-container .dt-length select {
  border-radius: var(--radius); border-color: var(--border);
}
.dt-container .dt-search input:focus,
.dt-container .dt-length select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint);
}
.dt-container .dt-info { color: var(--text-muted); font-size: 13px; }
.dt-container .dt-paging { margin-top: 0.75rem; }
.dt-container table.dataTable thead th { position: relative; }


/* ── Custom toasts (UI.notify) ─────────────────────────────────────────── */
.ui-toast-host {
  position: fixed; top: 1rem; right: 1rem; z-index: 1085;
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: min(92vw, 380px);
}
.ui-toast {
  display: flex; align-items: flex-start; gap: 0.5rem;
  background: #fff; color: var(--text); border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  padding: 0.7rem 0.85rem; font-size: 14px;
  opacity: 0; transform: translateX(16px); transition: opacity .2s ease, transform .2s ease;
}
.ui-toast.show { opacity: 1; transform: translateX(0); }
.ui-toast-icon { font-size: 20px; line-height: 1.2; flex-shrink: 0; }
.ui-toast-msg { flex: 1 1 auto; padding-top: 1px; }
.ui-toast-close {
  border: 0; background: transparent; color: var(--text-muted);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.ui-toast-close:hover { color: var(--text); }
.ui-toast-success { border-left-color: var(--success); }
.ui-toast-success .ui-toast-icon { color: var(--success); }
.ui-toast-error { border-left-color: var(--danger); }
.ui-toast-error .ui-toast-icon { color: var(--danger); }
.ui-toast-warning { border-left-color: var(--warning); }
.ui-toast-warning .ui-toast-icon { color: var(--warning); }
.ui-toast-info { border-left-color: var(--primary); }
.ui-toast-info .ui-toast-icon { color: var(--primary); }

/* ── Custom confirm modal (UI.confirm) ─────────────────────────────────── */
.ui-modal-overlay {
  position: fixed; inset: 0; z-index: 1090;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0; transition: opacity .18s ease;
}
.ui-modal-overlay.show { opacity: 1; }
.ui-modal {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
  width: 100%; max-width: 400px; padding: 1.5rem; text-align: center;
  transform: translateY(8px) scale(.98); transition: transform .18s ease;
}
.ui-modal-overlay.show .ui-modal { transform: translateY(0) scale(1); }
.ui-modal-icon {
  width: 52px; height: 52px; margin: 0 auto 0.75rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.ui-modal-icon .material-symbols-outlined { font-size: 28px; }
.ui-modal-icon.danger { background: var(--danger-tint); color: var(--danger); }
.ui-modal-icon.primary { background: var(--primary-tint); color: var(--primary); }
.ui-modal-title { margin: 0 0 0.35rem; font-weight: 700; font-size: 18px; }
.ui-modal-msg { margin: 0 0 1.25rem; color: var(--text-muted); font-size: 14px; }
.ui-modal-actions { display: flex; justify-content: center; gap: 0.5rem; }
.ui-modal-actions .btn { min-width: 96px; }

/* Force-hide helper for JS filters — beats Bootstrap's `.d-flex !important`
   because this stylesheet loads after Bootstrap. Use instead of jQuery
   .toggle()/.hide() on flex rows (which set inline display and get overridden). */
.filtered-hide { display: none !important; }

/* ── Order-history modal (Leads) ───────────────────────────────────────── */
.orders-modal-dialog { max-width: 1140px; }
.orders-layout { display: flex; gap: 0; }
.orders-tabs-col {
  flex: 0 0 240px; max-width: 240px;
  border-right: 1px solid var(--border);
  max-height: 74vh; overflow: auto;
}
.orders-detail-col { flex: 1 1 auto; padding-left: 1.25rem; max-height: 74vh; overflow: auto; }
.orders-tabs { display: flex; flex-direction: column; gap: 4px; padding-right: 0.5rem; }
.order-tab {
  text-align: left; width: 100%;
  border: 1px solid transparent; background: transparent;
  border-radius: var(--radius); padding: 0.5rem 0.65rem;
  cursor: pointer; line-height: 1.25; font-size: 13px;
}
.order-tab:hover { background: var(--surface-container); }
.order-tab.active { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.order-tab.active small { color: var(--primary) !important; }
.order-detail-table th { font-weight: 500; }

/* Redesigned order-detail panel (right side of the modal). */
.od-head { margin-bottom: 0.9rem; }
.od-title { font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.od-title .material-symbols-outlined { color: var(--primary); }
.od-sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.od-dot { opacity: 0.5; margin: 0 2px; }

.od-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-bottom: 1.1rem; }
.od-card { background: var(--surface-low); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 0.6rem 0.5rem; text-align: center; }
.od-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 4px; }
.od-card-val { font-size: 15px; font-weight: 600; color: var(--text); }

.od-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); font-weight: 600; margin: 0 0 0.5rem; }
.od-shipto { margin-bottom: 1.1rem; font-size: 14px; }
.od-shipto .od-name { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.od-contact { display: flex; align-items: center; gap: 0.4rem; color: var(--text-variant); line-height: 1.7; }
.od-contact .material-symbols-outlined { color: var(--text-muted); }
.od-addr { color: var(--text-variant); margin-top: 4px; }

.od-items { font-size: 13.5px; }
.od-items thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.od-items tbody td { border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.od-items .od-prod { font-weight: 500; color: var(--text); }

.od-totals { margin-top: 0.9rem; margin-left: auto; max-width: 320px; }
.od-total-row { display: flex; justify-content: space-between; padding: 6px 2px; font-size: 14px; color: var(--text-variant); border-top: 1px solid var(--border-soft); }
.od-total-row.od-grand { font-weight: 700; font-size: 15px; color: var(--text); border-top: 1px solid var(--border); }

@media (max-width: 575px) {
  .orders-layout { flex-direction: column; }
  .orders-tabs-col { flex-basis: auto; max-width: none; border-right: 0; border-bottom: 1px solid var(--border); }
  .orders-detail-col { padding-left: 0; padding-top: 0.75rem; }
  .od-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ── Kanban board ─────────────────────────────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  min-height: 60vh;
}
.kanban-col {
  flex: 0 0 270px;
  max-width: 270px;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-bottom: none;
}
.kanban-col-header--success { background: var(--success-tint); border-color: rgba(25,135,84,.2); }
.kanban-col-header--failed  { background: var(--danger-tint);  border-color: rgba(220,53,69,.2); }
.kanban-col-title { font-size: 13px; font-weight: 700; }
.kanban-col-body {
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 0.5rem;
  min-height: 300px;
}
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.45rem;
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.15s;
}
.kanban-card:hover { box-shadow: var(--shadow-2); }
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card[draggable="true"]:active { cursor: grabbing; }
.kanban-card.is-dragging { opacity: 0.35; box-shadow: none; }
.kanban-drag-handle { cursor: grab; flex-shrink: 0; opacity: 0.4; transition: opacity 0.15s; }
.kanban-card:hover .kanban-drag-handle { opacity: 0.8; }
.kanban-col-body.drag-over {
  background: var(--primary-tint);
  border: 2px dashed var(--primary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.kanban-card-name { line-height: 1.3; }
.kanban-card-notes { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.kanban-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 1.5rem 0.5rem; }
.ms-14 { font-size: 14px; }
.ms-16 { font-size: 16px; }

/* ── Password policy checklist (change-password page) ─────────────────────── */
.pw-checklist { list-style: none; padding: 0.75rem 0.9rem; margin: 0.25rem 0 0; background: var(--surface-container); border: 1px solid var(--border); border-radius: var(--radius); }
.pw-rule { display: flex; align-items: center; gap: 0.5rem; font-size: 13px; color: var(--danger); padding: 2px 0; }
.pw-rule.pass { color: var(--success); }
.pw-rule-icon { font-size: 18px; }
