/* ═══════════════════════════════════════════════════
   SupportTool Admin Console — Glass Theme
   Exact theme from theme.html
   ═══════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────── */
:root {
    --accent:      #3b82f6;
    --bg-dark:     #020617;
    --surface:     rgba(15, 23, 42, 0.6);
    --border:      rgba(255, 255, 255, 0.05);
    --neon-blue:   #00d2ff;
    --text-muted:  #64748b;
    --text-dim:    #94a3b8;
    --text-main:   #f1f5f9;
    --success:     #10b981;
    --danger:      #ef4444;
    --warning:     #f59e0b;
    --info:        #3b82f6;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: var(--bg-dark) !important;
    color: var(--text-main) !important;
    min-height: 100vh;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Glow text */
.glow-text {
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Page fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
#page-content > * {
    animation: fadeIn 0.35s ease-out;
}

/* ── Layout wrapper ─────────────────────────────────── */
#app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────── */
#sidebar,
.sidebar {
    width: 240px;
    min-width: 240px;
    background: rgba(10, 15, 30, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border) !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

/* Brand logo */
.sidebar-brand {
    padding: 24px;
    margin-bottom: 20px;
}
.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #4f46e5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
}
.sidebar-brand .brand-icon i { color: #fff; font-size: 1.1rem; }
.sidebar-brand .brand-name { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.sidebar-brand .brand-ver  { font-size: 9px; color: #3b82f6; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; }

/* Nav section label */
.sidebar-section-label {
    font-size: 9px;
    font-weight: 900;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 20px 28px 8px;
}

/* Nav links */
#sidebar .nav-link,
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    margin: 1px 12px;
    color: #94a3b8 !important;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    background: transparent;
    width: calc(100% - 24px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
}
#sidebar .nav-link:hover,
.sidebar .nav-link:hover {
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.05);
}
#sidebar .nav-link.active,
.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%) !important;
    color: var(--accent) !important;
    border-left: 3px solid var(--accent) !important;
    font-weight: 600;
}
#sidebar .nav-link i,
.sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* User footer */
.sidebar-user-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--border);
}
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-user-name { font-size: 11px; font-weight: 700; color: var(--text-main); line-height: 1.3; }
.sidebar-user-role { font-size: 9px; color: var(--success); display: flex; align-items: center; gap: 4px; }
.sidebar-user-role::before {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--success);
    animation: rolePulse 2s infinite;
}
@keyframes rolePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

#logoutBtn,
.btn-logout {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}
#logoutBtn:hover,
.btn-logout:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ── Main content area ──────────────────────────────── */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────── */
#app-header {
    height: 64px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
}
#page-title {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-main);
}
.header-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 16px;
}
.header-gateway {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-gateway i { color: var(--accent); }
.header-search-wrap {
    position: relative;
}
.header-search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 11px;
}
.header-search {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 6px 16px 6px 34px !important;
    font-size: 12px !important;
    width: 240px;
    color: var(--text-main) !important;
    outline: none;
}
.header-search:focus {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
}
.header-search::placeholder { color: #475569; }
.header-refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
}
.header-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}
.header-refresh-btn i { font-size: 12px; }

/* ── Page content scroll area ───────────────────────── */
#page-content-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* ── Glass cards (Bootstrap .card override) ─────────── */
.card {
    background: var(--surface) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    color: var(--text-main) !important;
    transition: transform 0.3s ease, border-color 0.3s ease !important;
}
.card:hover {
    border-color: rgba(59, 130, 246, 0.25) !important;
}
.card-header {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 20px 20px 0 0 !important;
    font-weight: 700;
    color: var(--text-main) !important;
}
.card-body { color: var(--text-main) !important; }
.card-footer {
    background: rgba(255, 255, 255, 0.02) !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 0 0 20px 20px !important;
}

/* Stat cards */
.stat-card {
    background: var(--surface) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.stat-card:hover { border-color: rgba(59, 130, 246, 0.25); }
.stat-card .stat-value { font-size: 2.2rem; font-weight: 900; color: var(--text-main); }
.stat-card .stat-label { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.stat-icon-blue   { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon-green  { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon-red    { background: rgba(239, 68, 68, 0.1);  color: #ef4444; }
.stat-icon-yellow { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* ── Status indicators ──────────────────────────────── */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.status-dot.online,
.status-online {
    background: #10b981;
    box-shadow: 0 0 12px #10b981;
}
.status-dot.online::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid #10b981;
    animation: statusPulse 2s infinite;
}
@keyframes statusPulse {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}
.status-dot.offline { background: #475569; }
.status-dot.warning { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.status-offline { color: #475569; }

/* ── Tables ─────────────────────────────────────────── */
.table-dark-custom,
.device-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
}
.table-dark-custom th,
.device-table th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.table-dark-custom td,
.device-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
}
.table-dark-custom tr:hover td,
.device-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Bootstrap .table override */
.table {
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}
.table > :not(caption) > * > * {
    color: var(--text-main) !important;
    border-bottom-color: rgba(255, 255, 255, 0.04) !important;
    background-color: transparent !important;
    padding: 12px 16px !important;
}
.table thead th,
.table thead td {
    background: rgba(255, 255, 255, 0.02) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: var(--text-muted) !important;
}
.table-hover > tbody > tr:hover > * {
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-main) !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.015) !important;
}

/* Action buttons in tables */
.btn-action {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
    font-size: 13px;
}
.btn-action:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.1); }
.btn-action.text-blue-400  { color: #60a5fa; }
.btn-action.text-red-400   { color: #f87171; }
.btn-action.text-green-400 { color: #34d399; }

/* ── Buttons ─────────────────────────────────────────── */
.btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25) !important;
    transition: all 0.2s !important;
}
.btn-primary:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35) !important;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: var(--text-main) !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: all 0.2s !important;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.btn-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: all 0.2s !important;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    color: #fca5a5 !important;
}
.btn-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
}
.btn-success:hover {
    background: rgba(16, 185, 129, 0.25) !important;
}
.btn-outline-secondary {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: var(--text-dim) !important;
    border-radius: 12px !important;
}
.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-main) !important;
}
.btn-sm { font-size: 12px !important; padding: 4px 12px !important; }

/* ── Forms ───────────────────────────────────────────── */
.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: var(--text-main) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 13px !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}
.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
    color: var(--text-main) !important;
}
.form-control::placeholder { color: #475569 !important; }
.form-label { color: var(--text-dim) !important; font-size: 12px !important; font-weight: 600 !important; }
.form-check-input {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px !important;
}
.form-check-input:checked {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
}
.input-group-text {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted) !important;
    border-radius: 12px !important;
}

/* ── Badges ──────────────────────────────────────────── */
.badge {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    border-radius: 8px !important;
    padding: 3px 8px !important;
}
.badge.bg-primary,
.bg-primary { background: rgba(59, 130, 246, 0.2) !important; color: #60a5fa !important; border: 1px solid rgba(59,130,246,0.3); }
.badge.bg-success,
.bg-success { background: rgba(16, 185, 129, 0.2) !important; color: #34d399 !important; border: 1px solid rgba(16,185,129,0.3); }
.badge.bg-danger,
.bg-danger  { background: rgba(239, 68, 68, 0.2) !important;  color: #f87171 !important; border: 1px solid rgba(239,68,68,0.3); }
.badge.bg-warning,
.bg-warning { background: rgba(245, 158, 11, 0.2) !important; color: #fbbf24 !important; border: 1px solid rgba(245,158,11,0.3); }
.badge.bg-secondary { background: rgba(100, 116, 139, 0.2) !important; color: #94a3b8 !important; }
.badge-diagnostics { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-maintenance  { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.badge-utility      { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-shell        { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-remote       { background: rgba(6, 182, 212, 0.2);  color: #22d3ee; border: 1px solid rgba(6,182,212,0.3); }
.badge-file         { background: rgba(251, 113, 133, 0.2); color: #fb7185; border: 1px solid rgba(251,113,133,0.3); }

/* ── Alerts ──────────────────────────────────────────── */
.alert {
    border-radius: 16px !important;
    border-width: 1px !important;
    font-size: 13px !important;
}
.alert-danger  { background: rgba(239, 68, 68, 0.1) !important;   border-color: rgba(239,68,68,0.3) !important;   color: #fca5a5 !important; }
.alert-success { background: rgba(16, 185, 129, 0.1) !important;  border-color: rgba(16,185,129,0.3) !important;  color: #6ee7b7 !important; }
.alert-warning { background: rgba(245, 158, 11, 0.1) !important;  border-color: rgba(245,158,11,0.3) !important;  color: #fde68a !important; }
.alert-info    { background: rgba(59, 130, 246, 0.1) !important;  border-color: rgba(59,130,246,0.3) !important;  color: #93c5fd !important; }

/* ── Modals ──────────────────────────────────────────── */
.modal-content {
    background: rgba(10, 15, 30, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    color: var(--text-main) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6) !important;
}
.modal-header {
    border-bottom: 1px solid var(--border) !important;
    padding: 18px 24px !important;
}
.modal-header .modal-title { font-weight: 700 !important; font-size: 15px !important; }
.modal-body {
    padding: 20px 24px !important;
    color: var(--text-dim) !important;
    font-size: 13px !important;
}
.modal-footer {
    border-top: 1px solid var(--border) !important;
    padding: 14px 24px !important;
}
.modal-backdrop { background: rgba(0, 0, 0, 0.7) !important; }
.btn-close { filter: invert(1) opacity(0.5) !important; }
.btn-close:hover { filter: invert(1) opacity(0.9) !important; }
.modal-detail-pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    color: #c9d1d9;
    font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* ── Console output ──────────────────────────────────── */
.console-output {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    color: #cbd5e1;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
}
.console-output .output-success { color: #34d399; }
.console-output .output-error   { color: #f87171; }
.console-output .output-info    { color: #60a5fa; }
.console-output .output-progress{ color: #fbbf24; }

/* ── Plugin cards ────────────────────────────────────── */
.plugin-card {
    background: var(--surface) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border) !important;
    border-radius: 20px;
    padding: 28px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.plugin-card:hover {
    border-color: rgba(59, 130, 246, 0.3) !important;
    transform: translateY(-2px);
}
.plugin-card-icon {
    width: 52px; height: 52px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
    transition: transform 0.2s;
}
.plugin-card:hover .plugin-card-icon { transform: scale(1.1); }

/* ── Plugin result UI ────────────────────────────────── */
.plugin-result-header {
    white-space: normal;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 10px 14px;
    margin: 8px 0 4px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.plugin-result-header.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}
.plugin-result-header.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.plugin-data {
    white-space: normal;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    margin: 4px 0 12px;
}

.plugin-section {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-left: 3px solid #3b82f6;
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
}
.plugin-section:nth-child(6n+2) { border-left-color: #8b5cf6; }
.plugin-section:nth-child(6n+3) { border-left-color: #10b981; }
.plugin-section:nth-child(6n+4) { border-left-color: #f59e0b; }
.plugin-section:nth-child(6n+5) { border-left-color: #ec4899; }
.plugin-section:nth-child(6n+6) { border-left-color: #60a5fa; }

.plugin-section-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.plugin-section-header i { font-size: 0.9rem; opacity: 0.7; }
.plugin-section-body { padding: 0; }

.plugin-kv-group { display: table; width: 100%; }
.plugin-kv { display: table-row; }
.plugin-kv .kv-label,
.plugin-kv .kv-value { display: table-cell; padding: 5px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.plugin-kv:last-child .kv-label,
.plugin-kv:last-child .kv-value { border-bottom: none; }
.plugin-kv .kv-label { color: var(--text-muted); font-size: 11px; white-space: nowrap; width: 1%; padding-right: 20px; }
.plugin-kv .kv-value { color: #e2e8f0; word-break: break-word; }

.plugin-table { margin: 0; font-size: 11px; width: 100%; border-collapse: collapse; }
.plugin-table thead th {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 6px 10px;
}
.plugin-table tbody td { padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); color: #cbd5e1; vertical-align: middle; }
.plugin-table tbody tr:last-child td { border-bottom: none; }
.plugin-table tbody tr:hover td { background: rgba(255,255,255,0.02); }

.plugin-pre {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 4px 0;
    font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    color: #cbd5e1;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
}

.plugin-val-bool {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}
.plugin-val-bool.yes { background: rgba(16,185,129,0.15); color: #34d399; }
.plugin-val-bool.no  { background: rgba(100,116,139,0.15); color: #94a3b8; }
.plugin-val-unit { color: var(--text-muted); font-size: 10px; margin-left: 2px; }
.plugin-val-tag {
    display: inline-block;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    margin: 1px 3px 1px 0;
    color: #cbd5e1;
}

.plugin-progress-line {
    white-space: normal;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: #fbbf24;
    font-size: 12px;
}
.plugin-progress-bar { flex: 0 0 120px; height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.plugin-progress-bar-fill { height: 100%; background: #f59e0b; border-radius: 2px; transition: width 0.3s ease; }

/* ── File Browser ────────────────────────────────────── */
.fb-container {
    white-space: normal;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.fb-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.fb-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; color: var(--text-muted); font-size: 13px; }
.fb-crumb { color: #60a5fa; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.fb-crumb:hover { background: rgba(96,165,250,0.1); text-decoration: underline; }
.fb-crumb-active { color: var(--text-main); font-weight: 700; padding: 2px 4px; }
.fb-stats { color: var(--text-muted); font-size: 11px; white-space: nowrap; margin-left: 12px; }
.fb-body { flex: 1; overflow-y: auto; }
.fb-table { width: 100%; border-collapse: collapse; }
.fb-table thead th {
    position: sticky; top: 0;
    background: rgba(10, 15, 30, 0.95);
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.fb-table tbody td { padding: 4px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); color: #cbd5e1; vertical-align: middle; }
.fb-row:hover td { background: rgba(255,255,255,0.02); }
.fb-clickable { cursor: pointer; }
.fb-clickable:hover td { background: rgba(96,165,250,0.05); }
.fb-clickable .fb-name { color: #60a5fa; }
.fb-icon { width: 30px; text-align: center; font-size: 0.95rem; }
.fb-name { font-size: 13px; }
.fb-size { text-align: right; color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.fb-date { color: var(--text-muted); font-size: 11px; }

/* ── RDP Connect Card ────────────────────────────────── */
.rdp-connect-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 16px;
    margin: 8px 0;
    white-space: normal;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.rdp-connect-header {
    background: rgba(255,255,255,0.02);
    padding: 10px 16px;
    font-weight: 700;
    font-size: 13px;
    border-radius: 16px 16px 0 0;
    color: var(--text-main);
}
.rdp-connect-body { padding: 16px; font-size: 13px; color: var(--text-dim); }
.rdp-connect-address {
    font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
    font-size: 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    color: #60a5fa;
    user-select: all;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* ── Loading spinner ─────────────────────────────────── */
.page-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}
.spinner-border { color: var(--accent) !important; }

/* ── Dropzone / upload area ──────────────────────────── */
.upload-zone {
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: var(--text-muted);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.05);
    color: var(--text-dim);
}

/* ── Nav tabs (Bootstrap override) ──────────────────── */
.nav-tabs {
    border-bottom: 1px solid var(--border) !important;
    gap: 4px;
}
.nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border: 1px solid transparent !important;
    border-radius: 10px 10px 0 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    transition: all 0.2s !important;
}
.nav-tabs .nav-link:hover {
    color: var(--text-dim) !important;
    background: rgba(255,255,255,0.04) !important;
}
.nav-tabs .nav-link.active {
    background: rgba(59,130,246,0.1) !important;
    border-color: rgba(59,130,246,0.3) rgba(59,130,246,0.3) transparent !important;
    color: var(--accent) !important;
    font-weight: 700 !important;
}

/* ── Pagination ──────────────────────────────────────── */
.pagination .page-link {
    background: rgba(255,255,255,0.04) !important;
    border-color: var(--border) !important;
    color: var(--text-dim) !important;
    border-radius: 8px !important;
    margin: 0 2px !important;
    font-size: 12px !important;
}
.pagination .page-link:hover {
    background: rgba(59,130,246,0.1) !important;
    color: var(--accent) !important;
}
.pagination .page-item.active .page-link {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

/* ── List group ──────────────────────────────────────── */
.list-group-item {
    background: rgba(255,255,255,0.03) !important;
    border-color: var(--border) !important;
    color: var(--text-main) !important;
    font-size: 13px !important;
    transition: background 0.15s !important;
}
.list-group-item:hover {
    background: rgba(255,255,255,0.06) !important;
}
.list-group-item.active {
    background: rgba(59,130,246,0.15) !important;
    border-color: rgba(59,130,246,0.3) !important;
    color: var(--accent) !important;
}

/* ── Text utilities ──────────────────────────────────── */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--accent) !important; }
.text-success { color: #34d399 !important; }
.text-danger  { color: #f87171 !important; }
.text-warning { color: #fbbf24 !important; }
.text-info    { color: #60a5fa !important; }
.text-secondary { color: var(--text-dim) !important; }

/* ── index.html class aliases ────────────────────────── */
/* bridge between HTML classes and CSS definitions above  */

.brand-version { font-size: 9px; color: #3b82f6; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; }

.nav-section-label {
    font-size: 9px;
    font-weight: 900;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 20px 16px 6px;
}

.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); }

.user-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.user-name { font-size: 11px; font-weight: 700; color: var(--text-main); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; color: var(--success); display: flex; align-items: center; gap: 4px; }
.user-role-dot {
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--success);
    animation: rolePulse 2s infinite;
}

.main-content { min-height: 100vh; }

.top-header {
    height: 64px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.header-status {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}
.header-search > i {
    position: absolute;
    left: 12px;
    color: #475569;
    font-size: 11px;
    pointer-events: none;
}
.header-search > input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 7px 16px 7px 34px !important;
    font-size: 12px !important;
    width: 220px;
    color: var(--text-main) !important;
    outline: none;
}
.header-search > input:focus {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
}
.header-search > input::placeholder { color: #475569; }

.header-btn {
    width: 36px; height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
}
.header-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-main); }
.header-btn i { font-size: 12px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    #sidebar, .sidebar { width: 60px; min-width: 60px; }
    #sidebar .nav-link span,
    .sidebar .nav-link span,
    .sidebar-brand .brand-name,
    .sidebar-brand .brand-ver,
    .sidebar-section-label,
    .sidebar-user-name,
    .sidebar-user-role { display: none; }
    .sidebar-brand { padding: 16px 10px; }
    #app-header { padding: 0 16px; }
    #page-content-wrap { padding: 16px; }
}
