:root {
  --bg-dark: #0f111a;
  --bg-panel: rgba(26, 29, 41, 0.7);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-main: #ffffff;
  --text-muted: #a0aab2;
  --primary-accent: #6b21a8; /* purple */
  --primary-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  --button-hover: rgba(255, 255, 255, 0.15);
  
  --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(107, 33, 168, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.15), transparent 25%);
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: rgba(15, 17, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(107, 33, 168, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-success {
  background: linear-gradient(to right, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-pink {
  background: linear-gradient(to right, #ec4899, #be185d);
  color: white;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}
.btn-pink:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-purple {
  background: linear-gradient(to right, #a855f7, #7c3aed);
  color: white;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}
.btn-purple:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Typography & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
}

h1, h2, h3 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.gap-4 { gap: 1rem; }

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

/* Search Bar */
.search-wrapper {
  display: flex;
  margin: 2rem auto;
  max-width: 600px;
  position: relative;
}

.search-wrapper .form-control {
  border-radius: 50px 0 0 50px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
}

.search-wrapper .domain-ext {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-left: none;
  padding: 0 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.search-wrapper .btn {
  border-radius: 0 50px 50px 0;
  padding: 1rem 2rem;
  margin-left: -1px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Table */
.modern-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.modern-table th, .modern-table td {
  padding: 1rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.modern-table th {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.8rem;
}

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

/* Badges */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-active { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge-suspended { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Premium Framed Alerts */
.alert {
  padding: 1.1rem 1.4rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.98rem;
  line-height: 1.5;
  border: 1px solid transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.4s ease-out forwards;
}

.alert::before {
  font-size: 1.6rem;
  flex-shrink: 0;
  display: block;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid #10b981;
  color: #fff;
}
.alert-success::before { content: "\2705"; }

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid #ef4444;
  color: #fff;
}
.alert-error::before { content: "\26A0"; }

.alert-info {
  background: rgba(59, 130, 246, 0.12);
  border: 1.5px solid #3b82f6;
  color: #fff;
}
.alert-info::before { content: "\2139"; }

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1.5px solid #f59e0b;
  color: #fff;
}
.alert-warning::before { content: "\1f4a1"; }

.alert-title {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}


.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Tabs System */
.tab-container { margin-bottom: 2rem; }
.tab-header {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 2px;
}
.tab-btn {
  padding: 1rem 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  white-space: nowrap;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.tab-btn.active {
  color: #a855f7;
  border-bottom-color: #a855f7;
  background: rgba(168, 85, 247, 0.05);
}
.tab-content { display: none; animation: fadeIn 0.4s ease-out; }
.tab-content.active { display: block; }

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid var(--border-color);
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 4px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider { background-color: #a855f7; border-color: #a855f7; }
input:focus + .slider { box-shadow: 0 0 1px #a855f7; }
input:checked + .slider:before { transform: translateX(24px); }

/* Status Pulse */
.pulse-green {
  display: inline-block;
  width: 8px; height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Premium Stat Cards */
.stat-card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent-color, #a855f7);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .value {
  font-size: 2.25rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.stat-card .icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.05);
}

/* Sidebar Refinement */
.side-nav {
  list-style: none;
  padding: 0;
}

.side-nav li {
  margin-bottom: 0.5rem;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.side-nav li.active a {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.side-nav i {
  font-size: 1.1rem;
}

/* Utility to hide/show details */
.detail-row {
  transition: all 0.3s ease;
}

/* ================================================================
   DASHBOARD LAYOUT SYSTEM
   Professional two-column layout with sticky sidebar
   ================================================================ */

.dashboard-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

.dashboard-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: none;
}
.dashboard-sidebar::-webkit-scrollbar { display: none; }

.dashboard-content {
    flex: 1;
    min-width: 0;
    width: calc(100% - 280px - 2rem);
}

/* ================================================================
   PAGE HEADER — reusable top bar for every dashboard sub-page
   ================================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h2 { margin: 0; }
.page-header .subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ================================================================
   RESPONSIVE TABLES
   ================================================================ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.table-responsive::-webkit-scrollbar { display: none; }

/* ================================================================
   ACTION BUTTON ROW — consistent icon buttons across all pages
   ================================================================ */
.action-btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.85rem;
}

/* ================================================================
   MOBILE RESPONSIVE BREAKPOINTS
   ================================================================ */

/* Tablet */
@media (max-width: 992px) {
    .container { padding: 1.5rem; }
    .dashboard-sidebar { width: 240px; }
    .dashboard-content { width: calc(100% - 240px - 2rem); }
}

/* Mobile */
@media (max-width: 768px) {
    .container { padding: 1rem; }

    /* Generic flex stacking */
    .flex { flex-direction: column; }
    .gap-4 { gap: 1rem; }

    /* Navbar */
    .navbar { padding: 1rem 5%; }

    /* Dashboard layout → vertical stack */
    .dashboard-layout {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    .dashboard-sidebar {
        width: 100% !important;
        position: static !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    .dashboard-content {
        width: 100% !important;
    }

    /* Sidebar collapses into horizontal scroll on mobile */
    .dashboard-sidebar .side-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .dashboard-sidebar .side-nav li {
        margin-bottom: 0;
    }
    .dashboard-sidebar .side-nav a {
        padding: 0.5rem 0.9rem;
        font-size: 0.82rem;
        white-space: nowrap;
        border: 1px solid var(--border-color);
        border-radius: 20px;
        gap: 6px;
    }
    .dashboard-sidebar .side-nav li.active a {
        border-color: rgba(168, 85, 247, 0.4);
    }

    /* Hide user avatar section on mobile to save space */
    .dashboard-sidebar > div:first-child {
        display: none !important;
    }
    /* Hide section labels on mobile */
    .dashboard-sidebar .nav-section-label {
        display: none !important;
    }

    /* Tab Header Scrolling */
    .tab-header {
        overflow-x: auto !important;
        white-space: nowrap !important;
        display: flex !important;
        padding: 0.5rem !important;
    }
    .tab-btn {
        flex: 0 0 auto !important;
        min-width: 120px;
        padding: 0.75rem 1rem !important;
    }

    /* Mobile Menu Toggle */
    .nav-toggle {
        display: block !important;
        cursor: pointer;
        padding: 10px;
    }
    .nav-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: #fff;
        margin: 5px 0;
        transition: 0.3s;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 17, 26, 0.95);
        backdrop-filter: blur(20px);
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        gap: 1.5rem;
    }
    .nav-links.active { display: flex; }
    .nav-links a {
        margin: 0;
        font-size: 1.1rem;
        width: 100%;
        padding: 0.5rem 0;
    }

    /* Search bar */
    .search-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    .search-wrapper .form-control,
    .search-wrapper .domain-ext,
    .search-wrapper .btn {
        border-radius: 8px !important;
        border: 1px solid var(--border-color) !important;
        width: 100% !important;
        justify-content: center;
        height: 50px !important;
    }

    /* Stat grid */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Glass panel padding */
    .glass-panel {
        padding: 1.25rem !important;
    }

    /* Admin */
    .admin-nav-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Page header stacks */
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.3rem !important; }

    .admin-nav-grid { grid-template-columns: 1fr !important; }
    .stat-grid { grid-template-columns: 1fr !important; }
    .stat-card .value { font-size: 1.75rem !important; }
    .tab-header { gap: 5px !important; }

    /* Side nav items smaller */
    .dashboard-sidebar .side-nav a {
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
    }
}
/* Landing Page Refinements */
.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.5s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.feature-grid {
    display: flex;
    gap: 2rem;
    margin-top: 6rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .feature-grid {
        flex-direction: column !important;
        margin-top: 4rem !important;
    }
}
