/* ═══════════════════════════════════════════════════════════════════
   Thirumangalam Admin Panel — Custom Styles
   Colors: Magenta #FC0F6E  •  Navy #1E2E4A
═══════════════════════════════════════════════════════════════════ */

:root {
  --magenta:      #FC0F6E;
  --magenta-dark: #d4005a;
  --magenta-light:#fff0f5;
  --navy:         #1E2E4A;
  --navy-light:   #263a5e;
  --sidebar-w:    260px;
  --topbar-h:     64px;
  --radius:       12px;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
  --shadow-md:    0 4px 24px rgba(0,0,0,.12);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f5f6fa;
  color: #1a1a2e;
  margin: 0;
}

/* ── Sidebar ──────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  transition: transform .3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
  width: 40px; height: 40px;
  background: var(--magenta);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.brand-name  { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.2; }
.brand-sub   { font-size: 11px; color: rgba(255,255,255,.45); }

.sidebar-nav { flex: 1; padding: 16px 12px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255,255,255,.35);
  padding: 16px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all .2s;
}

.nav-item:hover  { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--magenta); color: #fff; box-shadow: 0 4px 12px rgba(252,15,110,.35); }
.nav-item i      { width: 18px; text-align: center; }
.nav-item-danger { color: rgba(255,100,100,.8) !important; margin-top: 8px; }
.nav-item-danger:hover { background: rgba(255,50,50,.12) !important; color: #ff6464 !important; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.avatar-sm {
  width: 32px; height: 32px;
  background: var(--magenta);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}

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

/* ── Topbar ───────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.topbar-title  { font-size: 16px; font-weight: 600; flex: 1; color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle { background: none; border: none; font-size: 18px; color: var(--navy); cursor: pointer; }

.badge-live {
  display: inline-flex; align-items: center; gap: 5px;
  background: #ecfdf5; color: #059669;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}

.badge-live .fa-circle { font-size: 7px; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Page content ─────────────────────────────────────────────────── */
.page-content { flex: 1; padding: 28px; }

/* ── Stat Cards ───────────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  border-left: 4px solid var(--magenta);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card.navy  { border-left-color: var(--navy); }
.stat-card.green { border-left-color: #10b981; }
.stat-card.amber { border-left-color: #f59e0b; }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.magenta { background: var(--magenta-light); color: var(--magenta); }
.stat-icon.navy    { background: #eef2ff; color: var(--navy); }
.stat-icon.green   { background: #ecfdf5; color: #10b981; }
.stat-icon.amber   { background: #fffbeb; color: #f59e0b; }

.stat-label { font-size: 12px; color: #888; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-sub   { font-size: 12px; color: #999; margin-top: 2px; }

/* ── Cards ────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: none;
}
.card-header {
  background: transparent;
  border-bottom: 1px solid #f0f0f0;
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--navy); margin: 0; }
.card-body  { padding: 24px; }

/* ── Tables ───────────────────────────────────────────────────────── */
.table-clean { border-collapse: separate; border-spacing: 0; width: 100%; }
.table-clean thead th {
  background: #f8f9fc;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: #888;
  padding: 12px 16px; border-bottom: 1px solid #eee;
}
.table-clean tbody td {
  padding: 14px 16px; border-bottom: 1px solid #f5f5f5;
  font-size: 13.5px; vertical-align: middle;
}
.table-clean tbody tr:hover td { background: #fafafa; }
.table-clean tbody tr:last-child td { border-bottom: none; }

/* ── Badges ───────────────────────────────────────────────────────── */
.badge-promoted { background: #fff3cd; color: #856404; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-active   { background: #d1fae5; color: #065f46; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-inactive { background: #fee2e2; color: #991b1b; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-category { background: #fce7f3; color: #9d174d; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.badge-warning  { background: #fff7ed; color: #c2410c; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn-magenta      { background: var(--magenta); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .2s, transform .1s; }
.btn-magenta:hover { background: var(--magenta-dark); color: #fff; }
.btn-navy         { background: var(--navy); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .2s; }
.btn-navy:hover   { background: var(--navy-light); color: #fff; }
.btn-outline-sm   { background: none; border: 1px solid #ddd; border-radius: 6px; padding: 5px 12px; font-size: 12px; cursor: pointer; color: #555; transition: all .2s; }
.btn-outline-sm:hover { border-color: var(--magenta); color: var(--magenta); }
.btn-danger-sm    { background: #fee2e2; color: #dc2626; border: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; transition: background .2s; }
.btn-danger-sm:hover { background: #fecaca; }

/* ── Toggle switch ───────────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 8px; }
.toggle {
  position: relative;
  width: 44px; height: 24px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #ddd; border-radius: 34px;
  transition: .3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: .3s;
}
.toggle input:checked + .toggle-slider { background: var(--magenta); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Forms ────────────────────────────────────────────────────────── */
.form-input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 13.5px; font-family: 'Inter', sans-serif;
  color: #1a1a2e; background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-input:focus { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(252,15,110,.1); }
.form-label { font-size: 12px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; display: block; }
.form-group { margin-bottom: 18px; }

/* ── Login page ───────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, #0f1a2e 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
}

.login-logo {
  width: 56px; height: 56px;
  background: var(--magenta);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  margin: 0 auto 20px;
}

/* ── Alert boxes ──────────────────────────────────────────────────── */
.alert-custom {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-error   { background: #fee2e2; color: #991b1b; border-left: 3px solid #dc2626; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 3px solid #10b981; }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 3px solid #3b82f6; }
.alert-warning { background: #fff7ed; color: #c2410c; border-left: 3px solid #f97316; }

/* ── Chat bubbles ─────────────────────────────────────────────────── */
.msg-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; align-items: flex-start; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--magenta-light); color: var(--magenta); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.msg-sender { font-size: 12px; font-weight: 600; color: var(--navy); }
.msg-time   { font-size: 11px; color: #999; margin-left: 8px; }
.msg-text   { font-size: 13.5px; color: #333; margin-top: 3px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
}

/* ── Separator ────────────────────────────────────────────────────── */
.section-title {
  font-size: 13px; font-weight: 600; color: #888;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: #eee; }
