/* Observatorio SEOR - estilos base y responsive */

:root {
    --brand: #3a5477;
    --brand-600: #2f455f;
    --muted: #6b7280;
    --bg: #f5f7fb;
    --card: #ffffff;
    --radius: 16px;
}

* {
    box-sizing: border-box
}

body {
    background: var(--bg);
    color: #1f2937;
}

/* Navbar superior mínima (solo burger y título) */
.navbar {
    background: var(--brand) !important;
    padding: .5rem .75rem;
}

.navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
}

.navbar .navbar-brand img {
    height: 28px;
    width: auto;
    display: block;
}

.navbar .burger {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    padding: 8px 10px;
}

/* ⛔ Ocultar burger en escritorio (≥992px) */
@media (min-width:992px) {
    .navbar .burger {
        display: none;
    }
}

/* Layout con sidebar */
.layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
}

@media (max-width:991.98px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

.card {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.card .card-header {
    background: #f8fafc;
    font-weight: 600;
}

.table thead th {
    color: #6b7280;
    font-weight: 600;
    background: #f8fafc;
    user-select: none;
}

.badge-status {
    padding: .35em .6em;
    border-radius: 999px;
    font-weight: 700;
}

.badge-draft {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.badge-submitted {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #bbf7d0;
}

.badge-date {
    background: #eef2f7;
    color: #334155;
    border: 1px solid #e5e7eb;
}

/* Sidebar (menú/avatar) — sin logo en footer */
.sidebar {
    position: sticky;
    top: 74px;
    transition: transform .25s ease, opacity .25s ease;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px 16px;
    text-align: center;
}

.profile-card .avatar-wrap {
    position: relative;
    display: inline-block;
}

.profile-card .avatar {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    background: #fff;
}

.profile-card .edit {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.profile-card .name {
    margin: 8px 0 0 0;
    font-weight: 700;
    letter-spacing: .2px;
}

.profile-card .email {
    color: #64748b;
    font-size: .9rem;
}

.profile-card .status {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: .88rem;
}

.profile-card .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 3px #d1fae5 inset;
}

.profile-card .actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.profile-card .btn-icon {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.profile-card .btn-icon:hover {
    background: #f3f4f6
}

.menu-title {
    color: #64748b;
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
}

.menu-sub {
    color: #94a3b8;
    font-size: .72rem;
    margin-top: -6px;
    margin-bottom: 8px
}

.snav {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 6px;
}

.snav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
}

.snav-item:hover {
    background: #eef2f7;
}

.snav-item .icon {
    width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5b6b7d;
}

.snav-item.active {
    background: #ecf2f9;
    color: #0f172a;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--brand);
}

.snav-item.active .icon {
    color: var(--brand);
}

/* Responsive: el sidebar es el menú. Se desliza con burger */
@media (max-width:991.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 0;
        width: 320px;
        background: var(--bg);
        padding: 12px;
        overflow: auto;
        z-index: 1031;
        transform: translateX(-100%);
        opacity: 0;
        box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
        opacity: 1;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

/* Cabecera del formulario */
.form-head .right .meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Sortable headers */
th[data-sortable] {
    cursor: pointer;
    position: relative;
}

th[data-sortable]:after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-top-color: #9ca3af;
}

th[data-sort="asc"]:after {
    border-top-color: transparent;
    border-bottom-color: #374151;
}

th[data-sort="desc"]:after {
    border-top-color: #374151;
}

/* Condicionales dinámicos */
[data-cond-hidden="1"] {
    display: none !important;
}

[data-cond-disabled="1"] {
    opacity: .6;
    pointer-events: none;
}

/* Mini utilidades */
.text-muted {
    color: #6b7280 !important;
}

.shadow-soft {
    box-shadow: 0 8px 24px rgba(2, 6, 23, .06);
}

/* Ocultar el botón de menú (burger) en pantallas grandes */
@media (min-width: 992px) {
    .navbar .burger {
        display: none !important;
    }
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #3a5477;
    --bs-btn-border-color: #3a5477;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #8AAFD4;
    --bs-btn-hover-border-color: #8AAFD4;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #8AAFD4;
    --bs-btn-active-border-color: #3a5477;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #3a5477;
    --bs-btn-disabled-border-color: #3a5477;
}

/* Centrado del login */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* pantalla completa */
    background: #f5f7fb;
    /* igual que el fondo del resto */
}

.login-card {
    max-width: 400px;
    width: 100%;
}