/* ============================================================
   AlienXotp — Neon Green Glow Design System v2
   Dark + Light mode · Fixed layouts · Responsive
   ============================================================ */

@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');

/* ══════════════════════════════════════════
   DARK THEME (default)
   ══════════════════════════════════════════ */
:root {
    --bg-base: #060d09;
    --bg-body: #0a100d;
    --bg-card: rgba(14, 26, 18, 0.75);
    --bg-card-solid: #0e1a12;
    --bg-input: #0d1610;
    --bg-elevated: #111e15;
    --bg-hover: #142218;

    --neon: #00ff88;
    --neon-dim: rgba(0, 255, 136, 0.08);
    --neon-soft: rgba(0, 255, 136, 0.15);
    --neon-glow: rgba(0, 255, 136, 0.25);
    --neon-bright: #39ff14;
    --neon-muted: #00cc6a;
    --accent: #00ff88;
    --accent-dim: rgba(0, 255, 136, 0.06);

    --green: #00ff88;
    --green-dim: rgba(0, 255, 136, 0.06);
    --red: #ff3860;
    --red-dim: rgba(255, 56, 96, 0.06);
    --yellow: #ffd600;
    --yellow-dim: rgba(255, 214, 0, 0.06);
    --cyan: #00e5ff;
    --cyan-dim: rgba(0, 229, 255, 0.06);
    --purple: #b388ff;
    --purple-dim: rgba(179, 136, 255, 0.06);
    --orange: #ff9100;
    --orange-dim: rgba(255, 145, 0, 0.06);
    --pink: #ff4081;

    --text-primary: #e0f2e9;
    --text-secondary: #8aad96;
    --text-muted: #4d7a5e;

    --border: rgba(0, 255, 136, 0.08);
    --border-light: rgba(0, 255, 136, 0.18);
    --border-glow: rgba(0, 255, 136, 0.3);

    --sidebar-width: 240px;
    --sidebar-collapsed: 68px;
    --topbar-height: 52px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-sm: 0 0 8px rgba(0, 255, 136, 0.15);
    --glow-md: 0 0 16px rgba(0, 255, 136, 0.2);
    --glow-lg: 0 0 32px rgba(0, 255, 136, 0.25);
    --glow-btn: 0 0 20px rgba(0, 255, 136, 0.3), 0 0 60px rgba(0, 255, 136, 0.1);
    --glass: blur(20px) saturate(1.8);

    --grid-opacity: 0.015;
    --sidebar-bg: rgba(8, 18, 12, 0.9);
    --topbar-bg: rgba(8, 18, 12, 0.6);
}

/* ══════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════ */
[data-theme="light"] {
    --bg-base: #f4f7f5;
    --bg-body: #f0f4f2;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-solid: #ffffff;
    --bg-input: #e8eeeb;
    --bg-elevated: #ffffff;
    --bg-hover: #dfe8e2;

    --neon: #00a856;
    --neon-dim: rgba(0, 168, 86, 0.07);
    --neon-soft: rgba(0, 168, 86, 0.12);
    --neon-glow: rgba(0, 168, 86, 0.18);
    --neon-bright: #00c965;
    --neon-muted: #009e50;
    --accent: #00a856;
    --accent-dim: rgba(0, 168, 86, 0.05);

    --green: #00a856;
    --green-dim: rgba(0, 168, 86, 0.06);
    --red: #e53455;
    --red-dim: rgba(229, 52, 85, 0.06);
    --yellow: #c9a000;
    --yellow-dim: rgba(201, 160, 0, 0.06);
    --cyan: #0097b2;
    --cyan-dim: rgba(0, 151, 178, 0.06);
    --purple: #7c4dff;
    --purple-dim: rgba(124, 77, 255, 0.06);
    --orange: #e07c00;
    --orange-dim: rgba(224, 124, 0, 0.06);

    --text-primary: #1a2e22;
    --text-secondary: #4a6b56;
    --text-muted: #7a9a87;

    --border: rgba(0, 80, 40, 0.1);
    --border-light: rgba(0, 80, 40, 0.2);
    --border-glow: rgba(0, 168, 86, 0.25);

    --glow-sm: 0 1px 3px rgba(0, 0, 0, .06);
    --glow-md: 0 2px 8px rgba(0, 0, 0, .08);
    --glow-lg: 0 4px 16px rgba(0, 0, 0, .1);
    --glow-btn: 0 2px 12px rgba(0, 168, 86, 0.2);
    --glass: blur(20px) saturate(1.4);

    --grid-opacity: 0;
    --sidebar-bg: rgba(255, 255, 255, 0.92);
    --topbar-bg: rgba(255, 255, 255, 0.75);
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(0, 255, 136, var(--grid-opacity)) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, var(--grid-opacity)) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -30%;
    left: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(0, 255, 136, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] body::after {
    display: none;
}

a {
    color: var(--neon);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--neon-bright);
}

::selection {
    background: var(--neon-soft);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ══════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════ */

.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass);
    border-right: 1px solid var(--border);
    transition: width 0.25s ease, min-width 0.25s ease;
    z-index: 100;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
}

/* Sidebar header  */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 52px;
    min-height: 52px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.sidebar-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #000;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    flex-shrink: 0;
}

[data-theme="light"] .sidebar-brand-icon {
    background: linear-gradient(135deg, #00a856, #009040);
    box-shadow: 0 2px 8px rgba(0, 168, 86, 0.25);
}

.sidebar-brand-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.sidebar-collapse-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
    color: var(--neon);
    border-color: var(--neon);
    box-shadow: var(--glow-sm);
}

/* Collapsed state */
.collapsed .sidebar-brand-text,
.collapsed .sidebar-section-label,
.collapsed .sidebar-link-text,
.collapsed .sidebar-link .badge-sm,
.collapsed .sidebar-user-info,
.collapsed .sidebar-toggle-arrow {
    display: none;
}

.collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

.collapsed .sidebar-brand {
    justify-content: center;
}

.collapsed .sidebar-link {
    justify-content: center;
    padding: 10px 0;
}

.collapsed .sidebar-user {
    justify-content: center;
    padding: 14px 0;
}

.collapsed .sidebar-submenu {
    display: none !important;
}

/* Sidebar nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-section-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 16px 12px 6px;
    white-space: nowrap;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.sidebar-link:hover {
    background: var(--neon-dim);
    color: var(--text-primary);
}

.sidebar-link:hover i {
    color: var(--neon);
}

.sidebar-link.active {
    background: var(--neon-dim);
    color: var(--neon);
    box-shadow: inset 3px 0 0 var(--neon);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--neon);
}

.sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-link-text {
    flex: 1;
}

.sidebar-submenu {
    display: none;
    flex-direction: column;
    padding-left: 18px;
    gap: 1px;
}

.sidebar-submenu.open {
    display: flex;
}

.sidebar-submenu .sidebar-link {
    font-size: 12px;
    padding: 7px 12px;
}

.sidebar-toggle-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s;
    margin-left: auto;
}

.sidebar-toggle-arrow.rotated {
    transform: rotate(90deg);
}

/* Sidebar bottom user */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--border);
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--neon-muted), var(--neon));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #000;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-user-role {
    font-size: 10px;
    color: var(--text-muted);
}

.sidebar-user-info {
    white-space: nowrap;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ── Topbar ── */
.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: var(--topbar-bg);
    backdrop-filter: var(--glass);
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-left .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px var(--neon);
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 8px var(--neon);
    }

    50% {
        opacity: 0.5;
        box-shadow: 0 0 4px var(--neon);
    }
}

/* Topbar center — credit badge */
.topbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.topbar-credit {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--neon-dim);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 14px 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--neon);
}

.topbar-credit i {
    font-size: 11px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme toggle button in topbar */
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    border-color: var(--neon);
    color: var(--neon);
    box-shadow: var(--glow-sm);
}

/* User dropdown area */
.topbar-user-wrap {
    position: relative;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.topbar-user:hover {
    background: var(--bg-hover);
}

.topbar-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--neon-muted), var(--neon));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #000;
}

.topbar-user-name {
    font-size: 12px;
    font-weight: 600;
}

.topbar-user-chevron {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.topbar-user-wrap.open .topbar-user-chevron {
    transform: rotate(180deg);
}

/* Dropdown menu */
.topbar-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25), var(--glow-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 200;
}

.topbar-user-wrap.open .topbar-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.dropdown-header-name {
    font-size: 13px;
    font-weight: 700;
}

.dropdown-header-role {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--neon-dim);
    color: var(--text-primary);
}

.dropdown-item:hover i {
    color: var(--neon);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.dropdown-item.danger {
    color: var(--red);
}

.dropdown-item.danger:hover {
    background: var(--red-dim);
    color: var(--red);
}

.dropdown-item.danger i {
    color: var(--red);
}

/* ── Page Body ── */
.page-body {
    flex: 1;
    padding: 24px 32px;
    width: 100%;
}

/* ══════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════ */

/* ── Card ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    backdrop-filter: var(--glass);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--glow-sm);
}

.card-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header i {
    color: var(--neon);
    font-size: 12px;
}

/* ── Stat Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: var(--glass);
}

.stat-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--glow-sm);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}

.stat-value.accent {
    color: var(--neon);
    text-shadow: 0 0 20px rgba(0, 255, 136, .2);
}

.stat-value.green {
    color: var(--green);
}

.stat-value.cyan {
    color: var(--cyan);
}

.stat-value.purple {
    color: var(--purple);
}

.stat-value.yellow {
    color: var(--yellow);
}

.stat-value.red {
    color: var(--red);
}

.stat-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 16px;
    color: var(--border-light);
}

[data-theme="light"] .stat-value.accent {
    text-shadow: none;
}

/* ── Welcome Section ── */
.welcome-section {
    margin-bottom: 24px;
}

.welcome-section h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.welcome-section h2 .username {
    color: var(--neon);
}

.welcome-section p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Section Header ── */
.section-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header i {
    color: var(--neon);
    font-size: 12px;
}

/* ── Alerts ── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid;
}

.alert-success {
    background: var(--green-dim);
    border-color: rgba(0, 255, 136, .15);
    color: var(--green);
}

.alert-error {
    background: var(--red-dim);
    border-color: rgba(255, 56, 96, .15);
    color: var(--red);
}

.alert-warning {
    background: var(--yellow-dim);
    border-color: rgba(255, 214, 0, .15);
    color: var(--yellow);
}

.alert-info {
    background: var(--cyan-dim);
    border-color: rgba(0, 229, 255, .15);
    color: var(--cyan);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    font-weight: 700;
    box-shadow: var(--glow-btn);
}

.btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(0, 255, 136, .4), 0 0 80px rgba(0, 255, 136, .15);
}

[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #00a856, #009040);
    color: #fff;
}

.btn-ghost {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-danger {
    background: linear-gradient(135deg, #ff3860, #dc2020);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 56, 96, .2);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 11px;
}

.btn-xs {
    width: 26px;
    height: 26px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 10px;
}

.btn-xs:hover {
    border-color: var(--neon);
    color: var(--neon);
    box-shadow: var(--glow-sm);
}

.btn-xs.danger:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── Form ── */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--neon);
    box-shadow: 0 0 0 3px var(--neon-dim), var(--glow-sm);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234d7a5e'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-input);
    padding: 3px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    width: fit-content;
}

.tab {
    padding: 8px 18px;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--neon-dim);
    color: var(--neon);
    box-shadow: var(--glow-sm);
}

/* ── Admin Table ── */
.admin-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: var(--glass);
}

.admin-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.admin-table-header h2 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table-header h2 i {
    color: var(--neon);
    font-size: 11px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead th {
    padding: 10px 16px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, .08);
}

.admin-table tbody td {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0, 255, 136, .03);
}

.admin-table tbody tr:hover {
    background: var(--neon-dim);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

[data-theme="light"] .admin-table thead th {
    background: rgba(0, 0, 0, .02);
}

/* ── Pagination ── */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
}

.pg-controls {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.pg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.pg-btn:hover:not(.active):not(.pg-disabled) {
    border-color: var(--border-light);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.pg-btn.active {
    background: var(--neon);
    color: #000;
    border-color: var(--neon);
    box-shadow: var(--glow-sm);
    font-weight: 800;
}

.pg-btn.pg-disabled {
    opacity: .3;
    cursor: not-allowed;
    pointer-events: none;
}

.pg-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 28px;
    color: var(--text-muted);
    font-size: 12px;
    user-select: none;
}

/* ── Badges ── */
.badge-sm {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: var(--neon-dim);
    color: var(--neon);
}

.badge-user {
    background: var(--cyan-dim);
    color: var(--cyan);
}

.badge-active {
    background: var(--green-dim);
    color: var(--green);
}

.badge-banned {
    background: var(--red-dim);
    color: var(--red);
}

.badge-used {
    background: rgba(100, 100, 100, .1);
    color: var(--text-muted);
}

.badge-expired {
    background: var(--yellow-dim);
    color: var(--yellow);
}

.badge-completed {
    background: var(--green-dim);
    color: var(--green);
}

.badge-failed,
.badge-no-answer {
    background: var(--red-dim);
    color: var(--red);
}

.badge-initiated,
.badge-ringing {
    background: var(--yellow-dim);
    color: var(--yellow);
}

.badge-in-progress {
    background: var(--cyan-dim);
    color: var(--cyan);
}

/* ══════════════════════════════════════════
   FULL-WIDTH LAYOUT CARDS (Account / Wallet / Recharge)
   ══════════════════════════════════════════ */
.page-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.page-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.page-full {
    width: 100%;
}

/* ══════════════════════════════════════════
   RECHARGE PAGE
   ══════════════════════════════════════════ */
.recharge-balance {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(0, 255, 136, .06), rgba(0, 204, 106, .03));
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.recharge-balance-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--neon-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--neon);
    box-shadow: var(--glow-sm);
}

.recharge-balance-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.recharge-balance-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--neon);
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 0 30px rgba(0, 255, 136, .3);
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.preset-btn {
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'JetBrains Mono', monospace;
}

.preset-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.preset-btn.active {
    background: var(--neon-dim);
    border-color: var(--neon);
    color: var(--neon);
    box-shadow: var(--glow-sm);
}

.plan-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    margin-bottom: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.plan-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--glow-sm);
}

.plan-card.selected {
    border-color: var(--neon);
    background: var(--neon-dim);
}

.plan-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════
   AUTH PAGES
   ══════════════════════════════════════════ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: var(--bg-base);
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(40px, 40px);
    }
}

.auth-wrapper .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orb-float 8s ease-in-out infinite;
}

.auth-wrapper .orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(0, 255, 136, 0.06);
    top: -100px;
    left: -100px;
}

.auth-wrapper .orb-2 {
    width: 350px;
    height: 350px;
    background: rgba(0, 204, 106, 0.04);
    bottom: -80px;
    right: -80px;
    animation-delay: -4s;
}

.auth-wrapper .orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(0, 229, 255, 0.03);
    top: 50%;
    left: 50%;
    animation-delay: -2s;
}

@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(14, 26, 18, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 40px 36px;
    backdrop-filter: var(--glass);
    position: relative;
    z-index: 1;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.05);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon), transparent);
    border-radius: 1px;
}

.auth-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--neon);
    margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(0, 255, 136, .3);
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.auth-input-group {
    margin-bottom: 16px;
}

.auth-input-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
}

.auth-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.auth-input:focus {
    border-color: var(--neon);
    box-shadow: 0 0 0 3px var(--neon-dim), var(--glow-sm);
}

.auth-input::placeholder {
    color: rgba(77, 122, 94, .5);
}

.auth-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--glow-btn);
    margin-top: 4px;
}

.auth-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(0, 255, 136, .4), 0 0 80px rgba(0, 255, 136, .15);
}

.auth-divider {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin: 18px 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--neon);
    font-weight: 600;
}

/* ══════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s forwards;
    backdrop-filter: var(--glass);
    border: 1px solid;
}

.toast.success {
    background: var(--green-dim);
    border-color: rgba(0, 255, 136, .2);
    color: var(--green);
}

.toast.error {
    background: var(--red-dim);
    border-color: rgba(255, 56, 96, .2);
    color: var(--red);
}

.toast.info {
    background: var(--cyan-dim);
    border-color: rgba(0, 229, 255, .2);
    color: var(--cyan);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-grid-2 {
        grid-template-columns: 1fr;
    }

    .page-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 200;
        height: 100vh;
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .page-body {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar-center {
        display: none;
    }

    .topbar-user-name {
        display: none;
    }

    .sidebar-mobile-toggle {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-grid-3 {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 28px 22px;
    }
}