:root {
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --secondary: #0f172a;
  --accent: #0f766e;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --danger: #dc2626;
  --success: #059669;
  --sidebar: #0b1220;
  --sidebar-2: #111827;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  padding: .55rem 1.05rem;
  font-weight: 600;
  font-size: .86rem;
  cursor: pointer;
  transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-color: rgba(217, 119, 6, 0.25);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.btn-dark { background: #0f172a; color: #fff; border-color: #0f172a; }
.btn-dark:hover { background: #1e293b; color: #fff; transform: translateY(-1px); }
.btn-outline {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}
.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.btn-sm {
  padding: 0 .8rem;
  height: 2.25rem;
  font-size: .82rem;
  border-radius: .55rem;
}
.btn-danger {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #e11d48;
}
.btn-danger:hover {
  background: #e11d48;
  border-color: #e11d48;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.alert {
  padding: .85rem 1rem; border-radius: .75rem; margin-bottom: 1rem; font-size: .92rem;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: #334155; }
.form-control, select.form-control, textarea.form-control {
  width: 100%; border: 1px solid var(--border); border-radius: .7rem; padding: .7rem .9rem;
  font: inherit; background: #fff; color: var(--text);
}
.form-control:focus { outline: 2px solid rgba(245,158,11,.35); border-color: #f59e0b; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 1rem; }
table.data { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data th, table.data td { padding: .85rem 1rem; border-bottom: 1px solid #f1f5f9; text-align: left; font-size: .9rem; }
table.data th { background: #f8fafc; color: #475569; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
table.data tr:hover td { background: #fffbeb; }

.badge {
  display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
}
.badge-new, .badge-pending { background: #fff7ed; color: #c2410c; }
.badge-contacted, .badge-documentation, .badge-under_review { background: #eff6ff; color: #1d4ed8; }
.badge-approved, .badge-disbursed, .badge-active, .badge-eligible, .badge-paid { background: #ecfdf5; color: #047857; }
.badge-rejected, .badge-inactive, .badge-closed { background: #fef2f2; color: #b91c1c; }
.badge-on_hold { background: #fffbeb; color: #b45309; }
.badge-direct { background: #f1f5f9; color: #334155; }
.badge-cp { background: #fef3c7; color: #92400e; }
.badge-completed, .badge-high { background: #ecfdf5; color: #047857; }
.badge-failed { background: #fef2f2; color: #b91c1c; }
.badge-processing { background: #eff6ff; color: #1d4ed8; }
.badge-medium { background: #fff7ed; color: #c2410c; }
.badge-info { background: #f1f5f9; color: #334155; }
.badge-completed, .badge-high { background: #ecfdf5; color: #047857; }
.badge-failed { background: #fef2f2; color: #b91c1c; }
.badge-processing { background: #eff6ff; color: #1d4ed8; }
.badge-medium { background: #fff7ed; color: #c2410c; }
.badge-info { background: #f1f5f9; color: #334155; }

.panel {
  background: #fff; border: 1px solid var(--border); border-radius: 1rem; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid #f1f5f9;
}
.panel-head h3 { margin: 0; font-size: 1rem; }
.panel-body { padding: 1.2rem; }

.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem;
}
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 1rem; padding: 1.15rem 1.2rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.stat-card .stat-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem;
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 0.75rem; display: grid; place-items: center;
  color: #fff; font-size: 1rem;
}
.stat-icon.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.blue { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.stat-icon.green { background: linear-gradient(135deg, #34d399, #059669); }
.stat-icon.purple { background: linear-gradient(135deg, #c084fc, #7c3aed); }
.stat-card .delta { font-size: 0.75rem; font-weight: 700; color: #10b981; }
.stat-card .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat-card .value {
  font-size: 1.55rem; font-weight: 800; color: var(--secondary); margin-top: .15rem;
  line-height: 1.2; word-break: break-word;
}

.admin-shell, .cp-shell { display: flex; min-height: 100vh; position: relative; }
.sidebar {
  width: 260px; background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #e2e8f0; position: sticky; top: 0; height: 100vh; max-height: 100vh; display: flex; flex-direction: column; z-index: 40;
  overflow: hidden;
}
.sidebar-brand {
  display: flex; align-items: center; justify-content: center; padding: 1.15rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none; flex-shrink: 0; text-align: center;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: .8rem; background: linear-gradient(135deg, #f59e0b, #d97706);
  display: grid; place-items: center; font-weight: 800; color: #fff;
}
.brand-text { font-weight: 800; font-size: 1.15rem; color: #fff; }
.brand-text span { color: #F98D20; }
.sidebar-brand .nc-logo { min-width: 0; width: max-content; max-width: 100%; margin: 0 auto; align-items: stretch; text-align: center; }
.sidebar-brand .nc-logo-word { font-size: 1.28rem; color: inherit; text-align: center; display: block; }
.sidebar-brand .nc-logo-tag { width: 100%; }
.sidebar-brand .nc-logo-tagline { text-align: center; }
.sidebar-brand .nc-logo img { height: 48px; max-width: 210px; margin: 0 auto; }
.nc-logo{
  --nc-logo-navy:#211f58;
  --nc-logo-orange:#f29a00;
  --nc-logo-tag:#211f58;
  display:inline-flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:5px;
  width:max-content;
  max-width:100%;
  text-decoration:none;
  line-height:1;
}
.nc-logo-img,
.nc-logo img{
  display:block;
  width:auto;
  height:48px;
  max-width:min(208px,70vw);
  object-fit:contain;
}
.nc-logo-word{
  display:block;
  font-size:22px;
  font-weight:800;
  letter-spacing:-.055em;
  line-height:.92;
  font-family:"Plus Jakarta Sans","Plus Jakarta Sans Variable",Inter,system-ui,sans-serif;
  white-space:nowrap;
}
.nc-logo-next{color:var(--nc-logo-navy)}
.nc-logo-credit{color:var(--nc-logo-orange)}
.nc-logo-tag{
  display:grid;
  grid-template-columns:minmax(12px,1fr) auto minmax(12px,1fr);
  align-items:center;
  column-gap:6px;
  width:100%;
  color:var(--nc-logo-tag);
}
.nc-logo-rule{
  display:block;
  height:1.5px;
  min-width:12px;
  border-radius:1px;
}
.nc-logo-rule--navy{background:var(--nc-logo-navy)}
.nc-logo-rule--orange{background:var(--nc-logo-orange)}
.nc-logo-tagline{
  font-size:6.4px;
  font-weight:600;
  letter-spacing:.11em;
  text-transform:uppercase;
  line-height:1;
  color:var(--nc-logo-tag);
  font-family:"Plus Jakarta Sans","Plus Jakarta Sans Variable",Inter,system-ui,sans-serif;
  white-space:nowrap;
}
.nc-logo-tagline span{letter-spacing:0}
.nc-logo--dark,.sidebar-brand .nc-logo{
  --nc-logo-navy:#fff;
  --nc-logo-orange:#F98D20;
  --nc-logo-tag:#fff;
}
.nc-logo--auth .nc-logo-word{font-size:1.75rem}
.nc-logo img{display:block;width:auto;height:52px;max-width:min(240px,70vw)}
.nc-logo--auth img{height:64px;max-width:280px}
.auth-visual .nc-logo{margin-bottom:1.5rem}
.brand-sub { font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; margin-top: .1rem; }
.sidebar-nav {
  padding: .85rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .65rem .85rem; border-radius: .65rem;
  color: #cbd5e1; font-weight: 600; font-size: .9rem; transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.sidebar-nav a i { width: 1.25rem; text-align: center; flex-shrink: 0; font-size: .95rem; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(245,158,11,.14); color: #fbbf24; }
.sidebar-nav a.sidebar-support { margin-top: .35rem; color: #86efac; border: 1px solid rgba(37,211,102,.22); }
.sidebar-nav a.sidebar-support i { color: #25d366; }
.sidebar-nav a.sidebar-support:hover { background: rgba(37,211,102,.14); color: #bbf7d0; }
.sidebar-foot {
  padding: 1rem .85rem;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  background: var(--sidebar-2, #111827);
}
.sidebar-foot form .btn,
.sidebar-foot .btn-logout {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  transition: all .2s ease;
}
.sidebar-foot form .btn:hover,
.sidebar-foot .btn-logout:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}
.sidebar-user { display: flex; align-items: center; gap: .75rem; }
.sidebar-user strong { display: block; font-size: .88rem; color: #fff; }
.sidebar-user span { font-size: .75rem; color: #94a3b8; }
.avatar {
  width: 40px; height: 40px; border-radius: .7rem; background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; font-size: .85rem;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 35;
}
.sidebar-overlay.show { display: block; }
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.95rem 1.75rem;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-shrink: 0;
}
.topbar-actions, .page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem 0.65rem;
  flex-wrap: wrap;
}
.topbar-actions form,
.page-actions form {
  margin: 0;
  display: inline-flex;
}
.topbar-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.topbar-clock i { color: #f59e0b; }
.topbar h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.menu-toggle {
  display: none; width: 40px; height: 40px; border: none; border-radius: .65rem;
  background: var(--bg); cursor: pointer; color: var(--text);
}
.search-box { position: relative; }
.search-box i {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: .85rem; pointer-events: none;
}
.search-box input {
  width: 220px; height: 2.4rem; border: 1px solid var(--border); border-radius: .65rem;
  padding: 0 .85rem 0 2.2rem; outline: none; background: #fff; font: inherit;
}
.search-box input:focus { border-color: var(--primary); }
.content { padding: 1.5rem; flex: 1; }
.admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding: 0.7rem 1.5rem;
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}
.admin-footer-meta { color: #94a3b8; }
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.55rem 0.65rem;
}
.filters .form-control {
  width: auto;
  min-width: 0;
  flex: 0 1 auto;
  height: 2.1rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.8125rem;
  border-radius: 0.5rem;
  line-height: 1.2;
}
.filters input.form-control[type="text"],
.filters input.form-control[type="search"] {
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 280px;
}
.filters select.form-control {
  flex: 0 1 140px;
  min-width: 120px;
  max-width: 180px;
}
.filters .btn {
  height: 2.1rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}
.filters .btn-sm {
  padding: 0 0.75rem;
}
@media (max-width: 768px) {
  .filters input.form-control[type="text"],
  .filters input.form-control[type="search"],
  .filters select.form-control {
    flex: 1 1 100%;
    max-width: none;
  }
}
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .cp-shell .menu-toggle,
  .admin-shell .menu-toggle { display: grid; place-items: center; }
  .cp-shell .sidebar,
  .admin-shell .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-105%);
    transition: transform .25s ease; height: 100vh; max-height: 100vh; overflow: hidden;
  }
  .cp-shell .sidebar.open,
  .admin-shell .sidebar.open { transform: translateX(0); }
  .search-box input { width: 160px; }
}
@media (max-width: 640px) {
  .search-box { display: none; }
}

.panel-meta { font-size: .8rem; color: #64748b; }
.panel-link { font-size: .82rem; font-weight: 600; color: #d97706; }
.panel-link:hover { color: #b45309; }

.cibil-list-action { white-space: nowrap; }
.cibil-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.cibil-detail-actions .btn { white-space: nowrap; }
.cibil-detail-actions .cibil-delete-form { margin-left: auto; }
.cibil-details-grid { gap: .75rem 1.5rem; margin-bottom: 0; }
.cibil-details-grid p { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
@media (max-width: 640px) {
  .cibil-detail-actions .btn { white-space: normal; text-align: center; }
  .cibil-detail-actions .cibil-delete-form { margin-left: 0; }
}

.chart-bars {
  display: flex; align-items: flex-end; gap: .65rem; height: 180px; padding-top: .5rem;
}
.chart-bars .bar-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  height: 100%; justify-content: flex-end; gap: .45rem;
}
.chart-bars .bar {
  width: 100%; border-radius: .5rem .5rem .25rem .25rem;
  background: linear-gradient(180deg, #fbbf24, #d97706); min-height: 8px;
  transition: height .4s ease;
}
.chart-bars span { font-size: .7rem; color: var(--muted); font-weight: 600; }

.lead-list { display: flex; flex-direction: column; gap: .85rem; }
.lead-item {
  display: flex; align-items: center; gap: .85rem; color: inherit; text-decoration: none;
  padding: .35rem; border-radius: .75rem; transition: background .15s ease;
}
.lead-item:hover { background: #fffbeb; }
.lead-item .avatar { width: 38px; height: 38px; font-size: .8rem; }
.lead-item .meta { flex: 1; min-width: 0; }
.lead-item .meta strong { display: block; font-size: .88rem; color: var(--secondary); }
.lead-item .meta span { font-size: .75rem; color: var(--muted); }
.empty-leads { text-align: center; color: #64748b; padding: 1.25rem .5rem; font-size: .9rem; }
.empty-leads a { color: #d97706; font-weight: 600; }

.tip-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem;
}
.tip-card { padding: 1rem; border-radius: .85rem; }
.tip-card strong { display: block; font-size: .92rem; }
.tip-card p { font-size: .85rem; margin-top: .35rem; color: #64748b; }
.tip-amber { background: #fffbeb; }
.tip-amber strong { color: #b45309; }
.tip-blue { background: #eff6ff; }
.tip-blue strong { color: #1d4ed8; }
.tip-green { background: #ecfdf5; }
.tip-green strong { color: #047857; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.auth-visual {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual h1 { font-size: 2.4rem; line-height: 1.2; }
.auth-visual em { color: #fbbf24; font-style: normal; }
.auth-panel { display: grid; place-items: center; padding: 2rem; background: #f8fafc; }
.auth-card {
  width: min(440px, 100%); background: #fff; border: 1px solid var(--border);
  border-radius: 1.25rem; padding: 2rem; box-shadow: 0 20px 40px -24px rgba(15,23,42,.25);
}
.auth-card h2 { margin: 0 0 .35rem; }
.auth-card .subtitle { color: var(--muted); margin-bottom: 1.25rem; }
.auth-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem; background: #f1f5f9; padding: .35rem; border-radius: .8rem; }
.auth-tabs a { flex: 1; text-align: center; padding: .55rem; border-radius: .6rem; font-weight: 700; color: #64748b; }
.auth-tabs a.active { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-visual-copy p { color: #cbd5e1; margin: .75rem 0 0; }
.auth-visual-stats { display: flex; gap: 1rem; flex-shrink: 0; }
.auth-visual-stats strong { display: block; font-size: 1.4rem; color: #fbbf24; }
.auth-visual-stats span { color: #94a3b8; font-size: .85rem; }
html:has(.auth-page--viewport),
body:has(.auth-page--viewport) {
  height: 100%;
  overflow: hidden;
}
.auth-page--viewport {
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
.auth-page--viewport .auth-visual {
  height: 100%;
  min-height: 0;
  padding: 1.35rem 1.6rem 1.25rem;
  gap: .85rem;
  overflow: hidden;
}
.auth-page--viewport .auth-visual-copy { flex: 0 0 auto; }
.auth-page--viewport .auth-visual h1 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  margin: .7rem 0 0;
}
.auth-page--viewport .auth-visual-copy p { margin-top: .45rem; font-size: .92rem; }
.auth-page--viewport .auth-visual-stats strong { font-size: 1.2rem; }
.auth-page--viewport .auth-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 1.25rem;
}
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  html:has(.auth-page--viewport),
  body:has(.auth-page--viewport) { overflow: auto; }
  .auth-page--viewport {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: auto;
  }
}

.timeline { display: flex; flex-direction: column; gap: 1rem; }
.timeline-item { display: grid; grid-template-columns: 16px 1fr; gap: .85rem; }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: #f59e0b; margin-top: .35rem; }
.timeline-body { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .85rem; padding: .9rem 1rem; }
.timeline-body .meta { color: #64748b; font-size: .8rem; margin-bottom: .35rem; }

.chart-box { height: 260px; }
.empty { text-align: center; color: #64748b; padding: 2rem; }

.cms-content {
  color: #475569;
  line-height: 1.7;
  font-size: 0.98rem;
}
.cms-content > *:first-child { margin-top: 0; }
.cms-content > *:last-child { margin-bottom: 0; }
.cms-content p { margin: 0 0 0.9rem; }
.cms-content h1, .cms-content h2, .cms-content h3, .cms-content h4 {
  color: #0f172a;
  font-weight: 800;
  line-height: 1.3;
  margin: 1.25rem 0 0.65rem;
}
.cms-content h2 { font-size: 1.4rem; }
.cms-content h3 { font-size: 1.15rem; }
.cms-content ul, .cms-content ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}
.cms-content li { margin: 0.35rem 0; }
.cms-content a { color: #d97706; text-decoration: underline; }
.cms-content strong, .cms-content b { color: #0f172a; }
.cms-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.cms-content table th,
.cms-content table td {
  border: 1px solid #e2e8f0;
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.cms-content table th { background: #f8fafc; }
.tox-tinymce { border-radius: 0.75rem !important; border-color: #e2e8f0 !important; }

.cs-ladder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
  margin-bottom: 1.15rem;
}
.cs-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  display: flex;
  gap: .85rem;
  align-items: flex-start;
}
.cs-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  flex-shrink: 0;
}
.cs-step--1 .cs-step-num { background: #b45309; }
.cs-step--2 .cs-step-num { background: #211f58; }
.cs-step--3 .cs-step-num { background: #0f766e; }
.cs-step strong { display: block; font-size: .92rem; color: #0f172a; }
.cs-step p { margin: .25rem 0 0; font-size: .8rem; color: #64748b; line-height: 1.5; }
.cs-section { margin-bottom: 1.15rem; }
.cs-kicker {
  display: block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d97706;
  margin-bottom: .2rem;
}
.cs-intro { color: #64748b; margin: 0 0 1.1rem; font-size: .9rem; line-height: 1.6; }
.cs-hint { display: block; margin-top: .4rem; color: #64748b; font-size: .78rem; }
.cs-error { display: block; margin-top: .35rem; color: #b91c1c; font-size: .8rem; }
.cs-default-form {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.cs-default-preview {
  background: #211f58;
  color: #fff;
  border-radius: .9rem;
  padding: .85rem 1.1rem;
  min-width: 160px;
}
.cs-default-preview span { display: block; font-size: .72rem; color: #c7c6e8; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }
.cs-default-preview strong { font-size: 1.7rem; color: #fbbf24; line-height: 1.2; }
.cs-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
}
.cs-product-card {
  border: 1px solid #e8eaf2;
  border-radius: .9rem;
  padding: .95rem;
  background: #f8fafc;
}
.cs-product-card.is-set {
  background: #fffbeb;
  border-color: #fde68a;
}
.cs-product-top { display: flex; align-items: center; gap: .65rem; margin-bottom: .7rem; }
.cs-product-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .7rem;
  background: #211f58;
  color: #fbbf24;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cs-product-card strong { display: block; font-size: .86rem; }
.cs-product-card small { color: #64748b; font-size: .72rem; }
.cs-input-label { display: block; font-size: .72rem; font-weight: 700; color: #475569; margin-bottom: .3rem; }
.cs-actions { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; margin-top: 1.1rem; }
.cs-partner-table { border: 0; border-radius: 0; }
.cs-partner-name { display: block; color: #64748b; font-size: .8rem; margin-top: .15rem; }
.cs-partner-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.cs-partner-form .form-control { max-width: 130px; margin: 0; }
.cs-check { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: #475569; white-space: nowrap; margin: 0; }
.src-pill {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.src-pill.src-partner { background: #fff7ed; color: #c2410c; }
.src-pill.src-product { background: #eef2ff; color: #3730a3; }
.src-pill.src-global { background: #f1f5f9; color: #475569; }
.cp-rate-compact { margin-bottom: 1.15rem; }
.cp-rate-compact .panel-head { padding: .7rem 1rem; }
.cp-rate-compact .panel-head h3 { font-size: .92rem; }
.cp-rate-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  padding: .7rem .85rem .85rem;
}
.cp-rate-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: .45rem;
  padding: .55rem .65rem;
  border: 1px solid #e8eaf2;
  border-radius: .7rem;
  background: #f8fafc;
}
.cp-rate-chip i {
  color: #d97706;
  font-size: .72rem;
  line-height: 1.35;
  flex-shrink: 0;
}
.cp-rate-chip span {
  color: #475569;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}
.cp-rate-chip b {
  color: #211f58;
  font-size: .85rem;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.3;
}
@media (max-width: 1100px) {
  .cp-rate-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .cs-ladder { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cs-product-grid { grid-template-columns: 1fr; }
  .cp-rate-strip { grid-template-columns: 1fr; }
}

.track-admin { margin-bottom: 1.15rem; scroll-margin-top: 1rem; }
.track-admin-intro { margin: 0 0 1rem; color: #64748b; font-size: .9rem; line-height: 1.55; }
.track-admin-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: .6rem;
  margin: 0 0 1rem;
  padding: 0;
}
.track-admin-steps li {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .7rem .75rem;
  border: 1px solid #e8eaf2;
  border-radius: .85rem;
  background: #f8fafc;
  min-height: 92px;
}
.track-admin-steps li span {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: .68rem;
  font-weight: 800;
}
.track-admin-steps li strong { font-size: .82rem; color: #0f172a; }
.track-admin-steps li small { color: #64748b; font-size: .72rem; }
.track-admin-steps li.is-done { background: #ecfdf5; border-color: #a7f3d0; }
.track-admin-steps li.is-done span { background: #059669; color: #fff; }
.track-admin-steps li.is-current { background: #fffbeb; border-color: #fde68a; }
.track-admin-steps li.is-current span { background: #d97706; color: #fff; }
.track-admin-steps li.is-skip,
.track-admin-steps li.is-wait { background: #f8fafc; border-style: dashed; border-color: #d4d7e2; }
.track-admin-steps li.is-skip span,
.track-admin-steps li.is-wait span { background: #e2e8f0; color: #94a3b8; }
.track-admin-steps li.is-skip strong,
.track-admin-steps li.is-skip small,
.track-admin-steps li.is-wait strong,
.track-admin-steps li.is-wait small { color: #94a3b8; }
.track-admin-steps li.is-action,
.track-admin-steps li.is-hold { background: #fffbeb; border-color: #fcd34d; }
.track-admin-steps li.is-action span,
.track-admin-steps li.is-hold span { background: #d97706; color: #fff; }
.track-admin-steps li.is-closed { background: #fef2f2; border-color: #fecaca; }
.track-admin-steps li.is-closed span { background: #b91c1c; color: #fff; }
.track-admin-preview {
  padding: .85rem 1rem;
  border-radius: .85rem;
  background: #211f58;
  color: #fff;
  margin-bottom: 1rem;
}
.track-admin-preview span {
  display: inline-flex;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: rgba(242,154,0,.2);
  color: #fbbf24;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.track-admin-preview p { margin: .4rem 0 0; font-size: .9rem; line-height: 1.5; color: rgba(255,255,255,.86); }
.track-admin-preview.is-won { background: #064e3b; }
.track-admin-preview.is-closed { background: #7f1d1d; }
.track-admin-preview.is-hold,
.track-admin-preview.is-action { background: #7c2d12; }
.track-admin-preview small { display: block; margin-top: .45rem; color: rgba(255,255,255,.72); font-size: .75rem; }
.track-admin-fields { margin-bottom: .85rem; }
.track-admin-save { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.track-pick.is-hold.is-on,
.track-pick.is-action.is-on { background: #fffbeb; border-color: #d97706; }
.track-admin-picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
  margin-bottom: .9rem;
}
.track-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  padding: .75rem .8rem;
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  background: #fff;
  cursor: pointer;
  text-align: left;
}
.track-pick strong { font-size: .84rem; color: #0f172a; }
.track-pick small { color: #64748b; font-size: .72rem; }
.track-pick:hover { border-color: #f59e0b; background: #fffbeb; }
.track-pick.is-on { border-color: #211f58; box-shadow: 0 0 0 2px rgba(33,31,88,.18); background: #eef2ff; }
.track-pick.is-good.is-on { background: #ecfdf5; border-color: #047857; }
.track-pick.is-warn.is-on { background: #fef2f2; border-color: #b91c1c; }
.track-admin-hint { margin: 0; color: #64748b; font-size: .78rem; }
.lead-track-inline { display: flex; align-items: center; gap: .35rem; min-width: 220px; }
.lead-track-inline .form-control { max-width: 140px; padding: .35rem .5rem; font-size: .8rem; }
@media (max-width: 900px) {
  .track-admin-steps, .track-admin-picks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .track-admin-steps, .track-admin-picks { grid-template-columns: 1fr; }
  .lead-track-inline { flex-wrap: wrap; }
}
