:root {
    --bg: #050505;
    --card-bg: #0d0d0d;
    --primary: #dc2626;
    /* Solid Crimson Red */
    --primary-light: #ef4444;
    --primary-dark: #991b1b;
    --accent: #facc15;
    /* Gold accent */
    --text: #ffffff;
    --text-dim: #a1a1aa;
    --glass-border: rgba(255, 255, 255, 0.08);
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Outfit', 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: hidden;
}


a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #ffffff;
}

.glass {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

nav.nav-bar {
    border-bottom: 1px solid var(--glass-border);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 0 0 40px 0;
    padding: 15px 0;
}

/* Bento Grid System for Dashboards */
.bento-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(12, 1fr);
    margin-top: 20px;
    align-items: start;
}

@media (max-width: 1024px) {
    .bento-grid>.sentiment-card {
        grid-column: span 12 !important;
    }
}

/* If screen is small, maybe less padding */
@media (max-width: 768px) {
    nav.nav-bar {
        padding: 10px 0;
    }
}

.logo {
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: -1px;
    color: var(--primary);
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* Dropdown styling */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 10px;
    background-color: var(--card-bg);
    min-width: 380px;
    max-width: 90vw;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    z-index: 1001;
    overflow: hidden;
}

/* Invisible bridge to keep hover state active while crossing the gap */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 20px;
    background: transparent;
}

.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown.active .nav-dropdown-content {
    display: block !important;
    animation: fadeIn 0.15s ease-in-out;
}

.nav-dropdown-item {
    color: var(--text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--primary-light);
}

.nav-dropdown-item.danger:hover {
    background-color: rgba(220, 38, 38, 0.1);
    color: #ef4444;
}

.logo img {
    height: 24px;
    width: auto;
    display: block;
}

.logo span {
    color: white;
}

header {
    padding: 20px 0 40px;
    text-align: center;
}

h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-top: 0;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    color: white;
}

h1 span {
    color: var(--primary);
}

.page-title {
    font-size: 2.8rem;
    letter-spacing: -1px;
    margin-bottom: 15px;
    line-height: 1.1;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 20px auto;
}

/* Navigation Utilities */
.btn.nav-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Feature Card System */
.feature-card {
    text-align: left;
    padding: 30px;
}

.feature-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.feature-description {
    color: var(--text-dim);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Global Utilities */
.empty-state-text {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    padding: 15px 0;
}

.nav-search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 12px;
    margin: 0 20px;
    transition: all 0.2s ease;
    flex: 0 1 300px;
    width: 100%;
}

.nav-search-container:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-search-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
    text-transform: uppercase;
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    text-transform: none;
}

.nav-search-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 8px;
    transition: color 0.2s ease;
}

.nav-search-btn:hover {
    color: white;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 650px;
    margin: 0 auto;
}

/* Pricing Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 100px;
}

.card {
    padding: 48px 32px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #0d0d0d;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.1);
}

.card.popular {
    border: 2px solid var(--primary);
}

.card.active-plan {
    border: 2px solid var(--accent);
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.2);
    transform: translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.tier-name {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.price {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price span {
    font-size: 1.25rem;
    color: var(--text-dim);
    font-weight: 400;
}

ul {
    list-style: none;
    padding: 0;
    margin-bottom: 3rem;
    flex-grow: 1;
}

li {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-dim);
}

li strong {
    color: white;
}

li svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.2);
}

.btn-secondary {
    background: #262626;
    color: white;
}

.btn-secondary:hover {
    background: #333333;
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

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

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    padding: 60px 0 0 0;
}

.user-sidebar {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-content {
    padding: 40px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin-bottom: 24px;
    object-fit: cover;
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 12px;
}

.status-online {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-offline {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary-light);
}

.stat-card {
    background: #121212;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

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

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Footer & Socials */
footer {
    padding: 60px 0;
    margin-top: 50px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.social-link {
    color: var(--text-dim);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border: 1px solid var(--glass-border);
}

.social-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 71, 71, 0.2);
    background: rgba(255, 71, 71, 0.05);
}

.social-link svg {
    width: 16px;
    height: 16px;
}

.footer-nav {
    display: flex;
    gap: 24px;
    font-size: 0.9rem;
    font-weight: 600;
}

.footer-nav a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: white;
}

@media (max-width: 768px) {
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }

    .profile-row-1,
    .profile-row-2 {
        gap: 15px;
        margin-top: 15px;
    }

    .container {
        padding: 0 10px;
    }

    .stat-card {
        padding: 12px;
    }
}

/* Admin Panel */
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.admin-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card-glass {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-val {
    font-size: 2rem;
    font-weight: bold;
}

.stat-label-dim {
    color: var(--text-dim);
}

.quick-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.bot-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.config-tile {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

.config-status {
    color: #4ade80;
    font-size: 0.8em;
    margin-top: 5px;
}

.user-mgmt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-form {
    flex: 1;
    max-width: 400px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

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

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.user-table th {
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
}

.user-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
}

.tier-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.discord-id {
    font-family: monospace;
    color: var(--text-dim);
}

.health-grid {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.health-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    flex: 1;
    min-width: 150px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-log-viewer {
    background: black;
    color: #e4e4e7;
    font-family: monospace;
    padding: 15px;
    border-radius: 8px;
    height: 300px;
    overflow-y: auto;
    border: 1px solid #333;
    white-space: pre-wrap;
    font-size: 0.9em;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-glass {
    padding: 25px;
    width: 90%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    animation: fadeIn 0.2s ease;
    text-align: center;
}

.input-group {
    margin-bottom: 15px;
}

.input-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-dim);
}

.input-field {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
}

.select-field {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Logs */
.log-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Unified Navigation */
/* Unified Navigation */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    width: 100%;
    /* Ensure full width */
    position: relative;
    /* Context */
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.nav-socials {
    display: flex;
    gap: 12px;
    margin-left: 10px;
    align-items: center;
    height: 32px;
}

.nav-social-link {
    color: var(--text-dim);
    display: flex;
    align-items: center;
}

.nav-social-link:hover {
    color: white;
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

/* TradingView Logo Hider */
.tradingview-widget-copyright {
    display: none !important;
}

.mobile-only {
    display: none;
}

/* Mobile Bottom Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    z-index: 2000;
    padding: 12px 0;
    padding-bottom: env(safe-area-inset-bottom, 15px);
}

.mobile-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.7rem;
    gap: 4px;
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    color: var(--primary);
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
}

/* Responsive Navigation Override */
@media (max-width: 768px) {
    body {
        padding-bottom: 75px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 20px 0;
    }

    .user-sidebar,
    .main-content {
        padding: 20px;
    }

    .nav-bar {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
    }

    .nav-left {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .nav-left .btn-primary {
        display: none !important;
    }

    .nav-actions {
        margin-left: auto;
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .nav-actions .btn-secondary,
    .nav-actions .btn-danger {
        display: none !important;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-only {
        display: flex;
        flex-direction: column;
    }

    .desktop-only {
        display: none !important;
    }

    .nav-search-container {
        display: none !important;
    }

    /* Global Mobile Layout Fixes */
    .container {
        padding: 0 15px;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Force tables and wide containers to scroll instead of pushing viewport */
    .table-responsive,
    .glass-panel,
    div[style*="min-width"] {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card,
    .stat-card-glass,
    .health-card {
        padding: 24px 16px !important;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pricing-grid .card {
        padding: 30px 20px !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .profile-row-1,
    .profile-row-2 {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .user-sidebar,
    .paper-trading-hub,
    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        box-sizing: border-box;
    }

    .stat-card {
        padding: 15px !important;
    }

    .bento-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Chart Page Fixes */
    .chart-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
        padding: 15px !important;
    }

    .chart-controls {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .chart-main-row {
        flex-direction: column !important;
    }

    .chart-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--glass-border) !important;
    }

    /* Nav bar refinement */
    .nav-actions .btn-secondary:not(:last-child) {
        display: none !important;
    }

    .nav-left .logo span {
        display: none;
    }

    /* Aggressive Multi-column Stacking */
    .bento-grid,
    .terminal-grid,
    .sentiment-grid,
    .stats-grid,
    .dashboard-grid,
    .terminal-bottom {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        gap: 20px !important;
        height: auto !important;
        min-height: auto !important;
    }

    .bento-grid>*,
    .terminal-grid>*,
    .sentiment-grid>*,
    .stats-grid>*,
    .terminal-bottom>*,
    .profile-row-1>*,
    .profile-row-2>* {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        flex: none !important;
        box-sizing: border-box;
    }

    /* Fix Chart Specific Overflows */
    .ticker-header-container {
        height: auto !important;
        padding: 10px !important;
        flex-wrap: wrap !important;
    }
}

.nav-discord-link {
    color: #5865F2;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-discord-link:hover {
    text-decoration: underline;
}

/* Notification Badge */
.nav-notif-link {
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
}

.nav-notif-link:hover {
    color: white;
}

.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    display: none;
    border: 1px solid #1a1a1a;
}

/* Common Components */
.price-tag {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.price-period {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 400;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Notifications Page */
.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.notif-list {
    min-height: 200px;
}

.notif-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.2s;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.notif-unread {
    border-left: 3px solid var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

.notif-icon {
    font-size: 1.2rem;
    min-width: 30px;
    text-align: center;
}

.notif-content {
    flex: 1;
}

.notif-time-display {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.settings-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

/* Custom Scrollbar for Containers */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* Markdown AI Outputs */
.markdown-body {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text);
}

.markdown-body h1 {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.markdown-body h2 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.markdown-body h3,
.markdown-body h4 {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.markdown-body p {
    margin-bottom: 0.5rem;
}

.markdown-body p:last-child {
    margin-bottom: 0;
}

.markdown-body ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
}

.markdown-body ol {
    list-style: decimal;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
}

.markdown-body li {
    display: list-item;
    margin-bottom: 0.1rem;
    font-size: 0.85rem;
    color: var(--text);
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.markdown-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85em;
    color: var(--accent);
}

.markdown-body strong {
    color: white;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.02);
}

/* ==== Global CSS Refactor Utilities ==== */

/* Forms & Inputs */
.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

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

.form-control option {
    background: #111;
}

/* Modals */
.modal-close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--primary);
}

/* Card Headers */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title-icon {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

/* Typography Utilities */
.text-dim {
    color: var(--text-dim) !important;
}

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

.text-success {
    color: #4ade80 !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.fw-bold {
    font-weight: bold !important;
}

.fw-normal {
    font-weight: normal !important;
}

/* Flexbox Layout Utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
}

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

.flex-start {
    display: flex;
    justify-content: flex-start;
}

.align-center {
    align-items: center;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

/* Margin Overrides */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 8px !important;
}

.mb-3 {
    margin-bottom: 12px !important;
}

.mb-4 {
    margin-bottom: 20px !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-2 {
    margin-top: 8px !important;
}

.mt-3 {
    margin-top: 12px !important;
}

.mt-4 {
    margin-top: 20px !important;
}

/* ==== Deep CSS Optimization Components ==== */

/* Tables & Lists */
.table-header {
    padding: 8px 16px;
    font-weight: 500;
    flex-shrink: 0;
}

.list-divider {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.list-divider-light {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Admin Dashboard Specifics */
.admin-glass-card {
    padding: 24px;
    margin-bottom: 30px;
}

.admin-header {
    margin: 0;
    font-size: 1.8rem;
}