/* ================================================================
   SOURSO 3.1 — Premium Light Design System
   Inspired by: Stripe, Razorpay, Linear, Ramp, Notion
   Typography: Plus Jakarta Sans (display) + Inter (body)
   Future-ready · Investor-grade · India B2B market
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand-50:  #f0f3fb;
  --brand-100: #dce6f5;
  --brand-200: #b8cce8;
  --brand-300: #7fa3d0;
  --brand-400: #4a7ab8;
  --brand-500: #1e4d8c;
  --brand-600: #0a1628;
  --brand-700: #0d1f3c;
  --brand-800: #091525;
  --brand-900: #060e1a;

  /* Neutrals — warm white base like Stripe/Ramp */
  --gray-0:   #ffffff;
  --gray-25:  #fafafa;
  --gray-50:  #f7f8f9;
  --gray-100: #f0f2f5;
  --gray-150: #e8ebf0;
  --gray-200: #dde1e8;
  --gray-300: #c8cdd6;
  --gray-400: #a0a8b5;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Accent palette */
  --violet:      #7c3aed;
  --violet-50:   #f5f3ff;
  --violet-100:  #ede9fe;
  --violet-600:  #7c3aed;
  --violet-700:  #6d28d9;

  --amber:       #d97706;
  --amber-50:    #fffbeb;
  --amber-100:   #fef3c7;
  --amber-600:   #d97706;

  --rose:        #e11d48;
  --rose-50:     #fff1f2;
  --rose-100:    #ffe4e6;
  --rose-600:    #e11d48;

  --emerald:     #059669;
  --emerald-50:  #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-600: #059669;

  --sky:         #0284c7;
  --sky-50:      #f0f9ff;
  --sky-100:     #e0f2fe;
  --sky-600:     #0284c7;

  --indigo:      #4338ca;
  --indigo-50:   #eef2ff;
  --indigo-100:  #e0e7ff;

  /* Semantic */
  --success:     var(--emerald);
  --warning:     var(--amber);
  --danger:      var(--rose);
  --info:        var(--sky);

  /* Surfaces */
  --bg:          var(--gray-50);
  --surface:     var(--gray-0);
  --surface-2:   var(--gray-50);
  --surface-3:   var(--gray-100);

  /* Text */
  --text:        var(--gray-900);
  --text-2:      var(--gray-600);
  --text-3:      var(--gray-400);
  --text-4:      var(--gray-300);

  /* Borders */
  --border:       var(--gray-150);
  --border-2:     var(--gray-200);
  --border-strong:var(--gray-300);

  /* Shadows — surgical, precise */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.04);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,.08), 0 2px 4px -2px rgba(16,24,40,.04);
  --shadow-lg: 0 12px 24px -4px rgba(16,24,40,.10), 0 4px 8px -2px rgba(16,24,40,.06);
  --shadow-xl: 0 24px 48px -12px rgba(16,24,40,.14);
  --shadow-brand: 0 0 0 4px rgba(10,22,40,.12);
  --shadow-focus: 0 0 0 3px rgba(10,22,40,.18);

  /* Typography */
  --font:      'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r:    8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl:20px;
  --r-full: 999px;

  /* Layout */
  --sidebar-w: 240px;
  --topbar-h:  58px;

  /* Transitions */
  --t:   .15s ease;
  --t-md:.2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; font-size: 14px; }
a { color: var(--brand-700); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--brand-600); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font-body); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font); font-weight: 700; letter-spacing: -.02em; color: var(--text); line-height: 1.3; margin: 0 0 8px; }
h1 { font-size: 30px; letter-spacing: -.03em; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
h5 { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
p  { margin: 0 0 12px; color: var(--text-2); line-height: 1.65; }
small, .muted { color: var(--text-3); font-size: 12.5px; }
code { font-family: var(--font-mono); font-size: 12.5px; background: var(--gray-100); border: 1px solid var(--border); padding: 1px 5px; border-radius: var(--r-sm); color: var(--brand-700); }

/* ── App Shell ─────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; background: var(--bg); }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: none;
  box-shadow: var(--shadow-xs);
}
.sidebar::-webkit-scrollbar { display: none; }

.logo {
  display: flex;
  align-items: center;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo img { height: 28px; width: auto; }

.sidebar-nav { padding: 10px 10px; flex: 1; display: flex; flex-direction: column; gap: 1px; }

.nav-group {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 14px 10px 5px;
  flex-shrink: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  color: var(--gray-600);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--t);
  position: relative;
  text-decoration: none !important;
  white-space: nowrap;
}
.sidebar-nav a:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}
.sidebar-nav a.active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}
.sidebar-nav a.active .ico { opacity: 1; }
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 6px; bottom: 6px;
  width: 3px;
  background: var(--brand-50);
  border-radius: 0 3px 3px 0;
}

.ico {
  width: 20px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
  opacity: .75;
  line-height: 1;
}
.sidebar-nav a.active .ico,
.sidebar-nav a:hover .ico { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--rose-600);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: var(--gray-25);
}
.avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand-400), var(--brand-700));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

/* ── Main Area ─────────────────────────────────────────────────── */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-top {
  height: var(--topbar-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8ebf0;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}
.app-top h1 {
  font-size: 17px;
  margin: 0;
  letter-spacing: -.02em;
  font-weight: 700;
  color: var(--text);
}
.app-top-phone {
  color: var(--text-2) !important;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.app-content {
  padding: 28px 32px;
  flex: 1;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t);
  text-decoration: none !important;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: #0a1628;
  color: #fff;
  border-color: #0a1628;
  box-shadow: 0 1px 2px rgba(13,148,136,.3), inset 0 1px 0 rgba(255,255,255,.1);
}
.btn-primary:hover {
  background: #0d1f3c;
  color: #fff;
  box-shadow: 0 4px 14px rgba(10,22,40,0.35);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-2);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
  padding: 9px 14px;
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--text);
}

.btn-danger {
  background: var(--rose-50);
  color: var(--rose-600);
  border-color: var(--rose-100);
}
.btn-danger:hover { background: var(--rose-600); color: #fff; }

.btn-success {
  background: var(--emerald-50);
  color: var(--emerald-600);
  border-color: var(--emerald-100);
}
.btn-success:hover { background: var(--emerald-600); color: #fff; }

.btn-violet {
  background: var(--violet-50);
  color: var(--violet-600);
  border-color: var(--violet-100);
}
.btn-violet:hover { background: var(--violet-600); color: #fff; }

.btn-sm  { padding: 6px 12px; font-size: 12.5px; border-radius: var(--r-sm); gap: 5px; }
.btn-lg  { padding: 12px 24px; font-size: 15px; border-radius: var(--r-md); }
.btn-xl  { padding: 14px 28px; font-size: 16px; border-radius: var(--r-lg); }
.btn-block { width: 100%; justify-content: center; }

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t), box-shadow var(--t);
}
.card:hover { border-color: var(--border-2); }
.card-interactive:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
  transform: translateY(-1px);
}
.card-pad    { padding: 20px; }
.card-pad-lg { padding: 28px; }
.card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gray-25);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.card-body { padding: 20px; }

/* ── KPI / Stat Cards ──────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: all var(--t-md);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--kpi-accent, var(--brand-500));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  opacity: 0;
  transition: opacity var(--t);
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-2); }
.kpi-card:hover::before { opacity: 1; }
.kpi-lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.kpi-val { font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--text); line-height: 1; font-family: var(--font); }
.kpi-sub { font-size: 12px; color: var(--text-3); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.kpi-icon { width: 36px; height: 36px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 12px; }
.kpi-trend { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: var(--r-sm); }
.trend-up   { color: var(--emerald-600); background: var(--emerald-50); }
.trend-dn   { color: var(--rose-600); background: var(--rose-50); }
.trend-flat { color: var(--text-3); background: var(--gray-100); }

/* ── Tables ────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--gray-25);
  white-space: nowrap;
}
.table th:first-child { border-radius: var(--r-sm) 0 0 0; }
.table th:last-child  { border-radius: 0 var(--r-sm) 0 0; }
.table td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--t); }
.table tbody tr:hover td { background: var(--gray-25); color: var(--text); }
.table-unread { background: var(--brand-50) !important; }
.table-unread td { color: var(--text) !important; font-weight: 500; }

/* ── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.3;
  border: 1px solid transparent;
}
.badge-teal     { background: var(--brand-50);   color: var(--brand-700); border-color: var(--brand-100); }
.badge-emerald  { background: var(--emerald-50);  color: var(--emerald-600); border-color: var(--emerald-100); }
.badge-amber    { background: var(--amber-50);    color: var(--amber-600);   border-color: var(--amber-100); }
.badge-rose     { background: var(--rose-50);     color: var(--rose-600);    border-color: var(--rose-100); }
.badge-violet   { background: var(--violet-50);   color: var(--violet-600);  border-color: var(--violet-100); }
.badge-sky      { background: var(--sky-50);      color: var(--sky-600);     border-color: var(--sky-100); }
.badge-indigo   { background: var(--indigo-50);   color: var(--indigo);      border-color: var(--indigo-100); }
.badge-gray     { background: var(--gray-100);    color: var(--gray-600);    border-color: var(--gray-200); }
.badge-outline  { background: transparent;        color: var(--text-2);      border-color: var(--border-2); }
.badge-blue     { background: var(--sky-50);      color: var(--sky-600); }

/* Status semantic aliases */
.badge-pending   { background: var(--amber-50);   color: var(--amber-600);   border-color: var(--amber-100); }
.badge-verified  { background: var(--emerald-50);  color: var(--emerald-600); border-color: var(--emerald-100); }
.badge-rejected  { background: var(--rose-50);     color: var(--rose-600);    border-color: var(--rose-100); }
.badge-open      { background: var(--brand-50);    color: var(--brand-700);   border-color: var(--brand-100); }
.badge-closed    { background: var(--gray-100);    color: var(--gray-500);    border-color: var(--gray-200); }
.badge-draft     { background: var(--gray-100);    color: var(--gray-500);    border-color: var(--gray-200); }
.badge-submitted { background: var(--violet-50);   color: var(--violet-600);  border-color: var(--violet-100); }
.badge-accepted  { background: var(--emerald-50);  color: var(--emerald-600); border-color: var(--emerald-100); }
.badge-expired   { background: var(--gray-100);    color: var(--text-3); }
.badge-active    { background: var(--brand-50);    color: var(--brand-700);   border-color: var(--brand-100); }

/* ── Forms ─────────────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.form-label .req { color: var(--rose-600); margin-left: 2px; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.form-error-msg { font-size: 12px; color: var(--rose-600); margin-top: 5px; font-weight: 500; }

.form-control, .input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r);
  padding: 10px 13px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  transition: all var(--t);
  outline: none;
  -webkit-appearance: none;
  line-height: 1.5;
}
.form-control:hover, .input:hover { border-color: var(--border-strong); }
.form-control:focus, .input:focus {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
}
.form-control::placeholder, .input::placeholder { color: var(--text-3); }
select.form-control { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 96px; }
.form-control[type="file"] { padding: 8px 10px; cursor: pointer; }
.form-control.error { border-color: var(--rose-600); box-shadow: 0 0 0 3px var(--rose-50); }

.field { margin-bottom: 20px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* Form sections */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.form-section-head {
  padding: 16px 20px;
  background: var(--gray-25);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-section-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.form-section-head .section-icon {
  width: 32px; height: 32px;
  border-radius: var(--r);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.form-section-body { padding: 20px; }
.form-section-body .grid-3 { gap: 16px; }

/* Input with prefix/suffix */
.input-group { display: flex; align-items: stretch; }
.input-group .input-prefix,
.input-group .input-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--gray-50);
  border: 1.5px solid var(--border-2);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.input-group .input-prefix { border-right: none; border-radius: var(--r) 0 0 var(--r); }
.input-group .input-suffix { border-left: none;  border-radius: 0 var(--r) var(--r) 0; }
.input-group .form-control { border-radius: 0; flex: 1; }
.input-group .form-control:first-child { border-radius: var(--r) 0 0 var(--r); }
.input-group .form-control:last-child  { border-radius: 0 var(--r) var(--r) 0; }

/* Radio/Checkbox cards */
.option-cards { display: grid; gap: 10px; }
.option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--t);
  background: var(--surface);
}
.option-card:hover { border-color: var(--brand-300); background: var(--brand-50); }
.option-card.selected { border-color: var(--brand-500); background: var(--brand-50); box-shadow: var(--shadow-brand); }
.option-card input { margin-top: 2px; accent-color: var(--brand-600); }

/* ── Alerts ────────────────────────────────────────────────────── */
.alert {
  padding: 13px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
  line-height: 1.5;
}
.alert-success { background: var(--emerald-50);  color: #0a1628; border-color: var(--emerald-100); }
.alert-danger  { background: var(--rose-50);     color: #9f1239; border-color: var(--rose-100); }
.alert-warning { background: var(--amber-50);    color: #92400e; border-color: var(--amber-100); }
.alert-info    { background: var(--sky-50);      color: #075985; border-color: var(--sky-100); }

/* Flash aliases */
.flash { padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: 13.5px; font-weight: 500; border: 1px solid; }
.flash-emerald { background: var(--emerald-50); color: #0a1628; border-color: var(--emerald-100); border-left: 3px solid var(--emerald); }
.flash-rose    { background: var(--rose-50);    color: #9f1239; border-color: var(--rose-100);    border-left: 3px solid var(--rose); }
.flash-amber   { background: var(--amber-50);   color: #92400e; border-color: var(--amber-100);   border-left: 3px solid var(--amber); }
.flash-blue    { background: var(--brand-50);   color: var(--brand-800); border-color: var(--brand-100); border-left: 3px solid var(--brand-600); }

/* ── Trust Score ───────────────────────────────────────────────── */
.trust-score-big {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  font-family: var(--font);
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  border: 1px solid transparent;
}
.trust-platinum { background: var(--violet-50);  color: var(--violet-600); border-color: var(--violet-100); }
.trust-gold     { background: var(--amber-50);   color: var(--amber-600);  border-color: var(--amber-100); }
.trust-silver   { background: var(--gray-100);   color: var(--gray-600);   border-color: var(--gray-200); }
.trust-basic    { background: var(--brand-50);   color: var(--brand-700);  border-color: var(--brand-100); }
.trust-unverified { background: var(--rose-50);  color: var(--rose-600);   border-color: var(--rose-100); }

.trust-bar { display: grid; grid-template-columns: 160px 1fr 50px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.trust-bar:last-child { border-bottom: none; }
.trust-bar .lbl { font-size: 13px; color: var(--text-2); font-weight: 500; }
.trust-bar .lbl .w { color: var(--text-3); font-size: 11px; margin-left: 4px; }
.trust-bar .meter { background: var(--gray-100); height: 7px; border-radius: var(--r-full); overflow: hidden; }
.trust-bar .meter .fill { height: 100%; border-radius: var(--r-full); transition: width .6s cubic-bezier(.4,0,.2,1); }
.trust-bar .meter .fill.strong  { background: var(--emerald); }
.trust-bar .meter .fill.okay    { background: var(--amber); }
.trust-bar .meter .fill.weak    { background: var(--rose); }
.trust-bar .meter .fill.missing { background: var(--gray-200); }
.trust-bar .val { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); text-align: right; font-weight: 500; }

/* ── Tabs ──────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1.5px solid var(--border); margin-bottom: 20px; gap: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 11px 18px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 13.5px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  white-space: nowrap;
  transition: all var(--t);
  text-decoration: none !important;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--brand-700); border-bottom-color: var(--brand-600); font-weight: 600; }

/* ── Timeline ──────────────────────────────────────────────────── */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding-left: 32px; padding-bottom: 24px; }
.timeline li::before { content: ''; position: absolute; left: 9px; top: 20px; bottom: 0; width: 1.5px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li .dot { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); box-shadow: var(--shadow-xs); }
.timeline li.done .dot    { background: var(--emerald); border-color: var(--emerald); }
.timeline li.active .dot  { background: var(--surface); border-color: var(--brand-600); box-shadow: var(--shadow-brand); }
.timeline li.disputed .dot { background: var(--rose);   border-color: var(--rose); }
.timeline li h4 { margin: 0 0 4px; font-size: 14px; }
.timeline li .meta { font-size: 12px; color: var(--text-3); }

/* ── Steps ─────────────────────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.steps .step { flex: 1; height: 5px; background: var(--gray-200); border-radius: var(--r-full); transition: background .3s; }
.steps .step.active { background: var(--brand-500); }
.steps .step.done   { background: var(--emerald); }

/* ── Notification Bell ─────────────────────────────────────────── */
.notif-btn {
  width: 36px; height: 36px;
  border-radius: var(--r);
  background: var(--gray-50);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--t);
  color: var(--text-2);
  position: relative;
}
.notif-btn:hover { background: var(--gray-100); border-color: var(--border-2); }
.notif-count {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--rose-600);
  color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid #fff;
}
.notif-dropdown {
  position: absolute; right: 0; top: 44px;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
}
.notif-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none !important;
  color: inherit !important;
  transition: background var(--t);
}
.notif-item:hover { background: var(--gray-25); }
.notif-item:last-child { border-bottom: none; }

/* ── Vendor Cards (marketplace) ────────────────────────────────── */
.vendor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all var(--t-md);
  text-decoration: none !important;
}
.vendor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand-300); }
.vendor-card .vc-logo { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-700); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 18px; border: 1px solid var(--brand-100); }

/* ── Chat ──────────────────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.chat .msg { max-width: 76%; padding: 10px 14px; border-radius: var(--r-lg); background: var(--gray-100); color: var(--text); font-size: 13.5px; }
.chat .msg.mine { align-self: flex-end; background: var(--brand-600); color: #fff; }
.chat .msg .meta { font-size: 11px; opacity: .65; margin-top: 4px; }

/* ── Empty State ───────────────────────────────────────────────── */
.empty { text-align: center; padding: 56px 24px; }
.empty .ico { font-size: 36px; margin-bottom: 12px; opacity: .4; }
.empty h3 { color: var(--text-2); font-size: 15px; margin-bottom: 6px; }
.empty p  { color: var(--text-3); font-size: 13.5px; max-width: 320px; margin: 0 auto; }

/* ── Public Site ───────────────────────────────────────────────── */
.public-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.public-nav .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.public-nav .logo-txt { font-weight: 800; font-size: 20px; letter-spacing: -.03em; color: var(--text); font-family: var(--font); }
.public-nav .logo-txt span { color: var(--brand-600); }
.public-nav nav { display: flex; gap: 24px; align-items: center; }
.public-nav nav a { color: var(--text-2); font-weight: 500; font-size: 14px; }
.public-nav nav a:hover { color: var(--text); }

.hero { padding: 88px 24px 100px; background: linear-gradient(180deg, #fff 0%, var(--gray-50) 100%); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -20%; right: -5%; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(13,148,136,.07), transparent 70%); pointer-events: none; }
.hero::after  { content: ''; position: absolute; bottom: 0; left: -10%; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(124,58,237,.05), transparent 70%); pointer-events: none; }
.hero h1 { font-size: 54px; line-height: 1.06; max-width: 780px; margin: 0 auto 18px; text-align: center; letter-spacing: -.03em; }
.hero p.lead { font-size: 18px; max-width: 580px; margin: 0 auto 32px; text-align: center; color: var(--text-2); }
.hero .ctas  { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin: 64px auto 0; max-width: 900px; }
.hero .stat  { text-align: center; }
.hero .stat .num { font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--text); font-family: var(--font); }
.hero .stat .lbl { font-size: 13px; color: var(--text-3); margin-top: 4px; }

.section { padding: 72px 0; }
.section h2 { font-size: 34px; text-align: center; margin-bottom: 10px; letter-spacing: -.03em; }
.section .sub { text-align: center; color: var(--text-2); max-width: 540px; margin: 0 auto 52px; font-size: 16px; }

.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.feature { padding: 28px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); transition: all var(--t-md); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-300); }
.feature .ico { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-700); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 16px; border: 1px solid var(--brand-100); }
.feature h3 { margin: 0 0 8px; font-size: 16px; }

.footer { background: var(--gray-900); color: var(--gray-400); padding: 56px 0 28px; }
.footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer h4 { color: var(--gray-200); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer a { color: var(--gray-500); display: block; padding: 4px 0; font-size: 13.5px; transition: color var(--t); }
.footer a:hover { color: var(--gray-200); }
.footer .copy { border-top: 1px solid var(--gray-800); margin-top: 40px; padding-top: 20px; text-align: center; font-size: 13px; color: var(--gray-600); }

/* ── App Footer ────────────────────────────────────────────────── */
.app-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 40px; }
.app-footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: 1400px; padding: 32px; }
.app-footer-brand p { color: var(--text-3); font-size: 13px; max-width: 280px; margin: 0 0 10px; line-height: 1.6; }
.app-footer-contact { font-size: 13px; color: var(--text-2); font-weight: 600; }
.app-footer-col h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 0 0 12px; font-weight: 700; }
.app-footer-col a { display: block; color: var(--text-2); font-size: 13px; padding: 4px 0; }
.app-footer-col a:hover { color: var(--brand-700); }
.app-footer-bottom { border-top: 1px solid var(--border); padding: 16px 32px; font-size: 12.5px; color: var(--text-3); max-width: 1400px; }

/* ── Grid & Layout ─────────────────────────────────────────────── */
.container        { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 860px;  margin: 0 auto; padding: 0 28px; }
.grid    { display: grid; gap: 20px; }
.grid-2  { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3  { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4  { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-12 { grid-template-columns: repeat(12, minmax(0,1fr)); }
.col-span-3  { grid-column: span 3; }
.col-span-4  { grid-column: span 4; }
.col-span-5  { grid-column: span 5; }
.col-span-6  { grid-column: span 6; }
.col-span-7  { grid-column: span 7; }
.col-span-8  { grid-column: span 8; }
.col-span-9  { grid-column: span 9; }
.col-span-12 { grid-column: span 12; }

/* Spacing */
.mt-1{margin-top:4px} .mt-2{margin-top:8px} .mt-3{margin-top:12px}
.mt-4{margin-top:16px} .mt-6{margin-top:24px} .mt-8{margin-top:32px} .mt-12{margin-top:48px}
.mb-1{margin-bottom:4px} .mb-2{margin-bottom:8px} .mb-3{margin-bottom:12px}
.mb-4{margin-bottom:16px} .mb-5{margin-bottom:20px} .mb-6{margin-bottom:24px} .mb-8{margin-bottom:32px}
.p-4{padding:16px} .p-6{padding:24px}

/* Flex */
.flex         { display:flex; }
.flex-between { display:flex; justify-content:space-between; align-items:center; }
.flex-col     { flex-direction:column; }
.items-center { align-items:center; }
.items-start  { align-items:flex-start; }
.justify-end  { justify-content:flex-end; }
.gap-1{gap:4px} .gap-2{gap:8px} .gap-3{gap:12px} .gap-4{gap:16px} .gap-6{gap:24px}
.flex-1{flex:1 1 auto}

/* Text */
.text-right  { text-align:right; }
.text-center { text-align:center; }
.text-2      { color:var(--text-2); }
.text-3      { color:var(--text-3); }
.font-semibold { font-weight:600; }
.font-bold   { font-weight:700; }
.font-mono   { font-family:var(--font-mono); font-size:12.5px; }
.truncate    { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.w-full      { width:100%; }
.hidden      { display:none; }

/* ── Section Eyebrow ───────────────────────────────────────────── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Divider ───────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Chart containers ──────────────────────────────────────────── */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap canvas { max-width: 100%; }

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

/* ── Animations ────────────────────────────────────────────────── */
@keyframes fadeUp  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes shimmer { 0% { background-position:-600px 0; } 100% { background-position:600px 0; } }
@keyframes pulse   { 0%,100% { opacity:1; } 50% { opacity:.5; } }
@keyframes spin    { to { transform:rotate(360deg); } }

.fade-in   { animation: fadeIn .2s ease forwards; }
.fade-up   { animation: fadeUp .25s ease forwards; }
.sou-fade-in { animation: fadeUp .4s ease forwards; }
.sou-stagger > * { opacity:0; animation: fadeUp .5s ease forwards; }
.sou-stagger > *:nth-child(1){animation-delay:.05s}
.sou-stagger > *:nth-child(2){animation-delay:.10s}
.sou-stagger > *:nth-child(3){animation-delay:.15s}
.sou-stagger > *:nth-child(4){animation-delay:.20s}
.sou-stagger > *:nth-child(5){animation-delay:.25s}
.sou-stagger > *:nth-child(6){animation-delay:.30s}

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width:1100px) {
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .app-footer-inner { grid-template-columns:1fr 1fr; gap:24px; }
}
@media (max-width:900px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; }
  .col-span-3,.col-span-4,.col-span-5,.col-span-6,.col-span-7,.col-span-8,.col-span-9 { grid-column:span 12; }
  .app-shell { grid-template-columns:1fr; }
  .sidebar { transform:translateX(-100%); transition:transform var(--t-md); }
  .sidebar.open { transform:translateX(0); }
  .app-main { margin-left:0; }
  .app-content { padding:16px; }
  .hero h1 { font-size:36px; }
  .hero .stats { grid-template-columns:repeat(2,1fr); }
  .feature-grid { grid-template-columns:1fr; }
  .footer .container { grid-template-columns:1fr; }
  .app-top-phone-txt { display:none; }
}
@media (max-width:600px) {
  .kpi-grid { grid-template-columns:1fr; }
  .app-footer-inner { grid-template-columns:1fr; }
}

/* ── Print ─────────────────────────────────────────────────────── */
@media print {
  .sidebar,.app-top,.no-print { display:none !important; }
  .app-main { margin-left:0; }
  .app-content { padding:0; }
}

/* ── [x-cloak] ─────────────────────────────────────────────────── */
[x-cloak] { display:none !important; }

/* Mobile sidebar toggle */
@media (max-width:900px) {
  #sidebar-toggle { display:inline-flex !important; }
}
