@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* --- CUSTOM DESIGN SYSTEM & DESIGN TOKENS --- */
:root {
    color-scheme: light;
    --font-header: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Color Palette - Default Light Theme */
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-sidebar: #0f172a; /* Dark sidebar for professional high-contrast SaaS look */
    --border-color: #cbd5e1;
    --border-hover: #94a3b8;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Accents & Gradients */
    --accent-cyan: #0ea5e9;
    --accent-emerald: #10b981;
    --accent-gold: #fbbf24;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    
    --grad-primary: linear-gradient(135deg, #0ea5e9 0%, #10b981 100%);
    --grad-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --grad-danger: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    
    /* Effects - Flat and Clean (No Neon Glows) */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 4px 12px 0 rgba(148, 163, 184, 0.1);
    --card-shadow: 0 4px 16px rgba(148, 163, 184, 0.08);
    --neon-glow: 0 2px 8px rgba(15, 23, 42, 0.05); /* Removed neon glow, replaced with clean shadow */
    --neon-glow-red: 0 2px 8px rgba(239, 68, 68, 0.06);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* Dark Theme overrides (Translucent Glassmorphism, Cyber-Premium Glows) */
[data-theme="dark"] {
    color-scheme: dark;
    --bg-primary: #030712;
    --bg-secondary: #090d16;
    --bg-sidebar: #02040a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 240, 255, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-cyan: #00f0ff;
    --accent-emerald: #00e676;
    --accent-gold: #ffd600;
    --accent-red: #ff1744;
    --accent-purple: #d500f9;
    
    --glass-bg: rgba(9, 13, 22, 0.65);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --card-shadow: 0 8px 32px 0 rgba(0, 240, 255, 0.03);
    --neon-glow: 0 0 15px rgba(0, 240, 255, 0.25);
    --neon-glow-red: 0 0 15px rgba(255, 23, 68, 0.3);
}

/* --- RESET & BASIC STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: #00bfff;
}

input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* --- CORE APP LAYOUT (SPA) --- */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* COLUMN 1: LEFT SIDEBAR */
.app-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: transform var(--transition-normal);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}
.sidebar-logo img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--accent-cyan);
    box-shadow: var(--neon-glow);
}
.logo-main {
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: #fff;
}
.logo-sub {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

/* Sidebar Nav */
.nav-links {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 20px;
    padding-right: 4px;
}

.nav-header {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin: 20px 0 8px 12px;
}
.nav-header:first-of-type {
    margin-top: 0;
}

.nav-header-collapse {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin: 20px 0 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
}
.nav-header-collapse:hover {
    color: var(--accent-cyan);
}
.nav-header-collapse .chevron {
    font-size: 0.6rem;
    transition: transform var(--transition-normal);
}
.nav-header-collapse:not(.active) .chevron {
    transform: rotate(-90deg);
}
.sidebar-cat-wrapper {
    overflow: hidden;
    transition: max-height var(--transition-normal) ease-out;
    max-height: 500px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-cat-wrapper:not(.active) {
    max-height: 0 !important;
}
.sidebar-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-bottom: 4px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.nav-link svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}
.nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.04);
}
.nav-link:hover svg {
    opacity: 1;
}

/* Sidebar Active State */
.nav-item.active > .nav-link {
    color: #fff;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 10px 10px 0;
    font-weight: 600;
}
.nav-item.active > .nav-link svg {
    color: var(--accent-cyan);
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--accent-cyan));
}

/* Sidebar Profile Footer */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
}
.user-avatar-wrapper {
    position: relative;
    width: 38px;
    height: 38px;
}
.user-avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.user-info {
    flex-grow: 1;
    min-width: 0;
}
.user-name {
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}
.user-role {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    text-transform: capitalize;
    font-weight: 600;
}

/* COLUMN 2: MAIN SCROLLING CONTENT PANEL */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 24px 32px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: margin-left var(--transition-normal);
}

/* Fullscreen expansion */
.app-container.expanded .app-sidebar {
    transform: translateX(-260px);
}
.app-container.expanded .main-content {
    margin-left: 0;
}

/* HEADER TOP BAR */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}
.top-bar-title {
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.top-bar-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.theme-toggle-btn:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--neon-glow);
    transform: translateY(-1px);
}
.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}
.theme-toggle-btn:hover svg {
    color: var(--accent-cyan);
}

/* --- PREMIUM CARD COMPONENT (GLASSMORPHISM) --- */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
}
.card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.05), var(--neon-glow);
    transform: translateY(-2px) scale(1.005);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.card-title {
    font-family: var(--font-header);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- STATS GRID --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--neon-glow);
    border-color: var(--accent-cyan);
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.15);
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-value {
    font-family: var(--font-header);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Theme variances for stats icons */
.stat-card.gold .stat-icon {
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent-gold);
    border-color: rgba(251, 191, 36, 0.15);
}
.stat-card.gold:hover {
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.25);
    border-color: var(--accent-gold);
}

.stat-card.danger .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.15);
}
.stat-card.danger:hover {
    box-shadow: var(--neon-glow-red);
    border-color: var(--accent-red);
}

.stat-card.purple .stat-icon {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    border-color: rgba(139, 92, 246, 0.15);
}
.stat-card.purple:hover {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
    border-color: var(--accent-purple);
}

/* --- CHART COMPONENT --- */
.chart-wrapper {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 10px;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
}
.chart-bar-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.chart-bar {
    width: 65%;
    border-radius: 6px 6px 0 0;
    background: var(--grad-primary);
    transition: height 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    min-height: 4px;
}
.chart-bar:hover {
    filter: brightness(1.2);
}
.chart-bar-value {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}
.chart-label {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}
.btn-primary {
    background: var(--grad-primary);
    color: #05080e;
    box-shadow: 0 4px 14px rgba(0, 240, 255, 0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: var(--neon-glow);
}
.btn-danger {
    background: var(--grad-danger);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}
.btn-warning {
    background: var(--grad-gold);
    color: #1a1505;
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
}
.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}
.btn-icon-only {
    padding: 10px;
    border-radius: 10px;
}

/* --- FORMS & INPUTS --- */
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    transition: all var(--transition-fast);
}
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2300f0ff' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position-x: calc(100% - 10px);
    background-position-y: 50%;
    padding-right: 35px;
    cursor: pointer;
}
[data-theme="light"] select.form-input {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23475569' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
}
select.form-input option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}
.form-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: var(--neon-glow);
    background-color: rgba(255, 255, 255, 0.04);
}
.form-textarea {
    min-height: 80px;
    resize: vertical;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Toggle Switch */
.switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .3s;
    border-radius: 50%;
}
.switch input:checked + .slider {
    background-color: rgba(0, 240, 255, 0.15);
    border-color: var(--accent-cyan);
}
.switch input:checked + .slider:before {
    transform: translateX(20px);
    background-color: var(--accent-cyan);
    box-shadow: var(--neon-glow);
}

/* --- DATA TABLES --- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.data-table th, .data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

/* --- BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-warning {
    background-color: rgba(251, 191, 36, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(251, 191, 36, 0.2);
}
.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-info {
    background-color: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

/* --- DISCORD EMBED PREVIEWER --- */
.discord-preview-wrapper {
    background-color: #2f3136;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #dcddde;
    font-size: 0.9rem;
    margin-top: 10px;
    border: 1px solid #202225;
}
.discord-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.discord-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5865f2;
}
.discord-author-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}
.discord-bot-badge {
    background-color: #5865f2;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
}
.discord-message-time {
    color: #72767d;
    font-size: 0.75rem;
}
.discord-message-content {
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
}
.discord-embed {
    background-color: #202225;
    border-left: 4px solid var(--accent-cyan);
    border-radius: 4px;
    padding: 12px;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.discord-embed-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
}
.discord-embed-desc {
    font-size: 0.85rem;
    line-height: 1.35;
    color: #dcddde;
}
.discord-embed-footer {
    font-size: 0.75rem;
    color: #72767d;
    margin-top: 4px;
}

/* --- VIEW STYLING --- */
.view-section {
    animation: slideUpFade var(--transition-normal) ease-out;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

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

/* Pagination container */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 350px;
    width: 100%;
}
.toast {
    background: rgba(13, 19, 33, 0.9);
    border: 1px solid var(--border-color);
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    backdrop-filter: blur(10px);
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all var(--transition-fast);
}
@keyframes toastIn {
    from {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}
.toast.toast-success {
    border-left: 4px solid var(--accent-emerald);
}
.toast.toast-danger {
    border-left: 4px solid var(--accent-red);
}
.toast-icon {
    font-size: 1.25rem;
}
.toast-msg {
    font-size: 0.85rem;
    font-weight: 500;
    flex-grow: 1;
}

/* --- MODAL DIALOGS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(5, 8, 14, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    animation: fadeIn 0.25s ease-out;
}
.modal-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 550px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalIn {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* --- BOUTIQUE / PROFILE ACCENTS --- */
.avatar-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}
.shop-item-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    background: rgba(255,255,255,0.01);
    transition: all var(--transition-fast);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.shop-item-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    background: rgba(255,255,255,0.03);
}
.shop-item-frame-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 8px;
    position: relative;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}
.shop-item-frame {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.shop-item-equipped-tag {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--accent-emerald);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* --- FORMATIONS (ACADEMY LESSON BLOCKS) --- */
.lesson-canvas-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
}
.lesson-block {
    margin-bottom: 24px;
}
.lesson-block-title {
    font-family: var(--font-header);
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.lesson-block-title.h1 { font-size: 2.2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.lesson-block-title.h2 { font-size: 1.6rem; margin-top: 30px; }
.lesson-block-title.h3 { font-size: 1.25rem; }

.lesson-block-alert {
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid transparent;
    margin-bottom: 16px;
}
.lesson-block-alert.info { background: rgba(0, 240, 255, 0.05); border-left-color: var(--accent-cyan); color: #e2f1ff; }
.lesson-block-alert.warning { background: rgba(251, 191, 36, 0.05); border-left-color: var(--accent-gold); color: #fff8e7; }
.lesson-block-alert.success { background: rgba(16, 185, 129, 0.05); border-left-color: var(--accent-emerald); color: #e7ffe7; }
.lesson-block-alert.danger { background: rgba(239, 68, 68, 0.05); border-left-color: var(--accent-red); color: #ffe7e7; }

.lesson-block-step-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.lesson-block-step-item {
    display: flex;
    gap: 16px;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 10px;
}
.lesson-block-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-cyan);
    color: #000;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lesson-block-comparator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.comparator-col {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.comparator-col.good { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.02); }
.comparator-col.bad { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.02); }
.comparator-header { font-weight: 700; margin-bottom: 8px; font-size: 0.95rem; display: flex; align-items: center; gap: 6px;}

.quiz-container {
    background: rgba(255,255,255,0.02);
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-top: 30px;
}
.quiz-opt-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.01);
    text-align: left;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.quiz-opt-btn:hover {
    border-color: var(--accent-cyan);
    background: rgba(255,255,255,0.03);
}
.quiz-opt-btn.correct {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--accent-emerald) !important;
    color: var(--accent-emerald);
}
.quiz-opt-btn.wrong {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: var(--accent-red) !important;
    color: var(--accent-red);
}

/* --- VOICE CHANNELS GRAPHIC BUILDER --- */
.voice-creators-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.voice-creator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    .app-sidebar {
        transform: translateX(-260px);
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .app-container.mobile-active .app-sidebar {
        transform: translateX(0);
    }
}

/* --- CUSTOM DROPDOWN COMPONENT (FIXES WHITE FLASH) --- */
.custom-select {
    position: relative;
    user-select: none;
    width: 100%;
}
.custom-select-trigger {
    width: 100%;
    padding: 10px 14px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
    font-weight: 500;
}
.custom-select-trigger:after {
    content: "▼";
    font-size: 0.7rem;
    color: var(--accent-cyan);
    transition: transform var(--transition-fast);
}
.custom-select.open .custom-select-trigger:after {
    transform: rotate(180deg);
}
.custom-select.open .custom-select-trigger {
    border-color: var(--accent-cyan);
    box-shadow: var(--neon-glow);
    background-color: rgba(255, 255, 255, 0.04);
}
.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}
.custom-select.open .custom-select-options {
    display: block;
}
.custom-select-option {
    padding: 10px 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}
.custom-select-option img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}
.custom-select-option:hover {
    background: rgba(0, 240, 255, 0.08);
    color: var(--accent-cyan);
}
.custom-select-option.selected {
    background: rgba(0, 240, 255, 0.12);
    color: var(--accent-cyan);
    font-weight: 600;
}

/* --- DISCORD CHAT MESSAGE FEED (REPLACES LOGS TABLE) --- */
.chat-message-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    background: rgba(0,0,0,0.15);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-height: 550px;
    overflow-y: auto;
}
.chat-message-card {
    display: flex;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: all var(--transition-fast);
    position: relative;
}
.chat-message-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}
.chat-message-card.violating {
    border-left: 4px solid var(--accent-red);
    background: rgba(239, 68, 68, 0.02);
}
.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.chat-msg-body {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-msg-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.chat-username {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}
.chat-channel-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
}
.chat-timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.chat-content {
    color: #dcddde;
    font-size: 0.92rem;
    word-break: break-word;
    line-height: 1.4;
}
.chat-content strong.flagged-word {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.15);
    padding: 0 4px;
    border-radius: 4px;
}
.chat-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    position: absolute;
    right: 14px;
    top: 10px;
}
.chat-message-card:hover .chat-actions {
    opacity: 1;
}

/* --- SERVER RULES LIST STYLES --- */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.rule-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
}
.rule-item-text {
    font-weight: 500;
    color: var(--text-secondary);
}
.rule-item-text strong {
    color: var(--accent-cyan);
    margin-right: 6px;
}

/* --- SETTINGS TABRED PANEL STYLES --- */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    min-height: 600px;
}
.settings-sidebar {
    width: 240px;
    border-right: 1px solid var(--border-color);
    padding-right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.settings-tab-btn {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 10px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.1);
}
.settings-tab-btn.active {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.2);
    color: var(--accent-cyan);
    box-shadow: var(--neon-glow);
    transform: translateX(4px);
}
.settings-accordion {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings-accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.settings-accordion-header {
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    user-select: none;
    transition: background 0.2s, border-color 0.2s;
}
.settings-accordion-header:hover {
    background: var(--bg-hover);
}
.settings-accordion-header.active {
    background: var(--bg-hover);
}
.settings-accordion-header .chevron {
    transition: transform 0.2s;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.settings-accordion-header.active .chevron {
    transform: rotate(180deg);
}
.settings-accordion-content {
    display: none;
    padding: 24px;
    border-top: 1px solid var(--border-color);
    animation: fadeIn var(--transition-normal) ease-out;
}
.settings-accordion-content.active {
    display: block;
}


/* --- PLAYER MODERATION MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(5, 8, 14, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn var(--transition-fast) ease-out;
}
.mod-player-container {
    width: 820px;
    height: 620px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), var(--neon-glow);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpFade var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
}
.mod-player-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    border-bottom: 1.5px solid var(--border-color);
    padding: 24px 30px 16px 30px;
    position: relative;
}
.mod-player-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}
.mod-player-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.3);
}
.mod-player-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    margin-top: 20px;
    text-align: center;
}
.mod-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mod-stat-item:not(:last-child) {
    border-right: 1px solid var(--border-color);
}
.mod-stat-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}
.mod-stat-value {
    font-family: var(--font-header);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}
.mod-sub-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}
.mod-sub-tab-btn:hover {
    color: #fff;
}
.mod-sub-tab-btn.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}
.mod-mplayer-scroll-view {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 6px;
}
.mod-player-actions-panel {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: fit-content;
}
.mplayer-sanction-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mplayer-message-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.88rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- SUB-PERMISSIONS DETAILS & INTERACTION --- */
.perm-item-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}
.perm-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background var(--transition-fast);
}
.perm-item-header:hover {
    background: rgba(255, 255, 255, 0.02);
}
.perm-toggle-sub {
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}
.perm-toggle-sub:hover {
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
}
.perm-sub-details {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 10px 24px;
    margin: 2px 0 8px 10px;
    border-left: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.12);
    border-radius: 6px;
}

/* --- CUSTOM DROPDOWN SELECT OVERRIDES (PREVENTS WHITE DROPDOWNS) --- */
.custom-select-options {
    background-color: var(--bg-secondary) !important; /* Safe dark theme fallback */
    border: 1px solid var(--border-color) !important;
}
.custom-select-option {
    color: #f8fafc !important; /* Light text color */
}
.custom-select-option:hover {
    background: rgba(0, 240, 255, 0.1) !important;
    color: var(--accent-cyan) !important;
}
.custom-select-option.selected {
    background: rgba(0, 240, 255, 0.15) !important;
    color: var(--accent-cyan) !important;
}

/* Light theme overrides for custom selects */
[data-theme="light"] .custom-select-options {
    background-color: #ffffff !important;
}
[data-theme="light"] .custom-select-option {
    color: #0f172a !important; /* Dark text color */
}
[data-theme="light"] .custom-select-option:hover {
    background: rgba(0, 240, 255, 0.08) !important;
    color: #008fa3 !important;
}
[data-theme="light"] .custom-select-option.selected {
    background: rgba(0, 240, 255, 0.12) !important;
    color: #008fa3 !important;
}

/* Native Select Elements Force Colors (Fallback for browsers showing white-on-white native option dropdowns) */
select, select.form-input {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}
select option {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}
[data-theme="dark"] select, [data-theme="dark"] select.form-input {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}
[data-theme="dark"] select option {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Category header chevrons */
.chevron-icon-cat {
    transition: transform var(--transition-fast);
}

/* --- SETTINGS HORIZONTAL TABS REDESIGN --- */
.settings-tabs-header {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
}

.settings-tabs-header::-webkit-scrollbar {
    height: 4px;
}
.settings-tabs-header::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 4px;
}

.settings-tabs-header .settings-tab-btn {
    text-align: center;
    justify-content: center;
    transform: none !important;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: none;
}

.settings-tabs-header .settings-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateY(-2px) !important;
    border-color: rgba(255, 255, 255, 0.1);
}

.settings-tabs-header .settings-tab-btn.active {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.2);
    color: var(--accent-cyan);
    box-shadow: var(--neon-glow);
    transform: translateY(-2px) !important;
}

/* Custom select z-index fallback override */
.custom-select {
    position: relative !important;
}

.custom-select-options {
    z-index: 9999 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), var(--neon-glow) !important;
}

/* --- PLAYER MODERATION DRAWER REDESIGN --- */
#mod-player-modal {
    align-items: stretch !important;
    justify-content: flex-end !important;
    background-color: rgba(5, 8, 14, 0.45) !important;
    backdrop-filter: blur(4px) !important;
}

#mod-player-modal .mod-player-container {
    width: 480px !important;
    height: 100vh !important;
    border-radius: 20px 0 0 20px !important;
    border-top: none !important;
    border-bottom: none !important;
    border-right: none !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7), var(--neon-glow) !important;
    animation: slideRightOut 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes slideRightOut {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* --- EXPEDITIONS & DISPATCH SYSTEM --- */
.calendar-day-cell {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 110px;
}

.calendar-day-cell:hover {
    background: var(--bg-primary);
    border-color: var(--accent-cyan);
}


.calendar-day-cell.other-month {
    opacity: 0.25;
}

.calendar-day-cell.today {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
}

.calendar-day-cell .day-number {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

.calendar-day-cell.today .day-number {
    color: var(--accent-cyan);
}

.calendar-event-pill {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    margin-bottom: 2px;
}

.calendar-event-pill.meeting {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
}

.calendar-event-pill.expedition {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
}

/* Dispatcher Drag & Drop Styles */
.dispatch-dropzone.dragover {
    border-color: var(--accent-cyan) !important;
    background: rgba(6, 182, 212, 0.05) !important;
}

.dispatch-player-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    user-select: none;
    transition: all 0.2s ease;
}

.dispatch-player-card:active {
    cursor: grabbing;
}

.dispatch-player-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.dispatch-player-card img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.dispatch-player-card span {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dispatch-ship-box {
    background: rgba(19, 26, 44, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dispatch-ship-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dispatch-slot {
    background: rgba(15, 23, 42, 0.4);
    border: 1.5px dashed var(--border-color);
    border-radius: 6px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: all 0.2s ease;
}

.dispatch-slot.filled {
    border-style: solid;
    background: transparent;
    border-color: var(--border-color);
}

.dispatch-slot.dragover {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.05);
}

.dispatch-slot-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preset-card {
    background: rgba(19, 26, 44, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.preset-card:hover {
    border-color: var(--accent-cyan);
    background: rgba(19, 26, 44, 0.5);
}

.preset-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preset-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
}

.preset-composition {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* --- SIDEBAR SUBMENU COLLAPSIBLE GRID --- */
.sidebar-submenu-grid {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px 14px 12px 14px;
    margin-top: 4px;
    animation: slideDownFade var(--transition-fast) ease-out;
}
.sidebar-submenu-grid.active {
    display: grid;
}
.submenu-btn {
    font-size: 0.72rem !important;
    padding: 8px 6px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    justify-content: center !important;
    text-align: center !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    color: var(--text-secondary) !important;
    gap: 4px !important;
    transition: all var(--transition-fast) !important;
}
.submenu-btn:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}
.submenu-btn.active {
    color: #fff !important;
    background: rgba(0, 240, 255, 0.12) !important;
    border: 1px solid rgba(0, 240, 255, 0.3) !important;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1) !important;
}
