/* NextBotFX License Server - Modern Dark Theme */

:root {
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --bg-secondary: #0e0e11;
    --bg-input: #121212;
    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --border: #1f1f23;
    --radius: 8px;
    --shadow: 0 0 0 1px #1f1f23;

    /* Vibrant Design System Core */
    --vibrant-purple: #8b5cf6;
    --vibrant-green: #10b981;
    --vibrant-red: #ef4444;
    --vibrant-blue: #3b82f6;
    --vibrant-amber: #f59e0b;
    --vibrant-cyan: #06b6d4;
    --vibrant-orange: #f97316;

    /* Neon Accents (Legacy/Utility) */
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-green: #10b981;
    /* Unified with vibrant green */
    --neon-orange: #f97316;
    --neon-red: #ef4444;
    --neon-cyan: #06b6d4;

    --glass-bg: rgba(15, 17, 21, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* ==================== Vibrant Components ==================== */
.stat-card-vibrant {
    position: relative;
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 140px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: 100%;
    text-decoration: none !important;
}

.stat-card-vibrant:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Vibrant Themes */
.theme-purple-bg {
    background: linear-gradient(145deg, rgba(30, 27, 75, 0.9) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-left: 5px solid var(--vibrant-purple);
}

.theme-blue-bg {
    background: linear-gradient(145deg, rgba(30, 58, 138, 0.9) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-left: 5px solid var(--vibrant-blue);
}

.theme-green-bg {
    background: linear-gradient(145deg, rgba(6, 78, 59, 0.9) 0%, rgba(16, 185, 129, 0.15) 100%);
    border-left: 5px solid var(--vibrant-green);
}

.theme-orange-bg {
    background: linear-gradient(145deg, rgba(124, 45, 18, 0.9) 0%, rgba(249, 113, 22, 0.15) 100%);
    border-left: 5px solid var(--vibrant-orange);
}

.theme-cyan-bg {
    background: linear-gradient(145deg, rgba(21, 94, 117, 0.9) 0%, rgba(6, 182, 212, 0.15) 100%);
    border-left: 5px solid var(--vibrant-cyan);
}

.theme-red-bg {
    background: linear-gradient(145deg, rgba(127, 29, 29, 0.9) 0%, rgba(239, 68, 68, 0.15) 100%);
    border-left: 5px solid var(--vibrant-red);
}

/* Vibrant Typography */
.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    z-index: 2;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
    z-index: 2;
    margin-bottom: 0.5rem;
}

.tc-purple {
    color: #c4b5fd;
}

.tc-blue {
    color: #93c5fd;
}

.tc-green {
    color: #6ee7b7;
}

.tc-orange {
    color: #fed7aa;
}

.tc-cyan {
    color: #a5f3fc;
}

.tc-red {
    color: #fca5a5;
}

.stat-icon-large {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    opacity: 0.12;
    z-index: 1;
    transition: all 0.4s ease;
}

.stat-card-vibrant:hover .stat-icon-large {
    opacity: 0.25;
    transform: translateY(-50%) scale(1.1) rotate(5deg);
}

/* Icon Colors per Theme */
.theme-purple-bg .stat-icon-large {
    color: var(--vibrant-purple);
}

.theme-blue-bg .stat-icon-large {
    color: var(--vibrant-blue);
}

.theme-green-bg .stat-icon-large {
    color: var(--vibrant-green);
}

.theme-orange-bg .stat-icon-large {
    color: var(--vibrant-orange);
}

.theme-cyan-bg .stat-icon-large {
    color: var(--vibrant-cyan);
}

.theme-red-bg .stat-icon-large {
    color: var(--vibrant-red);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== Navbar — Futuristic Glassmorphism ==================== */
@keyframes navGradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes navPulseGlow {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    background: rgba(5, 5, 15, 0.85);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(0, 243, 255, 0.08);
}

/* Animated gradient line below navbar */
.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), var(--vibrant-cyan), var(--accent), var(--neon-blue), transparent);
    background-size: 200% 100%;
    animation: navGradientShift 6s ease infinite;
    opacity: 0.6;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    position: relative;
}

.nav-brand span {
    background: linear-gradient(135deg, #ffffff 0%, var(--neon-blue) 60%, var(--vibrant-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(0, 243, 255, 0.15));
}

.nav-brand .logo-img {
    transition: filter 0.4s ease, transform 0.4s ease;
}

.nav-brand:hover .logo-img {
    filter: drop-shadow(0 0 12px rgba(0, 243, 255, 0.7)) !important;
    transform: scale(1.08);
}

.logo {
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.08), rgba(59, 130, 246, 0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    color: #e2e8f0;
    border-color: rgba(0, 243, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.1), 0 0 20px rgba(0, 243, 255, 0.05);
    text-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
}

.nav-links a:hover::before {
    opacity: 1;
}

.nav-links a:hover i {
    color: var(--neon-blue);
    filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.5));
    transform: scale(1.15);
}

.nav-links a i {
    transition: all 0.3s ease;
    font-size: 0.82rem;
}

.nav-links a.active {
    color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.08);
    border-color: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1), inset 0 0 15px rgba(0, 243, 255, 0.03);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.nav-links a.active i {
    filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.6));
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.nav-user a,
.nav-user span {
    transition: all 0.3s ease;
}

.nav-user a:hover {
    color: var(--neon-blue) !important;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

.btn-settings {
    transition: all 0.3s ease !important;
}

.btn-settings:hover {
    color: var(--neon-blue) !important;
    transform: rotate(15deg) scale(1.1);
    filter: drop-shadow(0 0 6px rgba(0, 243, 255, 0.4));
}

.btn-logout {
    color: var(--danger);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    font-size: 0.84rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
    transform: translateY(-1px);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* ==================== Navbar Dropdowns — Futuristic ==================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid transparent;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.nav-dropdown-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.08), rgba(59, 130, 246, 0.08));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-dropdown-toggle:hover {
    color: #e2e8f0;
    border-color: rgba(0, 243, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.1), 0 0 20px rgba(0, 243, 255, 0.05);
    text-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
}

.nav-dropdown-toggle:hover::before {
    opacity: 1;
}

.nav-dropdown-toggle:hover i {
    color: var(--neon-blue);
    filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.5));
}

.nav-dropdown-toggle i {
    transition: all 0.3s ease;
}

.nav-dropdown-toggle.has-active {
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.25);
}

.nav-dropdown-toggle.has-active i:not(.caret) {
    filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.5));
}

.nav-dropdown-toggle .caret {
    font-size: 0.55rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.nav-dropdown.open .nav-dropdown-toggle .caret {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--neon-blue);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: rgba(8, 8, 20, 0.95);
    backdrop-filter: blur(25px) saturate(1.5);
    -webkit-backdrop-filter: blur(25px) saturate(1.5);
    border: 1px solid rgba(0, 243, 255, 0.1);
    border-radius: 14px;
    padding: 0.5rem;
    z-index: 200;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 243, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: dropdownSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient accent bar at top of dropdown */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), var(--vibrant-cyan), transparent);
    border-radius: 0 0 2px 2px;
    opacity: 0.6;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.nav-dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 2px;
    background: var(--neon-blue);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.25s ease;
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.5);
}

.nav-dropdown-menu a:hover {
    color: #e2e8f0;
    background: rgba(0, 243, 255, 0.06);
    border-color: rgba(0, 243, 255, 0.1);
    transform: translateX(4px);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.nav-dropdown-menu a:hover::before {
    opacity: 1;
}

.nav-dropdown-menu a:hover i {
    color: var(--neon-blue);
    filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.5));
    transform: scale(1.15);
}

.nav-dropdown-menu a i {
    transition: all 0.3s ease;
    font-size: 0.82rem;
    width: 18px;
    text-align: center;
}

.nav-dropdown-menu a.active {
    color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.08);
    border-color: rgba(0, 243, 255, 0.15);
    box-shadow: inset 0 0 15px rgba(0, 243, 255, 0.03);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.25);
}

.nav-dropdown-menu a.active::before {
    opacity: 1;
}

.nav-dropdown-menu a.active i {
    filter: drop-shadow(0 0 4px rgba(0, 243, 255, 0.6));
}

.nav-dropdown-menu .dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.12), transparent);
    margin: 0.35rem 0.5rem;
}

/* ==================== Nav Badge Dots (unseen content) ==================== */
@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

.nav-badge-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 9px;
    line-height: 1;
    margin-left: 4px;
    animation: badgePulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    position: relative;
    top: -1px;
}

/* ==================== Navbar Mobile Hamburger ==================== */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle:hover {
    border-color: rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.nav-toggle:hover span {
    background: var(--neon-blue);
    box-shadow: 0 0 6px rgba(0, 243, 255, 0.4);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--neon-blue);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    background: var(--neon-blue);
}

/* ==================== Navbar Responsive ==================== */
@media (max-width: 992px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(5, 5, 15, 0.97);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-bottom: 1px solid rgba(0, 243, 255, 0.1);
        padding: 1rem;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
        animation: mobileMenuSlide 0.3s ease;
    }

    .nav-menu::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--neon-blue), var(--vibrant-cyan), transparent);
        background-size: 200% 100%;
        animation: navGradientShift 6s ease infinite;
        opacity: 0.4;
    }

    @keyframes mobileMenuSlide {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-menu.open {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav-links a,
    .nav-dropdown-toggle {
        width: 100%;
        padding: 0.65rem 1rem;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(0, 243, 255, 0.02);
        border: 1px solid rgba(0, 243, 255, 0.06);
        margin: 0.25rem 0 0.25rem 1rem;
        animation: none;
    }

    .nav-dropdown-menu::before {
        display: none;
    }

    .nav-user {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(0, 243, 255, 0.08);
        flex-wrap: wrap;
    }
}

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

/* ==================== Page Header ==================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

/* ==================== Cards ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ==================== Stats Grid ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: none;
}

.stat-icon {
    font-size: 2rem;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

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

/* ==================== Dashboard Grid ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ==================== Quick Actions ==================== */
.quick-actions h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    box-shadow: none;
}

.action-card:hover {
    border-color: var(--accent);
    background: var(--bg-input);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.5rem;
}

/* ==================== Tables ==================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table .actions {
    white-space: nowrap;
}

.table .actions>a,
.table .actions>form,
.table .actions>button {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.table .actions form {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.table .actions> :last-child {
    margin-right: 0;
}

/* Row Variations */
.row-danger {
    background: rgba(239, 68, 68, 0.08) !important;
}

.row-danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
}

/* ==================== Badges ==================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-symbol {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    margin-right: 2px;
    font-size: 0.7rem;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    min-height: 48px;
    /* Match form-control height */
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    /* Inherit font */
    line-height: 1.5;
    /* Fixed line height */
    vertical-align: middle;
    /* Align with other inline elements */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    /* Remove default browser styling */
    -webkit-appearance: none;
}

.btn:hover {
    background: var(--border);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-danger {
    background: var(--bg-input);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    min-height: auto;
    /* Override the 48px from .btn */
}

.btn-block {
    width: 100%;
}

/* ==================== Forms ==================== */
.form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all 0.2s;
    min-height: 48px;
    height: auto !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ==================== Filter Form ==================== */
.filter-form .form-row {
    align-items: flex-end;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* ==================== License Info ==================== */
.license-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==================== Alerts ==================== */
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border-left: 4px solid var(--border);
}

.alert-success {
    border-left-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.alert-error {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.alert-info {
    border-left-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.alert-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.5rem;
}

.alert-close:hover {
    color: var(--text-primary);
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ==================== Utilities ==================== */
.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-muted {
    color: var(--text-muted);
}

.border-success {
    border: 1px solid var(--success) !important;
}

.border-danger {
    border: 1px solid var(--danger) !important;
}

.border-accent {
    border: 1px solid var(--accent) !important;
}

/* Select2 OLED Overrides */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
}

.select2-dropdown {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--accent) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

.inline {
    display: inline;
}

/* ==================== Login Page ==================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-dark);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

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

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form .btn {
    margin-top: 1rem;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.login-footer a:hover {
    color: white;
    text-decoration: underline;
}

.login-footer a::before {
    content: '↔️';
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ==================== Footer ==================== */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== Responsive ==================== */
/* Nav Toggle (Mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: auto;
    /* Allow it to shrink/fit */
}

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

@media (max-width: 900px) {
    .navbar {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

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

    .nav-menu.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
        background: var(--bg-input);
    }

    .nav-links a.active {
        border-left: 3px solid var(--accent);
    }

    /* Mobile dropdowns: accordion style */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        padding: 0.75rem 1rem;
        background: var(--bg-input);
        justify-content: space-between;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 1rem;
        background: transparent;
        animation: none;
    }

    .nav-dropdown-menu a {
        padding: 0.6rem 1rem;
        background: rgba(255, 255, 255, 0.02);
        margin-bottom: 2px;
    }

    .nav-user {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
    }

    .container {
        padding: 1rem 1rem 4rem 1rem;
        /* Added bottom padding for footer */
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
    }

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

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

    /* Card view adjustments */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Table adjustments */
    .table th,
    .table td {
        white-space: nowrap;
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Form adjustments */
    .form-row {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 1.5rem;
        width: 100%;
    }


}

/* ==================== Global Form Overrides (Moved from Media Query) ==================== */

/* Fix text clipping in Selects */
select.form-control,
select.form-select {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;

    /* Fix Clipping */
    height: auto !important;
    min-height: 48px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    line-height: 1.5;
}

/* Fix File Input clipping */
input[type="file"].form-control {
    height: auto !important;
    padding: 0.6rem;
    line-height: 1.5;
    min-height: 48px;
    display: flex;
    align-items: center;
}

select.form-control:focus,
select.form-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

select.form-control option {
    background-color: var(--bg-input);
    color: var(--text-primary);
}

/* ==================== Bootstrap Overrides ==================== */

/* Modal - Dark Theme Adaptations */
.modal-content {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border) !important;
}

.modal-footer {
    border-top: 1px solid var(--border) !important;
}

.close {
    color: var(--text-secondary) !important;
    text-shadow: none !important;
    opacity: 0.8 !important;
}

.close:hover {
    color: var(--text-primary) !important;
    opacity: 1 !important;
}

/* Fix Bootstrap resets overwriting base styles if any */
body {
    background-color: var(--bg-dark) !important;
    color: var(--text-primary) !important;
}

/* Ensure our generic buttons override Bootstrap's if conflicts arise */
.btn-primary {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: white !important;
}

.btn-secondary {
    background-color: var(--bg-input) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

.btn-info {
    color: white !important;
}

/* Bootstrap Utility Overrides for Dark Theme */
.bg-light {
    background-color: var(--bg-input) !important;
    /* Was white/gray in Bootstrap */
    color: var(--text-primary) !important;
}

.border {
    border-color: var(--border) !important;
}

.table {
    color: var(--text-primary) !important;
}

.table thead th {
    border-bottom: 2px solid var(--border) !important;
    color: var(--text-secondary) !important;
}

.table td,
.table th {
    border-top: 1px solid var(--border) !important;
}

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

a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

.text-dark {
    color: var(--text-primary) !important;
}

.bg-white {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

/* Fix Pagination */
.page-link {
    background-color: var(--bg-input);
    border-color: var(--border);
    color: var(--text-primary);
}

.page-link:hover {
    background-color: var(--border);
    border-color: var(--border);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.page-item.disabled .page-link {
    background-color: var(--bg-dark);
    border-color: var(--border);
    color: var(--text-muted);
}

/* ==================== Live Account Cards (Global) ==================== */
:root {
    --live-card-bg: var(--bg-card);
    --live-card-border: var(--border);
    --live-text-primary: var(--text-primary);
    --live-text-secondary: var(--text-secondary);
    --live-metric-bg: var(--bg-input);
    --live-success: var(--success);
    --live-danger: var(--danger);
}

.live-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.live-accounts-grid.preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.live-account-card {
    background: var(--live-card-bg);
    border: 1px solid var(--live-card-border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.live-account-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #475569;
}

/* Decoration line at top - Removed for OLED minimalist look or made subtle */
.live-account-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    opacity: 0.5;
}

.live-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.live-client-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    /* Essential for child truncation */
    margin-right: 8px;
    /* Space for the status dot */
}

.live-client-name {
    font-weight: 700;
    color: var(--live-text-primary);
    font-size: 1.1rem;
    letter-spacing: -0.025em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-client-email {
    font-size: 0.85rem;
    color: var(--live-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-account-number {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: monospace;
    letter-spacing: 0.05em;
}

.live-status-dot {
    height: 10px;
    width: 10px;
    background-color: var(--live-success);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}

.live-status-dot.offline {
    background-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.live-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.live-metrics-row-3 {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.live-metric {
    background: var(--live-metric-bg);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.live-metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.live-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--live-text-primary);
}

.text-success {
    color: var(--live-success) !important;
}

.text-danger {
    color: var(--live-danger) !important;
}

.text-muted {
    color: var(--live-text-secondary) !important;
}

.text-warning {
    color: yellow !important;
}

.live-card-note {
    font-size: 0.75rem;
    color: var(--warning);
    background: rgba(234, 179, 8, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.live-card-footer-preview {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--live-text-secondary);
}

.live-card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-empty-state {
    text-align: center;
    padding: 2rem;
    background: var(--live-card-bg);
    border-radius: 12px;
    border: 1px dashed var(--live-card-border);
}

.live-empty-text {
    color: var(--live-text-secondary);
    margin: 0;
}

/* ==================== Filter Bar ==================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
    padding: 15px;
    background: var(--live-card-bg);
    border: 1px solid var(--live-card-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    align-items: center;
}

.filter-label {
    font-weight: 600;
    color: var(--live-text-primary);
    margin-right: 10px;
}

.filter-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--live-card-border);
    background: var(--bg-dark);
    color: var(--live-text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
    outline: none;
}

.filter-select:hover,
.filter-select:focus {
    border-color: #3b82f6;
}

.filter-btn-clear {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #ef4444;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn-clear:hover {
    background: rgba(239, 68, 68, 0.1);
}

.filter-count {
    margin-left: auto;
    color: var(--live-text-secondary);
    font-size: 0.9em;
}

/* ==================== Modal Custom Widths ==================== */
@media (min-width: 992px) {

    /* Large video modal to force player expansion */
    .modal-video-custom {
        max-width: 1400px !important;
        width: 95% !important;
        min-width: 1200px;
    }

    /* Monitor modal (3 cards + sidebar) */
    .modal-monitor-custom {
        max-width: 1600px !important;
        width: fit-content !important;
        min-width: 800px;
    }
}

@media (max-width: 991px) {

    .modal-video-custom,
    .modal-monitor-custom {
        max-width: 95% !important;
        width: 95% !important;
        margin: 10px auto;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background-color 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
    background-color: #20b858;
    text-decoration: none;
}

@media (max-width: 500px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}