:root {
  /* Ultra-Premium Dashboard Palette */
  --bg: #030303;
  --bg-subtle: #08080a;
  --card-bg: rgba(15, 15, 20, 0.6);
  --card-hover: rgba(20, 20, 28, 0.85);
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.12);
  
  --primary: #818cf8;
  --primary-glow: rgba(129, 140, 248, 0.15);
  --secondary: #c084fc;
  --accent: #2dd4bf;
  
  --text: #f3f4f6;
  --text-dim: #9ca3af;
  --text-muted: #4b5563;
  
  --glass: blur(24px) saturate(200%);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Font stack optimized for high-end SaaS */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(192, 132, 252, 0.03) 0%, transparent 50%);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background Atmosphere */
.atmosphere {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 80vw;
  height: 80vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.glow-1 {
  top: -20%;
  right: -10%;
  background: radial-gradient(circle, var(--primary), transparent 70%);
}

.glow-2 {
  bottom: -20%;
  left: -10%;
  background: radial-gradient(circle, var(--secondary), transparent 70%);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 10px; }

/* Navbar - High-end floating style */
.modern-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1100px;
  height: 64px;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 24px;
  z-index: 2000;
  transition: all 0.4s var(--ease);
}

.modern-nav.scrolled {
  top: 12px;
  height: 56px;
  background: rgba(8, 8, 10, 0.95);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-icon-box {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.nav-menu {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  transition: all 0.3s var(--ease);
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.nav-auth {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dash-btn {
    padding: 10px 24px !important;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
}

.mobile-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: all 0.3s var(--ease);
}

@media (max-width: 900px) {
    .modern-nav {
        padding: 0 12px 0 16px;
        width: calc(100% - 24px);
    }

    .dash-btn {
        padding: 10px !important;
        width: 44px;
        height: 44px;
        justify-content: center;
        border-radius: 14px;
    }

    .nav-menu {
        position: fixed;
        top: 84px;
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        width: calc(100% - 32px);
        max-width: 450px;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 28px;
        padding: 32px;
        flex-direction: column;
        gap: 12px;
        opacity: 0;
        pointer-events: none;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2001;
        box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    }

    .nav-menu.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 18px;
        font-size: 1.1rem;
        background: rgba(255,255,255,0.02);
        border: 1px solid rgba(255,255,255,0.05);
        border-radius: 16px;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  padding: 180px 24px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 32px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  max-width: 900px;
  margin-bottom: 24px;
}

.hero-gradient {
  background: linear-gradient(to bottom, #fff 40%, rgba(255,255,255,0.5));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 80px;
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: #fff;
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: #fff;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hover);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(280px, auto);
  gap: 24px;
  margin-top: 60px;
}

.bento-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-8px);
}

.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-tall { grid-row: span 2; }

.card-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: var(--primary);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.card-text {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.5;
}

.card-footer {
  margin-top: auto;
  padding-top: 24px;
}

/* Features List in Bento */
.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.feature-item i { color: var(--accent); }

/* Pricing Pill */
.price-tag {
  display: inline-block;
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* Table Design */
.table-container {
  overflow-x: auto;
  margin-top: 40px;
}

.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
}

.modern-table th {
  padding: 16px 24px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.modern-table tr {
  background: var(--card-bg);
  transition: all 0.3s var(--ease);
}

.modern-table tr:hover {
  background: var(--card-hover);
  transform: scale(1.01);
}

.modern-table td {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.modern-table td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.modern-table td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 100px 0 60px;
  margin-top: 100px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 80px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-desc {
  color: var(--text-dim);
  max-width: 300px;
  font-size: 0.95rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* --- DASHBOARD COMPONENTS --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, var(--primary-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.stat-card:hover::before { opacity: 1; }

.stat-value {
    word-break: break-word;
    word-wrap: break-word;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 800;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.page-header-actions {
    margin-bottom: 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    width: 100%;
}

.header-btns {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .page-header-actions {
        display: block !important;
    }
    .header-btns {
        margin-top: 25px;
        width: 100%;
    }
    .header-btns .btn {
        width: 100%;
        justify-content: center;
        padding: 16px;
    }
}

.exp-date {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}

.status-critical {
    color: #ef4444 !important;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.main-side {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.side-side {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* --- Dashboard Navigation Overhaul (Premium SaaS) --- */
.sidebar {
  width: 280px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(8, 8, 12, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 32px 0;
  z-index: 5000;
  transition: all 0.4s var(--ease);
}

.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1;
  width: 100%;
  overflow-y: auto;
  padding: 0 20px;
}

.sidebar-header {
  padding: 0 12px;
  margin-bottom: 10px;
}

.sidebar-header .nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.sidebar-nav li { margin: 0; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.sidebar-nav a i {
  font-size: 0.9rem;
  opacity: 0.6;
}

.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 4998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-nav a.active {
  color: var(--primary);
  background: rgba(129, 140, 248, 0.1);
  font-weight: 600;
}

.sidebar-nav a.active i { opacity: 1; }

.user-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.user-actions .nav-link {
    width: 100%;
    text-align: center;
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 6px 6px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.account-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.user-info-text {
  text-align: left;
  line-height: 1.4;
}

.account-pill {
    width: 100%;
    justify-content: space-between;
}

.logout-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  transition: all 0.3s var(--ease);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.mobile-toggle {
  display: none;
}

.main-content {
    flex: 1;
    padding: 60px 80px;
    min-height: 100vh;
    margin-left: 310px;
    width: calc(100% - 310px);
    overflow-x: hidden;
    transition: all 0.4s var(--ease);
}

@media (max-width: 1400px) {
    .main-content {
        padding: 40px;
        margin-left: 280px;
        width: calc(100% - 280px);
    }
}

/* --- ADMIN SIDEBAR ADAPTATION --- */
.sidebar-section {
    padding: 0 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 24px 0 12px;
}

@media (max-width: 1200px) {
    .sidebar-section { display: none; }
    .sidebar-nav a { padding: 8px 12px; font-size: 0.85rem; }
}

@media (max-width: 1024px) {
  .sidebar { padding: 0 24px; }
  .sidebar-header { margin-right: 24px; }
  .main-content { padding: 40px 24px; }
}

/* MOBILE CRYSTAL DRAWER */
/* --- Responsive Layouts (Mobile & Tablet) --- */
@media (max-width: 1024px) {
    .hero-title { font-size: 3rem; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-large, .bento-tall { grid-column: span 1; grid-row: span 1; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 72px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(8, 8, 12, 0.95) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .sidebar-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0;
        overflow: visible;
    }

    .sidebar-header {
        margin: 0;
        padding: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-nav-content {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        height: calc(100vh - 72px);
        background: rgba(8, 8, 12, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 32px 20px 100px;
        gap: 8px;
        transform: translateX(-100%);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 4999;
        display: flex;
        align-items: stretch;
        overflow-y: auto;
    }

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

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 20px;
    }

    .sidebar-nav a {
        width: 100%;
        padding: 16px 20px;
        border-radius: 12px;
        font-size: 1.1rem;
        border: 1px solid rgba(255,255,255,0.03);
        justify-content: flex-start;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .sidebar-nav li {
        width: 100%;
    }

    .user-actions {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        margin-top: auto;
        padding-top: 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .user-actions .logout-btn {
        margin-top: 0;
    }

    .account-pill {
        padding: 12px 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .main-side, .side-side {
        grid-column: span 1;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 100px 20px 40px !important;
        overflow-x: hidden;
    }

    .dashboard-layout {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .mobile-toggle {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        color: #fff;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
    }

    /* Stats & Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
        border-radius: 20px;
    }

    .stat-value { font-size: 1.4rem; }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bento-card {
        padding: 24px;
        border-radius: 20px;
    }

    /* Mobile Table Transformation */
    .modern-table thead { display: none; }
    .modern-table, .modern-table tbody, .modern-table tr, .modern-table td {
        display: block;
        width: 100%;
    }
    .modern-table tr {
        margin-bottom: 16px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border);
        border-radius: 20px;
        padding: 16px;
    }
    .modern-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border: none;
        text-align: left;
    }
    .modern-table td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 800;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 4998;
        opacity: 0;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
}

/* --- Infrastructure Components --- */
.service-card-premium {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass);
}

.service-card-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, var(--primary-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.service-card-premium:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.service-card-premium:hover::before { opacity: 1; }

.status-pill {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.status-online { background: rgba(45, 212, 191, 0.1); color: var(--accent); }
.status-pending { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.status-suspended { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-expired { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.service-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255,255,255,0.05);
    transition: .4s var(--ease);
    border-radius: 34px;
    border: 1px solid var(--border);
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s var(--ease);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider { background-color: var(--primary); border-color: var(--primary); }
input:checked + .toggle-slider:before { transform: translateX(18px); }

/* --- FINANCE & WALLET COMPONENTS (Premium SaaS) --- */
.finance-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

.credit-card-premium {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 32px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.58 / 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background-size: 200% 200%;
    animation: flowGradient 8s ease infinite;
}

@keyframes flowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.credit-card-premium::before {
    content: '';
    position: absolute;
    top: -50%; left: -20%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(129, 140, 248, 0.2), transparent 70%);
    pointer-events: none;
}

.card-chip {
    width: 48px;
    height: 36px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.3);
}

.card-chip::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 3px;
    background: repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(0,0,0,0.05) 10px, rgba(0,0,0,0.05) 11px);
}

.transaction-ledger {
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border);
}

.transaction-row {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s var(--ease);
}

.transaction-row:last-child { border-bottom: none; }
.transaction-row:hover { background: rgba(255,255,255,0.03); }

.t-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.t-details { flex-grow: 1; }
.t-name { font-weight: 700; color: #fff; margin-bottom: 2px; }
.t-date { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.t-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1rem;
    white-space: nowrap;
}

.t-amount-pos { color: var(--accent); }
.t-amount-neg { color: var(--primary); }

.action-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.form-control-finance {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 14px 18px !important;
    color: #fff !important;
    width: 100% !important;
    font-size: 0.95rem !important;
    transition: all 0.3s var(--ease) !important;
}

.form-control-finance:focus {
    border-color: var(--primary) !important;
    background: rgba(255,255,255,0.06) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

@media (max-width: 1200px) {
    .finance-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    .action-group { grid-template-columns: 1fr; }
    .credit-card-premium { aspect-ratio: auto; min-height: 200px; padding: 24px; }
    .transaction-row { padding: 16px; }
    .t-amount { font-size: 0.9rem; }
}

/* --- SUPPORT & TICKETING COMPONENTS --- */
.support-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

.ticket-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 20px;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}

.ticket-card:hover {
    border-color: var(--primary);
    background: var(--card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.ticket-status {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-open { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-closed { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid var(--border); }

/* Standard Premium Form Controls */
.form-control {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    color: #fff;
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.3s var(--ease);
    font-family: inherit;
}

.form-control option {
    background: #0a0a0c;
    color: #fff;
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.06);
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.9;
}

@media (max-width: 1100px) {
    .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .ticket-card { padding: 20px; }
    .page-header-actions h1 { font-size: 2rem !important; }
}

/* Administrative Components */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table th {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.modern-table td {
    padding: 20px 24px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.2s var(--ease);
}

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

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

/* Premium Switches */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .4s var(--ease);
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .4s var(--ease);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Admin Action Buttons */
.action-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.action-icon-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.action-icon-btn.danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

::placeholder {
    color: var(--text-dim);
    opacity: 0.5;
}

input, select, textarea {
    color: #fff !important;
}

select option {
    background: #0a0a0c !important;
    color: #fff !important;
}