/*
 * Segunda Vuelta GLB - Portal privado
 */

.glb2-portal {
    --navy: #20396f;
    --blue: #375ca0;
    --gold: #eec42f;
    --bg: #f4f7fb;
    --text: #172033;
    --muted: #697386;
    --border: #dfe4ee;

    max-width: 1500px;
    margin: 0 auto;
    padding: 24px;

    background: var(--bg) !important;
    color: var(--text) !important;

    font-family: Inter, Arial, sans-serif;
}

.glb2-portal * {
    box-sizing: border-box;
}

.glb2-portal,
.glb2-portal p,
.glb2-portal span,
.glb2-portal label,
.glb2-portal div,
.glb2-portal td,
.glb2-portal th {
    color: var(--text);
}

.glb2-login {
    min-height: 72vh;
    display: grid;
    place-items: center;
}

.glb2-login-card {
    width: min(440px, 100%);
    padding: 30px;

    background: #ffffff !important;
    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow: 0 20px 48px rgba(32, 57, 111, .12);
}

.glb2-brand {
    border-left: 6px solid var(--gold);
    padding-left: 16px;
    margin-bottom: 22px;
}

.glb2-brand small,
.glb2-portal-header small {
    color: var(--blue) !important;
    font-weight: 800;
    letter-spacing: .08em;
}

.glb2-brand h1,
.glb2-portal-header h1 {
    margin: 5px 0;
    color: var(--navy) !important;
}

.glb2-brand p,
.glb2-portal-header p {
    margin: 0;
    color: var(--muted) !important;
}

.glb2-login form,
.glb2-form {
    display: grid;
    gap: 12px;
}

.glb2-login label,
.glb2-form label {
    display: grid;
    gap: 6px;

    color: var(--text) !important;
    font-weight: 700;
}

.glb2-login input,
.glb2-form input {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;

    background: #ffffff !important;
    border: 1px solid #cfd5df !important;
    border-radius: 9px;

    color: #172033 !important;
    font-size: 15px !important;
}

.glb2-login input:focus,
.glb2-form input:focus {
    border-color: var(--blue) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(55, 92, 160, .15) !important;
}

.glb2-check {
    display: flex !important;
    grid-template-columns: auto 1fr !important;
    align-items: center;

    color: var(--text) !important;
    font-weight: 400 !important;
}

.glb2-check input {
    width: auto !important;
    min-height: auto !important;
}

/* BOTONES */

.glb2-portal .glb2-primary,
.glb2-portal button.glb2-primary,
.glb2-portal a.glb2-primary,
.glb2-form button[type="submit"] {
    display: inline-flex !important;

    align-items: center !important;
    justify-content: center !important;

    min-height: 46px !important;
    padding: 11px 18px !important;

    background: #375ca0 !important;
    border: 1px solid #375ca0 !important;
    border-radius: 9px !important;

    color: #ffffff !important;

    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;

    opacity: 1 !important;
    visibility: visible !important;

    cursor: pointer !important;
    text-decoration: none !important;

    box-shadow: none !important;
}

.glb2-portal .glb2-primary:hover,
.glb2-portal button.glb2-primary:hover,
.glb2-portal a.glb2-primary:hover,
.glb2-form button[type="submit"]:hover {
    background: #20396f !important;
    border-color: #20396f !important;
    color: #ffffff !important;
}

.glb2-form button[type="submit"] {
    width: 100% !important;
    margin-top: 8px !important;
}

.glb2-secondary {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;

    min-height: 42px;
    padding: 9px 14px;

    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 9px;

    color: var(--navy) !important;

    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
}

.glb2-danger {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;

    min-height: 42px;
    padding: 9px 14px;

    background: #ffffff !important;
    border: 1px solid #e2b7b7 !important;
    border-radius: 9px;

    color: #b32d2e !important;

    font-weight: 800;
    text-decoration: none !important;
}

.glb2-inline-button {
    margin-top: 14px !important;
}

/* MENSAJES */

.glb2-alert {
    padding: 12px 14px;
    margin: 12px 0;

    border-radius: 10px;
    background: #eef4ff !important;

    color: var(--text) !important;
}

.glb2-alert-error {
    background: #fbeaea !important;
    color: #8b1d1d !important;
}

.glb2-alert-success {
    background: #dff3e5 !important;
    color: #165d2d !important;
}

/* CABECERA */

.glb2-portal-header {
    position: relative;

    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;

    padding: 22px;

    background: #ffffff !important;
    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow: 0 12px 28px rgba(32, 57, 111, .07);
}

.glb2-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ESTADÍSTICAS */

.glb2-portal-stats {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);

    gap: 12px;
    margin: 16px 0;
}

.glb2-portal-stats > div,
.glb2-portal-card {
    background: #ffffff !important;
    border: 1px solid var(--border);
    border-radius: 16px;

    box-shadow: 0 10px 25px rgba(32, 57, 111, .06);
}

.glb2-portal-stats > div {
    padding: 16px;
}

.glb2-portal-stats span {
    display: block;

    color: var(--muted) !important;

    font-size: 12px;
    text-transform: uppercase;
}

.glb2-portal-stats strong {
    display: block;

    margin-top: 5px;

    color: var(--navy) !important;
    font-size: 20px;
}

/* UNIDADES */

.glb2-unit-picker {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;
    margin: 12px 0 16px;
}

.glb2-unit-picker a {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 8px 11px;

    background: #ffffff !important;
    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--navy) !important;

    text-decoration: none !important;
    font-weight: 700;
}

.glb2-unit-picker a.is-active {
    background: var(--gold) !important;
    border-color: var(--gold) !important;

    color: #20396f !important;
}

.glb2-unit-pending-count {
    display: inline-flex !important;

    align-items: center;
    justify-content: center;

    min-width: 21px;
    height: 21px;

    margin: 0 !important;
    padding: 0 6px;

    border-radius: 999px;
    background: #d63638 !important;

    color: #ffffff !important;

    font-size: 11px !important;
    line-height: 1;
}

/* PANEL */

.glb2-portal-grid {
    display: grid;
    grid-template-columns:
        minmax(340px, .85fr)
        minmax(430px, 1.15fr);

    gap: 16px;
}

.glb2-portal-card {
    padding: 20px;

    color: var(--text) !important;
}

.glb2-portal-card h2,
.glb2-portal-card h3 {
    color: var(--navy) !important;
}

.glb2-portal-card h2 {
    margin-top: 0;
}

/* MESAS */

.glb2-mesa-list {
    display: grid;
    gap: 8px;
}

.glb2-mesa-row {
    display: grid;

    grid-template-columns:
        90px 110px 1fr 90px;

    gap: 8px;
    align-items: center;

    padding: 11px;

    background: #ffffff !important;
    border: 1px solid #e4e7ed;
    border-radius: 10px;

    color: var(--text) !important;
    text-decoration: none !important;
}

.glb2-mesa-row *,
.glb2-mesa-row strong,
.glb2-mesa-row span {
    color: inherit;
}

.glb2-mesa-row:hover,
.glb2-mesa-row.is-selected {
    background: #eef4ff !important;
    border-color: #b9cae7;
}

.glb2-state {
    display: inline-flex;
    width: max-content;

    padding: 5px 8px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;
}

.glb2-state-pendiente {
    background: #f0f0f1 !important;
    color: #50575e !important;
}

.glb2-state-registrada {
    background: #fff3cd !important;
    color: #664d03 !important;
}

.glb2-state-verificada {
    background: #d1e7dd !important;
    color: #0f5132 !important;
}

.glb2-card-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    align-items: center;

    margin-bottom: 15px;
}

/* ACTA */

.glb2-acta-block {
    margin-top: 20px;
    padding-top: 16px;

    border-top: 1px solid #e4e7ed;

    color: var(--text) !important;
}

.glb2-acta-block h3 {
    margin-top: 0;

    color: var(--navy) !important;
    font-size: 22px !important;
}

.glb2-acta-block p,
.glb2-acta-block span,
.glb2-acta-block label,
.glb2-acta-block strong {
    color: var(--text) !important;
}

.glb2-acta-block a:not(.glb2-primary) {
    color: var(--blue) !important;
    font-weight: 700;
    text-decoration: none;
}

.glb2-acta-block a:not(.glb2-primary):hover {
    color: var(--navy) !important;
    text-decoration: underline;
}

/* ARCHIVO */

.glb2-acta-block input[type="file"] {
    max-width: 100% !important;

    padding: 7px !important;

    background: #ffffff !important;
    border: 1px solid #cfd5df !important;
    border-radius: 8px !important;

    color: #172033 !important;

    font-size: 13px !important;
}

.glb2-acta-block input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 12px;

    background: #eef4ff !important;
    border: 1px solid #c4d2e8 !important;
    border-radius: 6px;

    color: #20396f !important;

    font-weight: 700;
    cursor: pointer;
}

.glb2-acta-block input[type="file"]::file-selector-button:hover {
    background: #dce9fa !important;
}

/* FORMULARIOS */

.glb2-acta-block form {
    display: flex;
    gap: 8px;

    align-items: center;
    flex-wrap: wrap;
}

.glb2-acta-block form button,
.glb2-acta-block input[type="submit"] {
    display: inline-flex !important;

    min-height: 42px !important;

    padding: 9px 14px !important;

    background: #375ca0 !important;
    border: 1px solid #375ca0 !important;
    border-radius: 8px !important;

    color: #ffffff !important;

    font-size: 13px !important;
    font-weight: 800 !important;

    opacity: 1 !important;
    visibility: visible !important;

    cursor: pointer;
}

.glb2-acta-block form button:hover,
.glb2-acta-block input[type="submit"]:hover {
    background: #20396f !important;
}

/* HISTORIAL */

.glb2-history {
    margin-top: 16px;
    overflow: auto;
}

.glb2-history table {
    width: 100%;
    border-collapse: collapse;
}

.glb2-history th,
.glb2-history td {
    padding: 10px;

    border-bottom: 1px solid #e4e7ed;

    color: var(--text) !important;
    text-align: left;
}

/* CAMPANA */

.glb2-notify {
    position: relative;
}

.glb2-notify > summary {
    list-style: none;
}

.glb2-notify > summary::-webkit-details-marker {
    display: none;
}

.glb2-notify-button {
    position: relative;

    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #ffffff !important;
    border: 1px solid var(--border);
    border-radius: 11px;

    cursor: pointer;
}

.glb2-notify-bell {
    color: initial !important;
    font-size: 19px;
}

.glb2-notify-count {
    position: absolute;

    right: -5px;
    top: -6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 20px;
    height: 20px;

    padding: 0 5px;

    background: #d63638 !important;
    border: 2px solid #ffffff;
    border-radius: 999px;

    color: #ffffff !important;

    font-size: 10px;
    font-weight: 800;
}

.glb2-notify-dropdown {
    position: absolute;

    z-index: 9999;

    right: 0;
    top: 50px;

    width: min(360px, calc(100vw - 30px));

    overflow: hidden;

    background: #ffffff !important;
    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow: 0 22px 50px rgba(32, 57, 111, .18);
}

.glb2-notify-dropdown-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;

    padding: 13px 15px;

    border-bottom: 1px solid #edf0f5;
}

.glb2-notify-dropdown-head strong {
    color: var(--navy) !important;
}

.glb2-notify-dropdown-head span {
    color: var(--muted) !important;
    font-size: 11px;
}

.glb2-notify-list {
    max-height: 360px;
    overflow: auto;
}

.glb2-notify-item {
    display: block;

    padding: 12px 14px;

    background: #ffffff !important;
    border-bottom: 1px solid #edf0f5;

    color: var(--text) !important;
    text-decoration: none !important;
}

.glb2-notify-item:hover {
    background: #f7faff !important;
}

.glb2-notify-item-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    align-items: center;

    margin-bottom: 3px;
}

.glb2-notify-item-top strong {
    color: var(--blue) !important;
    font-size: 12px;
}

.glb2-notify-item-top span {
    color: var(--muted) !important;
    font-size: 10px;
}

.glb2-notify-item-title {
    color: var(--navy) !important;

    font-size: 13px;
    font-weight: 800;
}

.glb2-notify-item small {
    display: block;
    margin-top: 3px;

    color: var(--muted) !important;
}

/* PENDIENTES */

.glb2-pending-departments {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;

    margin: 10px 0 4px;
    padding: 10px 12px;

    background: #ffffff !important;
    border: 1px solid #e3e8f0;
    border-radius: 13px;
}

.glb2-pending-label {
    color: var(--muted) !important;

    font-size: 12px;
    font-weight: 700;
}

.glb2-pending-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.glb2-pending-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 6px 9px;

    background: #f7f9fc !important;
    border-radius: 999px;

    color: var(--navy) !important;

    font-size: 12px;
    font-weight: 700;
}

.glb2-pending-pill strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 20px;
    height: 20px;

    padding: 0 6px;

    background: #d63638 !important;
    border-radius: 999px;

    color: #ffffff !important;

    font-size: 10px;
}

/* RESPONSIVE */

@media (max-width: 950px) {
    .glb2-portal-grid {
        grid-template-columns: 1fr;
    }

    .glb2-portal-stats {
        grid-template-columns: 1fr 1fr;
    }

    .glb2-portal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .glb2-mesa-row {
        grid-template-columns: 80px 100px 1fr;
    }

    .glb2-header-actions {
        width: 100%;
    }

    .glb2-notify-dropdown {
        left: 0;
        right: auto;
    }
}

@media (max-width: 520px) {
    .glb2-portal {
        padding: 12px;
    }

    .glb2-portal-stats {
        grid-template-columns: 1fr;
    }

    .glb2-mesa-row {
        grid-template-columns: 1fr 1fr;
    }

    .glb2-pending-departments {
        align-items: flex-start;
        flex-direction: column;
    }

    .glb2-notify-dropdown {
        width: calc(100vw - 40px);
    }

    .glb2-acta-block form {
        align-items: stretch;
        flex-direction: column;
    }

    .glb2-acta-block input[type="file"],
    .glb2-acta-block form button,
    .glb2-acta-block input[type="submit"] {
        width: 100% !important;
    }
}