@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;600;700&display=swap');

:root {
    --mq-blue: #0f1131;
    --mq-green: #90b937;
    --mq-orange: #ec6824;
    --mq-yellow: #ffc107;
    --po-fondo: #f4f7f6;
    --po-superficie: #ffffff;
    --po-superficie-suave: #f8faf8;
    --po-texto: #0f1131;
    --po-muted: #64748b;
    --po-borde: rgba(15, 17, 49, 0.1);
    --po-primario: #90b937;
    --po-primario-oscuro: #6f9628;
    --po-acento: #ec6824;
    --po-azul: #0f1131;
    --po-azul-suave: #1c2b46;
    --po-exito: #166534;
    --po-peligro: #b91c1c;
    --po-sombra: 0 20px 40px rgba(15, 17, 49, 0.08);
    --po-sombra-suave: 0 10px 30px rgba(0, 0, 0, 0.05);
    --po-radio: 12px;
}

[data-theme='dark'] {
    --po-fondo: #07111f;
    --po-superficie: #0f1b2e;
    --po-superficie-suave: #14233a;
    --po-texto: #e2e8f0;
    --po-muted: #94a3b8;
    --po-borde: rgba(148, 163, 184, 0.22);
    --po-primario: #2dd4bf;
    --po-primario-oscuro: #14b8a6;
    --po-azul: #091224;
    --po-azul-suave: #172554;
    --po-exito: #4ade80;
    --po-peligro: #f87171;
    --po-sombra: 0 20px 40px rgba(2, 6, 23, 0.45);
}

html,
body {
    background: var(--po-fondo);
    color: var(--po-texto);
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
}

.po-topbar {
    background: var(--mq-blue);
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.po-topbar-contenido {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    min-height: 50px;
    gap: 1rem;
}

.po-redes {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 0 0 auto;
}

.po-redes a {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, color 0.2s ease;
}

.po-redes a:hover {
    color: #ffffff;
    background: var(--mq-green);
}

.po-toplinks {
    display: flex;
    justify-content: flex-end;
    flex: 1 1 auto;
    overflow-x: auto;
}

.po-toplinks a {
    min-width: 138px;
    padding: 0.42rem 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.po-toplinks a:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.po-toplinks a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.po-toplinks span {
    color: var(--mq-yellow);
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.po-toplinks strong {
    font-size: 0.74rem;
    line-height: 1.15;
}

.po-toplink-telefono {
    background: rgba(144, 185, 55, 0.18);
}

.po-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(15, 17, 49, 0.95);
    border-bottom: 3px solid var(--mq-green);
    box-shadow: 0 12px 28px rgba(15, 17, 49, 0.18);
}

.po-header-contenido {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.po-header-marca {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.po-logo {
    width: auto;
    height: 62px;
    display: block;
}

.po-modulo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    text-decoration: none;
    min-width: 0;
}

.po-modulo-link:hover {
    color: #ffffff;
}

.po-modulo-icono {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mq-green);
    color: var(--mq-blue);
    flex: 0 0 auto;
}

.po-modulo-link strong,
.po-modulo-link small {
    display: block;
}

.po-modulo-link strong {
    font-size: 1rem;
    line-height: 1.1;
}

.po-modulo-link small {
    max-width: 340px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    line-height: 1.2;
}

.po-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.po-nav a,
.po-nav-fecha,
.po-usuario {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 0.85rem;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
}

.po-nav a:hover {
    color: var(--mq-yellow);
}

.po-nav-fecha {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
}

.po-usuario {
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
}

.po-usuario span {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--mq-green);
    color: var(--mq-blue);
    font-size: 0.76rem;
}

.po-salir {
    width: 42px;
    padding: 0;
}

.po-menu-boton {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.po-menu-movil {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 88vw);
    z-index: 1090;
    padding: 112px 1rem 1rem;
    background: var(--mq-blue);
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.22);
}

.po-menu-movil.active {
    display: grid;
    align-content: start;
    gap: 0.65rem;
}

.po-menu-movil a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

.po-contenedor,
.po-contenedor-admin {
    padding-bottom: 4rem;
}

.po-portada {
    background:
        radial-gradient(circle at 78% 20%, rgba(144, 185, 55, 0.34) 0, rgba(144, 185, 55, 0.34) 70px, transparent 72px),
        radial-gradient(circle at 88% 66%, rgba(236, 104, 36, 0.22) 0, rgba(236, 104, 36, 0.22) 92px, transparent 94px),
        linear-gradient(135deg, rgba(15, 17, 49, 0.98) 0%, rgba(15, 17, 49, 0.9) 52%, rgba(28, 43, 70, 0.86) 100%);
    background-position: center;
    background-size: cover;
    color: #ffffff;
    padding: 5.5rem 0 4.2rem;
    position: relative;
    overflow: hidden;
}

.po-portada::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(45deg, transparent 0 44%, rgba(255, 255, 255, 0.12) 44% 46%, transparent 46% 100%),
        linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.08) 48% 50%, transparent 50% 100%);
    background-size: 180px 180px, 240px 240px;
    opacity: 0.8;
    pointer-events: none;
}

.po-portada::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--mq-green) 0 33.33%, var(--mq-orange) 33.33% 66.66%, var(--mq-blue) 66.66% 100%);
}

.po-portada .container {
    position: relative;
    z-index: 2;
}

.po-senal {
    display: inline-block;
    padding: 0.48rem 0.85rem;
    background: var(--mq-green);
    border-radius: 8px;
    color: var(--mq-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.po-titulo {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.05;
    margin: 0 0 1rem 0;
    max-width: 980px;
    font-weight: 800;
}

.po-bajada {
    max-width: 780px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 1.4rem;
}

.po-datos-portada {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.po-datos-portada span {
    display: inline-flex;
    align-items: center;
    padding: 0.68rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 0.92rem;
}

.po-destacado,
.po-panel,
.po-tarjeta-admin,
.po-matriz-admin,
.po-tabla-admin,
.po-banda-admin {
    background: var(--po-superficie);
    border: 1px solid var(--po-borde);
    box-shadow: var(--po-sombra);
    border-radius: var(--po-radio);
}

.po-destacado {
    padding: 2rem;
    color: var(--po-texto);
    border-top: 5px solid var(--mq-green);
}

.po-destacado-titulo {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--po-primario);
    font-weight: 700;
    margin-bottom: 1rem;
}

.po-destacado p {
    color: var(--po-muted);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.po-seccion-formulario {
    margin-top: -2rem;
    position: relative;
    z-index: 2;
}

.po-panel,
.po-panel-formulario {
    padding: 1.5rem;
}

.po-panel-titulo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.po-listado {
    display: grid;
    gap: 0.85rem;
}

.po-fila-servicio {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.po-fila-servicio > span {
    width: 8px;
    height: 42px;
    flex: 0 0 8px;
    border-radius: 8px;
}

.po-fila-servicio strong {
    display: block;
}

.po-fila-servicio small {
    color: var(--po-muted);
}

.po-encabezado-paso {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.po-encabezado-paso > span {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--po-primario);
    color: var(--mq-blue);
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    border-radius: 10px;
}

.po-encabezado-paso h2 {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    font-size: 1.35rem;
}

.po-encabezado-paso p {
    margin: 0.25rem 0 0 0;
    color: var(--po-muted);
}

.form-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--po-muted);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.po-panel-formulario .form-label::after {
    content: ' *';
    color: var(--mq-orange);
}

.form-control,
.form-select,
.select2-container--default .select2-selection--single {
    min-height: 3.55rem;
    border-radius: 8px;
    border: 1px solid var(--po-borde);
    background: var(--po-superficie-suave);
    color: var(--po-texto);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--po-primario);
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.14);
    background: var(--po-superficie);
}

.po-tarjeta-servicio {
    position: relative;
    display: block;
    min-height: 100%;
    padding: 1.4rem 1.2rem 1.2rem 1.2rem;
    background: var(--po-superficie);
    border: 1px solid var(--po-borde);
    border-radius: var(--po-radio);
    box-shadow: var(--po-sombra-suave);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.po-tarjeta-servicio:hover {
    transform: translateY(-2px);
    box-shadow: var(--po-sombra);
}

.po-acento {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    border-radius: var(--po-radio) var(--po-radio) 0 0;
}

.po-servicio-superior {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.po-nombre-servicio {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    line-height: 1.3;
}

.po-contador {
    color: var(--po-muted);
    font-size: 0.84rem;
    white-space: nowrap;
}

.po-descripcion-servicio {
    color: var(--po-texto);
    font-size: 0.92rem;
    margin-bottom: 0.45rem;
}

.po-detalle-servicio {
    color: var(--po-muted);
    font-size: 0.9rem;
}

.po-servicio-input:checked + .po-tarjeta-servicio {
    border-color: var(--po-primario);
    box-shadow: 0 0 0 2px rgba(144, 185, 55, 0.25), var(--po-sombra);
    transform: translateY(-2px);
}

.po-alerta {
    border-radius: 8px;
    border: 1px solid var(--po-borde);
    background: var(--po-superficie-suave);
    color: var(--po-muted);
}

.po-grilla-horarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.85rem;
}

.po-tarjeta-horario {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
    justify-content: center;
    min-height: 5.2rem;
    padding: 1rem;
    border: 1px solid var(--po-borde);
    border-radius: 10px;
    background: var(--po-superficie-suave);
    color: var(--po-texto);
    cursor: pointer;
    transition: all 0.18s ease;
}

.po-tarjeta-horario:hover {
    border-color: var(--po-primario);
}

.po-hora {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
}

.po-estado {
    font-size: 0.82rem;
    color: var(--po-muted);
}

.btn-check:checked + .po-tarjeta-horario {
    background: var(--po-primario);
    border-color: var(--po-primario);
    color: var(--mq-blue);
    font-weight: 700;
}

.btn-check:checked + .po-tarjeta-horario .po-estado {
    color: rgba(15, 17, 49, 0.72);
}

.po-tarjeta-horario.ocupado,
.btn-check:disabled + .po-tarjeta-horario {
    background: rgba(148, 163, 184, 0.11);
    border-color: var(--po-borde);
    color: var(--po-muted);
    cursor: not-allowed;
}

.po-tarjeta-horario.ocupado .po-estado,
.btn-check:disabled + .po-tarjeta-horario .po-estado {
    color: var(--po-peligro);
    font-weight: 700;
}

.po-acciones {
    margin-top: 2rem;
    text-align: center;
}

.po-boton-enviar {
    min-width: 260px;
    border-radius: 8px;
    border: none;
    padding: 1rem 2rem;
    background: var(--mq-green);
    color: var(--mq-blue);
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(144, 185, 55, 0.28);
}

.po-boton-enviar:hover,
.po-boton-enviar:focus {
    background: #a2c947;
    color: var(--mq-blue);
}

.po-superior-admin {
    padding-top: 1.8rem;
    padding-bottom: 1.2rem;
}

.po-banda-admin {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.po-banda-admin h1,
.po-tabla-cabecera h2,
.po-matriz-cabecera h2 {
    font-family: 'Outfit', sans-serif;
    margin: 0;
}

.po-banda-admin p,
.po-tabla-cabecera p,
.po-matriz-cabecera p {
    margin: 0.35rem 0 0 0;
    color: var(--po-muted);
}

.po-acciones-admin {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.po-tarjeta-admin {
    padding: 1.4rem;
}

.po-tarjeta-admin-superior {
    display: flex;
    justify-content: space-between;
    color: var(--po-muted);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.po-valor-admin {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.45rem;
}

.po-subvalor-admin {
    color: var(--po-muted);
    font-size: 0.92rem;
}

.po-progreso {
    height: 6px;
    margin-top: 1rem;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.2);
}

.po-progreso .progress-bar {
    background: linear-gradient(135deg, var(--mq-green) 0%, var(--mq-orange) 100%);
}

.po-matriz-admin {
    padding: 1.35rem;
}

.po-matriz-cabecera {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.po-color-servicio {
    width: 12px;
    height: 48px;
}

.po-lista-horarios-admin {
    display: grid;
    gap: 0.7rem;
}

.po-horario-admin {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid var(--po-borde);
    background: var(--po-superficie-suave);
}

.po-horario-admin strong,
.po-fila-admin strong {
    display: block;
}

.po-horario-admin span,
.po-fila-admin span {
    color: var(--po-muted);
    font-size: 0.88rem;
}

.po-distintivo-admin {
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--po-muted);
}

.po-horario-admin.ocupado {
    border-left: 4px solid var(--po-primario);
}

.po-horario-admin.libre {
    border-left: 4px solid var(--po-exito);
}

.po-tabla-admin {
    overflow: hidden;
}

.po-tabla-cabecera {
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.po-tabla-admin table {
    margin-top: 1rem;
}

.po-tabla-admin thead th {
    background: var(--po-azul);
    color: #ffffff;
    border-bottom: none;
    white-space: nowrap;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.po-tabla-admin tbody td {
    background: var(--po-superficie);
    border-color: var(--po-borde);
    color: var(--po-texto);
}

.po-hora-admin {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.55rem;
    background: var(--po-superficie-suave);
    border: 1px solid var(--po-borde);
    font-weight: 700;
}

.po-lista-admins {
    border-top: 1px solid var(--po-borde);
}

.po-fila-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--po-borde);
}

.btn,
.swal2-popup {
    border-radius: 8px !important;
}

@media (max-width: 991px) {
    .po-topbar-contenido {
        flex-direction: column;
        gap: 0;
        padding-top: 0.5rem;
    }

    .po-redes {
        justify-content: center;
        padding-bottom: 0.45rem;
    }

    .po-toplinks {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 0.35rem;
    }

    .po-header-contenido {
        min-height: 76px;
    }

    .po-logo {
        height: 54px;
    }

    .po-modulo-link small {
        display: none;
    }

    .po-nav {
        display: none;
    }

    .po-menu-boton {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .po-portada {
        padding-top: 3.6rem;
    }

    .po-seccion-formulario {
        margin-top: -1.4rem;
    }

    .po-banda-admin {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .po-header-marca {
        gap: 0.7rem;
    }

    .po-logo {
        height: 46px;
    }

    .po-modulo-icono {
        width: 36px;
        height: 36px;
    }

    .po-modulo-link strong {
        max-width: 150px;
        font-size: 0.9rem;
    }

    .po-panel,
    .po-panel-formulario,
    .po-tarjeta-admin,
    .po-matriz-admin,
    .po-banda-admin {
        padding: 1.2rem;
    }

    .po-grilla-horarios {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .po-boton-enviar {
        width: 100%;
        min-width: 0;
    }
}
