:root {
  --adm-navy: #0b132b;
  --adm-navy-2: #162244;
  --adm-bg: #f1f5f9;
  --adm-surface: #ffffff;
  --adm-border: #e2e8f0;
  --adm-text: #0f172a;
  --adm-muted: #475569;
  --adm-red: #dc2626;
  --adm-red-dark: #b91c1c;
  --adm-blue: #0284c7;
  --adm-emerald: #059669;
  --adm-gold: #d97706;
  --adm-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
  background: var(--adm-bg);
  color: var(--adm-text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* Login Page */
.adm-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 18% 20%, rgba(220, 38, 38, 0.2), transparent 45%),
              radial-gradient(circle at 82% 80%, rgba(2, 132, 199, 0.22), transparent 45%),
              linear-gradient(135deg, #070d1f 0%, #0b132b 100%);
}

.adm-login-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 22px;
  padding: 34px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.adm-brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.adm-brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--adm-navy);
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-brand-head h1 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.adm-brand-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--adm-muted);
}

/* Dashboard Shell */
.adm-shell {
  display: flex;
  min-height: 100vh;
}

.adm-sidebar {
  width: 268px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0b132b 0%, #111c3a 100%);
  color: #e2e8f0;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.adm-side-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.adm-side-brand strong {
  display: block;
  font-size: 15px;
  color: #ffffff;
}

.adm-side-brand span {
  display: block;
  font-size: 11.5px;
  color: #94a3b8;
}

.adm-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  transition: background 0.2s, color 0.2s;
}

.adm-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.adm-nav-item.is-active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
}

.adm-nav-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.adm-nav-badge--gold {
  background: #f59e0b;
  color: #0b132b;
}

.adm-side-foot {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-main {
  flex: 1;
  min-width: 0;
  padding: 24px 28px 48px;
}

.adm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.adm-topbar h2 {
  margin: 0;
  font-size: 1.5rem;
}

.adm-topbar p {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--adm-muted);
}

.adm-mobile-menu-btn {
  display: none;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--adm-border);
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

/* KPI Stats */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.adm-stat-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.adm-stat-card span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.adm-stat-card strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 6px 0 2px;
  color: var(--adm-navy);
}

.adm-stat-card small {
  font-size: 12px;
  color: var(--adm-emerald);
  font-weight: 600;
}

/* Cards & Forms */
.adm-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.adm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.adm-card-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.adm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.adm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.adm-field--full {
  grid-column: 1 / -1;
}

.adm-field label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.adm-input,
.adm-select,
.adm-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font: inherit;
  font-size: 14px;
  color: var(--adm-text);
}

.adm-input:focus,
.adm-select:focus,
.adm-textarea:focus {
  outline: none;
  border-color: var(--adm-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.adm-check-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.adm-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, background 0.15s;
}

.adm-btn--sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 8px;
}

.adm-btn--primary {
  background: var(--adm-red);
  color: #ffffff;
}
.adm-btn--primary:hover { background: var(--adm-red-dark); }

.adm-btn--navy {
  background: var(--adm-navy);
  color: #ffffff;
}
.adm-btn--navy:hover { background: var(--adm-navy-2); }

.adm-btn--emerald {
  background: var(--adm-emerald);
  color: #ffffff;
}
.adm-btn--wa {
  background: #16a34a;
  color: #ffffff;
}
.adm-btn--call {
  background: #0284c7;
  color: #ffffff;
}
.adm-btn--call:hover { background: #0369a1; }

.adm-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #0284c7;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.adm-phone-link:hover {
  color: #0369a1;
  text-decoration: underline;
}
.adm-btn--outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}
.adm-btn--outline:hover { background: #f8fafc; }

.adm-btn--danger {
  background: #fee2e2;
  color: #b91c1c;
}
.adm-btn--danger:hover { background: #fecaca; }

/* Alerts */
.adm-alert {
  padding: 12px 16px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.adm-alert--success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.adm-alert--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Filters & Tables */
.adm-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.adm-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.adm-table th {
  text-align: left;
  padding: 11px 10px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--adm-muted);
  border-bottom: 2px solid var(--adm-border);
  white-space: nowrap;
}

.adm-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--adm-border);
  vertical-align: top;
}

.adm-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.adm-pill--new { background: #fee2e2; color: #b91c1c; }
.adm-pill--contacted { background: #fef3c7; color: #92400e; }
.adm-pill--admitted { background: #dcfce7; color: #166534; }
.adm-pill--closed { background: #e2e8f0; color: #334155; }
.adm-pill--blue { background: #e0f2fe; color: #0369a1; }
.adm-pill--gold { background: #fef3c7; color: #92400e; }

.adm-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.adm-thumb {
  width: 96px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #0b132b;
  display: block;
}

.adm-yt-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--adm-border);
}

.adm-yt-preview img {
  width: 112px;
  height: 63px;
  border-radius: 7px;
  object-fit: cover;
}

@media (max-width: 960px) {
  .adm-sidebar {
    position: fixed;
    left: -280px;
    z-index: 90;
    transition: left 0.25s ease;
  }
  .adm-sidebar.is-open {
    left: 0;
  }
  .adm-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .adm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .adm-main {
    padding: 18px 14px 40px;
  }
  .adm-form-grid {
    grid-template-columns: 1fr;
  }
}

/* WhatsApp Delivery Recipient Tracking */
.adm-wa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.adm-wa-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  line-height: 1.3;
}

.adm-wa-chip--fail {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.adm-wa-sent-meta {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  line-height: 1.35;
}

.adm-wa-sent-meta--none {
  color: #94a3b8;
  font-weight: 500;
}

.adm-wa-live-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 12.5px;
  color: #065f46;
}

.adm-wa-details {
  margin-top: 6px;
  font-size: 12px;
  color: #334155;
}

.adm-wa-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #0284c7;
}
