/* ════════════════════════════════════════════════════════════════
   ELSAFE BIZ – Design System & Global Styles
   ════════════════════════════════════════════════════════════════ */

/* ── CSS Variables (Design Tokens) ───────────────────────────── */
:root {
  /* Brand Colors */
  --color-navy:       #0A1F44;
  --color-navy-light: #132D5E;
  --color-navy-dark:  #06152E;
  --color-primary:       #059669;
  --color-primary-light: #34D399;
  --color-primary-dark:  #047857;
  --color-white:      #FFFFFF;
  /* legacy aliases kept for backward compat */
  --color-gold:       #059669;
  --color-gold-light: #34D399;
  --color-gold-dark:  #047857;

  /* UI Colors */
  --color-bg:         #F0F2F5;
  --color-surface:    #FFFFFF;
  --color-border:     #E2E6EB;
  --color-text:       #1A2233;
  --color-text-sec:   #5A6577;
  --color-text-muted: #8E99A9;

  /* Status Colors */
  --color-success:    #16A34A;
  --color-success-bg: #DCFCE7;
  --color-warning:    #EAB308;
  --color-warning-bg: #FEF9C3;
  --color-danger:     #DC2626;
  --color-danger-bg:  #FEE2E2;
  --color-info:       #2563EB;
  --color-info-bg:    #DBEAFE;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(10,31,68,.08);
  --shadow-md:  0 4px 12px rgba(10,31,68,.10);
  --shadow-lg:  0 8px 30px rgba(10,31,68,.14);
  --shadow-xl:  0 12px 48px rgba(10,31,68,.18);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 50%;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-xs:  .75rem;
  --font-sm:  .8125rem;
  --font-base: .9375rem;
  --font-md:  1rem;
  --font-lg:  1.125rem;
  --font-xl:  1.375rem;
  --font-2xl: 1.75rem;
  --font-3xl: 2.25rem;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl:48px;

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

  /* Transitions */
  --trans-fast: .15s ease;
  --trans-med:  .25s ease;
  --trans-slow: .35s ease;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {color: var(--color-info); text-decoration: none;}
a:hover {text-decoration: underline;}
img {max-width: 100%; display: block;}
ul,ol {list-style: none;}
button {cursor: pointer; font-family: inherit; border: none; background: none;}
input,select,textarea {font-family: inherit; font-size: var(--font-base); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 10px 14px; transition: border var(--trans-fast), box-shadow var(--trans-fast); outline: none; background: var(--color-white); width: 100%; color: var(--color-text);}
input:focus,select:focus,textarea:focus {border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(5,150,105,.18);}
textarea {resize: vertical; min-height: 80px;}
select {appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpolyline points='0,0 5,6 10,0' fill='none' stroke='%235A6577' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;}
table {width:100%; border-collapse: collapse; font-size: var(--font-sm);}
th,td {text-align:left; padding:10px 14px; border-bottom:1px solid var(--color-border);}
th {font-weight:600; color:var(--color-text-sec); background:var(--color-bg); position:sticky; top:0; z-index:1; text-transform:uppercase; letter-spacing:.5px; font-size:var(--font-xs);}
.hidden {display:none !important;}

/* ── Login Page ──────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-bg {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-navy) 50%, var(--color-navy-light) 100%);
  position: relative;
  overflow: hidden;
}
.login-bg::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(5,150,105,.14) 0%, transparent 70%);
  border-radius: 50%;
}
.login-bg::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -15%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,.1) 0%, transparent 70%);
  border-radius: 50%;
}
.login-card {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,.2);
  padding: 48px 40px 36px;
  width: 420px;
  max-width: 95vw;
  position: relative;
  z-index: 1;
  animation: loginSlideUp .6s ease-out;
  border-top: 3px solid var(--color-primary);
}
@keyframes loginSlideUp {
  from {opacity:0; transform:translateY(30px);}
  to {opacity:1; transform:translateY(0);}
}
.login-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: 20px;
}
.login-logo {
  max-height: 110px;
  width: auto;
  filter: drop-shadow(0 4px 14px rgba(220,38,38,.25));
}
.login-brand {display:flex;align-items:baseline;gap:4px;}
.login-brand-main {font-size:var(--font-2xl);font-weight:800;color:var(--color-navy);letter-spacing:.5px;}
.login-brand-sub {font-size:var(--font-lg);font-weight:600;color:var(--color-primary);}
.login-tagline {text-align:center;color:var(--color-text-sec);margin-bottom:28px;font-size:var(--font-sm);}
.login-form .form-group {margin-bottom:18px;}
.login-form label {display:block;font-size:var(--font-sm);font-weight:600;color:var(--color-text-sec);margin-bottom:6px;}
.pass-wrap {position:relative;}
.pass-wrap input {padding-right:42px;}
.toggle-pass {position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:1rem;color:var(--color-text-muted);padding:4px;}
.login-error {color:var(--color-danger);font-size:var(--font-sm);padding:8px 12px;background:var(--color-danger-bg);border-radius:var(--radius-sm);margin-bottom:12px;}
.login-footer-note {text-align:center;font-size:var(--font-xs);color:var(--color-text-muted);margin-top:20px;}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--font-sm);
  transition: all var(--trans-fast);
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.btn-primary {background:var(--color-primary);color:var(--color-white);border-color:var(--color-primary);}
.btn-primary:hover {background:var(--color-primary-dark);border-color:var(--color-primary-dark);transform:translateY(-1px);box-shadow:var(--shadow-md);}
.btn-secondary {background:var(--color-navy);color:var(--color-white);border-color:var(--color-navy);}
.btn-secondary:hover {background:var(--color-navy-light);border-color:var(--color-navy-light);transform:translateY(-1px);box-shadow:var(--shadow-md);}
.btn-ghost {background:transparent;color:var(--color-text-sec);border-color:var(--color-border);}
.btn-ghost:hover {background:var(--color-bg);color:var(--color-text);}
.btn-danger {background:var(--color-danger);color:var(--color-white);}
.btn-danger:hover {background:#B91C1C;}
.btn-success {background:var(--color-success);color:var(--color-white);}
.btn-success:hover {background:#15803D;}
.btn-sm {padding:6px 14px;font-size:var(--font-xs);}
.btn-full {width:100%;justify-content:center;padding:12px;}
.btn:disabled,.btn.loading {opacity:.55;pointer-events:none;}

/* ── App Shell Layout ────────────────────────────────────────── */
.app-shell {display:flex; min-height:100vh;}
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0A1F44 0%, #0D2952 60%, #0A2040 100%);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--trans-med);
  box-shadow: 4px 0 24px rgba(0,0,0,.18);
}
.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: 72px;
}
.sidebar-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.sb-main {font-size:var(--font-lg);font-weight:800;letter-spacing:.5px;}
.sb-sub {font-size:var(--font-sm);font-weight:600;color:var(--color-primary-light);}
.sidebar-close {display:none;color:var(--color-white);font-size:1.5rem;margin-left:auto;padding:4px;}

.nav-links {
  flex: 1; overflow-y: auto; padding: 12px 0;
}
.nav-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px;
  font-size: var(--font-sm);
  font-weight: 500;
  color: rgba(255,255,255,.7);
  transition: all var(--trans-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-links a:hover,.nav-links a.active {
  color: var(--color-white);
  background: rgba(255,255,255,.06);
  border-left-color: var(--color-primary);
}
.nav-links a.active {background: rgba(5,150,105,.15);font-weight:600;}
.nav-links .nav-icon {
  font-size:1rem;
  width:28px;height:28px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:6px;
  background:rgba(255,255,255,.06);
  transition:background var(--trans-fast);
}
.nav-links a:hover .nav-icon,
.nav-links a.active .nav-icon {
  background:var(--color-primary);
}
.nav-links .nav-section {
  padding: 18px 24px 6px;
  font-size: var(--font-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.user-chip {display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.user-avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--font-sm);
}
.u-name {font-size:var(--font-sm);font-weight:600;color:var(--color-white);}
.u-role {font-size:var(--font-xs);color:rgba(255,255,255,.5);text-transform:capitalize;}
.user-meta {display:flex;flex-direction:column;gap:1px;}
.btn-logout {
  width: 100%; padding: 8px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  font-size: var(--font-sm);
  font-weight: 500;
  transition: all var(--trans-fast);
  text-align: center;
}
.btn-logout:hover {background:rgba(220,38,38,.2);color:var(--color-white);}

/* ── Cloud Sync Status ───────────────────────────────────────── */
.cloud-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-xs);
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.08);
}
.cloud-status.online {
  color: var(--color-primary-light);
  background: rgba(5,150,105,.1);
  border-color: rgba(5,150,105,.2);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online {
  background-color: var(--color-primary-light);
  box-shadow: 0 0 8px var(--color-primary-light);
  animation: pulseCloud 2s infinite;
}
.status-dot.offline {
  background-color: var(--color-danger);
}
@keyframes pulseCloud {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}
.btn-sync {
  width: 100%;
  margin-bottom: 8px;
  font-size: var(--font-xs);
  background: rgba(52,211,153,.15);
  color: var(--color-primary-light);
  border: 1px solid rgba(52,211,153,.3);
}
.btn-sync:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 99;
  opacity: 0; transition: opacity var(--trans-med);
}
.sidebar-overlay.show {opacity: 1;}

/* ── Main Wrapper ────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.top-bar {
  height: var(--topbar-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(10,31,68,.07);
  backdrop-filter: blur(4px);
}
.menu-toggle {
  display:none;
  align-items:center;justify-content:center;
  width:38px;height:38px;
  font-size:1.2rem;
  border-radius:var(--radius-sm);
  color:var(--color-text);
  background:var(--color-bg);
  border:1px solid var(--color-border);
  transition:all var(--trans-fast);
}
.menu-toggle:hover {background:var(--color-border);}
.breadcrumb {
  font-size: var(--font-sm);
  color: var(--color-text-sec);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb .bc-sep {color:var(--color-text-muted);}
.breadcrumb .bc-current {font-weight:600;color:var(--color-text);}
.topbar-right {margin-left:auto;display:flex;align-items:center;gap:14px;}
.notif-btn {position:relative;font-size:1.2rem;padding:6px;color:var(--color-text-sec);}
.notif-badge {
  position:absolute;top:0;right:0;
  min-width:18px;height:18px;
  border-radius:10px;
  background:var(--color-danger);
  color:var(--color-white);
  font-size:10px;
  font-weight:700;
  display:flex;align-items:center;justify-content:center;
  padding:0 4px;
}
.notif-panel {
  position:absolute;top:calc(100% + 8px);right:0;
  width:320px;max-height:400px;overflow-y:auto;
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-lg);
  z-index:200;
}
.notif-panel .notif-item {
  padding:12px 16px;
  border-bottom:1px solid var(--color-border);
  font-size:var(--font-sm);
  cursor:pointer;
  transition:background var(--trans-fast);
}
.notif-panel .notif-item:hover {background:var(--color-bg);}
.notif-panel .notif-item.unread {background:var(--color-info-bg);}
.notif-panel .notif-empty {padding:24px;text-align:center;color:var(--color-text-muted);font-size:var(--font-sm);}
.notif-wrap {position:relative;}

.main-content {
  padding: 28px;
  flex: 1;
}

/* ── Page Loader ─────────────────────────────────────────────── */
.page-loader {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:80px 0;gap:16px;color:var(--color-text-muted);font-size:var(--font-sm);
}
.spinner {
  width:36px;height:36px;
  border:3px solid var(--color-border);
  border-top-color:var(--color-primary);
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin {to{transform:rotate(360deg);}}

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;
  margin-bottom:24px;
}
.page-header h1 {font-size:var(--font-xl);font-weight:700;color:var(--color-navy);}
.page-header-actions {display:flex;align-items:center;gap:10px;}

/* ── Cards & Panels ──────────────────────────────────────────── */
.card {
  background:var(--color-surface);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);
  border:1px solid var(--color-border);
  overflow:hidden;
  transition:box-shadow var(--trans-fast), transform var(--trans-fast);
}
.card:hover {box-shadow:var(--shadow-md);}
.card-header {
  padding:16px 20px;
  border-bottom:1px solid var(--color-border);
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:var(--color-bg);
}
.card-header h2,.card-header h3 {font-size:var(--font-md);font-weight:700;color:var(--color-navy);letter-spacing:-.01em;}
.card-body {padding:20px;}
.card-footer {padding:12px 20px;border-top:1px solid var(--color-border);background:var(--color-bg);}

/* ── Stat Cards (Dashboard) ──────────────────────────────────── */
.stats-grid {
  display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:18px;
  margin-bottom:28px;
}
.stat-card {
  background:var(--color-surface);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);
  border:1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  padding:20px;
  display:flex;align-items:flex-start;gap:14px;
  transition:transform var(--trans-fast),box-shadow var(--trans-fast);
}
.stat-card:hover {transform:translateY(-3px);box-shadow:var(--shadow-md);}
.stat-icon {
  width:48px;height:48px;border-radius:var(--radius-md);
  display:flex;align-items:center;justify-content:center;
  font-size:1.4rem;flex-shrink:0;
}
.stat-icon.blue   {background:var(--color-info-bg);color:var(--color-info);}
.stat-icon.green  {background:var(--color-success-bg);color:var(--color-success);}
.stat-icon.orange {background:var(--color-warning-bg);color:var(--color-warning);}
.stat-icon.red    {background:var(--color-danger-bg);color:var(--color-danger);}
.stat-value {font-size:var(--font-2xl);font-weight:800;color:var(--color-navy);line-height:1;}
.stat-label {font-size:var(--font-xs);color:var(--color-text-sec);margin-top:4px;text-transform:uppercase;letter-spacing:.5px;font-weight:500;}

/* ── Form Styles ─────────────────────────────────────────────── */
.form-group {margin-bottom:18px;}
.form-group label {display:block;font-size:var(--font-sm);font-weight:600;color:var(--color-text-sec);margin-bottom:6px;}
.form-group .hint {font-size:var(--font-xs);color:var(--color-text-muted);margin-top:4px;}
.form-row {display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.form-row-3 {display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;}
.form-actions {display:flex;gap:10px;margin-top:24px;}
.required::after {content:" *";color:var(--color-danger);}
.input-error {border-color:var(--color-danger) !important;}
.error-msg {color:var(--color-danger);font-size:var(--font-xs);margin-top:4px;}
.form-section-title {font-size:var(--font-md);font-weight:700;color:var(--color-navy);margin:28px 0 14px;padding-bottom:8px;border-bottom:2px solid var(--color-primary);}

/* ── Table Enhancements ──────────────────────────────────────── */
.table-wrap {overflow-x:auto;border-radius:var(--radius-md);border:1px solid var(--color-border);}
table tr:hover td {background:rgba(5,150,105,.04);}
.table-actions {display:flex;gap:6px;}
.table-actions button {padding:5px 8px;border-radius:var(--radius-sm);font-size:var(--font-xs);}
.table-empty {padding:40px;text-align:center;color:var(--color-text-muted);}

/* ── Status Badges ───────────────────────────────────────────── */
.badge {
  display:inline-flex;align-items:center;
  padding:3px 10px;
  border-radius:20px;
  font-size:var(--font-xs);
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.3px;
}
.badge-active,.badge-sent     {background:var(--color-success-bg);color:var(--color-success);}
.badge-inactive,.badge-rejected {background:var(--color-danger-bg);color:var(--color-danger);}
.badge-draft                   {background:var(--color-warning-bg);color:var(--color-warning);}
.badge-accepted                {background:var(--color-info-bg);color:var(--color-info);}
.badge-in                      {background:var(--color-success-bg);color:var(--color-success);}
.badge-out                     {background:var(--color-danger-bg);color:var(--color-danger);}
/* CRM Badges */
.badge-new                     {background:#DBEAFE;color:#2563EB;}
.badge-contacted               {background:#FEF9C3;color:#CA8A04;}
.badge-interested              {background:#F3E8FF;color:#7C3AED;}
.badge-won                     {background:#DCFCE7;color:#16A34A;}
.badge-lost                    {background:#FEE2E2;color:#DC2626;}
.badge-pending                 {background:#FEF9C3;color:#CA8A04;}
.badge-done                    {background:#DCFCE7;color:#16A34A;}
.badge-cancelled               {background:#F3F4F6;color:#6B7280;}
.badge-overdue                 {background:#FEE2E2;color:#DC2626;}

/* ── Search & Filter Bar ─────────────────────────────────────── */
.toolbar {
  display:flex;align-items:center;flex-wrap:wrap;gap:12px;
  margin-bottom:18px;
}
.toolbar .search-box {
  flex:1;min-width:200px;max-width:320px;
  position:relative;
}
.toolbar .search-box input {padding-left:36px;}
.toolbar .search-box::before {
  content:'🔍';position:absolute;left:10px;top:50%;transform:translateY(-50%);
  font-size:.9rem;
}
.toolbar select {max-width:180px;}
.filter-chips {display:flex;gap:6px;flex-wrap:wrap;}
.chip {
  display:inline-flex;align-items:center;gap:5px;
  padding:5px 12px;border-radius:20px;font-size:var(--font-xs);font-weight:500;
  background:var(--color-bg);border:1px solid var(--color-border);color:var(--color-text-sec);
  cursor:pointer;transition:all var(--trans-fast);
}
.chip.active,.chip:hover {background:var(--color-primary);color:var(--color-white);border-color:var(--color-primary);}

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs {display:flex;border-bottom:2px solid var(--color-border);margin-bottom:24px;gap:0;}
.tab-btn {
  padding:10px 20px;
  font-size:var(--font-sm);font-weight:600;
  color:var(--color-text-sec);
  border-bottom:2px solid transparent;
  margin-bottom:-2px;
  transition:all var(--trans-fast);
  cursor:pointer;
  background:none;
}
.tab-btn:hover {color:var(--color-text);}
.tab-btn.active {color:var(--color-primary);border-bottom-color:var(--color-primary);}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position:fixed;inset:0;
  background:rgba(0,0,0,.5);
  display:flex;align-items:center;justify-content:center;
  z-index:1000;
  animation:fadeIn .2s;
}
@keyframes fadeIn {from{opacity:0;}to{opacity:1;}}
.modal {
  background:var(--color-surface);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-xl);
  width:600px;max-width:95vw;max-height:90vh;overflow-y:auto;
  animation:modalPop .25s ease;
}
@keyframes modalPop {from{opacity:0;transform:scale(.95);}to{opacity:1;transform:scale(1);}}
.modal-header {
  display:flex;align-items:center;justify-content:space-between;
  padding:20px 24px;
  border-bottom:1px solid var(--color-border);
}
.modal-title {font-size:var(--font-lg);font-weight:700;color:var(--color-navy);}
.modal-close {font-size:1.5rem;color:var(--color-text-muted);padding:4px;transition:color var(--trans-fast);}
.modal-close:hover {color:var(--color-danger);}
.modal-body {padding:24px;}
.modal.wide {width:850px;}
.confirm-modal {width:420px;}
.confirm-actions {display:flex;gap:10px;justify-content:flex-end;margin-top:20px;}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position:fixed;bottom:24px;right:24px;z-index:9999;
  display:flex;flex-direction:column-reverse;gap:10px;
}
.toast {
  display:flex;align-items:center;gap:10px;
  padding:14px 20px;
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-lg);
  font-size:var(--font-sm);font-weight:500;
  min-width:280px;max-width:420px;
  animation:toastIn .3s ease;
  color:var(--color-white);
}
@keyframes toastIn {from{opacity:0;transform:translateY(16px);}to{opacity:1;transform:translateY(0);}}
.toast-success {background:#16A34A;}
.toast-error {background:#DC2626;}
.toast-warning {background:#D97706;}
.toast-info {background:#2563EB;}
.toast-dismiss {margin-left:auto;background:none;color:rgba(255,255,255,.8);font-size:1.1rem;padding:2px 4px;}

/* ── Line Items Table ────────────────────────────────────────── */
.line-items-table {margin:12px 0;}
.line-items-table th {font-size:.7rem;}
.line-items-table .row-remove {color:var(--color-danger);font-size:1.1rem;padding:4px 6px;}
.add-line-btn {margin-top:8px;}

/* ── Image Upload ────────────────────────────────────────────── */
.img-upload-area {
  border:2px dashed var(--color-border);
  border-radius:var(--radius-md);
  padding:24px;
  text-align:center;
  cursor:pointer;
  transition:all var(--trans-fast);
  color:var(--color-text-muted);
  font-size:var(--font-sm);
}
.img-upload-area:hover {border-color:var(--color-gold);background:rgba(245,166,35,.04);}
.img-preview-grid {display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;}
.img-preview {
  width:80px;height:80px;border-radius:var(--radius-sm);
  object-fit:cover;border:1px solid var(--color-border);
}
.img-preview-wrap {position:relative;}
.img-preview-wrap .remove-img {
  position:absolute;top:-6px;right:-6px;
  width:20px;height:20px;border-radius:50%;
  background:var(--color-danger);color:white;font-size:12px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
}

/* ── Quotation View ──────────────────────────────────────────── */
.line-item-actions {display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px;}
.quot-totals {
  display:flex;justify-content:flex-end;margin-top:16px;
}
.quot-totals table {width:auto;min-width:280px;}
.quot-totals td {padding:8px 16px;}
.quot-totals tr:last-child {font-weight:700;font-size:var(--font-md);color:var(--color-navy);}
.quot-totals tr:last-child td {border-top:2px solid var(--color-navy);}

/* ── Reports ─────────────────────────────────────────────────── */
.report-filters {display:flex;flex-wrap:wrap;gap:12px;margin-bottom:20px;align-items:flex-end;}
.report-filters .form-group {margin-bottom:0;min-width:160px;}
.export-bar {display:flex;gap:10px;margin-bottom:16px;justify-content:flex-end;}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {display:flex;align-items:center;justify-content:center;gap:6px;margin-top:20px;font-size:var(--font-sm);}
.pagination button {
  padding:6px 12px;border-radius:var(--radius-sm);border:1px solid var(--color-border);
  background:var(--color-surface);color:var(--color-text-sec);font-weight:500;
  transition:all var(--trans-fast);
}
.pagination button:hover,.pagination button.active {background:var(--color-primary);color:var(--color-white);border-color:var(--color-primary);}
.pagination button:disabled {opacity:.4;cursor:default;}

/* ── Alert Banners ───────────────────────────────────────────── */
.alert {
  padding:14px 18px;border-radius:var(--radius-sm);font-size:var(--font-sm);margin-bottom:16px;
  display:flex;align-items:center;gap:10px;
}
.alert-warning {background:var(--color-warning-bg);color:#92400E;border:1px solid #FDE68A;}
.alert-danger {background:var(--color-danger-bg);color:#991B1B;border:1px solid #FECACA;}
.alert-info {background:var(--color-info-bg);color:#1E40AF;border:1px solid #BFDBFE;}
.alert-success {background:var(--color-success-bg);color:#166534;border:1px solid #BBF7D0;}

/* ── Misc ────────────────────────────────────────────────────── */
.text-center {text-align:center;}
.text-right {text-align:right;}
.text-muted {color:var(--color-text-muted);}
.text-success {color:var(--color-success);}
.text-danger {color:var(--color-danger);}
.text-warning {color:var(--color-warning);}
.mt-sm {margin-top:var(--space-sm);}
.mt-md {margin-top:var(--space-md);}
.mt-lg {margin-top:var(--space-lg);}
.mb-sm {margin-bottom:var(--space-sm);}
.mb-md {margin-bottom:var(--space-md);}
.mb-lg {margin-bottom:var(--space-lg);}
.gap-sm {gap:var(--space-sm);}
.flex {display:flex;}
.flex-col {flex-direction:column;}
.items-center {align-items:center;}
.justify-between {justify-content:space-between;}
.grid-2 {display:grid;grid-template-columns:1fr 1fr;gap:18px;}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN – 3 breakpoints: 900, 480, 360
   Covers: sidebar, tables, modals, forms, notifications,
   voucher details, reports, quotations, line-items, alerts
   ══════════════════════════════════════════════════════════════ */

/* ── Sidebar Overlay ─────────────────────────────────────────── */
.sidebar-overlay {
  position:fixed;inset:0;z-index:899;
  background:rgba(0,0,0,.45);
  opacity:0;
  transition:opacity .25s ease;
  pointer-events:none;
}
.sidebar-overlay.show {opacity:1;pointer-events:auto;}

/* ── Voucher item chips ─────────────────────────────────── */
.voucher-items-cell {max-width:360px;}
.voucher-chip {
  display:inline-flex;
  align-items:center;
  gap:3px;
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:2px 9px;
  margin:2px 3px 2px 0;
  font-size:.72rem;
  color:#475569;
  white-space:nowrap;
  line-height:1.4;
}
.voucher-chip b {color:#0f172a;font-weight:700;}
.voucher-chip-count {
  display:inline-block;
  background:var(--color-navy, #1e293b);
  color:#fff;
  border-radius:12px;
  padding:2px 9px;
  margin:2px 5px 2px 0;
  font-size:.7rem;
  font-weight:700;
  white-space:nowrap;
}

/* ── Responsive (Tablet ≤ 900px) ────────────────────────── */
@media (max-width:900px) {
  /* Sidebar → drawer */
  .sidebar {transform:translateX(-100%);box-shadow:none;position:fixed;z-index:900;}
  .sidebar.open {transform:translateX(0);box-shadow:8px 0 32px rgba(0,0,0,.25);}
  .sidebar-close {display:block;}
  .main-wrapper {margin-left:0;}
  .menu-toggle {display:flex;}

  /* Layout stacking */
  .form-row,.form-row-3,.grid-2 {grid-template-columns:1fr;}
  .stats-grid {grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px;}
  .main-content {padding:16px 12px;}
  .top-bar {padding:0 12px;gap:10px;}
  .page-header {margin-bottom:16px;}
  .page-header h1 {font-size:var(--font-lg);}

  /* Modal → near full-screen */
  .modal {width:96vw;max-height:94vh;}
  .modal.wide {width:96vw;}
  .confirm-modal {width:92vw;max-width:420px;}

  /* ── Table → Card rows ── */
  .table-wrap {border:none;background:transparent;box-shadow:none;}
  table, thead, tbody, th, td, tr {display:block;}
  thead tr {position:absolute;top:-9999px;left:-9999px;}
  tr {
    border:1px solid var(--color-border);
    border-radius:var(--radius-md);
    margin-bottom:14px;
    padding:14px;
    background:var(--color-surface);
    box-shadow:var(--shadow-sm);
  }
  td {
    border:none;
    border-bottom:1px solid var(--color-bg);
    position:relative;
    padding:10px 8px 10px 48%;
    text-align:right;
    font-size:var(--font-sm);
    min-height:38px;
    display:flex;
    align-items:center;
    justify-content:flex-end;
  }
  td.picker-cell {
    padding:10px !important;
    justify-content:flex-start !important;
  }
  td.picker-cell::before { display:none !important; }
  td:last-child {border-bottom:0;}
  td::before {
    content:attr(data-label);
    position:absolute;
    left:8px;
    width:45%;
    text-align:left;
    font-weight:600;
    color:var(--color-text-sec);
    text-transform:uppercase;
    font-size:10px;
    letter-spacing:.4px;
  }
  .table-actions {flex-wrap:wrap;gap:6px;justify-content:flex-end;}
  .btn-sm {min-height:38px;padding:8px 14px;}

  /* Voucher items → full-width chip list (label on top) */
  .voucher-items-cell {
    flex-direction:column;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    text-align:left;
    padding:10px 8px !important;
    max-width:none;
  }
  .voucher-items-cell::before {
    position:static;
    width:auto;
    display:block;
    margin-bottom:8px;
  }
  .voucher-items-cell .voucher-chip,
  .voucher-items-cell .voucher-chip-count {font-size:.75rem;padding:3px 10px;}

  /* Toolbar stacking */
  .toolbar {flex-direction:column;align-items:stretch;gap:8px;}
  .toolbar .search-box {max-width:none;}
  .toolbar select {max-width:none;}
  .toolbar input[type="date"] {width:100%;}

  /* Dashboard sections */
  .dash-sections-grid {grid-template-columns:1fr;}

  /* Tabs → pills on mobile */
  .tabs {flex-wrap:wrap;gap:4px;border-bottom:none;}
  .tab-btn {
    border:1px solid var(--color-border);
    border-radius:var(--radius-sm);
    padding:8px 14px;
    border-bottom:none;margin-bottom:0;
    font-size:var(--font-xs);
  }
  .tab-btn.active {border-color:var(--color-primary);background:rgba(5,150,105,.08);}

  /* Report filters */
  .report-filters {flex-direction:column;gap:8px;}
  .report-filters .form-group {min-width:unset;width:100%;}
  .export-bar {justify-content:stretch;}
  .export-bar .btn {flex:1;}

  /* Quotation totals */
  .quot-totals {justify-content:stretch;}
  .quot-totals table {width:100%;min-width:unset;}

  /* Notification panel full-width */
  .notif-panel {
    position:fixed !important;
    left:8px !important;right:8px !important;
    top:auto !important;bottom:auto !important;
    max-width:none !important;width:auto !important;
    max-height:60vh;overflow-y:auto;
    z-index:1001;
  }

  /* Line-items table inside modals/forms */
  .line-items-table, .line-items-table thead, .line-items-table tbody,
  .line-items-table th, .line-items-table td, .line-items-table tr {
    display:block;
  }
  .line-items-table thead tr {
    position:static;padding:0;margin:0;
    background:var(--color-bg);border:none;box-shadow:none;
  }
  .line-items-table thead th {display:none;}
  .line-items-table tr {padding:12px;margin-bottom:10px;border:1px solid var(--color-border);border-radius:var(--radius-md);}
  .line-items-table td {
    padding:6px 4px 6px 0;
    border-bottom:none;
    min-height:auto;
    justify-content:flex-start;
    text-align:left;
  }
  .line-items-table td::before {
    position:static;width:auto;margin-right:8px;flex-shrink:0;
    font-size:10px;min-width:70px;
  }
  .line-items-table td input,
  .line-items-table td select {width:100% !important;min-width:0 !important;max-width:100%;}

  /* Add-line buttons / Line item actions full-width */
  .add-line-btn {width:100%;justify-content:center;}
  .line-item-actions .btn {flex:1;min-width:140px;justify-content:center;}

  /* Quote Packages list: stack each field (label above value) so the Items
     list reads vertically instead of colliding horizontally across the card. */
  .qp-table td {
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    text-align:left;
    padding:8px 6px;
    gap:3px;
  }
  .qp-table td::before {
    position:static;
    left:auto;
    width:auto;
    margin-bottom:2px;
  }
  .qp-table td.table-actions {
    flex-direction:row;
    flex-wrap:wrap;
    gap:6px;
    justify-content:flex-start;
  }
  .qp-table .qp-items > div {line-height:1.5;}
  .qp-table .qp-items {width:100%;}

  /* Modal body scroll */
  .modal-body {max-height:72vh;overflow-y:auto;-webkit-overflow-scrolling:touch;}

  /* Voucher detail modal grid → stacked */
  .modal-body > div[style*="grid-template-columns"] {
    display:flex !important;flex-direction:column !important;gap:8px !important;
  }

  /* Alert banners mobile padding */
  .alert {flex-wrap:wrap;padding:12px 14px;font-size:var(--font-xs);}

  /* Image preview responsive */
  .img-preview-grid {gap:8px;}
  .img-preview {width:60px;height:60px;}

  /* Touch-friendly inputs — 16px prevents iOS zoom on focus */
  input, select, textarea {font-size:16px !important;min-height:40px;}
  textarea {min-height:60px;}

  /* Confirm dialog actions */
  .confirm-actions {flex-direction:column;gap:8px;}
  .confirm-actions .btn {width:100%;justify-content:center;}
}

/* ── Responsive (Mobile ≤ 480px) ─────────────────────────── */
@media (max-width:480px) {
  /* Login */
  .login-card {padding:28px 18px 24px;}
  .login-bg {padding:12px;}

  /* Stats */
  .stats-grid {grid-template-columns:1fr 1fr;}
  .stat-card {padding:14px;gap:10px;}
  .stat-icon {width:38px;height:38px;font-size:1.1rem;}
  .stat-value {font-size:var(--font-xl);}
  .stat-label {font-size:9px;}

  /* Page header stacks */
  .page-header {flex-direction:column;align-items:flex-start;gap:8px;}
  .page-header-actions {width:100%;display:flex;flex-wrap:wrap;gap:6px;}
  .page-header-actions .btn {flex:1;justify-content:center;min-width:110px;}

  /* Table card adjustments */
  td {padding:10px 4px 10px 42%;}
  td::before {width:38%;}

  /* Forms stack */
  .form-actions {flex-direction:column;}
  .form-actions .btn {width:100%;justify-content:center;}

  /* Modal → full screen */
  .modal {width:100vw;max-width:100vw;border-radius:var(--radius-sm) var(--radius-sm) 0 0;max-height:100vh;}
  .modal.wide {width:100vw;}
  .modal-body {padding:14px;max-height:82vh;}
  .modal-header {padding:14px 16px;}

  /* Buttons: 44px touch targets */
  .btn {padding:10px 16px;min-height:44px;font-size:var(--font-sm);}
  .tab-btn {padding:8px 10px;font-size:var(--font-xs);}

  /* Toast spans full width */
  .toast-container {left:8px;right:8px;bottom:12px;}
  .toast {min-width:unset;max-width:unset;font-size:var(--font-xs);padding:10px 14px;}

  /* Sidebar wider */
  .sidebar {width:85vw;}

  /* Compact cards */
  .card-body {padding:14px;}
  .card-header {padding:12px 14px;}

  /* Form section title compact */
  .form-section-title {font-size:var(--font-sm);margin:18px 0 10px;}

  /* Breadcrumb hide on very small */
  .breadcrumb {font-size:var(--font-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:50vw;}

  /* Topbar compact */
  .top-bar {height:50px;}
  .topbar-right {gap:4px;}

  /* Image preview smaller */
  .img-preview {width:50px;height:50px;}
  .img-preview-wrap .remove-img {width:16px;height:16px;font-size:10px;}
}

/* ── Responsive (Ultra small ≤ 360px) ───────────────────── */
@media (max-width:360px) {
  .stats-grid {grid-template-columns:1fr;}
  .stat-card {padding:12px;gap:8px;}
  .stat-value {font-size:var(--font-lg);}
  .login-card {padding:20px 14px 18px;}
  .sidebar {width:92vw;}

  /* Labels go above values instead of side-by-side */
  td {padding:8px 4px 8px 0;}
  td::before {position:static;width:auto;margin-bottom:2px;display:block;}
  td {flex-direction:column;align-items:flex-start;}
  .table-actions {justify-content:flex-start;width:100%;}
  .table-actions .btn-sm {flex:1;justify-content:center;}

  /* Full-width page header actions */
  .page-header-actions .btn {min-width:unset;font-size:var(--font-xs);}

  /* Modal tighter */
  .modal-body {padding:10px;}
}

/* ── Utilities ───────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-right { text-align: right !important; }
.text-danger { color: var(--color-danger) !important; }
.text-success { color: var(--color-success) !important; }
.text-muted { color: var(--color-text-muted) !important; }

.table-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  font-size: var(--font-sm);
}

.spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(10,31,68,.1);
  border-top-color: var(--color-navy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px; gap: 12px;
  color: var(--color-text-muted); font-size: var(--font-sm);
}

/* ══════════════════════════════════════════════════════════════
   SearchableSelect – Searchable Dropdown Component
   Mobile-first: opens fullscreen modal with search box
   ══════════════════════════════════════════════════════════════ */
.ss-wrapper {
  position: relative;
  display: inline-flex;
  width: 100%;
}
.ss-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  font-size: var(--font-base);
  font-family: inherit;
  cursor: pointer;
  transition: border var(--trans-fast), box-shadow var(--trans-fast);
  min-height: 42px;
  user-select: none;
  -webkit-user-select: none;
}
.ss-trigger:hover, .ss-trigger:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}
.ss-trigger-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ss-arrow {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ── Overlay ── */
.ss-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
}
.ss-overlay.ss-active {
  opacity: 1;
}
.ss-overlay.ss-closing {
  opacity: 0;
}

/* ── Modal ── */
.ss-modal {
  background: var(--color-surface);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .25s ease;
  overflow: hidden;
  box-shadow: 0 -8px 32px rgba(0,0,0,.2);
}
.ss-active .ss-modal {
  transform: translateY(0);
}
.ss-closing .ss-modal {
  transform: translateY(100%);
}

/* ── Header ── */
.ss-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.ss-search {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 16px !important; /* Prevents iOS zoom */
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-text);
  outline: none;
  transition: border var(--trans-fast);
}
.ss-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.15);
}
.ss-close {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--trans-fast);
}
.ss-close:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* ── Options List ── */
.ss-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}
.ss-option {
  padding: 14px 20px;
  font-size: var(--font-sm);
  color: var(--color-text);
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,.04);
  transition: background .15s;
  user-select: none;
  -webkit-user-select: none;
}
.ss-option:active, .ss-option:hover {
  background: rgba(5,150,105,.08);
}
.ss-option.ss-selected {
  background: rgba(5,150,105,.12);
  color: var(--color-primary);
  font-weight: 600;
}
.ss-option mark {
  background: rgba(250,204,21,.4);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.ss-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}

/* ── Desktop: centered modal instead of bottom sheet ── */
@media (min-width: 901px) {
  .ss-overlay {
    align-items: center;
  }
  .ss-modal {
    border-radius: var(--radius-lg);
    max-height: 60vh;
    max-width: 500px;
    transform: scale(.95);
    opacity: 0;
    transition: transform .2s ease, opacity .2s ease;
  }
  .ss-active .ss-modal {
    transform: scale(1);
    opacity: 1;
  }
  .ss-closing .ss-modal {
    transform: scale(.95);
    opacity: 0;
  }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE APP ONLY  (installed Android / Capacitor build)
   Scoped to `.native-app` on <html>, added at startup only when
   running natively — so the web app (desktop OR phone browser) is
   NEVER affected by anything below.
   ══════════════════════════════════════════════════════════════ */

/* 1) Bigger sidebar logo */
.native-app .sidebar-header { min-height: 84px; }
.native-app .sidebar-logo { height: 62px; padding: 5px 10px; }

/* 2) Larger, clearer breadcrumb / page header text */
.native-app .breadcrumb {
  font-size: 1.05rem;
  max-width: 68vw;
}
.native-app .breadcrumb .bc-current { font-weight: 700; }

/* 3) Bold the left-side labels in every stacked card / list on mobile */
.native-app td::before {
  font-weight: 700;
  color: #1e293b;
}

/* 4) Voucher list: show only the "N items" count, hide the item chips */
.native-app .voucher-items-cell .voucher-chip { display: none; }

/* ── Cashbook daily opening/closing header row (web + mobile) ────── */
.cb-day-head td {
  background: #0f2942;
  color: #fff;
  padding: 10px 14px;
  border-bottom: none;
}
.cb-day-head td strong { color: #fff; }
@media (max-width:900px) {
  .cb-day-head td {
    display: block !important;
    text-align: left !important;
    justify-content: flex-start !important;
    padding: 10px 14px !important;
  }
  .cb-day-head td::before { display: none !important; }
}



/* ── Just-edited row highlight ────────────────────────────────────────────
   App.flashRow() scrolls the record you just saved into view and briefly
   tints it, so it stays in front of you in a long list. Works for normal
   table rows on desktop and for the stacked card rows on mobile. */
@keyframes rowFlash {
  0%   { background-color: #fef08a; }
  65%  { background-color: #fef9c3; }
  100% { background-color: transparent; }
}
tr.row-flash > td,
tr.row-flash {
  animation: rowFlash 3s ease-out 1;
}
tr.row-flash {
  outline: 2px solid var(--color-accent, #f5a623);
  outline-offset: -2px;
  transition: outline-color .4s ease;
}
@media (prefers-reduced-motion: reduce) {
  tr.row-flash > td, tr.row-flash { animation: none; background-color: #fef9c3; }
}
