/* 
  Aṇu Astra Premium Design System v2.0
  Theme: Vedic Blue & Ethereal White
  Modern, Minimalist, and State-of-the-Art
*/

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

:root {
  /* Core Colors */
  --bg-dark: #020617;
  --bg-card: rgba(15, 23, 42, 0.6);
  --primary: #0070FF;    /* Vedic Blue */
  --primary-light: #3b82f6;
  --primary-glow: rgba(0, 112, 255, 0.25);
  --secondary: #FFFFFF;  /* Radiant White */
  --accent: #38bdf8;     /* Sky Blue */

  /* Neutral palette */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-glass: rgba(255, 255, 255, 0.05);
  --border-active: rgba(0, 112, 255, 0.2);

  /* Spacing & Sizes */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --side-nav-width: 280px;
  
  /* Animation */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-blur: blur(16px);
}



[data-theme="light"] body {
  background-image: 
    radial-gradient(circle at 50% -20%, var(--primary-glow) 0%, transparent 60%),
    radial-gradient(circle at 10% 20%, rgba(0, 0, 0, 0.02) 0%, transparent 30%);
}

[data-theme="light"] .glass-panel {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .badge-secondary {
  border-color: rgba(0,0,0,0.1);
  background: rgba(0,0,0,0.05);
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"] {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0,0,0,0.15);
}

[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0,0,0,0.1);
}

[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.6);
  border-right-color: rgba(0,0,0,0.1);
}

[data-theme="light"] ::-webkit-scrollbar-track { background: #f1f5f9; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd5e1; border-color: #f1f5f9; }

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

html {
  font-size: 15px; /* Global scale down to ~94% for a more professional look */
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% -20%, var(--primary-glow) 0%, transparent 60%),
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 30%);
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3, h4, .brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Glassmorphism Refined */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
  .glass-panel {
    backdrop-filter: blur(12px);
    padding: 1.5rem;
  }
}

.glass-panel:hover {
  border-color: var(--border-active);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Buttons Premium */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  gap: 10px;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #1e40af);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 112, 255, 0.4);
  filter: brightness(1.1);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--secondary);
}

/* Inputs Premium */
.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 112, 255, 0.15);
}

/* Badges */
.badge {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-primary {
  background: rgba(0, 112, 255, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(0, 112, 255, 0.2);
}

.badge-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

/* Status Dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* Animations Refined */
@keyframes pulse-primary {
  0% { box-shadow: 0 0 0 0 rgba(0, 112, 255, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 112, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 112, 255, 0); }
}

.status-online {
  background: var(--primary);
  animation: pulse-primary 2s infinite;
}

/* ─── App Layout (Sidebar System) ─────────────────────────────────────────── */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--side-nav-width);
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-glass);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.main-content {
  flex: 1;
  margin-left: var(--side-nav-width);
  padding: 1.5rem 2.5rem;
  max-width: 1400px;
  transition: margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sidebar Toggle Button (Mobile Only) */
.sidebar-toggle {
  display: none;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  color: var(--secondary);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 1001;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

/* ─── Sidebar Navigation ──────────────────────────────────────────────────── */
.nav-group {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--secondary);
}

.nav-item.active {
  border: 1px solid var(--border-active);
  background: rgba(0, 112, 255, 0.08);
}

/* ─── Tables Premium ──────────────────────────────────────────────────────── */
.table-card {
  overflow: hidden;
  margin-top: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-glass);
}

td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  color: var(--text-main);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* ─── Scrollbars ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ─── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal {
  max-width: 550px;
  width: 90%;
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── Landing Page Components ─────────────────────────────────────────────── */
.floating-nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: 99px;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--secondary);
}

/* ─── Utilities ───────────────────────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-text {
  text-shadow: 0 0 20px var(--primary-glow);
}

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ─── Premium UI Polish ───────────────────────────────────────────────────── */
/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
  color: transparent !important;
  pointer-events: none;
}
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 9999;
}
.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-active);
  border-left: 4px solid var(--primary);
  color: var(--text-main);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards, slideOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards 2.7s;
}
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* Table Responsive Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Subtle Row Hover */
tr {
  transition: background 0.2s ease, transform 0.2s ease;
}
tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

/* Copy Icon Hover */
.copy-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.copy-icon-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--secondary);
}

/* ─── Mobile Responsiveness ─────────────────────────────────────────────── */
/* ─── Mobile & Tablet Adjustments ───────────────────────────── */
@media (max-width: 1024px) {
  html {
    font-size: 14px;
  }

  .floating-nav {
    width: 95%;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
  }

  .floating-nav .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  /* Internal App Responsiveness */
  /* Internal App Responsiveness */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 280px;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 1.5rem 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .sidebar-toggle {
    display: flex;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .top-bar h1 {
    font-size: 1.8rem !important;
  }

  /* Force stat grids to single column */
  .stats-grid, .admin-stats-grid {
    grid-template-columns: 1fr !important;
  }

  /* Make tables scrollable within their card */
  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: calc(100vw - 2rem); /* Account for main-content padding */
  }

  table {
    min-width: 600px;
  }
}
/* ─── GLOBAL HAMBURGER MENU ─── */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--text-main);
    height: 2px;
    width: 24px;
    border-radius: 2px;
    position: relative;
    transition: background 0.2s ease-out;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
    transition: top 0.2s ease-out, bottom 0.2s ease-out, transform 0.2s ease-out;
}

.nav-toggle-label span::before {
    top: -8px;
}

.nav-toggle-label span::after {
    bottom: -8px;
}

@media (max-width: 768px) {
    .floating-nav {
        justify-content: space-between !important;
        flex-wrap: wrap;
    }

    .nav-toggle-label {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-glass);
        gap: 1.5rem;
    }

    .nav-toggle:checked ~ .nav-menu {
        display: flex;
    }

    .nav-toggle:checked ~ .nav-toggle-label span {
        background: transparent;
    }

    .nav-toggle:checked ~ .nav-toggle-label span::before {
        transform: rotate(45deg);
        top: 0;
    }

    .nav-toggle:checked ~ .nav-toggle-label span::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
}

/* ─── MISSING NAVBAR FLEXBOX STYLES RECONSTRUCTED ─── */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* ─── MISSING NAVBAR FLEXBOX STYLES RECONSTRUCTED ─── */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}
