/*
 * custom.css — Ajustes específicos del panel IBO sobre el tema Vvveb (admin.css).
 * Solo overrides de marca/acento; el look base viene de assets/vvveb/css/admin.css.
 */

:root {
    --ibo-accent: #6c5ce7;
}

/* Marca de la barra lateral */
.sidebar .brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.1rem .75rem;
    text-decoration: none;
    color: var(--bs-emphasis-color);
}
.sidebar .brand .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ibo-accent), #00b4d8);
    color: #fff;
    font-weight: 800;
    font-size: .9rem;
    letter-spacing: .5px;
    flex: 0 0 auto;
}
.sidebar .brand .brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.sidebar .brand .brand-name strong {
    font-weight: 700;
    font-size: 1rem;
}
.sidebar .brand .brand-name small {
    font-size: .72rem;
    opacity: .65;
    text-transform: uppercase;
    letter-spacing: .6px;
}

/* Identidad del admin al pie de la sidebar */
.sidebar .sidebar-foot {
    margin-top: auto;
    padding: .75rem 1.1rem 1rem;
    border-top: 1px solid var(--bs-border-color);
    font-size: .85rem;
}
.sidebar .sidebar-foot .who {
    display: block;
    opacity: .7;
    margin-bottom: .4rem;
}

/* Botón primario con el acento de IBO */
.btn-primary {
    --bs-btn-bg: var(--ibo-accent);
    --bs-btn-border-color: var(--ibo-accent);
    --bs-btn-hover-bg: #5a4ad1;
    --bs-btn-hover-border-color: #5a4ad1;
    --bs-btn-active-bg: #4f41c4;
    --bs-btn-active-border-color: #4f41c4;
}

/* Tarjetas de estadística del dashboard */
.stat-card .stat-label {
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: .72rem;
    opacity: .7;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}
.stat-card .stat-icon {
    font-size: 1.9rem;
    opacity: .85;
}

/* Texto monoespaciado para MAC / device keys / URLs */
.mono {
    font-family: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: .9em;
}

/* Login centrado */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.login-card {
    width: 100%;
    max-width: 380px;
}
.login-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ibo-accent), #00b4d8);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Pequeños retoques de tabla */
.table .actions-row {
    white-space: nowrap;
}
.hint {
    font-size: .85rem;
    opacity: .7;
}

/* ===== Re-skin "pro": fondo con profundidad + superficies glass ===== */
body.home {
    background:
        radial-gradient(1100px 600px at 12% -8%, rgba(108, 92, 231, 0.20), transparent 58%),
        radial-gradient(1000px 700px at 100% 0%, rgba(0, 180, 216, 0.13), transparent 55%),
        #0b0e15;
    background-attachment: fixed;
    min-height: 100vh;
}
.sidebar {
    background: rgba(12, 15, 21, 0.72);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.card {
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}
.card-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top-header {
    background: rgba(12, 15, 21, 0.55);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: .5rem .75rem;
    margin-bottom: 1rem;
}

/* ===== Login más atmosférico ===== */
.login-page {
    background:
        radial-gradient(900px 520px at 18% 8%, rgba(108, 92, 231, 0.30), transparent 55%),
        radial-gradient(820px 600px at 86% 92%, rgba(0, 180, 216, 0.22), transparent 55%),
        #0a0d13;
}
.login-card .card {
    background: rgba(20, 24, 33, 0.72);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

/* ===== Secciones colapsables (acordeón) más "pro" ===== */
.accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-active-bg: rgba(108, 92, 231, 0.12);
    --bs-accordion-active-color: var(--bs-emphasis-color);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(108, 92, 231, 0.25);
    --bs-accordion-border-color: rgba(255, 255, 255, 0.08);
    --bs-accordion-border-radius: 12px;
}
.accordion-item {
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(8px);
    margin-bottom: .75rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}
.accordion-button {
    font-weight: 600;
}
.accordion-button .la {
    margin-right: .55rem;
    opacity: .85;
}

/* ===== Fix stacking: el dropdown de idioma debe ir SOBRE las cards =====
   .top-header y .card usan backdrop-filter (cada uno crea un stacking context);
   como las cards van después en el DOM, tapaban el dropdown. */
.top-header {
    position: relative;
    z-index: 30;
}
.dropdown-menu {
    z-index: 1060;
}

/* ===== Responsive: sidebar off-canvas en mobile ===== */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 250px;
        max-width: 82vw;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .25s ease;
        overflow-y: auto;
    }
    #container.sidebar-open .sidebar {
        transform: translateX(0);
    }
    .main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    /* backdrop */
    #container.sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        z-index: 1040;
    }
}
