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

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════════════════ */
:root {
  --sidebar-w:      265px;
  --topbar-h:       66px;

  /* Sidebar */
  --sb-bg:          #0b1120;
  --sb-text:        #8896ae;
  --sb-act-bg:      rgba(14,165,233,.13);
  --sb-act-txt:     #ffffff;
  --sb-act-bdr:     #0ea5e9;
  --sb-hover:       rgba(255,255,255,.045);
  --sb-section:     rgba(136,150,174,.4);

  /* Brand */
  --primary:        #0ea5e9;
  --primary-dk:     #0284c7;
  --primary-lt:     #e0f2fe;

  /* Semantic */
  --success:        #059669;
  --success-lt:     #d1fae5;
  --warning:        #d97706;
  --warning-lt:     #fef3c7;
  --danger:         #dc2626;
  --danger-lt:      #fee2e2;
  --info:           #2563eb;
  --info-lt:        #dbeafe;
  --purple:         #7c3aed;
  --purple-lt:      #ede9fe;
  --teal:           #0891b2;

  /* Layout */
  --bg:             #f0f4f8;
  --bg2:            #e8edf2;
  --card:           #ffffff;
  --border:         #e2e8f0;
  --text:           #0f172a;
  --text2:          #334155;
  --muted:          #64748b;
  --muted-lt:       #94a3b8;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh:    0 2px 8px rgba(15,23,42,.07),0 0 1px rgba(15,23,42,.04);
  --sh-md: 0 6px 20px rgba(15,23,42,.09),0 1px 4px rgba(15,23,42,.05);
  --sh-lg: 0 16px 40px rgba(15,23,42,.12),0 2px 8px rgba(15,23,42,.06);

  /* Gradients */
  --g-blue:   linear-gradient(135deg,#0284c7 0%,#38bdf8 100%);
  --g-green:  linear-gradient(135deg,#047857 0%,#34d399 100%);
  --g-orange: linear-gradient(135deg,#b45309 0%,#fbbf24 100%);
  --g-purple: linear-gradient(135deg,#6d28d9 0%,#a78bfa 100%);
  --g-teal:   linear-gradient(135deg,#0e7490 0%,#22d3ee 100%);
  --g-red:    linear-gradient(135deg,#991b1b 0%,#f87171 100%);
  --g-dark:   linear-gradient(135deg,#1e293b 0%,#475569 100%);

  /* Radius */
  --r:    12px;
  --r-sm: 8px;
  --r-lg: 16px;
  --r-xl: 22px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════════════════════════════ */
*  { box-sizing: border-box; }
body {
  font-family: 'Inter','Segoe UI',system-ui,sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; }

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN — SPLIT SCREEN
═══════════════════════════════════════════════════════════════════════════ */
.login-wrap {
  display: flex;
  min-height: 100vh;
}
.login-brand {
  width: 42%;
  background: linear-gradient(145deg,#071524 0%,#0c2848 40%,#0e3a5e 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 4rem;
  position: relative;
  overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(14,165,233,.1);
}
.login-brand::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(37,99,235,.12);
}
.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  position: relative;
  z-index: 1;
}
.login-brand-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--g-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; color: #fff;
  box-shadow: 0 8px 24px rgba(14,165,233,.4);
}
.login-brand-name { color: #fff; font-size: 1.35rem; font-weight: 800; letter-spacing: -.5px; }
.login-brand-sub  { color: rgba(255,255,255,.5); font-size: .75rem; font-weight: 500; }
.login-brand-headline {
  color: #fff;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.login-brand-headline span { color: #38bdf8; }
.login-brand-desc { color: rgba(255,255,255,.55); font-size: .9rem; margin-bottom: 2.5rem; position: relative; z-index: 1; }
.login-feature {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.login-feature-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(14,165,233,.15);
  border: 1px solid rgba(14,165,233,.25);
  display: flex; align-items: center; justify-content: center;
  color: #38bdf8; font-size: .8rem; flex-shrink: 0;
}
.login-feature-text { color: rgba(255,255,255,.75); font-size: .82rem; line-height: 1.4; }
.login-feature-text strong { color: #fff; font-weight: 600; display: block; }

.login-form-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
}
.login-card {
  background: var(--card);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: 2.75rem 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}
.login-card-title { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: .35rem; }
.login-card-sub   { font-size: .85rem; color: var(--muted); margin-bottom: 2rem; }

@media (max-width: 768px) {
  .login-wrap { flex-direction: column; }
  .login-brand { width: 100%; padding: 2rem; min-height: 240px; }
  .login-brand-headline { font-size: 1.5rem; }
  .login-brand::before,.login-brand::after { display: none; }
}

/* ── Legacy compatibility ── */
.login-bg { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-logo { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.login-logo span { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════════════════ */
#sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--sb-bg);
  display: flex; flex-direction: column;
  z-index: 1050;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  border-right: 1px solid rgba(255,255,255,.04);
}
#sidebar::-webkit-scrollbar { width: 3px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 3px; }

.sidebar-logo {
  display: flex; align-items: center; gap: .85rem;
  padding: 1.35rem 1.4rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--g-blue);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.15rem; font-weight: 800;
  box-shadow: 0 4px 12px rgba(14,165,233,.35);
  flex-shrink: 0;
}
.sidebar-logo-text { color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: -.3px; line-height: 1.1; }
.sidebar-logo-ver  { color: var(--sb-text); font-size: .65rem; margin-top: 2px; }

.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  margin-bottom: .25rem;
  flex-shrink: 0;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg,#0ea5e9,#2563eb);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .8rem; font-weight: 700;
  flex-shrink: 0;
}
.user-name { color: #e2e8f0; font-size: .83rem; font-weight: 600; line-height: 1.2; }
.user-role { color: var(--sb-text); font-size: .7rem; margin-top: 1px; }

.sidebar-section {
  color: var(--sb-section);
  font-size: .62rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .85rem 1.4rem .3rem;
  flex-shrink: 0;
}

.sidebar-nav { list-style: none; padding: 0 .5rem; margin: 0; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: .75rem;
  padding: .58rem .9rem;
  color: var(--sb-text);
  font-size: .83rem; font-weight: 500;
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  margin-bottom: 2px;
  transition: all .15s;
}
.sidebar-nav li a:hover { background: var(--sb-hover); color: #cbd5e1; }
.sidebar-nav li a.active {
  background: var(--sb-act-bg);
  color: var(--sb-act-txt);
  border-left-color: var(--sb-act-bdr);
  font-weight: 600;
}
.sidebar-nav li a.active i { color: var(--sb-act-bdr); }
.sidebar-nav li a i { width: 16px; text-align: center; font-size: .82rem; }
.sidebar-nav li a .nav-badge {
  margin-left: auto;
  background: var(--danger); color: #fff;
  font-size: .6rem; font-weight: 700;
  padding: .15rem .45rem; border-radius: 20px;
}

.sidebar-bottom { margin-top: auto; padding: .25rem .5rem .75rem; border-top: 1px solid rgba(255,255,255,.05); }

/* ═══════════════════════════════════════════════════════════════════════════
   TOPBAR
═══════════════════════════════════════════════════════════════════════════ */
#topbar {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0;
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.75rem; gap: 1rem;
  z-index: 1040;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(15,23,42,.04);
}
.topbar-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.topbar-org   { font-size: .72rem; color: var(--muted); margin-left: .5rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.topbar-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); background: var(--card); cursor: pointer;
  transition: all .15s; font-size: .85rem;
  position: relative;
}
.topbar-btn:hover { background: var(--bg); color: var(--text); border-color: var(--muted-lt); }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════════════════════ */
#main-content { margin-left: var(--sidebar-w); padding-top: var(--topbar-h); min-height: 100vh; }
.content-area  { padding: 1.75rem 2rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════════════════════════════════════════ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem;
}
.page-header h1 { font-size: 1.45rem; font-weight: 800; margin: 0 0 .2rem; letter-spacing: -.4px; }
.breadcrumb { font-size: .75rem; --bs-breadcrumb-divider-color: var(--muted-lt); }
.breadcrumb-item a { color: var(--muted); }
.breadcrumb-item.active { color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: .95rem 1.35rem;
  font-weight: 700;
  font-size: .88rem;
  display: flex; align-items: center; justify-content: space-between;
  letter-spacing: -.2px;
}
.card-header i { color: var(--primary); }
.card-body { padding: 1.25rem 1.35rem; }

/* Card with left color accent */
.card-accent-blue   { border-left: 3px solid var(--primary) !important; }
.card-accent-green  { border-left: 3px solid var(--success) !important; }
.card-accent-orange { border-left: 3px solid var(--warning) !important; }
.card-accent-red    { border-left: 3px solid var(--danger) !important; }
.card-accent-purple { border-left: 3px solid var(--purple) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   STAT CARDS — GRADIENT
═══════════════════════════════════════════════════════════════════════════ */
.stat-card {
  border-radius: var(--r-lg);
  padding: 1.4rem 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  min-height: 108px;
}
.stat-card.grad-blue   { background: var(--g-blue);   }
.stat-card.grad-green  { background: var(--g-green);  }
.stat-card.grad-orange { background: var(--g-orange); }
.stat-card.grad-purple { background: var(--g-purple); }
.stat-card.grad-teal   { background: var(--g-teal);   }
.stat-card.grad-red    { background: var(--g-red);    }
.stat-card.grad-dark   { background: var(--g-dark);   }
/* Decorative circles */
.stat-card::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.stat-card::after {
  content: '';
  position: absolute; bottom: -40px; right: 50px;
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.stat-card-left { position: relative; z-index: 1; }
.stat-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-bottom: .4rem; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.stat-sub   { font-size: .76rem; opacity: .75; margin-top: .35rem; }
.stat-icon-bg {
  font-size: 2.8rem;
  opacity: .18;
  position: relative; z-index: 1;
}

/* ── Legacy stat-card (plain white) kept for backwards compat ── */
.stat-card.plain {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--sh);
}
.stat-card.plain .stat-icon { width: 48px; height: 48px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-card.plain .stat-icon.blue   { background: var(--primary-lt); color: var(--primary); }
.stat-card.plain .stat-icon.green  { background: var(--success-lt); color: var(--success); }
.stat-card.plain .stat-icon.orange { background: var(--warning-lt); color: var(--warning); }
.stat-card.plain .stat-icon.red    { background: var(--danger-lt);  color: var(--danger); }
.stat-card.plain .stat-label { color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: none; letter-spacing: 0; opacity: 1; }
.stat-card.plain .stat-value { font-size: 1.7rem; color: var(--text); }
.stat-card.plain .stat-sub   { color: var(--muted); opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════════════════════ */
.table-crm { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-crm th {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
  padding: .75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  white-space: nowrap;
}
.table-crm th:first-child { border-radius: 0; }
.table-crm td {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: .85rem;
  vertical-align: middle;
  color: var(--text2);
}
.table-crm tbody tr:last-child td { border-bottom: none; }
.table-crm tbody tr { transition: background .1s; }
.table-crm tbody tr:hover td { background: #f8fafc; }
.table-crm .fw-bold { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════════════════════ */
.badge {
  font-size: .68rem; font-weight: 700;
  padding: .3em .7em; border-radius: 20px;
  letter-spacing: .02em;
}
.bg-success { background: var(--success) !important; }
.bg-danger  { background: var(--danger)  !important; }
.bg-warning { background: var(--warning) !important; color: #fff !important; }
.bg-info    { background: var(--info)    !important; }
.bg-primary { background: var(--primary) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════════════════ */
.btn { border-radius: var(--r-sm); font-weight: 600; font-size: .82rem; letter-spacing: .01em; transition: all .15s; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); color: #fff; box-shadow: 0 4px 12px rgba(14,165,233,.35); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-gradient {
  background: var(--g-blue); color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(14,165,233,.4);
}
.btn-gradient:hover { box-shadow: 0 6px 20px rgba(14,165,233,.5); color: #fff; opacity: .92; }
.btn-sm { font-size: .76rem; padding: .33rem .7rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); }

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════════════════════ */
.form-control, .form-select {
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  font-size: .85rem;
  color: var(--text);
  padding: .5rem .85rem;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
  outline: none;
}
.form-label { font-size: .78rem; font-weight: 700; color: var(--text2); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; }
.input-group-text { border: 1.5px solid var(--border); background: #f8fafc; color: var(--muted); font-size: .85rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   PIPELINE / KANBAN
═══════════════════════════════════════════════════════════════════════════ */
.pipeline-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.pipeline-col {
  min-width: 218px; flex: 1;
  background: #f8fafc;
  border-radius: var(--r);
  padding: .85rem;
  border: 1px solid var(--border);
}
.pipeline-col-header {
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
  margin-bottom: .75rem;
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--border);
}
.pipeline-col-header .count {
  background: var(--border); color: var(--muted);
  border-radius: 20px; padding: .1rem .5rem; font-size: .68rem;
}
.deal-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .9rem;
  margin-bottom: .55rem; cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.deal-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); border-color: var(--muted-lt); }
.deal-card-title { font-size: .83rem; font-weight: 700; margin-bottom: .3rem; color: var(--text); }
.deal-card-val { font-size: .92rem; font-weight: 800; color: var(--primary); }
.deal-card-meta { font-size: .72rem; color: var(--muted); margin-top: .35rem; display: flex; gap: .4rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════════════════════════════════════ */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 18px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { display: flex; gap: .85rem; margin-bottom: 1.1rem; position: relative; }
.timeline-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; flex-shrink: 0; z-index: 1;
  border: 2px solid var(--card);
}
.timeline-icon.call    { background: var(--primary-lt); color: var(--primary); }
.timeline-icon.email   { background: var(--info-lt);    color: var(--info); }
.timeline-icon.meeting { background: var(--success-lt); color: var(--success); }
.timeline-icon.note    { background: var(--warning-lt); color: var(--warning); }
.timeline-icon.default { background: var(--bg2);        color: var(--muted); }
.timeline-body {
  flex: 1; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: .75rem 1rem; box-shadow: var(--sh-xs);
}
.timeline-title { font-size: .85rem; font-weight: 700; color: var(--text); }
.timeline-desc  { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.timeline-date  { font-size: .71rem; color: var(--muted-lt); margin-top: .3rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE HEADER
═══════════════════════════════════════════════════════════════════════════ */
.profile-header {
  background: linear-gradient(140deg,#071524 0%,#0e3a5e 100%);
  border-radius: var(--r) var(--r) 0 0;
  padding: 2rem 1.5rem 1.5rem;
  position: relative; overflow: hidden;
}
.profile-header::after {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(14,165,233,.12);
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg,#0ea5e9,#2563eb);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; font-weight: 800;
  margin-bottom: .85rem;
  border: 3px solid rgba(255,255,255,.2);
  position: relative; z-index: 1;
}
.profile-name { color: #fff; font-size: 1.2rem; font-weight: 800; margin: 0; position: relative; z-index: 1; }
.profile-sub  { color: rgba(255,255,255,.55); font-size: .83rem; position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   MISC COMPONENTS
═══════════════════════════════════════════════════════════════════════════ */
.flash-wrap {
  position: fixed; top: calc(var(--topbar-h) + 10px); right: 1.5rem;
  z-index: 9999; min-width: 320px;
}
.empty-state { text-align: center; padding: 2.5rem 1.5rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; opacity: .18; display: block; margin-bottom: .75rem; }
.empty-state h5 { color: var(--text2); margin-bottom: .35rem; }
.empty-state p  { font-size: .85rem; }

.search-box { position: relative; }
.search-box .form-control { padding-left: 2.3rem; }
.search-box i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted-lt); font-size: .82rem; }

.priority-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.priority-dot.low    { background: var(--muted-lt); }
.priority-dot.medium { background: var(--info); }
.priority-dot.high   { background: var(--warning); }
.priority-dot.urgent { background: var(--danger); }

.prob-bar  { height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.prob-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg,var(--primary),#2563eb); }

.tag {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .65rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; font-size: .72rem; font-weight: 600; color: var(--muted);
}

.fw-600 { font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION / MODULE HERO
═══════════════════════════════════════════════════════════════════════════ */
.module-hero {
  background: linear-gradient(135deg,#071524 0%,#0e3a5e 100%);
  border-radius: var(--r-lg); padding: 1.75rem 2rem;
  margin-bottom: 1.5rem; position: relative; overflow: hidden;
  color: #fff;
}
.module-hero::after {
  content:'';position:absolute;top:-40px;right:-40px;
  width:200px;height:200px;border-radius:50%;background:rgba(14,165,233,.1);
}
.module-hero h2 { font-size:1.4rem;font-weight:800;margin:0 0 .25rem;position:relative;z-index:1; }
.module-hero p  { font-size:.84rem;opacity:.6;margin:0;position:relative;z-index:1; }

/* ═══════════════════════════════════════════════════════════════════════════
   RECLAMATION STATUS BADGES
═══════════════════════════════════════════════════════════════════════════ */
.badge-new         { background: var(--info-lt);    color: var(--info);    border: 1px solid #bfdbfe; }
.badge-in_progress { background: var(--warning-lt); color: var(--warning); border: 1px solid #fde68a; }
.badge-resolved    { background: var(--success-lt); color: var(--success); border: 1px solid #a7f3d0; }
.badge-rejected    { background: var(--danger-lt);  color: var(--danger);  border: 1px solid #fecaca; }

/* Campaign status */
.badge-draft    { background: #f1f5f9; color: var(--muted);   border: 1px solid var(--border); }
.badge-active   { background: var(--success-lt); color: var(--success); border: 1px solid #a7f3d0; }
.badge-completed{ background: var(--primary-lt); color: var(--primary); border: 1px solid #bae6fd; }
.badge-cancelled{ background: var(--danger-lt);  color: var(--danger);  border: 1px solid #fecaca; }

/* Integration cards */
.integration-card {
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  padding: 1.5rem; background: var(--card);
  transition: box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column; gap: .75rem;
}
.integration-card:hover { box-shadow: var(--sh-md); border-color: var(--primary); }
.integration-icon {
  width: 52px; height: 52px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.integration-status {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-dot.active { background: var(--success); box-shadow: 0 0 0 3px var(--success-lt); }
.status-dot.inactive { background: var(--muted-lt); }
.status-dot.partial  { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-lt); }

/* Segment pill */
.segment-pill {
  background: var(--primary-lt); color: var(--primary);
  border: 1px solid #bae6fd; border-radius: 20px;
  padding: .3rem .85rem; font-size: .76rem; font-weight: 700;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #topbar, #main-content { left: 0 !important; margin-left: 0 !important; }
  .content-area { padding: 1rem; }
  .pipeline-board { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-lt); }

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════════════════════════ */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-info    { color: var(--info)    !important; }
.text-muted   { color: var(--muted)   !important; }
.bg-light-blue   { background: var(--primary-lt) !important; }
.bg-light-green  { background: var(--success-lt) !important; }
.bg-light-orange { background: var(--warning-lt) !important; }
.bg-light-red    { background: var(--danger-lt)  !important; }
