/* 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 ==================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    /* Compact padding */
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    /* Reduced gap */
    font-weight: 600;
    font-size: 1rem;
    /* Slightly smaller */
}

.logo {
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 0.15rem;
    /* Tighter gap */
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    /* Significantly reduced horizontal padding */
    border-radius: var(--radius);
    transition: all 0.2s;
    font-size: 0.85rem;
    /* Smaller font for menu */
    white-space: nowrap;
    /* Prevent individual wrapping */
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.nav-links a.active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

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

.btn-logout {
    color: var(--danger);
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    /* Match links */
    border-radius: var(--radius);
    transition: all 0.2s;
}

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

/* ==================== 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);
    }

    .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;
    }
}