:root {
    --brand-green: #4f5bf0;
    --brand-green-dark: #3c46d6;
    --brand-accent: #7c8cf5;
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow-soft: 0 4px 20px rgba(15, 23, 42, .06);
    --shadow-hover: 0 10px 30px rgba(15, 23, 42, .12);
}

* {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bs-tertiary-bg);
    background-image:
        linear-gradient(rgba(79, 91, 240, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 91, 240, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--brand-green) 8%, transparent) 0%, transparent 45%),
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--brand-accent) 8%, transparent) 0%, transparent 45%),
        radial-gradient(circle at 15% 100%, color-mix(in srgb, var(--brand-green) 5%, transparent) 0%, transparent 40%);
    background-size: 28px 28px, 28px 28px, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    min-height: 100vh;
    transition: background-color .2s ease;
}

/* Fondo cuadriculado para modo oscuro */
[data-bs-theme="dark"] body {
    background-image:
        linear-gradient(rgba(124, 140, 245, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 140, 245, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--brand-green) 8%, transparent) 0%, transparent 45%),
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--brand-accent) 8%, transparent) 0%, transparent 45%),
        radial-gradient(circle at 15% 100%, color-mix(in srgb, var(--brand-green) 5%, transparent) 0%, transparent 40%);
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -.01em;
}

/* Contenido principal ocupa todo el ancho disponible */
.app-content {
    width: 100%;
    padding: 1.75rem 1.5rem;
}

/* Insignia de icono automática para los encabezados de sección
   (patron <h2 class="fw-bold ..."><i class="bi ..."></i> Titulo</h2>) */
h1.fw-bold > i.bi:first-child,
h2.fw-bold > i.bi:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    margin-right: .55rem;
    margin-bottom: 4px;
    font-size: 1.15rem;
    vertical-align: middle;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-green) 16%, transparent) 0%, color-mix(in srgb, var(--brand-accent) 16%, transparent) 100%);
    color: var(--brand-green-dark);
}

/* --- App shell (sidebar) --- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1040;
}

.sidebar-backdrop.visible {
    display: block;
}

.app-sidebar {
    width: 256px;
    flex-shrink: 0;
    background: #16172a;
    color: #cbd0e8;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1050;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.35rem 1.25rem .35rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    padding-bottom: 1rem;
}

.sidebar-logo-wrap {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    background: #fff;
}

.sidebar-brand-name {
    font-weight: 800;
    font-size: .98rem;
    color: #fff;
    line-height: 1.15;
}

.sidebar-brand-sub {
    font-size: .68rem;
    color: #8a90b8;
    letter-spacing: .02em;
}

.app-sidebar-nav {
    padding: .85rem 0 .5rem;
    flex: 1;
}

.sidebar-group + .sidebar-group,
.app-sidebar-nav > .sidebar-link + .sidebar-group,
.sidebar-group + .sidebar-link {
    margin-top: .1rem;
}

.sidebar-link,
.sidebar-sub-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #b2b7d6;
    text-decoration: none;
    padding: .68rem 1.25rem;
    font-size: .9rem;
    font-weight: 500;
    border-radius: 0;
    transition: background-color .13s ease, color .13s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover,
.sidebar-sub-link:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.sidebar-link.active,
.sidebar-sub-link.active {
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand-green) 22%, transparent) 0%, transparent 100%);
    color: #fff;
    border-left-color: var(--brand-accent);
}

.sidebar-link i.bi,
.sidebar-sub-link i.bi {
    font-size: .95rem;
    opacity: .85;
}

.sidebar-sub-link {
    padding-left: 3rem;
    font-size: .85rem;
    color: #9aa0c4;
}

.sidebar-caret {
    font-size: .75rem;
    opacity: .6;
    transition: transform .15s ease;
}

a[aria-expanded="true"] .sidebar-caret {
    transform: rotate(180deg);
}

.app-sidebar-footer {
    padding: 0 0 1.25rem;
}

.app-sidebar-footer .altivatec-badge {
    margin-top: .75rem;
    margin-bottom: .75rem;
}

.app-sidebar-footer .sidebar-link {
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.app-sidebar-footer .sidebar-link {
    padding: .6rem 1.25rem;
}

.app-sidebar-footer form button.sidebar-link:hover {
    background: rgba(255, 255, 255, .06);
}

/* --- Topbar --- */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.5rem;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color-translucent);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-topbar-date {
    align-items: center;
    gap: .5rem;
    color: var(--bs-secondary-color);
    font-size: .88rem;
    font-weight: 500;
}

.sidebar-toggle {
    border: none;
    background: transparent;
    color: var(--bs-body-color);
    padding: .25rem .35rem;
}

.topbar-icon-btn {
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .13s ease, border-color .13s ease;
}

.topbar-icon-btn:hover {
    background: var(--bs-tertiary-bg);
}

/* Boton de tema en paginas publicas (sin topbar): flotante arriba a la derecha */
.public-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1050;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

.app-topbar-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--bs-body-color);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-accent) 100%);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: .78rem;
}

.app-topbar-user-name {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-size: .82rem;
}

.topbar-role {
    color: var(--bs-secondary-color);
    font-size: .7rem;
}

.app-content {
    flex: 1;
}

/* --- Generic dropdown (topbar user menu) --- */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    padding: .5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: .55rem .8rem;
    font-weight: 500;
    transition: background-color .12s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: color-mix(in srgb, var(--brand-green) 10%, transparent);
}

/* --- Campana de notificaciones del topbar --- */
.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--bs-danger);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notif-menu {
    min-width: 300px;
    max-width: 340px;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    white-space: normal;
}

.notif-icon {
    color: var(--brand-green);
    margin-top: .15rem;
    flex-shrink: 0;
}

.notif-text {
    flex: 1;
    font-size: .82rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-time {
    font-size: .7rem;
    color: var(--bs-secondary-color);
    flex-shrink: 0;
    margin-top: .1rem;
}

/* --- Cards --- */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: box-shadow .2s ease, transform .2s ease;
}

.stat-card {
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

.stat-card.text-bg-success {
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%) !important;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon-total {
    background: color-mix(in srgb, var(--brand-green) 15%, transparent);
    color: var(--brand-green);
}

.stat-icon-present {
    background: rgba(40, 193, 138, .16);
    color: #28c18a;
}

.stat-icon-absent {
    background: rgba(244, 167, 47, .15);
    color: #d38307;
}

.stat-icon-enrolled {
    background: color-mix(in srgb, var(--brand-accent) 18%, transparent);
    color: var(--brand-accent);
}

.stat-icon-tardy {
    background: rgba(220, 53, 69, .14);
    color: #dc3545;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.01em;
}

.stat-label {
    font-size: .8rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.stat-foot {
    font-size: .72rem;
    font-weight: 700;
    margin-top: .1rem;
}

.stat-foot-success { color: #28c18a; }
.stat-foot-warning { color: #d38307; }
.stat-foot-danger { color: #dc3545; }

/* --- Buttons --- */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: .5rem 1.1rem;
    transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}

.btn:active {
    transform: scale(.97);
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
    border-color: var(--brand-green);
    color: #fff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-green) 35%, transparent);
}

.btn-brand:hover {
    background: linear-gradient(135deg, var(--brand-green-dark) 0%, var(--brand-green) 100%);
    border-color: var(--brand-green-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-green) 45%, transparent);
}

.btn-outline-success {
    color: var(--brand-green);
    border-color: var(--brand-green);
}

.btn-outline-success:hover {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
}

.btn-sm {
    border-radius: 8px;
}

/* --- Forms --- */
.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--bs-border-color);
    padding: .55rem .85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand-green) 20%, transparent);
}

.form-control-color {
    width: 100%;
    height: 46px;
    border-radius: 10px;
}

.form-check-input:checked {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
}

.form-label {
    font-weight: 600;
    font-size: .88rem;
    color: var(--bs-secondary-color);
    margin-bottom: .4rem;
}

/* --- Tables --- */
.table {
    --bs-table-hover-bg: color-mix(in srgb, var(--brand-green) 6%, transparent);
}

.table thead th {
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--bs-secondary-color);
    font-weight: 700;
    border-bottom-width: 1px;
}

/* --- Badges --- */
.badge {
    font-weight: 600;
    padding: .4em .7em;
    border-radius: 8px;
}

/* --- Alerts --- */
.alert {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

/* --- Mobile sidebar --- */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 0 0 40px rgba(0, 0, 0, .3);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-topbar {
        padding: .7rem 1rem;
    }

    .app-content {
        padding: 1.25rem 1rem;
    }

    .app-topbar-user-name {
        display: none;
    }
}

/* --- Login page v2 --- */
.loginv2 {
    --lv-primary: #4f5bf0;
    --lv-primary-dark: #3c46d6;
    --lv-navy: #1e1b4b;
    position: relative;
    min-height: 100vh;
    padding: 3.5rem 1.5rem 0;
    overflow: hidden;
    background: linear-gradient(180deg, #eef1fd 0%, #e6eafc 100%);
}

[data-bs-theme="dark"] .loginv2 {
    background: linear-gradient(180deg, #14152b 0%, #1b1c3a 100%);
}

.loginv2-blob-top {
    position: absolute;
    top: -160px;
    right: -160px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(129, 140, 248, .35) 0%, rgba(129, 140, 248, 0) 70%);
    z-index: 0;
}

.loginv2-blob-bottom {
    position: absolute;
    left: -120px;
    bottom: -180px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lv-primary) 0%, #7c8cf5 100%);
    opacity: .9;
    z-index: 0;
}

.loginv2-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
    padding-bottom: 3rem;
}

.loginv2-card {
    background: var(--bs-body-bg);
    width: 100%;
    max-width: 380px;
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(79, 91, 240, .18);
    padding: 2.75rem 2.25rem;
    text-align: center;
}

/* Variante ancha del card (registro de empresa tiene mas campos) */
.loginv2-card-wide {
    max-width: 480px;
}

.loginv2-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #eef0ff 0%, #dfe3ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: var(--lv-primary);
}

.loginv2-icon-logo {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    overflow: hidden;
}

.loginv2-icon-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.loginv2-title {
    font-weight: 800;
    font-size: 1.7rem;
    color: var(--lv-navy);
    margin-bottom: .15rem;
}

[data-bs-theme="dark"] .loginv2-title {
    color: #e8e9fb;
}

.loginv2-subtitle {
    color: var(--lv-primary);
    font-weight: 600;
    margin-bottom: .6rem;
}

.loginv2-tagline {
    color: var(--bs-secondary-color);
    font-size: .88rem;
    margin-bottom: 1.75rem;
    line-height: 1.4;
}

.loginv2-label {
    display: block;
    text-align: left;
    font-weight: 600;
    font-size: .82rem;
    color: var(--bs-secondary-color);
    margin-bottom: .35rem;
    margin-top: 1rem;
}

.loginv2-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.loginv2-input-wrap i:first-child {
    position: absolute;
    left: 14px;
    color: #9ca3d6;
    font-size: 1rem;
    pointer-events: none;
}

.loginv2-input-wrap .form-control {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    border-radius: 12px;
    background: #f6f7fd;
    border-color: #e6e8fb;
}

[data-bs-theme="dark"] .loginv2-input-wrap .form-control {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .1);
}

.loginv2-input-wrap .form-control:focus {
    border-color: var(--lv-primary);
    box-shadow: 0 0 0 .2rem rgba(79, 91, 240, .15);
    background: var(--bs-body-bg);
}

.loginv2-eye-toggle {
    position: absolute;
    right: 14px;
    color: #9ca3d6;
    cursor: pointer;
}

/* Toggle switch para tema claro/oscuro */
.theme-toggle {
    display: inline-flex;
    cursor: pointer;
    user-select: none;
}
.theme-toggle-track {
    position: relative;
    display: flex;
    width: 72px;
    height: 34px;
    border-radius: 34px;
    background: var(--bs-tertiary-bg, #e9ecef);
    border: 1px solid var(--bs-border-color, #dee2e6);
    overflow: hidden;
    transition: background 0.25s ease;
}
.theme-toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.35);
    z-index: 1;
    transition: color 0.25s ease;
}
.theme-toggle[data-value="light"] .theme-toggle-option[data-value="light"],
.theme-toggle[data-value="dark"] .theme-toggle-option[data-value="dark"] {
    color: #fbbf24;
}
.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0.55;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, opacity 0.25s ease;
}
.theme-toggle:hover .theme-toggle-thumb {
    opacity: 0.4;
}
.theme-toggle[data-value="dark"] .theme-toggle-track {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.theme-toggle[data-value="dark"] .theme-toggle-thumb {
    transform: translateX(38px);
}
.theme-toggle[data-value="light"] .theme-toggle-track {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

/* Variante grande */
.theme-toggle-lg .theme-toggle-track {
    width: 104px;
    height: 48px;
    border-radius: 48px;
}
.theme-toggle-lg .theme-toggle-option {
    font-size: 20px;
}
.theme-toggle-lg .theme-toggle-thumb {
    top: 4px;
    left: 4px;
    width: 38px;
    height: 38px;
}
.theme-toggle-lg[data-value="dark"] .theme-toggle-thumb {
    transform: translateX(58px);
}

.loginv2-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.1rem 0 1.4rem;
    font-size: .82rem;
}

.loginv2-remember {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--bs-secondary-color);
    cursor: pointer;
}

.loginv2-remember input {
    accent-color: var(--lv-primary);
}

.loginv2-link,
.loginv2-link-muted {
    color: var(--lv-primary);
    font-weight: 600;
    text-decoration: none;
}

.loginv2-link-muted {
    color: var(--lv-primary);
}

.loginv2-link:hover,
.loginv2-link-muted:hover {
    text-decoration: underline;
}

.loginv2-submit {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: .8rem 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--lv-primary) 0%, var(--lv-primary-dark) 100%);
    box-shadow: 0 10px 24px rgba(79, 91, 240, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: transform .12s ease, box-shadow .15s ease;
}

.loginv2-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(79, 91, 240, .45);
    color: #fff;
}

.loginv2-footer-note {
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-size: .85rem;
    color: var(--bs-secondary-color);
}

/* --- Badge "Creado por AltivaTec" --- */
.altivatec-badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    margin-top: 1.25rem;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    color: #FF8000;
    transition: opacity .12s ease;
}
.altivatec-badge:hover {
    opacity: .7;
    color: #FF8000;
    text-decoration: underline;
}
.altivatec-badge-brand {
    font-weight: 800;
    letter-spacing: -.01em;
}
[data-bs-theme="dark"] .altivatec-badge {
    color: #FF9933;
}
[data-bs-theme="dark"] .altivatec-badge:hover {
    color: #FF9933;
}

/* ===================== Modal de cumpleaños ===================== */
.birthday-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: birthdayFadeIn 0.3s ease;
}
.birthday-modal {
    background: var(--bs-body-bg);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: birthdayPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.birthday-modal-emoji {
    font-size: 4rem;
    animation: birthdayBounce 1s ease infinite;
}
.birthday-modal-title {
    font-weight: 800;
    margin: 0.5rem 0;
    color: #e83e8c;
}
.birthday-modal-names {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.birthday-modal-sub {
    color: var(--bs-secondary-color);
    margin-bottom: 1.5rem;
}
@keyframes birthdayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes birthdayPop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes birthdayBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Animaciones del confeti del kiosko */
@keyframes bdayFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes bdayPop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes bdayBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- Illustration --- */
.loginv2-illustration {
    position: relative;
    width: 420px;
    height: 460px;
    flex-shrink: 0;
}

.loginv2-dots {
    position: absolute;
    top: 10px;
    right: 20px;
    width: 90px;
    height: 90px;
    background-image: radial-gradient(circle, #b9c0f7 1.6px, transparent 1.6px);
    background-size: 14px 14px;
    opacity: .8;
}

.loginv2-calendar {
    position: absolute;
    top: 70px;
    left: 20px;
    width: 220px;
    background: var(--bs-body-bg);
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(79, 91, 240, .18);
    padding: 1.5rem 1.25rem 1.25rem;
}

.loginv2-calendar-rings {
    display: flex;
    justify-content: space-evenly;
    margin-top: -2rem;
    margin-bottom: .75rem;
}

.loginv2-calendar-rings span {
    width: 14px;
    height: 22px;
    border-radius: 8px;
    background: #fff;
    border: 3px solid #a5aef7;
    display: block;
}

.loginv2-calendar-header {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--lv-primary) 0%, #8b95f7 100%);
    margin-bottom: 1rem;
}

.loginv2-calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}

.loginv2-calendar-grid span {
    height: 28px;
    border-radius: 8px;
    background: #eef0fd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loginv2-calendar-grid span.filled {
    background: var(--lv-primary);
}

.loginv2-calendar-grid span.check {
    background: #d7f7e6;
    color: #19b177;
    font-size: .85rem;
}

.loginv2-clock {
    position: absolute;
    bottom: 120px;
    right: 10px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: var(--bs-body-bg);
    border: 6px solid var(--lv-primary);
    box-shadow: 0 20px 45px rgba(79, 91, 240, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: var(--lv-primary);
}

.loginv2-dashcard {
    position: absolute;
    bottom: 20px;
    right: 30px;
    width: 190px;
    background: var(--bs-body-bg);
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(79, 91, 240, .18);
    padding: 1rem;
}

.loginv2-dash-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lv-primary) 0%, #8b95f7 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .6rem;
}

.loginv2-dash-lines span {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: #eef0fd;
    margin-bottom: .4rem;
}

.loginv2-dash-lines span:first-child { width: 80%; }
.loginv2-dash-lines span:last-child { width: 55%; }

.loginv2-dash-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 40px;
    margin-top: .75rem;
}

.loginv2-dash-bars i {
    display: block;
    width: 16px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, #8b95f7 0%, var(--lv-primary) 100%);
}

.loginv2-dash-bars i:nth-child(1) { height: 40%; }
.loginv2-dash-bars i:nth-child(2) { height: 65%; }
.loginv2-dash-bars i:nth-child(3) { height: 90%; }
.loginv2-dash-bars i:nth-child(4) { height: 55%; }

.loginv2-plant {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bs-body-bg);
    box-shadow: 0 10px 25px rgba(79, 91, 240, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #34c38f;
}

.loginv2-features {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 1rem 3rem;
    text-align: center;
}

.loginv2-feature {
    max-width: 220px;
}

.loginv2-feature-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto .6rem;
    border-radius: 12px;
    background: var(--bs-body-bg);
    box-shadow: 0 6px 16px rgba(79, 91, 240, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lv-primary);
    font-size: 1.15rem;
}

@media (max-width: 575px) {
    .loginv2 {
        padding-top: 2.5rem;
    }
    .loginv2-card {
        padding: 2rem 1.5rem;
        border-radius: 22px;
    }
}

/* --- Kiosko de camara v2 --- */
.kiosk-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 50px;
    padding: .5rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

.kiosk-status-pill .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6c757d;
    flex-shrink: 0;
}

.kiosk-status-pill.kiosk-status-ok .dot { background: #28c18a; }
.kiosk-status-pill.kiosk-status-warn .dot { background: #f4a72f; }
.kiosk-status-pill.kiosk-status-error .dot { background: #e7413c; }
.kiosk-status-pill.kiosk-status-info .dot { background: var(--brand-green); }

.kiosk-action-btn {
    border: none;
    border-radius: 14px;
    padding: .85rem 1.9rem;
    font-weight: 700;
    font-size: 1.02rem;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    transition: transform .12s ease, box-shadow .15s ease, opacity .15s ease;
    box-shadow: var(--shadow-soft);
    white-space: nowrap;
}

.kiosk-action-btn:active:not(:disabled) {
    transform: scale(.97);
}

.kiosk-action-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Colores fijos para entrada/salida: no dependen del tema de la empresa. */
.kiosk-btn-in {
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
    color: #fff;
}

.kiosk-btn-in:hover:not(:disabled) {
    background: linear-gradient(135deg, #22c95e 0%, #1a9b47 100%);
    box-shadow: 0 8px 20px rgba(37, 211, 102, .4);
}

.kiosk-btn-out {
    background: #fff;
    color: #FF0000;
    border: 2px solid #FF0000;
}

.kiosk-btn-out:hover:not(:disabled) {
    background: #ffe5e5;
    box-shadow: 0 8px 20px rgba(255, 0, 0, .2);
}

.kiosk-actions-row {
    display: flex;
    gap: .75rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: nowrap;
}

@media (max-width: 480px) {
    .kiosk-actions-row {
        gap: .5rem;
    }
    .kiosk-action-btn {
        padding: .7rem 1.1rem;
        font-size: .9rem;
    }
}

.kiosk-camera-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0;
    border-radius: 22px;
    overflow: hidden;
    background: #101023;
    box-shadow: var(--shadow-hover);
}

.kiosk-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .55rem 0;
    font-size: .88rem;
}

.kiosk-info-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.kiosk-info-value {
    font-weight: 600;
}

.kiosk-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}

.kiosk-stat-mini {
    text-align: center;
    padding: .75rem .5rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--bs-body-color) 4%, transparent);
}

.kiosk-stat-mini-value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.1;
}

.kiosk-stat-mini-success { color: #28c18a; }
.kiosk-stat-mini-warning { color: #d38307; }
.kiosk-stat-mini-danger { color: #dc3545; }

.kiosk-stat-mini-label {
    font-size: .72rem;
    color: var(--bs-secondary-color);
    margin-top: .2rem;
}

@media (max-width: 991.98px) {
    .kiosk-camera-wrapper {
        max-width: 100%;
    }
}

/* --- Kiosko de camara (heredado: floating actions) --- */
.camera-wrapper {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 22px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-hover);
}

.camera-wrapper video,
.camera-wrapper canvas {
    width: 100%;
    display: block;
}

.camera-wrapper canvas#overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-actions {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 14px;
    z-index: 5;
}

.floating-btn {
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: .95rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform .1s ease;
}

.floating-btn:active {
    transform: scale(.95);
}

.floating-btn.btn-in {
    background-color: #198754;
}

.floating-btn.btn-out {
    background-color: #dc3545;
}

.floating-btn:disabled {
    opacity: .5;
}

.recognized-name-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: .9rem;
    z-index: 5;
}

.kiosk-status {
    min-height: 28px;
}

/* Lista de checkboxes de días laborables */
#id_workdays {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .5rem;
    margin-bottom: 0;
}
#id_workdays li {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
}
#id_workdays input {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .floating-btn {
        padding: 8px 16px;
        font-size: .85rem;
    }
}

/* --- Calendario de días especiales --- */
.calendar-grid-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
}

.calendar-header {
    background: var(--bs-tertiary-bg);
    padding: .5rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.calendar-week {
    min-height: 90px;
    border-bottom: 1px solid var(--bs-border-color);
}

.calendar-week:last-child {
    border-bottom: none;
}

.calendar-cell {
    border-right: 1px solid var(--bs-border-color);
    min-height: 90px;
    background: var(--bs-body-bg);
    transition: background-color .15s ease;
}

.calendar-cell:last-child {
    border-right: none;
}

.calendar-cell:empty {
    background: var(--bs-tertiary-bg);
}

.calendar-day-card {
    border-radius: 10px;
    height: 100%;
    min-height: 80px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
    border: 1px solid transparent;
}

.calendar-day-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.calendar-day-number {
    font-size: .9rem;
    font-weight: 600;
    color: var(--bs-body-color);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.calendar-today .calendar-day-number {
    background: var(--brand-green);
    color: #fff;
}

.calendar-weekend {
    background: color-mix(in srgb, #ffc107 10%, transparent);
}

.calendar-no-workday {
    background: var(--bs-tertiary-bg);
    opacity: .7;
}

.calendar-holiday {
    background: color-mix(in srgb, #dc3545 16%, transparent);
    border-color: #dc3545;
}

.calendar-extra-work {
    background: color-mix(in srgb, #ffc107 22%, transparent);
    border-color: #f4a72f;
}

.calendar-non-working {
    background: color-mix(in srgb, #6c757d 18%, transparent);
    border-color: #6c757d;
}

.calendar-badge {
    font-size: .62rem;
    font-weight: 700;
    text-align: center;
    border-radius: 6px;
    padding: .15rem .25rem;
    background: rgba(255, 255, 255, .5);
    color: var(--bs-body-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .calendar-week {
        min-height: 70px;
    }
    .calendar-cell {
        min-height: 70px;
    }
    .calendar-day-card {
        min-height: 60px;
    }
    .calendar-day-number {
        font-size: .78rem;
        width: 22px;
        height: 22px;
    }
    .calendar-badge {
        font-size: .55rem;
    }
}

.calendar-sidebar {
    box-shadow: var(--shadow-soft);
}

.calendar-sidebar-item {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.calendar-sidebar-item:hover,
.calendar-sidebar-item.active {
    background: var(--brand-green);
    color: #fff;
}

.calendar-week-large {
    min-height: 130px;
}

.calendar-cell-large {
    min-height: 130px;
}

.calendar-cell-large .calendar-day-card {
    min-height: 120px;
    border-radius: 12px;
}

.calendar-event-card {
    border-radius: 8px;
    padding: .35rem .5rem;
    font-size: .75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, .55);
    margin-top: .25rem;
}

.calendar-holiday .calendar-event-card { color: #842029; }
.calendar-extra-work .calendar-event-card { color: #664d03; }
.calendar-non-working .calendar-event-card { color: #41464b; }

/* --- Calendario estilo "board" (Miro-like) --- */
.miro-calendar-wrapper {
    min-height: 75vh;
}

.miro-sidebar {
    width: 60px;
    flex-shrink: 0;
    background: var(--bs-body-bg);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    gap: .85rem;
}

.miro-sidebar-item {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, transform .12s ease;
}

.miro-sidebar-item:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--brand-green) 12%, transparent);
    color: var(--brand-green);
}

.miro-sidebar-item.active {
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-green) 40%, transparent);
}

.miro-board {
    background: color-mix(in srgb, var(--bs-tertiary-bg) 70%, transparent);
    border-radius: 22px;
    padding: 1.25rem;
}

.miro-toolbar {
    padding: 0 .25rem;
}

.miro-title-pill {
    background: #111827;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    padding: .55rem 1.4rem;
    border-radius: 50px;
    box-shadow: 0 6px 16px rgba(17, 24, 39, .25);
    display: inline-flex;
    align-items: center;
}

[data-bs-theme="dark"] .miro-title-pill {
    background: #f4f4f5;
    color: #111827;
}

.miro-select {
    border-radius: 10px;
}

.miro-grid-card {
    background: var(--bs-body-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--bs-border-color);
}

.miro-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.miro-header-cell {
    text-align: center;
    padding: .65rem 0;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--bs-secondary-color);
}

.miro-header-weekend {
    background: linear-gradient(135deg, #ffe066 0%, #ffd43b 100%);
    color: #664d03;
}

.miro-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 88px;
}

.miro-day-cell {
    height: 88px;
    max-height: 88px;
    border-right: 1px solid var(--bs-border-color);
    border-bottom: 1px solid var(--bs-border-color);
    padding: .4rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    position: relative;
    background: var(--bs-body-bg);
    transition: background-color .15s ease;
    overflow: hidden;
}

.miro-week-row .miro-day-cell:last-child {
    border-right: none;
}

.miro-day-cell.miro-day-empty {
    background: var(--bs-tertiary-bg);
}

.miro-day-cell.miro-day-weekend {
    background: color-mix(in srgb, #ffe066 12%, transparent);
}

.miro-day-cell:hover:not(.miro-day-empty) {
    background: color-mix(in srgb, var(--brand-green) 5%, transparent);
}

.miro-day-number {
    font-size: .85rem;
    font-weight: 700;
    color: var(--bs-body-color);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.miro-day-today {
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-green) 45%, transparent);
}

/* Post-it / sticky note para cada evento, al estilo Miro */
.miro-sticky-note {
    border-radius: 8px;
    padding: .25rem .4rem;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .3rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
    transform: rotate(-.6deg);
    transition: transform .15s ease, box-shadow .15s ease;
    line-height: 1.2;
    cursor: default;
    height: 22px;
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}

.miro-sticky-note:hover {
    transform: rotate(0deg) translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .18);
    z-index: 2;
}

.miro-sticky-note .bi {
    display: none;
}

.miro-sticky-note .miro-emoji {
    display: inline;
    font-size: .85rem;
    line-height: 1;
    flex-shrink: 0;
}

.miro-sticky-note .miro-employee-name {
    display: none;
}

.miro-sticky-note .miro-note-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.miro-note-holiday {
    background: #ffc9c9;
    color: #9a1f1f;
}

.miro-note-extra_work {
    background: #ffe066;
    color: #664d03;
}

.miro-note-non_working {
    background: #d0d5dd;
    color: #344054;
}

[data-bs-theme="dark"] .miro-note-holiday { background: #6b1616; color: #ffd1d1; }
[data-bs-theme="dark"] .miro-note-extra_work { background: #6b5400; color: #fff3bf; }
[data-bs-theme="dark"] .miro-note-non_working { background: #3f4552; color: #e2e5ea; }

.miro-notes-stack {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    margin-top: .15rem;
    flex-shrink: 1;
    overflow: hidden;
    min-width: 0;
}

.miro-sticky-note.miro-note-personal {
    height: 32px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: .2rem .4rem;
    gap: .05rem;
}

.miro-sticky-note.miro-note-personal .miro-employee-name {
    display: block;
    font-size: .55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    opacity: .85;
}

.miro-sticky-note.miro-note-personal .miro-note-text {
    font-size: .6rem;
    line-height: 1.1;
}

.miro-more-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    border-radius: 9px;
    padding: 0 .35rem;
    font-size: .6rem;
    font-weight: 800;
    background: #111827;
    color: #fff;
    align-self: flex-start;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .miro-more-badge {
    background: #f4f4f5;
    color: #111827;
}

.miro-day-clickable {
    cursor: pointer;
}

.miro-detail-panel {
    animation: miro-fade-in .25s ease;
}

@keyframes miro-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.miro-detail-card {
    background: var(--bs-body-bg);
    border-radius: 18px;
    box-shadow: var(--shadow-hover);
    padding: 1.25rem;
    border: 1px solid var(--bs-border-color);
    max-width: 100%;
}

.miro-detail-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--bs-body-color);
}

.miro-detail-body {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.miro-detail-note {
    border-radius: 12px;
    padding: .85rem 1rem;
    font-size: .9rem;
    font-weight: 700;
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    line-height: 1.4;
}

.miro-detail-note .miro-note-text {
    white-space: normal;
    overflow: visible;
    display: block;
}

.miro-detail-note .bi {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: .1rem;
}

.miro-detail-note .miro-emoji {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: .1rem;
}

.miro-detail-note .miro-employee-name {
    display: block;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: .15rem;
    opacity: .85;
}

.miro-legend {
    padding: 0 .25rem;
}

.miro-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.miro-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.miro-legend-weekend {
    background: linear-gradient(135deg, #ffe066 0%, #ffd43b 100%);
}

.miro-legend-today {
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
    border-radius: 50%;
}

@media (max-width: 768px) {
    .miro-week-row {
        grid-auto-rows: 72px;
    }
    .miro-day-cell {
        height: 72px;
        max-height: 72px;
        padding: .25rem;
        gap: .15rem;
    }
    .miro-sticky-note {
        height: 20px;
        font-size: .58rem;
        padding: .15rem .3rem;
    }
    .miro-sticky-note .bi {
        font-size: .8rem;
    }
    .miro-header-cell {
        font-size: .62rem;
        padding: .4rem 0;
    }
    .miro-day-number {
        width: 20px;
        height: 20px;
        font-size: .7rem;
    }
}

/* Version compacta del calendario, usada en formularios de empresa/empleado */
.miro-grid-mini .miro-week-row {
    grid-auto-rows: 64px;
}

.miro-grid-mini .miro-day-cell {
    height: 64px;
    max-height: 64px;
    padding: .25rem;
    gap: .15rem;
}

.miro-grid-mini .miro-day-number {
    width: 18px;
    height: 18px;
    font-size: .68rem;
}

.miro-grid-mini .miro-sticky-note {
    height: 18px;
    font-size: .58rem;
    padding: .15rem .3rem;
    gap: .2rem;
}

.miro-grid-mini .miro-sticky-note.miro-note-personal {
    height: 28px;
    padding: .1rem .25rem;
    gap: 0;
}

.miro-grid-mini .miro-sticky-note.miro-note-personal .miro-employee-name {
    font-size: .5rem;
}

.miro-grid-mini .miro-sticky-note.miro-note-personal .miro-note-text {
    font-size: .55rem;
}

.miro-grid-mini .miro-sticky-note .bi {
    font-size: .75rem;
}

.miro-grid-mini .miro-more-badge {
    height: 15px;
    font-size: .55rem;
    padding: 0 .25rem;
}

.miro-grid-mini .miro-header-cell {
    font-size: .65rem;
    padding: .45rem 0;
}

/* ==================== LANDING PAGE ==================== */
.landing {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--bs-body-color);
}

.landing-logo { height: 40px; width: auto; border-radius: 10px; }

.landing-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-green) 40%, transparent);
}

.landing-nav-actions { display: flex; gap: .6rem; align-items: center; }

.landing-btn-primary,
.landing-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}

.landing-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-green) 35%, transparent);
}

.landing-btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-green) 45%, transparent);
}

.landing-btn-ghost {
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border: 1.5px solid var(--bs-border-color);
}

.landing-btn-ghost:hover {
    color: var(--brand-green);
    border-color: var(--brand-green);
    transform: translateY(-2px);
}

.landing-btn-lg { padding: .85rem 1.6rem; font-size: 1rem; border-radius: 14px; }

.landing-hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 3rem;
    align-items: center;
    padding: 3.5rem 0 4rem;
}

.landing-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .9rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--brand-green);
    background: color-mix(in srgb, var(--brand-green) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand-green) 25%, transparent);
    margin-bottom: 1.25rem;
}

.landing-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 1.1rem;
}

.landing-grad {
    background: linear-gradient(135deg, var(--brand-green), var(--brand-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-hero-text > p {
    font-size: 1.05rem;
    color: var(--bs-secondary-color);
    line-height: 1.65;
    margin-bottom: 1.75rem;
    max-width: 34rem;
}

.landing-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.landing-trust {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
    font-size: .82rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.landing-trust i { color: var(--brand-green); margin-right: .3rem; }

/* Mock del kiosko */
.landing-hero-visual { display: flex; flex-direction: column; align-items: center; }

.kiosk-mock {
    width: 100%;
    max-width: 330px;
    border-radius: 24px;
    padding: 10px;
    background: linear-gradient(160deg, #1e2235, #10131f);
    box-shadow: 0 30px 60px rgba(15, 23, 42, .35), 0 0 0 1px rgba(255,255,255,.06);
    transform: rotate(-2deg);
    transition: transform .3s ease;
}

.kiosk-mock:hover { transform: rotate(0deg) scale(1.02); }

.kiosk-mock-camera {
    position: relative;
    border-radius: 17px;
    height: 340px;
    background: radial-gradient(circle at 50% 35%, #2c3350, #171b2c 75%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.kiosk-mock-person {
    font-size: 6.5rem;
    color: rgba(255,255,255,.16);
}

.kiosk-mock-face {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    width: 128px;
    height: 150px;
    border: 3px solid #22c55e;
    border-radius: 14px;
    box-shadow: 0 0 24px rgba(34,197,94,.45);
    animation: face-pulse 2s ease-in-out infinite;
}

@keyframes face-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(34,197,94,.35); }
    50% { box-shadow: 0 0 32px rgba(34,197,94,.6); }
}

.kiosk-mock-name {
    position: absolute;
    top: 210px;
    left: 50%;
    transform: translateX(-50%);
    background: #22c55e;
    color: #062a12;
    font-weight: 800;
    font-size: .85rem;
    padding: .35rem .85rem;
    border-radius: 999px;
    white-space: nowrap;
}

.kiosk-mock-btns {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: .6rem;
}

.kiosk-mock-btn {
    font-size: .72rem;
    font-weight: 700;
    padding: .4rem .8rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.kiosk-mock-btn.in { background: rgba(34,197,94,.9); color: #052e16; }
.kiosk-mock-btn.out { background: rgba(239,68,68,.9); color: #fff; }

.kiosk-mock-shadow {
    width: 70%;
    height: 18px;
    margin-top: 14px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(15,23,42,.3), transparent 70%);
}

/* Features */
.landing-features { padding: 3rem 0; text-align: center; }
.landing-features h2 { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.landing-features-sub { color: var(--bs-secondary-color); margin-bottom: 2.5rem; }

.landing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    text-align: left;
}

.landing-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, box-shadow .18s ease;
}

.landing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.landing-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
    margin-bottom: 1rem;
}

.landing-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: .5rem; }
.landing-card p { font-size: .88rem; color: var(--bs-secondary-color); margin: 0; line-height: 1.6; }

/* Pasos */
.landing-steps { padding: 3rem 0 4rem; text-align: center; }
.landing-steps h2 { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 2.5rem; }

.landing-steps-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.landing-step-line {
    position: absolute;
    top: 26px;
    left: 18%;
    right: 18%;
    height: 2px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand-green) 40%, transparent), transparent);
    z-index: 0;
}

.landing-step { position: relative; z-index: 1; }

.landing-step-num {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-green) 35%, transparent);
}

.landing-step h3 { font-size: 1rem; font-weight: 800; margin-bottom: .4rem; }
.landing-step p { font-size: .85rem; color: var(--bs-secondary-color); max-width: 16rem; margin: 0 auto; line-height: 1.6; }

.landing-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: 2rem 0;
    font-size: .85rem;
    color: var(--bs-secondary-color);
    border-top: 1px solid var(--bs-border-color);
}

.landing-footer a { color: var(--brand-green); text-decoration: none; font-weight: 600; }
.landing-footer a:hover { text-decoration: underline; }
.landing-footer-dot { opacity: .4; }

/* Páginas de error */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.error-card { max-width: 30rem; }

.error-code {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 1.25rem;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
    box-shadow: 0 12px 30px color-mix(in srgb, var(--brand-green) 35%, transparent);
}

/* Responsive landing */
@media (max-width: 900px) {
    .landing-hero { grid-template-columns: 1fr; padding: 2rem 0 3rem; gap: 2.5rem; text-align: center; }
    .landing-hero-text > p { margin-left: auto; margin-right: auto; }
    .landing-cta, .landing-trust { justify-content: center; }
    .landing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .landing-grid { grid-template-columns: 1fr; }
    .landing-steps-row { grid-template-columns: 1fr; gap: 2rem; }
    .landing-step-line { display: none; }
    .landing-nav-actions .landing-btn-ghost { display: none; }
    .kiosk-mock-camera { height: 290px; }
}

/* ==================== SUSCRIPCIONES / PRECIOS ==================== */
.pricing-grid { align-items: stretch; }

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.pricing-featured {
    border: 2px solid var(--brand-green);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--brand-green) 20%, transparent);
}

.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .3rem .85rem;
    border-radius: 999px;
    white-space: nowrap;
}

.pricing-name { font-size: 1.15rem; font-weight: 800; margin-bottom: .25rem; }
.pricing-desc { font-size: .85rem; color: var(--bs-secondary-color); margin-bottom: 1rem; }

.pricing-price { display: flex; align-items: baseline; gap: .4rem; margin-bottom: .5rem; }

.pricing-amount {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-period { font-size: .85rem; color: var(--bs-secondary-color); font-weight: 600; }

.pricing-users {
    font-size: .85rem;
    font-weight: 700;
    color: var(--brand-green);
    margin-bottom: 1.25rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex-grow: 1;
}

.pricing-features li {
    font-size: .86rem;
    padding: .3rem 0;
    color: var(--bs-body-color);
}

.pricing-features li i { color: #22c55e; font-weight: 800; margin-right: .35rem; }

/* Estado de suscripcion (Mi suscripcion) */
.subs-status {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.subs-status i { font-size: 1.6rem; margin-top: .1rem; }
.subs-status-title { font-weight: 800; font-size: 1.02rem; }
.subs-status-sub { font-size: .85rem; opacity: .85; }

.subs-active { background: rgba(34,197,94,.12); color: #15803d; }
.subs-suspended { background: rgba(245,158,11,.14); color: #b45309; }
.subs-cancelled { background: rgba(239,68,68,.12); color: #b91c1c; }
.subs-exempt { background: rgba(14,165,233,.12); color: #0369a1; }

[data-bs-theme="dark"] .subs-active { color: #4ade80; }
[data-bs-theme="dark"] .subs-suspended { color: #fbbf24; }
[data-bs-theme="dark"] .subs-cancelled { color: #f87171; }
[data-bs-theme="dark"] .subs-exempt { color: #38bdf8; }

.subs-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .55rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    font-size: .92rem;
}

.subs-detail-row:last-child { border-bottom: none; }

/* Brillo dorado pulsante para avisos de suscripcion / botones de pago */
@keyframes glowGold {
    0%, 100% { box-shadow: 0 0 4px rgba(255,193,7,.45), 0 0 10px rgba(255,193,7,.20); }
    50%      { box-shadow: 0 0 10px rgba(255,193,7,.75), 0 0 22px rgba(255,193,7,.40); }
}
.glow-gold { animation: glowGold 2.2s ease-in-out infinite; }

/* Candado circular dorado para secciones bloqueadas por suscripcion */
.lock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,193,7,.22);
    border: 1px solid rgba(255,193,7,.5);
    font-size: .72rem;
    flex-shrink: 0;
}

/* Toggle Mensual/Anual en la pagina de precios */
.billing-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin: 0 auto 1.75rem;
}
.billing-label { font-weight: 600; font-size: .95rem; }
.billing-switch {
    width: 46px; height: 26px; border-radius: 999px;
    background: var(--bs-secondary-bg, #dee2e6);
    border: none; position: relative; cursor: pointer;
    transition: background .2s; padding: 0;
}
.billing-switch[aria-checked="true"] { background: var(--brand-green, #22c55e); }
.billing-switch-knob {
    position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform .2s;
}
.billing-switch[aria-checked="true"] .billing-switch-knob { transform: translateX(20px); }
.billing-save-badge {
    background: rgba(34,197,94,.15); color: #15803d;
    border: 1px solid rgba(34,197,94,.4);
    padding: .2rem .65rem; border-radius: 999px;
    font-size: .8rem; font-weight: 600;
}
[data-bs-theme="dark"] .billing-save-badge { color: #4ade80; }
.pricing-yearly-note {
    display: block; font-size: .78rem; color: var(--bs-secondary-color);
    margin-top: .25rem;
}
