/* ============================================================================
   x21Checker — Premium Design System
   Dark mode + Neon Purple/Cyan accent
   ============================================================================ */

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

/* ─── CSS Variables ───────────────────────────────────────────────────────── */
:root {
    /* Colors */
    --bg-primary: #0b0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a1f35;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(26, 31, 53, 0.9);
    --bg-sidebar: rgba(11, 14, 23, 0.95);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #06b6d4);
    --accent-gradient-hover: linear-gradient(135deg, #7c3aed, #0891b2);

    --color-safe: #10b981;
    --color-safe-bg: rgba(16, 185, 129, 0.15);
    --color-blocked: #ef4444;
    --color-blocked-bg: rgba(239, 68, 68, 0.15);
    --color-unknown: #f59e0b;
    --color-unknown-bg: rgba(245, 158, 11, 0.15);

    --border-color: rgba(139, 92, 246, 0.15);
    --border-glow: rgba(139, 92, 246, 0.4);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.2);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Sidebar */
    --sidebar-width: 260px;
}

/* ─── Light Mode ──────────────────────────────────────────────────────────── */
html.light {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: rgba(241, 245, 249, 1);
    --bg-sidebar: rgba(255, 255, 255, 0.98);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: rgba(139, 92, 246, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* ─── Cosmos Background ───────────────────────────────────────────────────── */
.cosmos-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.cosmos-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.cosmos-bg .orb:nth-child(1) {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    right: -100px;
    animation-duration: 25s;
}

.cosmos-bg .orb:nth-child(2) {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: -50px;
    left: -50px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.cosmos-bg .orb:nth-child(3) {
    width: 200px;
    height: 200px;
    background: #ec4899;
    top: 50%;
    left: 50%;
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

html.light .cosmos-bg .orb {
    opacity: 0.08;
}

/* ─── Container ───────────────────────────────────────────────────────────── */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.app-header .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-header .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.app-header .brand-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-header .brand-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* ─── Glass Card ──────────────────────────────────────────────────────────── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.glass-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.glass-card h2 i {
    color: var(--accent-primary);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-gradient-hover);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

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

.btn-outline:hover:not(:disabled) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.05);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* Glow Button */
.btn-glow {
    background: var(--accent-gradient);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3), 0 0 60px rgba(6, 182, 212, 0.15);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255, 255, 255, 0.1), transparent 30%);
    animation: glow-spin 4s linear infinite;
}

.btn-glow:hover:not(:disabled) {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5), 0 0 80px rgba(6, 182, 212, 0.25);
    transform: translateY(-3px);
}

@keyframes glow-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ─── Status Badges ───────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-safe {
    color: var(--color-safe);
    background: var(--color-safe-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-blocked {
    color: var(--color-blocked);
    background: var(--color-blocked-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-unknown {
    color: var(--color-unknown);
    background: var(--color-unknown-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ─── Form Inputs ─────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 20px rgba(139, 92, 246, 0.1);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.input-group {
    position: relative;
}

.input-group .toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}

.domain-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ─── Domain Checker Results ──────────────────────────────────────────────── */
.result-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    animation: fadeSlideIn 0.3s ease;
    transition: all var(--transition-fast);
}

.result-row:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
}

.result-row .result-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.result-row .result-domain {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-all;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Summary Card ────────────────────────────────────────────────────────── */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.summary-item {
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.summary-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.summary-item .summary-count {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.summary-item .summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.summary-item.safe .summary-count { color: var(--color-safe); }
.summary-item.blocked .summary-count { color: var(--color-blocked); }
.summary-item.unknown .summary-count { color: var(--color-unknown); }

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width var(--transition-base);
}

.progress-bar-fill.safe { background: var(--color-safe); }
.progress-bar-fill.blocked { background: var(--color-blocked); }
.progress-bar-fill.unknown { background: var(--color-unknown); }

/* ─── Loading ─────────────────────────────────────────────────────────────── */
.loading-container {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.app-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.app-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.app-footer a {
    color: var(--accent-primary);
}

/* ─── Toast Notifications ─────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 400px;
    border: 1px solid;
}

.toast.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.toast.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.info {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
}

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* ─── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-base);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal h3 i {
    color: var(--accent-primary);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ─── Admin Layout ────────────────────────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base);
}

.sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand h2 {
    font-size: 1.15rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand small {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
    -webkit-text-fill-color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.sidebar-nav a:hover {
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-blocked);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.sidebar-footer a:hover {
    opacity: 0.8;
}

/* Main content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.page {
    display: none;
    animation: fadeSlideIn 0.3s ease;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.page-header .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Mobile Hamburger */
.hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ─── Table ───────────────────────────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

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

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

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    position: sticky;
    top: 0;
}

.data-table tr:hover td {
    background: rgba(139, 92, 246, 0.03);
}

.data-table .domain-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--accent-secondary);
}

.data-table .actions-cell {
    display: flex;
    gap: 0.35rem;
}

.data-table input[type="checkbox"] {
    accent-color: var(--accent-primary);
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* ─── Group Cards ─────────────────────────────────────────────────────────── */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.group-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.group-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
    transform: translateY(-3px);
}

.group-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-card h4 i {
    color: var(--accent-primary);
}

.group-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
    word-break: break-all;
}

.group-url .copy-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

.group-url .copy-btn:hover {
    color: var(--accent-primary);
}

.group-card .group-actions {
    display: flex;
    justify-content: flex-end;
}

/* ─── Filter Bar ──────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .form-select {
    width: auto;
    min-width: 200px;
}

/* ─── Stats Badges Row ────────────────────────────────────────────────────── */
.stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-badge i { font-size: 1rem; }
.stat-badge.safe i { color: var(--color-safe); }
.stat-badge.blocked i { color: var(--color-blocked); }
.stat-badge.unknown i { color: var(--color-unknown); }
.stat-badge.total i { color: var(--accent-primary); }

/* ─── Login Page ──────────────────────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card .login-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-card .login-icon i {
    font-size: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.login-card .login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.login-error {
    padding: 0.75rem;
    background: var(--color-blocked-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-blocked);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── Check Progress ──────────────────────────────────────────────────────── */
.check-progress {
    text-align: center;
    padding: 2rem;
}

.check-progress .progress-ring {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    position: relative;
}

.check-progress .progress-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.check-results-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.check-results-list::-webkit-scrollbar {
    width: 4px;
}

.check-results-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.check-results-list::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 2px;
}

/* ─── Settings Section ────────────────────────────────────────────────────── */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.settings-section h3 i {
    color: var(--accent-primary);
}

.settings-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.settings-row .form-group {
    flex: 1;
    min-width: 200px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 0;
}

.last-check-info {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-close {
        display: block;
    }

    .admin-main {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header .actions {
        width: 100%;
    }

    .page-header .actions .btn {
        flex: 1;
        font-size: 0.75rem;
    }

    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .container {
        padding: 1rem;
    }

    .glass-card {
        padding: 1.25rem;
    }

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

    .modal {
        padding: 1.5rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.75rem;
    }

    .stats-row {
        flex-direction: column;
    }
}

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

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar .form-select {
        width: 100%;
    }

    .app-header .brand-text h1 {
        font-size: 1.2rem;
    }
}

/* ─── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.85rem;
}

/* ─── Misc ────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

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

.w-full { width: 100%; }
