/* assets/style.css */

:root {
    --bg-dark: #0a0b10;
    --bg-card: rgba(18, 20, 29, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Neon Palettes */
    --neon-purple: hsl(270, 95%, 60%);
    --neon-cyan: hsl(180, 100%, 50%);
    --neon-pink: hsl(330, 100%, 55%);
    --neon-green: hsl(140, 100%, 50%);
    --neon-orange: hsl(35, 100%, 50%);
    --neon-red: hsl(0, 100%, 55%);
    
    /* Glow filters */
    --glow-purple: 0 0 15px rgba(168, 85, 247, 0.6);
    --glow-cyan: 0 0 15px rgba(6, 182, 212, 0.6);
    --glow-pink: 0 0 15px rgba(236, 72, 153, 0.6);
    --glow-green: 0 0 15px rgba(34, 197, 94, 0.6);
    --glow-red: 0 0 15px rgba(239, 68, 68, 0.6);
    
    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: #e2e8f0;
    font-family: var(--font-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Background cybernetgrid & glow-orbs --- */
.cyber-grid {
    background-image: 
        linear-gradient(rgba(18, 20, 29, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 20, 29, 0.4) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center;
    position: relative;
}

/* Scanline Effect */
.scanline {
    width: 100%;
    height: 100px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(245, 158, 11, 0.03) 50%,
        rgba(255, 255, 255, 0)
    );
    position: fixed;
    top: -100px;
    left: 0;
    z-index: 999;
    pointer-events: none;
    animation: scan 6s linear infinite;
}

@keyframes scan {
    0% { top: -100px; }
    100% { top: 100%; }
}

/* Ambient glow orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}
.orb-1 {
    width: 40vw;
    height: 40vw;
    background: var(--color-amber);
    top: -10%;
    right: -10%;
    animation: floating 12s ease-in-out infinite alternate;
}
.orb-2 {
    width: 35vw;
    height: 35vw;
    background: var(--neon-cyan);
    bottom: -10%;
    left: -10%;
    animation: floating 15s ease-in-out infinite alternate-reverse;
}

@keyframes floating {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* --- App layout --- */
.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.view {
    display: none;
    flex: 1;
    flex-direction: column;
}
.view.active {
    display: flex;
}

/* --- Login styling --- */
#login-view {
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--color-amber);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    backdrop-filter: blur(10px);
    animation: zoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.brand {
    text-align: center;
    margin-bottom: 30px;
}

.brand .logo-icon {
    font-size: 3rem;
    color: var(--color-amber);
    filter: drop-shadow(var(--color-amber-glow));
    margin-bottom: 10px;
    display: inline-block;
    animation: pulseGlow 2s infinite alternate;
}

.brand h1 {
    font-family: var(--font-primary);
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 2.2rem;
    color: #fff;
}

.brand .logo-sub {
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: #64748b;
    margin-top: 5px;
    font-weight: 600;
}

/* --- Form Elements --- */
.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: #94a3b8;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-group label i {
    margin-right: 5px;
}

.input-group input, 
.input-group select {
    background: rgba(10, 11, 16, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.input-with-button {
    display: flex;
    gap: 10px;
}
.input-with-button input {
    flex: 1;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 6px;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background: var(--color-amber);
    color: #000;
    font-weight: 700;
    box-shadow: var(--color-amber-glow);
}
.btn-primary:hover {
    background: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-color);
    color: #fff;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.btn-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: inset 0 0 10px rgba(34, 197, 94, 0.1);
}
.btn-success:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: var(--glow-green);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--neon-red);
    color: var(--neon-red);
    box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.1);
}
.btn-danger:hover {
    background: var(--neon-red);
    color: #fff;
    box-shadow: var(--glow-red);
    transform: translateY(-2px);
}

.btn-warning {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--neon-orange);
    color: var(--neon-orange);
    box-shadow: inset 0 0 10px rgba(249, 115, 22, 0.1);
}
.btn-warning:hover {
    background: var(--neon-orange);
    color: #000;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.6);
    transform: translateY(-2px);
}

.btn-icon {
    background: transparent;
    padding: 8px;
    border-radius: 50%;
    color: #64748b;
    width: 40px;
    height: 40px;
}
.btn-icon:hover {
    color: var(--neon-red);
    background: rgba(239, 68, 68, 0.1);
}

/* --- Header style --- */
.app-header {
    background: rgba(10, 11, 16, 0.85);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.app-header .brand {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.app-header .brand .logo-icon {
    font-size: 1.8rem;
    margin-bottom: 0;
}
.app-header .brand .logo-text {
    font-size: 1.4rem;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-tabs {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px;
    display: flex;
    gap: 5px;
}

.nav-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 20px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-tab:hover {
    color: #fff;
}
.nav-tab.active {
    background: var(--neon-purple);
    color: #fff;
    box-shadow: var(--glow-purple);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.user-role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.user-badge .badge {
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--neon-purple);
    color: #fff;
    font-family: var(--font-display);
}

/* --- Dashboard Subviews & Layout --- */
.dashboard-content {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
}

.subview {
    display: none;
    flex: 1;
}
.subview.active {
    display: flex;
    flex-direction: column;
}

/* --- Server Sub Views Navigation Tabs --- */
.server-sub-tab {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-slate);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.server-sub-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.server-sub-tab.active {
    color: #fff;
    background: var(--neon-purple);
    border-color: #ba68c8;
    box-shadow: 0 0 12px rgba(186, 104, 200, 0.4);
}

.server-tab-content {
    display: none !important;
    width: 100%;
}
.server-tab-content.active {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    flex: 1;
}

/* Panels */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-header h3 i {
    color: var(--neon-cyan);
}

.panel-body {
    padding: 20px;
    flex: 1;
}

/* --- Server Sidebar --- */
.server-sidebar-panel .panel-body {
    padding: 10px;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(168, 85, 247, 0.4);
}
.sidebar-item.active {
    background: rgba(168, 85, 247, 0.1);
    border-color: var(--neon-purple);
    box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.1);
}

.sidebar-item .server-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-item .name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
}
.sidebar-item .port {
    font-size: 0.7rem;
    color: #64748b;
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
}
.status-indicator-dot.online {
    background: var(--neon-green);
    box-shadow: var(--glow-green);
}
.status-indicator-dot.offline {
    background: var(--neon-red);
    box-shadow: var(--glow-red);
}

/* --- Active Server Panel Layout --- */
.main-server-area {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.no-selection-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    color: #64748b;
    padding: 40px;
    text-align: center;
}

.no-selection-card i {
    font-size: 4rem;
    color: rgba(255,255,255,0.05);
    margin-bottom: 20px;
}

.server-active-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 1;
}

/* Server Hero Status */
.server-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.server-info-summary h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: #fff;
}
.server-info-summary .path {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 5px;
}

.server-state-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0,0,0,0.3);
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.status-glow {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.status-glow.online {
    background: var(--neon-green);
    box-shadow: var(--glow-green);
    animation: neonPulseGreen 1.5s infinite alternate;
}
.status-glow.offline {
    background: var(--neon-red);
    box-shadow: var(--glow-red);
}

@keyframes neonPulseGreen {
    0% { box-shadow: 0 0 5px rgba(34, 197, 94, 0.5); }
    100% { box-shadow: 0 0 20px rgba(34, 197, 94, 1); }
}

.server-state-indicator span {
    font-family: var(--font-display);
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Control grid widgets */
.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.power-widget .power-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.stats-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-bar-group .stat-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-family: var(--font-display);
    font-weight: 600;
    margin-bottom: 6px;
    color: #94a3b8;
}

.bar-outer {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.bar-inner {
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    transition: width 0.5s ease;
}
.bar-inner.purple {
    background: var(--neon-purple);
    box-shadow: var(--glow-purple);
}

/* FTP Info */
.ftp-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.ftp-info-item {
    display: flex;
    justify-content: space-between;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.ftp-info-item .lbl {
    color: #64748b;
    font-weight: 600;
}
.ftp-info-item .val {
    color: #fff;
    font-family: var(--font-mono);
}
.ftp-info-item .italicized {
    color: var(--neon-purple);
}

/* --- RCON Panel & Console Output --- */
.terminal-body {
    background: #050508;
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 280px;
    overflow: hidden;
}

.console-badge {
    background: rgba(6, 182, 212, 0.1);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    font-size: 0.65rem;
    font-family: var(--font-display);
    padding: 2px 8px;
    border-radius: 4px;
}

.terminal-output {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.terminal-line {
    word-break: break-all;
    line-height: 1.4;
}
.terminal-line.cmd-sent {
    color: var(--neon-purple);
}
.terminal-line.cmd-sent::before {
    content: "> ";
    color: var(--neon-purple);
    font-weight: bold;
}
.terminal-line.response {
    color: #e2e8f0;
}
.terminal-line.system-msg {
    color: var(--neon-cyan);
    border-left: 2px solid var(--neon-cyan);
    padding-left: 8px;
}
.terminal-line.error-msg {
    color: var(--neon-red);
    border-left: 2px solid var(--neon-red);
    padding-left: 8px;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    background: rgba(0,0,0,0.4);
}

.terminal-input-row .prompt {
    color: var(--neon-purple);
    font-family: var(--font-mono);
    font-weight: bold;
    margin-right: 10px;
}

.terminal-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}
.terminal-input-row input:focus {
    outline: none;
}

.terminal-input-row button {
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}
.terminal-input-row button:hover {
    transform: scale(1.1);
}

/* --- Admin Views / Tables --- */
.flex-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.table-responsive {
    overflow-x: auto;
}

.cyber-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
    text-align: left;
}

.cyber-table th {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #64748b;
    padding: 15px 20px;
    border-bottom: 2px solid var(--border-color);
    font-weight: bold;
}

.cyber-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    color: #cbd5e1;
}

.cyber-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.cyber-table code {
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    justify-content: center;
    align-items: center;
}
.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--neon-purple);
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

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

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.modal-close {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}
.modal-close:hover {
    color: var(--neon-red);
}

.modal-body {
    padding: 25px;
}

.modal-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

.checkbox-list {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    accent-color: var(--neon-purple);
    width: 16px;
    height: 16px;
}

/* Directory scanner results */
.scan-results-container {
    margin-top: 20px;
}

.scan-results-container h4 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 10px;
}

.scan-results-list {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scan-results-list .placeholder-text {
    color: #475569;
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
}

.scan-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.scan-item:hover {
    border-color: rgba(6, 182, 212, 0.4);
    background: rgba(6, 182, 212, 0.05);
}

.scan-item .details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.scan-item .name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}
.scan-item .path {
    font-size: 0.7rem;
    color: #64748b;
}

/* Error/Success elements */
.error-msg {
    color: var(--neon-red);
    font-size: 0.85rem;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

.table-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
.table-badge.online {
    background: rgba(34, 197, 94, 0.1);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
}
.table-badge.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--neon-red);
    border: 1px solid var(--neon-red);
}

/* Row Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}
.action-buttons .btn {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* Animations */
@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.9)); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-purple);
}

/* --- Collapsible Config Editor Sections --- */
.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.config-section[open] {
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(186, 104, 200, 0.15);
}
.config-section-header {
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid transparent;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    transition: all 0.3s;
}
.config-section-header::-webkit-details-marker {
    color: var(--neon-cyan);
    margin-right: 5px;
}
.config-section-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--neon-cyan);
}
.config-section[open] .config-section-header {
    border-bottom-color: var(--border-color);
    background: rgba(186, 104, 200, 0.05);
}
.config-section-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.collapse-hint {
    font-size: 0.75rem;
    color: var(--text-slate);
    margin-left: auto;
    font-weight: 400;
    letter-spacing: 0.5px;
}
.config-section[open] .collapse-hint {
    display: none;
}

/* --- Responsive Adjustments --- */
@media(max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .app-header {
        padding: 15px 20px;
    }
    .dashboard-content {
        padding: 20px;
    }
}
@media(max-width: 768px) {
    .control-grid {
        grid-template-columns: 1fr;
    }
    .input-row {
        grid-template-columns: 1fr;
    }
}

/* --- GS Dashboard Layout & Aesthetics (Matches Reference Photo) --- */
:root {
    --color-amber: #f59e0b;
    --color-amber-dim: rgba(245, 158, 11, 0.15);
    --color-amber-glow: 0 0 15px rgba(245, 158, 11, 0.45);
    --bg-sidebar: #13151c;
    --bg-workspace: #0d0e12;
    --bg-card-dark: #1b1d24;
}

.app-layout {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-workspace);
}

/* Sidebar Nav */
.sidebar-nav {
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 25px 15px;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
    padding-left: 10px;
}

.sidebar-brand .logo-icon {
    font-size: 1.6rem;
    color: var(--color-amber);
    filter: drop-shadow(0 0 5px rgba(245,158,11,0.5));
}

.sidebar-brand .brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand .logo-text {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.sidebar-brand .logo-ver {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu .nav-tab {
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    padding: 12px 16px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
}

.sidebar-menu .nav-tab i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    color: #64748b;
    transition: color 0.2s;
}

.sidebar-menu .nav-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-menu .nav-tab:hover i {
    color: #fff;
}

.sidebar-menu .nav-tab.active {
    background: rgba(245, 158, 11, 0.08);
    color: var(--color-amber);
    font-weight: 600;
}

.sidebar-menu .nav-tab.active i {
    color: var(--color-amber);
}

.sidebar-menu .badge-active {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--color-amber);
    color: var(--color-amber);
    background: rgba(245, 158, 11, 0.05);
}

/* Main Workspace */
.main-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
}

/* Workspace Header */
.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    background: var(--bg-workspace);
    border-bottom: 1px solid var(--border-color);
}

.workspace-header .subtitle {
    font-size: 0.75rem;
    font-family: var(--font-primary);
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #64748b;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.workspace-header .title {
    font-size: 1.6rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.workspace-header .region-text {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 400;
    margin-left: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-profile .avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--color-amber);
}

.user-status-info {
    display: flex;
    flex-direction: column;
}

.user-status-info .username {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.user-status-info .status-pill {
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-status-info .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    display: inline-block;
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: #64748b;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-icon-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.15rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-amber);
    box-shadow: 0 0 8px var(--color-amber);
}

/* Stat Cards Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
}

.stat-card {
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 90px;
    justify-content: center;
}

.stat-card .card-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-card .card-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-primary);
}

.stat-card .status-badge-pill {
    color: var(--color-amber);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    border: 1px solid var(--color-amber-dim);
    background: rgba(245, 158, 11, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    width: max-content;
}

/* Card Glow Active State */
.stat-card.card-glow {
    border-color: var(--color-amber);
    box-shadow: var(--color-amber-glow);
}

/* Progress bar inside card */
.stat-card .card-progress {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.stat-card .card-progress-bar {
    height: 100%;
    background-color: var(--color-amber);
    box-shadow: 0 0 8px var(--color-amber);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Main Dashboard Grid */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 25px;
    width: 100%;
    align-items: start;
}

.grid-left-col, .grid-right-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Panels */
.panel {
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Chart widget */
.stats-chart-panel .panel-body {
    padding: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header .chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.chart-header .chart-title .muted {
    color: #64748b;
    font-weight: 400;
    font-size: 0.8rem;
}

.chart-header .chart-status-dot {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-header .dot-orange {
    width: 8px;
    height: 8px;
    background-color: var(--color-amber);
    border-radius: 50%;
    box-shadow: var(--color-amber-glow);
    display: inline-block;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 160px;
}

.activity-chart {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #475569;
    font-size: 0.75rem;
    font-family: var(--font-primary);
    padding: 0 10px;
}

.glowing-dot {
    animation: chartDotPulse 2s infinite alternate;
}

@keyframes chartDotPulse {
    0% { r: 3.5; opacity: 0.7; }
    100% { r: 6; opacity: 1; filter: drop-shadow(var(--color-amber-glow)); }
}

/* Players Table widget */
.active-players-panel .panel-body {
    padding: 15px;
}

.players-table {
    width: 100%;
    border-collapse: collapse;
}

.players-table th {
    text-align: left;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.players-table td {
    padding: 12px 15px;
    font-size: 0.85rem;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.players-table tr:last-child td {
    border-bottom: none;
}

.players-table .status-active {
    color: #22c55e;
    font-weight: 500;
}

/* RCON Console widget */
.rcon-console-panel .panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 380px;
}

.console-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.console-status-pill {
    font-size: 0.75rem;
    color: var(--color-amber);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.05);
}

.console-status-pill .dot-orange {
    width: 6px;
    height: 6px;
    background-color: var(--color-amber);
    border-radius: 50%;
    display: inline-block;
}

.console-log-container {
    height: 400px;
    max-height: 400px;
    overflow-y: auto;
    background-color: #0d0f13;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.console-log .log-line {
    line-height: 1.5;
    color: #cbd5e1;
}

.console-log .time {
    color: #475569;
    margin-right: 6px;
}

.console-log .admin {
    color: var(--color-amber);
    font-weight: 600;
}

.console-log .chat {
    color: #38bdf8;
}

.console-log .system {
    color: #22c55e;
    font-weight: 600;
}

/* Console Input Area */
.console-input-area {
    display: flex;
    gap: 12px;
    width: 100%;
}

.console-input {
    flex: 1;
    background-color: #0d0f13;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 16px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.console-input:focus {
    border-color: var(--color-amber);
}

.btn-execute {
    background-color: var(--color-amber);
    border: none;
    color: #000;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-execute:hover {
    background-color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: var(--color-amber-glow);
}

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

/* Hide elements depending on view selection */
.subview {
    display: none !important;
}

.subview.active {
    display: flex !important;
    flex-direction: column;
}

/* Other tab panel adjustment styles */
.server-details-panel {
    flex: 1;
}

/* Responsive sidebar adaptations */
@media (max-width: 1024px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar-nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 15px;
    }
    
    .sidebar-brand {
        margin-bottom: 15px;
    }
    
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .sidebar-menu .nav-tab {
        white-space: nowrap;
        padding: 8px 14px;
    }
    
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
    
    .workspace-header {
        padding: 20px;
    }
    
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
