:root {
    --sidebar-width: 268px;
    --topbar-h: 64px;
    --ui-bg: #eef3f9;
    --ui-bg2: #f7f9fc;
    --ui-surface: #ffffff;
    --ui-border: #dce5f0;
    --ui-text: #0f1f3d;
    --ui-muted: #64748b;
    --ui-primary: #0f5bd7;
    --ui-accent: #00a9a5;
    --ui-danger: #e05252;
    --ui-radius: 16px;
    --ui-shadow: 0 20px 45px rgba(10, 44, 94, 0.08);
}

body {
    background:
        radial-gradient(1200px 500px at 8% -10%, rgba(44, 119, 230, 0.2), transparent 65%),
        radial-gradient(1000px 450px at 110% 0%, rgba(0, 169, 165, 0.14), transparent 55%),
        linear-gradient(180deg, var(--ui-bg), var(--ui-bg2));
    color: var(--ui-text);
    font-family: "Manrope", "Segoe UI", sans-serif;
}

.bz-top-nav {
    min-height: var(--topbar-h);
    background: rgba(7, 35, 83, 0.92);
    border-bottom: 1px solid #2d4a7a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.bz-top-nav-left,
.bz-top-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bz-logo {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #e8f1ff;
    margin-right: 8px;
}

.bz-top-link {
    text-decoration: none;
    color: #c6d7f3;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 9px;
    transition: all 0.2s ease;
}

.bz-top-link:hover,
.bz-top-link.bz-active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.bz-user-chip,
.bz-clock-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #edf4ff;
    font-size: 0.92rem;
    font-weight: 800;
}

.bz-menu-toggle,
.bz-sidebar-close {
    display: none;
}

.bz-sidebar-backdrop {
    display: none;
}

.bz-sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.82);
    border-right: 1px solid var(--ui-border);
    backdrop-filter: blur(10px);
    padding: 22px 16px;
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    height: calc(100vh - var(--topbar-h));
    z-index: 15;
    overflow-y: auto;
}

.bz-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bz-brand {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #0b3b93;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.bz-sidebar-meta {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.bz-sidebar-clock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(120deg, #eff5ff, #f6fbff);
    border: 1px solid #d6e3f5;
    color: #143f84;
    font-size: 1.3rem;
    font-weight: 800;
}

.bz-nav-section {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6c7e97;
    margin: 8px 8px 6px;
}

.bz-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bz-nav a {
    text-decoration: none;
    color: #3f4f68;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.bz-nav a:hover {
    background: #edf4ff;
    color: #1555c4;
}

.bz-nav a.bz-active {
    background: linear-gradient(100deg, #dcebff, #e4f6ff);
    color: #0e50c0;
    border: 1px solid #c7dcf8;
}

.bz-main {
    display: block !important;
    flex: 1;
    min-height: calc(100vh - var(--topbar-h));
    margin-left: var(--sidebar-width);
    padding: 24px;
    align-self: stretch !important;
}

.bz-main > :first-child,
.bz-main > .container,
.bz-main > .container-fluid,
.bz-main > .bz-dashboard-page,
.bz-main > .cert-wrap {
    margin-top: 0 !important;
    align-self: flex-start !important;
}

.bz-dashboard {
    width: 100%;
    max-width: none;
}

.bz-dashboard-page {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
}

.bz-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--ui-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(236, 246, 255, 0.9));
    box-shadow: var(--ui-shadow);
    margin-bottom: 18px;
}

.bz-hero-main h2 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 2.9vw, 3.1rem);
    line-height: 1.04;
    font-weight: 800;
    color: #10254a;
}

.bz-hero-main p {
    margin: 0 0 18px;
    font-size: 1.02rem;
    color: #4b5f7d;
}

.bz-hero-side {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid #d7e6f6;
    background: rgba(255, 255, 255, 0.92);
}

.bz-meta-grid {
    display: grid;
    gap: 10px;
}

.bz-meta-item {
    display: grid;
    gap: 4px;
}

.bz-meta-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ui-muted);
}

.bz-meta-value {
    font-size: 1.02rem;
    font-weight: 700;
    color: #14345f;
    line-height: 1.3;
}

.bz-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.bz-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f3f8ff;
    border: 1px solid #d8e4f3;
    color: #173a69;
    font-size: 0.94rem;
    font-weight: 700;
}

.bz-chip strong {
    font-weight: 800;
}

.bz-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.bz-title {
    margin: 0 0 6px;
    font-size: clamp(2rem, 2.6vw, 2.9rem);
    line-height: 1.05;
    font-weight: 800;
    color: #10254a;
}

.bz-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.bz-stat-card {
    border-radius: var(--ui-radius);
    border: 1px solid var(--ui-border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--ui-shadow);
    padding: 18px 18px 16px;
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.bz-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--ui-primary), var(--ui-accent));
}

.bz-stat-card-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ui-muted);
    margin-bottom: 10px;
}

.bz-stat-card-value {
    font-size: clamp(2rem, 2.2vw, 2.6rem);
    line-height: 1;
    font-weight: 800;
    color: #10254a;
    margin-bottom: 10px;
}

.bz-stat-card-note {
    font-size: 0.98rem;
    line-height: 1.45;
    color: #596b86;
}

.bz-section-card {
    border-radius: var(--ui-radius);
    border: 1px solid var(--ui-border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--ui-shadow);
    padding: 22px;
}

.bz-section-title {
    margin: 0 0 16px;
    font-size: 1.4rem;
    line-height: 1.15;
    font-weight: 800;
    color: #15315f;
}

.bz-section-subtitle {
    margin: 0 0 14px;
    color: #5e6f88;
    line-height: 1.5;
}

.bz-list-note {
    display: grid;
    gap: 10px;
}

.bz-list-note-item {
    color: #233a60;
    line-height: 1.55;
}

.bz-kpi-stack {
    display: grid;
    gap: 16px;
}

.bz-empty-state {
    border: 1px dashed #cbd9ea;
    background: #f8fbff;
    color: #58708f;
    border-radius: 16px;
    padding: 18px;
}

.contenedor-fichajes,
.info-box,
.bz-widget,
.card {
    border-radius: var(--ui-radius) !important;
    border: 1px solid var(--ui-border) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: var(--ui-shadow) !important;
}

.contenedor-fichajes {
    padding: 22px !important;
    max-width: none;
    margin: 0 0 20px;
}

.status-fichar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.status-fichar-dot,
.compliance-badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-fichar--pending {
    background: rgba(255, 255, 255, 0.14);
    color: #f8fbff;
    border-color: rgba(255, 255, 255, 0.18);
}

.status-fichar--pending .status-fichar-dot {
    background: #cbd5e1;
}

.status-fichar--ok {
    background: rgba(22, 163, 74, 0.15);
    color: #0b6b2f;
    border-color: rgba(22, 163, 74, 0.2);
}

.status-fichar--ok .status-fichar-dot {
    background: #16a34a;
}

.status-fichar--warn {
    background: rgba(245, 158, 11, 0.16);
    color: #8a5603;
    border-color: rgba(245, 158, 11, 0.24);
}

.status-fichar--warn .status-fichar-dot {
    background: #f59e0b;
}

.compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e9f8ef;
    border: 1px solid #b7e4c5;
    color: #16753e;
    font-size: 0.9rem;
    font-weight: 700;
}

.compliance-badge-dot {
    background: #16a34a;
}

.ins-footer {
    margin-top: 24px;
    padding: 18px 24px;
    border-radius: var(--ui-radius);
    background: rgba(7, 35, 83, 0.92);
    color: #dce8ff;
    border: 1px solid #2d4a7a;
}

.ins-footer strong {
    color: #ffffff;
}

@media (max-width: 980px) {
    .bz-hero-card {
        grid-template-columns: 1fr;
    }

    .bz-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .bz-menu-toggle,
    .bz-sidebar-close {
        display: inline-flex;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        color: #eff6ff;
        align-items: center;
        justify-content: center;
    }

    .bz-menu-toggle {
        flex-direction: column;
        gap: 4px;
        padding: 0;
    }

    .bz-menu-toggle span {
        width: 18px;
        height: 2px;
        background: #eff6ff;
        border-radius: 99px;
        display: block;
    }

    .bz-sidebar {
        width: min(86vw, 320px);
        height: 100vh;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        box-shadow: 0 24px 60px rgba(11, 32, 65, 0.22);
        z-index: 40;
    }

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

    .bz-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(7, 17, 34, 0.45);
        z-index: 35;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        display: block;
    }

    body.sidebar-open .bz-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .bz-top-nav {
        align-items: center;
        padding: 10px 14px;
        gap: 8px;
    }

    .bz-top-link {
        display: none;
    }

    .bz-logo {
        font-size: 1.5rem;
    }

    .bz-top-nav-left,
    .bz-top-nav-right {
        flex-wrap: wrap;
        width: 100%;
    }

    .bz-top-nav-right {
        justify-content: space-between;
    }

    .bz-main {
        min-height: auto;
        margin-left: 0;
        padding: 18px 14px;
    }
}
