/* ============================================================
   TechFlint CRM — Design System
   A B2B record-keeping tool grounded in its own ancestor: the
   rolodex / contact card. Ink-navy + electric indigo + a single
   restrained gold accent for anything "verified" or official
   (GST/PAN, compliance documents).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Ink */
  --ink-900: #0E1420;
  --ink-800: #151C2C;
  --ink-700: #1E2740;

  /* Canvas & surface */
  --canvas: #F3F4F9;
  --surface: #FFFFFF;
  --border: #E3E5EF;
  --border-soft: #ECEDF5;

  /* Signal (primary) */
  --signal-600: #2563EB;
  --signal-700: #1D4ED8;
  --signal-50: #EFF6FF;

  /* Gold (compliance / verified accent — used sparingly) */
  --gold-500: #C6952F;
  --gold-50: #FBF3E3;

  /* Status */
  --success-600: #1C8A5B;
  --success-50: #E6F6EF;
  --danger-600: #D6423F;
  --danger-50: #FCEAEA;
  --warning-600: #C1710B;
  --warning-50: #FCF1E2;

  /* Text */
  --text-900: #10131C;
  --text-600: #4B5262;
  --text-400: #8A90A0;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(14,20,32,.05);
  --shadow-md: 0 6px 20px rgba(14,20,32,.08);
  --shadow-lg: 0 20px 60px rgba(14,20,32,.18);

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--text-900);
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }

/* ============================================================
   LOGIN / AUTH — simple, clean split screen. No floating
   illustration pieces, so nothing can ever overlap the text.
   ============================================================ */
.auth-shell {
  min-height: 100vh;
  display: flex;
}
.auth-hero {
  flex: 1;
  background: linear-gradient(160deg, var(--ink-900) 0%, var(--signal-700) 100%);
  color: #fff;
  padding: 48px 60px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-hero .hero-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}
.auth-hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -15%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(6,182,212,.35), transparent 70%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}
.auth-hero .top-brand, .auth-hero .hero-center, .auth-hero .hero-foot { position: relative; z-index: 1; }
.auth-hero .top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  top: 44px; left: 60px;
}
.auth-hero .top-brand .mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  box-shadow: 0 4px 14px rgba(37,99,235,.35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; letter-spacing: -.02em;
  color: #fff;
}
.auth-hero .top-brand .name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }

.auth-hero .hero-copy {
  max-width: 440px;
}
.auth-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-hero .eyebrow::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--gold-500);
}
.auth-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 16px;
  color: #fff;
}
.auth-hero .hero-sub {
  color: rgba(255,255,255,.75);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 28px;
}

.auth-hero .feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-hero .feature-list .f {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255,255,255,.85);
}
.auth-hero .feature-list .f .dot {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 5px;
  background: rgba(255,255,255,.14);
  color: var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; margin-top: 1px;
}

.hero-foot {
  padding-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

.auth-panel {
  flex: 0.85;
  min-width: 420px;
  max-width: 500px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-card { width: 100%; max-width: 360px; }
.auth-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 6px;
}
.auth-card p.sub {
  color: var(--text-400);
  margin: 0 0 28px;
  font-size: 13.5px;
}
.auth-card .foot-note {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--text-400);
  text-align: center;
}

@media (max-width: 880px) {
  .auth-hero { display: none; }
  .auth-panel { flex: 1; max-width: none; min-width: 0; }
}

/* ---- Simple, staggered entrance for hero text (no floating pieces) ---- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-hero .top-brand { animation: heroFadeUp .5s ease both; }
.auth-hero .eyebrow { animation: heroFadeUp .5s ease .08s both; }
.auth-hero h1 { animation: heroFadeUp .5s ease .14s both; }
.auth-hero .hero-sub { animation: heroFadeUp .5s ease .20s both; }
.auth-hero .feature-list .f { animation: heroFadeUp .5s ease both; opacity: 0; }
.auth-hero .feature-list .f:nth-child(1) { animation-delay: .28s; }
.auth-hero .feature-list .f:nth-child(2) { animation-delay: .35s; }
.auth-hero .feature-list .f:nth-child(3) { animation-delay: .42s; }
.auth-hero .feature-list .f:nth-child(4) { animation-delay: .49s; }
.auth-panel .auth-card { animation: heroFadeUp .5s ease .15s both; }

/* ---- Button shine sweep ---- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: '';
  position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
}
.btn-primary:hover::after { left: 125%; }

/* ---- Trust badge under the login button ---- */
.trust-badge {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--text-400);
}
.trust-badge .icon { color: var(--success-600); }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-600);
  letter-spacing: .01em;
}
input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=date], input[type=file], input[type=number], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text-900);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--signal-600);
  box-shadow: 0 0 0 3.5px var(--signal-50);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13.7px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-body);
}
.btn-primary { background: var(--signal-600); color: #fff; box-shadow: 0 1px 2px rgba(61,63,224,.3); }
.btn-primary:hover { background: var(--signal-700); }
.btn-block { width: 100%; justify-content: center; }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--text-900); }
.btn-outline:hover { background: var(--canvas); border-color: #cfd2e2; }
.btn-success { background: var(--success-600); color: #fff; }
.btn-danger { background: var(--danger-600); color: #fff; }
.btn-warning { background: var(--warning-600); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-50); color: #135F3E; border-color: #CDEBDC; }
.alert-error { background: var(--danger-50); color: #96201D; border-color: #F5CFCE; }
.alert-info { background: var(--signal-50); color: var(--signal-700); border-color: #D6D7FA; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 244px;
  background: var(--ink-900);
  color: #B7BCD6;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px 18px;
}
.sidebar-brand .mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  box-shadow: 0 3px 10px rgba(37,99,235,.3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 13.5px;
  flex-shrink: 0;
}
.sidebar-brand .name {
  font-weight: 700; font-size: 15px; letter-spacing: -.01em;
  color: #fff;
}
.workspace-card {
  margin: 0 14px 18px;
  padding: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}
.workspace-card .ws-avatar {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 14px;
  flex-shrink: 0;
}
.workspace-card .ws-label {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #9BA1BC;
  margin-bottom: 2px;
}
.workspace-card .ws-name {
  color: #fff; font-weight: 700; font-size: 13.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar nav { padding: 6px 12px; flex: 1; }
.sidebar nav .nav-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #5B6280;
  padding: 6px 14px 8px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  font-size: 13.7px;
  font-weight: 500;
  color: #B7BCD6;
}
.sidebar nav a .ic { width: 17px; text-align: center; opacity: .85; }
.sidebar nav a:hover { background: rgba(255,255,255,.055); color: #fff; }
.sidebar nav a.active { background: var(--signal-600); color: #fff; }
.sidebar .foot {
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar .foot a.logout-link {
  display: flex; align-items: center; gap: 8px;
  color: #8A90D8; font-size: 13px; font-weight: 500;
}
.sidebar .foot a.logout-link:hover { color: #fff; }

.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.topbar-user .tu-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 13px;
  flex-shrink: 0;
}
.topbar-user .tu-name { font-weight: 700; font-size: 13.3px; color: var(--text-900); line-height: 1.3; }
.topbar-user .tu-role { font-size: 11.5px; color: var(--text-400); }

.main { flex: 1; min-width: 0; }
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.topbar .meta { font-size: 12.5px; color: var(--text-400); margin-top: 2px; }
.content { padding: 28px 30px; }

/* ============================================================
   CARDS / STATS
   ============================================================ */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid-4, .grid-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card .label { font-size: 12px; color: var(--text-400); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-card .value { font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-top: 6px; }
.stat-card .icon {
  width: 38px; height: 38px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 12px;
}

/* ---- Simplified stat card (no icon box, description line) ---- */
.stat-card-v2 { transition: transform .18s ease, box-shadow .18s ease; }
.stat-card-v2:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card-v2 .label { font-size: 13.5px; color: var(--text-600); font-weight: 600; }
.stat-card-v2 .value { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin-top: 10px; color: var(--text-900); }
.stat-card-v2 .desc { font-size: 12px; color: var(--text-400); margin-top: 6px; }

.hero-banner {
  background: linear-gradient(120deg, var(--ink-900) 0%, var(--signal-700) 130%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero-banner .eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: #C9CCF7; margin-bottom: 6px;
}
.hero-banner .company-name { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.01em; }
.hero-banner .sub { font-size: 13.3px; color: #C9CCF7; margin-top: 6px; }

/* ---- Bright blue "welcome" banner variant (dashboard) ---- */
.hero-banner-blue {
  background: linear-gradient(120deg, var(--signal-600) 0%, #5B7CFA 100%);
  padding: 30px 32px;
}
.hero-banner-blue .eyebrow { color: rgba(255,255,255,.8); font-weight: 600; }
.hero-banner-blue .company-name { font-size: 26px; display: flex; align-items: center; gap: 10px; }
.hero-banner-blue .sub { color: rgba(255,255,255,.85); font-size: 14px; margin-top: 8px; margin-bottom: 20px; }
.wave { display: inline-block; animation: wave 2s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-8deg); }
  45% { transform: rotate(14deg); }
  60% { transform: rotate(-4deg); }
  75% { transform: rotate(0deg); }
}
.btn-hero-cta {
  background: #fff;
  color: var(--signal-600);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.btn-hero-cta:hover { background: #F5F5FF; transform: translateY(-1px); }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.6px; }
table.data-table th {
  text-align: left;
  padding: 12px 14px;
  background: #F8F8FC;
  color: var(--text-400);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
table.data-table tr:hover { background: #FAFAFD; }

.name-cell { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px; color: #fff;
  flex-shrink: 0;
}
.link-name { color: var(--text-900); font-weight: 600; cursor: pointer; }
.link-name:hover { color: var(--signal-600); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
}
.badge-enabled { background: var(--success-50); color: #135F3E; }
.badge-disabled { background: var(--danger-50); color: #96201D; }
.badge-admin { background: var(--gold-50); color: #8A6414; }
.badge-user { background: var(--signal-50); color: var(--signal-700); }

.label-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

/* ============================================================
   FILTER / TOOLBAR
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-end;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 170px; }
.filter-bar .form-group label { font-size: 11px; color: var(--text-400); text-transform: uppercase; letter-spacing: .04em; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.toolbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(14,20,32,.6);
  display: none; align-items: center; justify-content: center; z-index: 999;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 14px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; padding: 28px;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { margin-top: 0; font-family: var(--font-display); font-weight: 600; }
.modal-close { float: right; cursor: pointer; font-size: 20px; color: var(--text-400); }

.empty-state {
  text-align: center;
  padding: 54px 20px;
  color: var(--text-400);
}
.empty-state .big { font-size: 40px; margin-bottom: 10px; }

/* ============================================================
   CUSTOMER PROFILE / DETAIL
   ============================================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.profile-header .avatar-lg {
  width: 62px; height: 62px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 24px; color: #fff;
  flex-shrink: 0;
}
.profile-header h2 { font-family: var(--font-display); font-weight: 600; margin: 0; font-size: 23px; }
.profile-header .co { color: var(--text-400); font-size: 13.5px; margin-top: 2px; }

.detail-row { display: flex; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.detail-row:last-child { border-bottom: none; }
.detail-row .k { width: 160px; color: var(--text-400); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; padding-top: 1px; }
.detail-row .v { flex: 1; font-size: 14px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16.5px;
  margin: 0 0 4px;
}
.section-sub { color: var(--text-400); font-size: 12.8px; margin: 0 0 16px; }

/* Document vault */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .15s;
}
.doc-item:hover { border-color: #cfd2e2; }
.doc-item .doc-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--gold-50); color: var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.doc-item .doc-meta { flex: 1; min-width: 0; }
.doc-item .doc-name { font-weight: 600; font-size: 13.7px; }
.doc-item .doc-sub { color: var(--text-400); font-size: 11.8px; margin-top: 2px; font-family: var(--font-mono); }
.doc-item .doc-actions { display: flex; gap: 6px; flex-shrink: 0; }

.upload-remark-list .item {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--surface);
}
.upload-remark-list .item .file { font-weight: 600; font-size: 13.6px; }
.upload-remark-list .item .remark { color: var(--text-400); font-size: 12.6px; margin-top: 3px; }

.wa-link { color: var(--success-600); font-weight: 600; }
.wa-link:hover { text-decoration: underline; }

.verified-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  color: var(--gold-500); background: var(--gold-50);
  padding: 3px 9px; border-radius: 999px; letter-spacing: .02em;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #D5D7E3;
  transition: .18s;
  border-radius: 999px;
}
.switch-slider::before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: #fff;
  transition: .18s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .switch-slider { background-color: var(--signal-600); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* ============================================================
   NOTES / REMARK BOX
   ============================================================ */
.notes-box textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.8px;
  font-family: var(--font-body);
  resize: vertical;
  color: var(--text-900);
}
.notes-box textarea:focus {
  outline: none;
  border-color: var(--signal-600);
  box-shadow: 0 0 0 3.5px var(--signal-50);
}

/* ============================================================
   ICONS
   ============================================================ */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.btn .icon { width: 15px; height: 15px; }

/* ============================================================
   MOTION — subtle entrance + elevation
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.content > * { animation: fadeSlideUp .35s ease both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; }

.card {
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card.hoverable:hover, table.data-table tbody tr.row-hover:hover {
  box-shadow: var(--shadow-md);
  border-color: #D7D9EA;
}
.stat-card { transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ============================================================
   TEXTURE — subtle dot-grid for dark hero surfaces
   ============================================================ */
.dot-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
  z-index: 0;
  mask-image: radial-gradient(circle at 30% 20%, black 0%, transparent 70%);
}

/* ============================================================
   BUTTON POLISH
   ============================================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--signal-600), #4C4EF0);
  box-shadow: 0 2px 8px rgba(61,63,224,.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--signal-700), var(--signal-600));
  box-shadow: 0 4px 14px rgba(61,63,224,.45);
  transform: translateY(-1px);
}
.btn-danger:hover, .btn-success:hover, .btn-warning:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn { transition: all .15s ease; }

/* ============================================================
   TOPBAR SEARCH + ICON BUTTON
   ============================================================ */
.topbar-search {
  position: relative;
  width: 260px;
}
.topbar-search .icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-400); pointer-events: none;
}
.topbar-search input {
  padding-left: 34px;
  background: var(--canvas);
  border-color: var(--border);
  font-size: 13.3px;
}
.topbar-search input:focus { background: var(--surface); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-600);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
}
.icon-btn:hover { background: var(--canvas); color: var(--text-900); }

/* ============================================================
   SIDEBAR active-state accent bar
   ============================================================ */
.sidebar nav a { position: relative; }
.sidebar nav a.active::before {
  content: '';
  position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 3px;
  background: var(--gold-500);
}
.sidebar nav { padding-left: 22px; }

/* ============================================================
   EMPTY STATE ICON
   ============================================================ */
.empty-state .icon-wrap {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--canvas);
  color: var(--text-400);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
