@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Rajdhani:wght@500;600;700&family=Share+Tech+Mono&display=swap');

:root {
    /* 2026 Ultra-Realistic Tactical Hardware Palette */
    --bg-dark: #070709; /* Deep matte graphite */
    --bg-panel: #111114; /* Raised panel */
    --bg-inset: #040405; /* Sunken screen area */
    
    --border-dim: #1c1c22;
    --border-light: #2c2c36;
    --border-highlight: rgba(255, 255, 255, 0.05);
    
    /* Neon Accents (Laser LEDs) */
    --accent-cyan: #00d2ff;
    --accent-red: #ff2a2a;
    --accent-green: #00ff66;
    --accent-purple: #b026ff;

    /* Text */
    --text-main: #d4d4dc;
    --text-muted: #6b6b78;
    --text-led: #8affb1;

    /* Hardware Shadows (Neo-brutal/3D realism) */
    --shadow-raised: 8px 8px 16px rgba(0, 0, 0, 0.9), -2px -2px 8px rgba(255, 255, 255, 0.015);
    --shadow-inset: inset 4px 4px 8px rgba(0, 0, 0, 0.8), inset -1px -1px 2px rgba(255, 255, 255, 0.02);
    --shadow-glow: 0 0 15px rgba(0, 210, 255, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    /* Carbon fiber/Micro-texture noise overlaid on Cyberpunk background */
    background-image: 
        linear-gradient(rgba(7, 7, 9, 0.3), rgba(7, 7, 9, 0.6)),
        url("data:image/svg+xml,%3Csvg width='4' height='4' viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3h1v1H1V3zm2-2h1v1H3V1z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"),
        url('/assets/dashboard-bg.png?v=2');
    background-size: auto, auto, cover;
    background-position: center, center, center;
    background-attachment: fixed, fixed, fixed;
}

h1, h2, h3, h4, .brand h1, .nav-header {
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Primary Top Navigation */
.primary-navbar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    height: 60px;
    z-index: 9999; /* Guarantees navbar and its dropdowns always stay above all dynamic floating window cards */
    position: relative;
    /* Subtle edge highlight for physical thickness */
    border-bottom: 1px solid var(--border-highlight);
}

.brand {
    display: flex;
    align-items: center;
    margin-right: 3rem;
    min-width: fit-content;
}

.brand-icon {
    width: 20px;
    height: 20px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    margin-right: 12px;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.brand h1 {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 700;
}

.nav-section-horiz {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-section-horiz ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-section-horiz li {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    height: 60px; /* span full width of navbar for hover effect */
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    position: relative;
}

.nav-section-horiz li:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.nav-section-horiz li.active {
    color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.05);
}

.nav-section-horiz li.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-cyan);
    box-shadow: 0 -2px 10px var(--accent-cyan);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.topbar {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-dim);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 5;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-inset);
    border: 1px solid var(--border-dim);
    box-shadow: var(--shadow-inset);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    width: 280px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 13px;
    margin-left: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1.5rem;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-header h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

/* Physical Buttons */
.btn-primary {
    background: linear-gradient(180deg, #1f1f26 0%, #15151a 100%);
    color: #fff;
    border: 1px solid var(--border-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.8);
    padding: 0.6rem 1.2rem;
    border-radius: 3px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.1s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 -2px 10px var(--accent-cyan);
    opacity: 0.8;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #25252d 0%, #1a1a20 100%);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.8), inset 0 2px 4px rgba(0,0,0,0.5);
    border-top: 1px solid var(--border-dim);
}

/* Hardware Panels */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: 4px;
    box-shadow: var(--shadow-raised);
    position: relative;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px 4px 0 0;
}

/* Fleksibelt System for Server Cards */
.servers-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    /* Tillad scrolling når der er mange servere */
    overflow-y: auto; 
    padding: 16px 32px;
}

/* Server Card */
.server-card {
    display: flex;
    flex-direction: column;
    height: 360px;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-dim);
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.server-title {
    font-size: 1.1rem;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
}

.server-address {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Share Tech Mono', monospace;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-inset);
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid var(--border-dim);
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.5);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

.server-card.online .status-dot {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}
.server-card.error .status-dot,
.server-card.disconnected .status-dot {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.status-text {
    font-size: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.server-card.online .status-text { color: var(--accent-green); }
.server-card.error .status-text,
.server-card.disconnected .status-text { color: var(--accent-red); }

/* Badges */
.query-info {
    padding: 0.5rem 1.2rem;
    display: flex;
    gap: 10px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-light);
}

.info-badge {
    font-size: 11px;
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-muted);
    background: var(--bg-inset);
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid var(--border-dim);
}

/* Console Area (Sunken CRT/Screen effect) */
.console-wrapper {
    flex: 1;
    background: var(--bg-inset);
    padding: 0.75rem;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-inset);
}

/* Scanline overlay for screen realism */
.console-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
}

.console-output {
    height: 100%;
    overflow-y: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--text-led);
    text-shadow: 0 0 5px rgba(138, 255, 177, 0.4);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    position: relative;
    z-index: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-inset);
    border-left: 1px solid var(--border-dim);
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Command & Chat Forms */
.command-form,
.chat-form {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-dim);
}

.prompt-symbol {
    color: var(--accent-cyan);
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    margin-right: 12px;
}

.command-input,
.chat-input {
    flex: 1;
    background: var(--bg-inset);
    border: 1px solid var(--border-dim);
    box-shadow: var(--shadow-inset);
    color: var(--text-led);
    font-family: 'Share Tech Mono', monospace;
    outline: none;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 2px;
}

.chat-input {
    color: #e2aeff; /* distinct chat color */
}

.btn-send {
    background: linear-gradient(180deg, #1f1f26 0%, #15151a 100%);
    border: 1px solid var(--border-dim);
    color: var(--accent-cyan);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: all 0.1s;
}

.btn-send:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    transform: translateY(1px);
}

.btn-send svg {
    width: 14px;
    height: 14px;
}

.btn-disconnect {
    background: linear-gradient(180deg, #2a0b12 0%, #1a0509 100%);
    color: var(--accent-red);
    border: none;
    border-top: 1px solid var(--border-dim);
    padding: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.btn-disconnect:hover {
    background: linear-gradient(180deg, #3a1019 0%, #200509 100%);
}
.btn-disconnect:active {
    background: var(--bg-inset);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.8);
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s 0.2s;
}

.modal-content {
    width: 100%;
    max-width: 580px;
    padding: 2.5rem;
    transform: scale(1);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.05);
}

.modal.hidden .modal-content {
    transform: scale(0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-dim);
}

.modal-header h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-header h3::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: var(--accent-cyan);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.btn-close:hover { color: #fff; }

/* Forms */
.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 15px;
}

.flex-1 { flex: 1; min-width: 0; }
.flex-2 { flex: 2; min-width: 0; }

form label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

form input,
form select {
    width: 100%;
    background: var(--bg-inset);
    border: 1px solid var(--border-dim);
    border-radius: 3px;
    padding: 10px 12px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    box-shadow: var(--shadow-inset);
    transition: all 0.2s;
    appearance: none;
}

form select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

form input:focus,
form select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 1px var(--accent-cyan), var(--shadow-inset);
}

.modal-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    pointer-events: none; /* Forhindrer usynlig boks i at stjæle mouse clicks */
}

select.bm-sender-label {
    display: block; /* Flex på et select element saboterer scroll/klik i visse browsere */
    appearance: auto;
    -webkit-appearance: auto;
    cursor: pointer;
    width: auto;
}

.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    color: #fff;
    padding: 1rem 1.5rem;
    pointer-events: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border-left: 4px solid var(--accent-cyan);
}

.toast.error { border-left-color: var(--accent-red); }
.toast.success { border-left-color: var(--accent-green); }

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   BattleMetrics-Inspired Server Card — Premium
   ============================================ */
.bm-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 480px;
    height: 460px;
    max-width: 100%;
    min-height: 420px;
    background: #0c0c10;
    border: 1px solid rgba(122, 85, 237, 0.15);
    border-radius: 10px;
    overflow: hidden;
    resize: both;
    position: relative;
    isolation: isolate;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.bm-card:hover {
    border-color: rgba(122, 85, 237, 0.3);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(122, 85, 237, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.bm-card:focus-within {
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(122, 85, 237, 0.15),
        0 0 0 1px rgba(122, 85, 237, 0.5);
    border-color: rgba(122, 85, 237, 0.5);
}

/* --- Card Header --- */
.bm-header {
    background: linear-gradient(135deg, #0f0f16 0%, #141420 50%, #0f0f16 100%);
    color: #a78bfa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 14px;
    height: 44px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid rgba(122, 85, 237, 0.15);
    cursor: grab;
    user-select: none;
    position: relative;
}

/* Subtle animated shimmer line at header bottom */
.bm-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(122, 85, 237, 0.4), transparent);
    animation: shimmer-line 4s ease-in-out infinite;
}

@keyframes shimmer-line {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.bm-header:active {
    cursor: grabbing;
}

.bm-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    margin-right: 15px;
}

.bm-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: #e2d8ff;
    text-shadow: 0 0 12px rgba(167, 139, 250, 0.3);
}

.bm-icon {
    width: 16px;
    height: 16px;
    color: rgba(122, 85, 237, 0.6);
    filter: drop-shadow(0 0 3px rgba(122, 85, 237, 0.4));
}

.bm-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #999;
    font-weight: 600;
    font-size: 12px;
}

.bm-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 11px;
    white-space: nowrap;
    transition: background 0.2s;
}

.bm-stat:hover {
    background: rgba(122, 85, 237, 0.08);
}

.bm-tool-btn {
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}
.bm-tool-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.1);
}

/* --- Body Split --- */
.bm-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
}

/* --- Left Sidebar (Players) --- */
.bm-sidebar {
    width: 220px;
    min-width: 140px;
    max-width: 60%;
    background: linear-gradient(180deg, #0d0d12 0%, #0a0a0f 100%);
    border-right: 1px solid rgba(122, 85, 237, 0.1);
    display: flex;
    flex-direction: column;
    resize: horizontal;
    overflow: hidden;
    position: relative;
}

/* Faded top-edge glow */
.bm-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(180deg, rgba(122, 85, 237, 0.04), transparent);
    pointer-events: none;
    z-index: 1;
}

.bm-sidebar .players-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
}

.bm-sidebar .players-list li {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #8fb8e0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease;
    position: relative;
    animation: player-fade-in 0.3s ease;
}

@keyframes player-fade-in {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

.bm-sidebar .players-list li:hover {
    background: rgba(122, 85, 237, 0.08);
    color: #c4d5ff;
    padding-left: 18px;
}

.bm-sidebar .players-list li::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
    flex-shrink: 0;
}

/* --- Right Main Content (Console) --- */
.bm-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #080810 0%, #060609 100%);
    position: relative;
}

.bm-main .console-wrapper {
    flex: 1;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 12px 14px;
    position: relative;
}

.bm-main .console-wrapper::after { display: none; }

.bm-main .console-output {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    color: #c8c8d4;
    text-shadow: none;
    line-height: 1.7;
}

/* --- Console Message Styling --- */
.bm-main .console-output > div {
    padding: 3px 10px;
    margin: 1px 0;
    border-radius: 4px;
    border-left: 3px solid transparent;
    transition: background 0.15s;
}

.bm-main .console-output > div:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* --- Footer Inputs (Premium) --- */
.bm-footer {
    display: flex;
    background: linear-gradient(180deg, #111118 0%, #0e0e14 100%);
    height: 42px;
    align-items: center;
    padding: 0 6px;
    gap: 4px;
    border-top: 1px solid rgba(122, 85, 237, 0.1);
    border-radius: 0 0 10px 10px;
}

.bm-sender-label {
    color: #a78bfa;
    background: rgba(122, 85, 237, 0.1);
    padding: 0 12px;
    height: 30px;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(122, 85, 237, 0.15);
    border-radius: 5px;
    transition: all 0.2s;
}

.bm-sender-label:hover {
    border-color: rgba(122, 85, 237, 0.3);
    background: rgba(122, 85, 237, 0.15);
}

.bm-form {
    display: flex;
    height: 30px;
    margin: 0;
    padding: 0;
    background: transparent;
}

.bm-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #e0e0f0;
    padding: 0 10px;
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    outline: none;
    border-radius: 5px;
    transition: all 0.2s;
}

.bm-input::placeholder {
    color: #444;
}

.bm-input:focus {
    background: rgba(122, 85, 237, 0.06);
    border-color: rgba(122, 85, 237, 0.3);
    box-shadow: 0 0 0 2px rgba(122, 85, 237, 0.08);
}

.bm-send-btn {
    background: linear-gradient(135deg, rgba(122, 85, 237, 0.2), rgba(122, 85, 237, 0.1));
    border: 1px solid rgba(122, 85, 237, 0.2);
    color: #a78bfa;
    padding: 0 16px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-radius: 5px;
    transition: all 0.2s;
}

.bm-send-btn:hover {
    background: linear-gradient(135deg, rgba(122, 85, 237, 0.35), rgba(122, 85, 237, 0.2));
    color: #fff;
    box-shadow: 0 0 12px rgba(122, 85, 237, 0.2);
    transform: translateY(-1px);
}

.bm-send-btn:active {
    transform: translateY(0);
}

/* ============================================
   Fullscreen Server Card Mode
   ============================================ */

/* Dark backdrop behind fullscreen card */
.bm-fullscreen-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 9998;
    animation: fs-backdrop-in 0.3s ease forwards;
}

@keyframes fs-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fs-backdrop-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* The card in fullscreen mode */
.bm-card.fullscreen-mode {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 40px) !important;
    max-width: none !important;
    z-index: 9999 !important;
    resize: none !important;
    border-radius: 14px;
    border-color: rgba(122, 85, 237, 0.4);
    box-shadow:
        0 0 60px rgba(122, 85, 237, 0.15),
        0 25px 80px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: fs-card-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fs-card-in {
    from {
        opacity: 0.5;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fs-card-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

/* Fullscreen header gets more space and a glow bar */
.bm-card.fullscreen-mode .bm-header {
    height: 52px;
    padding: 0 20px;
    border-radius: 14px 14px 0 0;
}

.bm-card.fullscreen-mode .bm-title {
    font-size: 18px;
}

.bm-card.fullscreen-mode .bm-stat {
    font-size: 12px;
    padding: 4px 10px;
}

/* Sidebar widens in fullscreen */
.bm-card.fullscreen-mode .bm-sidebar {
    width: 280px;
    min-width: 200px;
}

.bm-card.fullscreen-mode .bm-sidebar .players-list li {
    padding: 11px 18px;
    font-size: 13.5px;
}

/* Console gets bigger font */
.bm-card.fullscreen-mode .bm-main .console-output {
    font-size: 13.5px;
    line-height: 1.8;
}

.bm-card.fullscreen-mode .bm-main .console-output > div {
    padding: 5px 14px;
    margin: 2px 0;
}

/* Footer enlarges */
.bm-card.fullscreen-mode .bm-footer {
    height: 48px;
    padding: 0 10px;
    gap: 6px;
    border-radius: 0 0 14px 14px;
}

.bm-card.fullscreen-mode .bm-form {
    height: 34px;
}

.bm-card.fullscreen-mode .bm-input {
    font-size: 14px;
    padding: 0 14px;
}

.bm-card.fullscreen-mode .bm-send-btn {
    font-size: 13px;
    padding: 0 20px;
}

.bm-card.fullscreen-mode .bm-sender-label {
    height: 34px;
    font-size: 13px;
}

/* Fullscreen button glow when active */
.bm-card.fullscreen-mode .btn-fullscreen {
    color: #a78bfa !important;
    text-shadow: 0 0 8px rgba(167, 139, 250, 0.6);
}

/* -------------------------------------------
   Player Context Menu (Kick/Ban Modals)
------------------------------------------- */
.context-menu {
    position: absolute;
    z-index: 10000;
    width: 200px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
    color: #eee;
    user-select: none;
}
.context-menu.hidden {
    display: none;
}
.context-header {
    background: #1a1a1a;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #888;
    border-bottom: 1px solid #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.context-menu-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}
.ctx-item {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s;
}
.ctx-item:hover {
    background: #222;
    color: #fff;
}
.ctx-warning:hover {
    background: #b17e17;
    color: #111;
}
.ctx-danger:hover {
    background: #8e1f1f;
    color: #fff;
}
.ctx-divider {
    height: 1px;
    background: #222;
    margin: 4px 0;
}

li.clickable-player {
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
li.clickable-player:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #00ccff !important;
}

/* -------------------------------------------
   Global Action Bar (Top Navigation)
------------------------------------------- */
/* -------------------------------------------
   Global Action Bar (Sleek Redesign)
------------------------------------------- */
.global-bar {
    display: flex;
    align-items: center;
    background: rgba(10, 10, 14, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    margin: 0;
    padding: 0 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gb-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 2px;
}

.gb-btn-icon {
    background: transparent;
    border: none;
    color: #888;
    width: 44px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px 0 0 6px;
    transition: all 0.2s;
}
.gb-btn-icon .icon { width: 18px; height: 18px; }
.gb-btn-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.gb-dropdown-container {
    height: 100%;
    position: relative;
}

.gb-btn {
    background: transparent;
    border: none;
    color: #bbb;
    padding: 0 16px;
    height: 100%;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.gb-btn .icon.arrow { width: 14px; height: 14px; transition: transform 0.2s; }
.gb-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.gb-input-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    flex: 1;
}

.gb-prefix {
    color: var(--accent-cyan);
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    padding-left: 14px;
    font-size: 15px;
}

.gb-input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0 12px;
    height: 100%;
    width: 380px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
}
.gb-input::placeholder { color: #555; font-family: 'Inter', sans-serif; }
.gb-input:focus { outline: none; }

.gb-action-btn {
    background: rgba(0, 204, 255, 0.1);
    border: none;
    border-left: 1px solid rgba(0, 204, 255, 0.2);
    color: var(--accent-cyan);
    padding: 0 20px;
    height: 100%;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}
.gb-action-btn:hover {
    background: rgba(0, 204, 255, 0.25);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.15);
}

.gb-dropdown-content {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 260px;
    background: rgba(12, 12, 14, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.gb-dropdown-content.hidden {
    display: none;
}
.gb-header {
    padding: 10px 14px;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0,0,0,0.2);
    letter-spacing: 1px;
}
.gb-dropdown-content a {
    padding: 10px 14px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #aaa;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}
.gb-dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* -------------------------------------------
   Player Profile Modal (Dossier Mode)
------------------------------------------- */
.profile-content {
    max-width: 600px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 204, 255, 0.2);
}

.profile-meta {
    margin-top: 5px;
    display: flex;
    gap: 15px;
    align-items: center;
}
.profile-meta .badge {
    background: #222;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #aaa;
    border: 1px solid #444;
}

.profile-actions {
    display: flex;
    gap: 15px;
    padding: 20px 25px 0;
}
.profile-actions button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Rajdhani', sans-serif;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: filter 0.2s;
}
.profile-actions button:hover {
    filter: brightness(1.2);
}
.profile-kick {
    background: linear-gradient(135deg, #d49a17, #8e6205);
    color: #fff;
    box-shadow: 0 0 10px rgba(212, 154, 23, 0.5);
}
.profile-ban {
    background: linear-gradient(135deg, #d32f2f, #8b0000);
    color: #fff;
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.5);
}

.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 25px 25px;
}
.profile-section h3 {
    font-family: 'Rajdhani', sans-serif;
    color: #777;
    font-size: 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.admin-log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 120px;
    overflow-y: auto;
    background: #111;
    border: 1px solid #222;
    border-radius: 4px;
}
.admin-log-list li {
    padding: 8px 12px;
    font-size: 13px;
    font-family: monospace;
    border-bottom: 1px solid #1a1a1a;
    color: #ccc;
}
.admin-log-list li:last-child {
    border: none;
}
.log-action-kick { color: #d49a17; font-weight: bold; }
.log-action-ban { color: #d32f2f; font-weight: bold; }

.chat-history-box {
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    height: 180px;
    overflow-y: auto;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    color: #ddd;
    line-height: 1.4;
}
.chat-history-box p {
    margin: 0 0 4px 0;
}
.chat-history-box .chat-date {
    color: #666;
    margin-right: 8px;
}

/* -------------------------------------------
   Target Selector Rules
------------------------------------------- */
.target-list-box {
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.target-list-box label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-family: Arial, sans-serif;
    color: #ccc;
    padding: 6px;
    border-radius: 3px;
    transition: background 0.1s;
}
.target-list-box label:hover {
    background: #222;
}
.target-list-box input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}
.chk-all-item {
    border-bottom: 1px solid #333;
    padding-bottom: 10px !important;
    margin-bottom: 5px;
    font-weight: bold;
    color: #fff !important;
}

/* -------------------------------------------
   Global Action Bar
------------------------------------------- */
.global-bar {
    display: flex;
    align-items: center;
    background: rgba(15, 15, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin: 15px 32px 5px 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    height: 48px;
    flex-shrink: 0;
}

.gb-dropdown-container {
    position: relative;
    height: 100%;
}

.gb-btn {
    height: 100%;
    padding: 0 20px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px 0 0 6px;
}

.gb-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.gb-dropdown-content {
    position: absolute;
    top: 55px;
    left: 0;
    width: 280px;
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.gb-header {
    padding: 10px 15px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    border-bottom: 1px solid var(--border-dim);
    background: rgba(0, 210, 255, 0.05);
}

.gb-dropdown-content a {
    padding: 12px 15px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.gb-dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding-left: 20px;
}

.gb-divider {
    width: 1px;
    height: 24px;
    background: var(--border-highlight);
    margin: 0 15px;
}

.gb-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    height: 100%;
    padding-right: 15px;
}

.gb-prefix {
    color: var(--accent-cyan);
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    margin-right: 8px;
    user-select: none;
}

.gb-input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    height: 100%;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    outline: none;
}

.gb-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.gb-action-btn {
    height: 100%;
    padding: 0 25px;
    background: var(--accent-cyan);
    border: none;
    color: #000;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    transition: all 0.2s;
}

.gb-action-btn:hover {
    background: #4de1ff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}


/* SortableJS Styles */
.bm-header { cursor: grab; }
.bm-header:active { cursor: grabbing; }
.sortable-ghost {
    opacity: 0.4;
    background: rgba(122, 85, 237, 0.1);
    border: 2px dashed rgba(122, 85, 237, 0.5);
    border-radius: 10px;
}


/* Klikbar Chat Link */
.chat-player-link {
    color: #7dd3fc;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.15s;
    border-bottom: 1px solid transparent;
}
.chat-player-link:hover {
    color: #e2d8ff;
    border-bottom-color: rgba(167, 139, 250, 0.4);
    text-shadow: 0 0 8px rgba(167, 139, 250, 0.3);
}

.console-msg-command {
    color: #fbbf24 !important;
    font-style: italic;
    font-weight: 500;
}

.console-msg-admin {
    color: #f472b6 !important;
    font-weight: bold;
}

/* Tab Views */
.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.view-section.active {
    display: block;
}

/* Data Tables (Scheduled Tasks & Ban List) */
.data-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    font-weight: 600;
}
.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}
.btn-danger:hover { background: #b03030; transform: translateY(-1px); }
.btn-danger:active { transform: translateY(0); }

/* Custom Select Dropdown Styling for Glassmorphism */
select.modern-input, select#ban-duration {
    background-color: var(--bg-inset) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    outline: none !important;
    box-shadow: var(--shadow-inset) !important;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
select.modern-input:focus, select#ban-duration:focus {
    border-color: var(--accent-cyan) !important;
    box-shadow: var(--shadow-glow) !important;
}
select.modern-input option, select#ban-duration option {
    background-color: var(--bg-panel);
    color: var(--text-main);
    padding: 8px; /* Some browsers ignore padding on options, but we try */
}

/* -------------------------------------------
   Authentication & User Management Styles
------------------------------------------- */

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: #0a0a0f url('/assets/login-bg.png') no-repeat center center fixed;
    background-size: cover;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: rgba(15, 15, 20, 0.7);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
}

.login-container .brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

#nav-logout-btn {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

#nav-logout-btn:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

.role-badge {
    background: rgba(0, 204, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 204, 255, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.role-badge.admin {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.3);
}

.req-perm {
    display: none !important; /* Will be overridden by inline style if user has permission */
}

input.new-user-perm, input.edit-user-perm {
    appearance: auto;
    -webkit-appearance: auto;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
    margin: 0;
}

.error-box.hidden {
    display: none !important;
}

/* ============================================
   PWA Install Banner
   ============================================ */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(135deg, rgba(15, 12, 30, 0.98), rgba(10, 8, 20, 0.98));
    border-top: 1px solid rgba(122, 85, 237, 0.4);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6), 0 -1px 0 rgba(122, 85, 237, 0.3);
    backdrop-filter: blur(20px);
    animation: pwa-banner-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pwa-install-banner.pwa-banner-hidden {
    display: none;
}

@keyframes pwa-banner-slide-in {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

.pwa-banner-icon img {
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(122, 85, 237, 0.4);
    flex-shrink: 0;
}

.pwa-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pwa-banner-text strong {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.pwa-banner-text span {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-btn {
    background: linear-gradient(135deg, #7a55ed, #5b3dc8);
    border: none;
    color: #fff;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(122, 85, 237, 0.4);
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pwa-banner-btn:hover {
    background: linear-gradient(135deg, #8f6bf5, #6b4de0);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(122, 85, 237, 0.5);
}

.pwa-banner-close {
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    font-size: 14px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.pwa-banner-close:hover { color: #aaa; }

/* ============================================
   MOBIL REDESIGN (≤ 768px)
   ============================================ */
@media (max-width: 768px) {

    /* ── Navbar ── */
    .primary-navbar {
        padding: 0 10px;
        height: 54px;
        gap: 6px;
    }

    .brand {
        margin-right: 8px;
    }

    .brand h1 {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }

    /* Skjul nav-tekst, behold kun ikoner */
    .nav-section-horiz li {
        padding: 0 8px;
        font-size: 0;
        gap: 0;
        height: 54px;
    }
    .nav-section-horiz li svg {
        width: 19px;
        height: 19px;
    }

    /* Skjul brugernavn + rolle badge */
    #nav-profile-name, #nav-profile-role { display: none; }
    .user-profile { gap: 6px; }

    /* Skjul install-label, behold ikon */
    .pwa-btn-label { display: none; }
    #pwa-nav-btn { padding: 6px 10px; }

    /* ── Global Action Bar ── */
    .global-bar {
        height: 44px;
        padding: 0 10px;
        gap: 4px;
        border-radius: 0;
        margin: 0;
    }

    /* Skjul "Lager Kommandoer" tekst, behold pil-dropdown */
    .gb-btn span { display: none; }
    .gb-btn { padding: 0 10px; gap: 0; }
    .gb-btn .icon.arrow { width: 16px; height: 16px; }

    .gb-prefix { padding-left: 8px; font-size: 13px; }
    .gb-input { font-size: 13px; }

    .gb-action-btn {
        padding: 0 12px;
        font-size: 12px;
        letter-spacing: 0;
        white-space: nowrap;
    }

    /* ── Servers Grid ── */
    .servers-grid {
        padding: 8px;
        gap: 10px;
        overflow-y: auto;
    }

    /* ── Server Card: fuld bredde, større ── */
    .bm-card {
        width: 100% !important;
        height: 500px;
        resize: none;
        border-radius: 10px;
        min-width: 0;
    }

    /* ── Card Header ── */
    .bm-header {
        height: 48px;
        padding: 0 12px;
    }

    .bm-title {
        font-size: 14px;
    }

    /* Skjul de mindst vigtige stats på mobil — behold spillerantal */
    .bm-stat { display: none; }
    .bm-stat:has(.players-badge),
    .bm-stat:first-child { display: inline-flex !important; }

    /* Fremhæv spillerantal lidt mere på mobil */
    .bm-stat:has(.players-badge) {
        background: rgba(122, 85, 237, 0.15);
        border: 1px solid rgba(122, 85, 237, 0.3);
        border-radius: 12px;
        padding: 3px 9px;
        font-size: 12px;
        font-weight: 600;
        color: #c4b5fd;
        gap: 4px;
    }

    /* ── Body: STAK vertikalt (spillerliste OVER konsol) ── */
    .bm-body {
        flex-direction: column;
    }

    /* ── Spillerliste: kollapsibel panel øverst ── */
    .bm-sidebar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        border-right: none;
        border-bottom: 1px solid rgba(122, 85, 237, 0.12);
        resize: none;
        transition: max-height 0.3s ease;
        flex-shrink: 0;
    }

    /* Åben tilstand (toggled via JS) */
    .bm-sidebar.mobile-open {
        max-height: 160px;
        overflow-y: auto;
    }

    .bm-sidebar .players-list li {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* ── Konsol: fylder resten ── */
    .bm-main {
        flex: 1;
        min-height: 0;
    }

    .bm-main .console-output {
        font-size: 12.5px;
        line-height: 1.7;
    }

    .bm-main .console-output > div {
        padding: 4px 10px;
        font-size: 12.5px;
    }

    /* ── Footer: touch-venlig ── */
    .bm-footer {
        height: 50px;
        padding: 0 6px;
        gap: 5px;
        flex-shrink: 0;
    }

    .bm-sender-label {
        height: 36px;
        padding: 0 10px;
        font-size: 12px;
        min-width: 50px;
    }

    .bm-input {
        height: 36px;
        font-size: 13px;
        padding: 0 10px;
    }

    .bm-send-btn {
        height: 36px;
        padding: 0 14px;
        font-size: 13px;
        min-width: 52px;
    }

    /* ── Modaler: fuld bredde ── */
    .modal-content {
        max-width: calc(100vw - 16px) !important;
        margin: 8px;
        padding: 1.2rem;
    }

    /* ── Spillerliste toggle-knap ── */
    .bm-players-toggle {
        display: flex !important;
    }
}

/* Meget smalle skærme (iPhone SE, Galaxy A-serie) */
@media (max-width: 400px) {
    .primary-navbar { padding: 0 8px; }
    .brand h1 { display: none; } /* Behold kun logo-ikon */
    .bm-title { font-size: 13px; }
    .bm-header { padding: 0 10px; }
    .bm-card { height: 480px; }
    /* Vis KUN spillerantal — skjul resten */
    .bm-stat { display: none !important; }
    .bm-stat:has(.players-badge) { display: inline-flex !important; }
    .gb-action-btn { font-size: 11px; padding: 0 8px; }
}

/* iOS Safe Area (notch/home indicator) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .app-container {
        padding-bottom: env(safe-area-inset-bottom);
    }
    .bm-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ============================================
   PWA Guide Modal — Step Styles
   ============================================ */
.pwa-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: #ccc;
    font-size: 13.5px;
    line-height: 1.5;
}

.pwa-step-num {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: rgba(122, 85, 237, 0.2);
    border: 1px solid rgba(122, 85, 237, 0.4);
    color: #a78bfa;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-step-alt {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 12.5px;
    color: #999;
    line-height: 1.7;
}

.pwa-step-alt strong { color: #ddd; }

.pwa-tip {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(122, 85, 237, 0.08);
    border: 1px solid rgba(122, 85, 237, 0.2);
    border-radius: 6px;
    font-size: 12px;
    color: #a78bfa;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobil: skjul "Installer App" label tekst på meget smalle skærme */
@media (max-width: 500px) {
    .pwa-btn-label { display: none; }
}




