/* ============================================================
   SRI KABHIJITH GROUP — PREMIUM DARK GLASSMORPHISM ADMIN PANEL
   Ultra-modern, sleek, dark executive dashboard interface
   ============================================================ */

:root {
  color-scheme: dark;
  --glass-bg: rgba(13, 30, 48, 0.65);
  --glass-bg-card: rgba(18, 38, 59, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-gold: rgba(255, 199, 44, 0.35);
  --admin-gold: #FFC72C;
  --admin-gold-deep: #DE9F3C;
  --admin-cyan: #38BDF8;
  --admin-emerald: #34D399;
  --admin-rose: #F43F5E;
  --text-white: #FFFFFF;
  --text-muted: #94A3B8;
  --text-sub: #CBD5E1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  color-scheme: dark !important;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #030E17;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(14, 76, 115, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(222, 159, 60, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, #030E17 0%, #02070D 100%);
  background-attachment: fixed;
  color: var(--text-white);
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ---- LOGIN SCREEN (DARK GLASS) ---- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: rgba(13, 30, 48, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border-gold);
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 199, 44, 0.1);
}

.login-card label {
  font-size: .83rem;
  font-weight: 600;
  color: var(--admin-gold);
  display: block;
  margin-bottom: 8px;
}

.login-card input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: #ffffff;
  font-size: .95rem;
  transition: all .2s ease;
}

.login-card input:focus {
  outline: none;
  border-color: var(--admin-gold);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 16px rgba(255, 199, 44, 0.25);
}

.login-error {
  color: var(--admin-rose);
  font-size: .85rem;
  margin-bottom: 14px;
  min-height: 18px;
}

/* ---- MAIN DASHBOARD SYSTEM ---- */
.dashboard-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- 1. TOP NAVIGATION HEADER ---- */
.top-header {
  background: rgba(8, 22, 36, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--admin-gold);
  letter-spacing: -0.01em;
}

.brand-logo-img {
  height: 36px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

/* 5 Website Top Navigation Tabs */
.top-site-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-site-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .24s ease;
  white-space: nowrap;
}

.top-site-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
}

.top-site-tab.active {
  background: linear-gradient(135deg, #FFC72C 0%, #DE9F3C 100%);
  color: #030E17;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 199, 44, 0.35);
  border-color: #FFC72C;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--admin-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all .2s ease;
}

.live-site-btn:hover {
  background: var(--admin-cyan);
  color: #030E17;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.top-logout-btn {
  background: rgba(244, 63, 94, 0.12);
  color: var(--admin-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

.top-logout-btn:hover {
  background: var(--admin-rose);
  color: #ffffff;
}

/* ---- 2. MAIN CONTROL LAYOUT (SIDE NAV + WORKSPACE) ---- */
.control-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
  min-height: calc(100vh - 64px);
}

/* Side Control Navigation */
.control-nav {
  background: rgba(8, 22, 36, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-nav-head {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--admin-gold);
  margin-bottom: 12px;
  padding: 0 8px;
}

.control-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  text-align: left;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s ease;
}

.control-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-white);
}

.control-link.active {
  background: rgba(14, 76, 115, 0.4);
  border: 1px solid var(--glass-border-gold);
  color: var(--admin-gold);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Main Workspace Panel */
.main-panel {
  padding: 36px 44px;
  max-width: 1280px;
  box-sizing: border-box;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.panel-head h2 {
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-white);
}

.site-tag {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--admin-gold);
  background: rgba(255, 199, 44, 0.14);
  border: 1px solid rgba(255, 199, 44, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 10px;
  vertical-align: middle;
}

/* Glass Info Cards Grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.info-card {
  background: var(--glass-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: transform .24s ease, border-color .24s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-gold);
}

.big-num {
  font-family: 'Zilla Slab', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--admin-gold);
  margin-top: 8px;
}

/* Glass Admin Card Section */
.admin-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.admin-card-head {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

/* ---- FORMS & INPUTS (GLASS) ---- */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: .83rem;
  font-weight: 700;
  color: var(--admin-gold);
}

.field input,
.field select,
.field textarea,
select,
input,
textarea {
  color-scheme: dark !important;
  padding: 12px 16px;
  background: #081624 !important;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: .92rem;
  font-family: inherit;
  color: #ffffff !important;
  transition: all .2s ease;
}

/* Dropdown Option List Items Styling (HIGH CONTRAST FIX) */
select option,
.field select option,
#enquiryFormSourceFilter option,
#enquiryStatusFilter option {
  color-scheme: dark !important;
  background-color: #081624 !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
  font-size: .9rem !important;
  font-weight: 600 !important;
}

select option:hover,
select option:focus,
select option:checked {
  background-color: #DE9F3C !important;
  color: #030E17 !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
select:focus,
input:focus {
  outline: none;
  border-color: var(--admin-gold) !important;
  background: rgba(18, 38, 59, 0.98) !important;
  box-shadow: 0 0 14px rgba(255, 199, 44, 0.25) !important;
}

/* ---- DATA TABLES (GLASS) ---- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.admin-table th {
  text-align: left;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--admin-gold);
  background: rgba(255, 255, 255, 0.06);
  padding: 14px 18px;
  border-bottom: 1px solid var(--glass-border);
}

.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: .9rem;
  color: var(--text-sub);
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.status-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: inline-block;
}

.status-new {
  background: rgba(56, 189, 248, 0.15);
  color: var(--admin-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-contacted {
  background: rgba(255, 199, 44, 0.15);
  color: var(--admin-gold);
  border: 1px solid rgba(255, 199, 44, 0.3);
}

.status-enrolled {
  background: rgba(52, 211, 153, 0.15);
  color: var(--admin-emerald);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-closed {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all .2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #FFC72C 0%, #DE9F3C 100%);
  color: #030E17;
  border-color: #FFC72C;
  box-shadow: 0 4px 16px rgba(255, 199, 44, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 199, 44, 0.45);
}

.btn-dark {
  background: rgba(14, 76, 115, 0.5);
  border: 1px solid var(--glass-border-gold);
  color: #ffffff;
}

.btn-dark:hover {
  background: rgba(14, 76, 115, 0.8);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  border: 1px solid var(--glass-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--glass-border-gold);
}

/* Modal (Dark Glass) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 7, 13, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.modal-card {
  background: rgba(13, 30, 48, 0.92);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border-gold);
  border-radius: 20px;
  padding: 34px;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: #ffffff;
}

/* Responsive */
@media (max-width: 1024px) {
  .top-header { flex-direction: column; height: auto; padding: 14px 18px; gap: 14px; }
  .top-site-tabs { overflow-x: auto; width: 100%; }
  .control-layout { grid-template-columns: 1fr; }
  .control-nav { flex-direction: row; overflow-x: auto; padding: 12px 18px; }
  .main-panel { padding: 24px 20px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
