/* ========================================================================
   PVEBoard - Custom Theme Nubify
   ======================================================================== */

/* ── Paleta de colores Nubify ───────────────────────────────────── */
:root {
    --nubify-primary: #6366f1;      /* Indigo principal */
    --nubify-primary-dark: #4f46e5; /* Indigo oscuro */
    --nubify-primary-light: #818cf8;/* Indigo claro */
    --nubify-accent: #06b6d4;       /* Cyan acento */
    --nubify-dark: #0f172a;         /* Fondo oscuro base */
    --nubify-dark-2: #1e293b;       /* Tarjetas/fondo secundario */
    --nubify-dark-3: #334155;       /* Bordes */
    --nubify-text: #e2e8f0;         /* Texto principal */
    --nubify-text-muted: #94a3b8;   /* Texto secundario */
    --nubify-success: #22c55e;      /* Verde */
    --nubify-danger: #ef4444;       /* Rojo */
    --nubify-warning: #f59e0b;      /* Amarillo */
    --nubify-console: #8b5cf6;      /* Púrpura consola */
    --nubify-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
}

/* ── HEADER con logo Nubify ─────────────────────────────────────── */
.header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h2 img {
    height: 32px;
    width: auto;
}

/* ── TABS mejoradas ─────────────────────────────────────────────── */
.tab-btn {
    background: var(--nubify-dark-2);
    border: 1px solid var(--nubify-dark-3);
    color: var(--nubify-text-muted);
    font-weight: 600;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--nubify-dark-3);
    color: var(--nubify-text);
    transform: translateY(-1px);
}

.tab-btn.tab-active {
    background: var(--nubify-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ── TABLAS con estilo más limpio ────────────────────────────────── */
table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

th {
    background: var(--nubify-dark-2);
    color: var(--nubify-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 12px !important;
}

td {
    padding: 12px !important;
    vertical-align: middle;
}

tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* ── BADGES ──────────────────────────────────────────────────────── */
.badge {
    background: var(--nubify-dark-3);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

/* ── BOTONES con más estilo ──────────────────────────────────────── */
.btn {
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin: 2px;
    transition: all 0.15s ease;
    letter-spacing: 0.3px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn:disabled {
    opacity: 0.3;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.btn-start { background: var(--nubify-success); }
.btn-stop { background: var(--nubify-danger); }
.btn-reboot { background: var(--nubify-warning); }
.btn-console { background: var(--nubify-console); }

/* ── TOAST ───────────────────────────────────────────────────────── */
#toast {
    background: var(--nubify-dark-2) !important;
    border: 1px solid var(--nubify-dark-3) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
    padding: 14px 20px !important;
    font-weight: 600 !important;
}

/* ── LOGIN ───────────────────────────────────────────────────────── */
.box {
    background: var(--nubify-dark-2) !important;
    border: 1px solid var(--nubify-dark-3) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
}

.box .logo img {
    height: 48px;
    width: auto;
    margin-bottom: 8px;
}

input {
    border-radius: 8px !important;
    transition: border-color 0.2s ease !important;
}

input:focus {
    border-color: var(--nubify-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

button[type="submit"] {
    background: var(--nubify-gradient) !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
}

/* ── ADMIN PANEL ──────────────────────────────────────────────────── */
.card {
    background: var(--nubify-dark-2);
    border: 1px solid var(--nubify-dark-3);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card h3 {
    color: var(--nubify-primary-light) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-admin {
    background: var(--nubify-primary) !important;
}

.badge-soporte {
    background: var(--nubify-console) !important;
}

/* ── VNC CONSOLE ──────────────────────────────────────────────────── */
.topbar {
    background: var(--nubify-dark-2) !important;
    border-bottom: 1px solid var(--nubify-dark-3) !important;
}

/* ── Responsive extra ────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
    .header h2 img {
        height: 26px;
    }
}

@media screen and (max-width: 480px) {
    .header h2 img {
        height: 22px;
    }
}

/* ── Scrollbar personalizada ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--nubify-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--nubify-dark-3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--nubify-text-muted);
}

/* ── Link Admin mejorado ──────────────────────────────────────────── */
.admin-link {
    color: var(--nubify-primary-light) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border: 1px solid var(--nubify-primary-light) !important;
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
    font-size: 12px !important;
}

.admin-link:hover {
    background: var(--nubify-primary) !important;
    color: #fff !important;
    border-color: var(--nubify-primary) !important;
}