﻿/* Componentes generales para páginas de consulta y formularios */
.samai-page-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 18px 50px;
    color: #172033;
}

.samai-page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 26px 30px;
    background: linear-gradient(135deg, #f7fbff 0%, #ffffff 55%, #f3f8f6 100%);
    border: 1px solid #e4edf5;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 42, 70, 0.08);
}

.samai-page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

    .samai-page-hero__eyebrow::before {
        width: 9px;
        height: 9px;
        content: "";
        border-radius: 50%;
    }

.samai-page-hero__eyebrow--success {
    color: #0f7b55;
}

    .samai-page-hero__eyebrow--success::before {
        background: #0f9d58;
        box-shadow: 0 0 0 5px rgba(15, 157, 88, 0.12);
    }

.samai-page-hero__title {
    margin: 0 0 8px;
    color: #0c1f33;
    font-size: 30px;
    font-weight: 800;
}

.samai-page-hero__description {
    max-width: 720px;
    margin: 0;
    color: #526173;
    font-size: 15px;
    line-height: 1.55;
}

/* Distribución de contenido */
.samai-content-grid {
    display: grid;
    align-items: start;
    gap: 22px;
}

.samai-content-grid--split {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

/* Tarjetas de contenido */
.samai-content-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e4eaf1;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 42, 70, 0.08);
}

.samai-content-card__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.samai-content-card__title {
    margin: 0 0 4px;
    color: #0c1f33;
    font-size: 22px;
    font-weight: 800;
}

.samai-content-card__description {
    margin: 0;
    color: #607086;
    font-size: 14px;
    line-height: 1.45;
}

.samai-content-card--result {
    position: relative;
    overflow: hidden;
}

    .samai-content-card--result::before {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 5px;
        content: "";
        background: linear-gradient(90deg, #0f8f5f, #0b4f8a);
    }

/* Contenedores de iconos */
.samai-icon-box {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 14px;
}

.samai-icon-box--large {
    width: 48px;
    height: 48px;
    font-weight: 900;
    letter-spacing: 0.03em;
    border-radius: 15px;
}

.samai-icon-box--primary {
    color: #0b4f8a;
    background: #eef6ff;
}

.samai-icon-box--success {
    color: #087443;
    background: #e9f7f0;
}

/* Formularios */
.samai-form-field {
    margin-bottom: 18px;
}

.samai-form-label {
    display: block;
    margin-bottom: 7px;
    color: #24364b;
    font-size: 14px;
    font-weight: 700;
}

.samai-form-control {
    min-height: 46px;
    padding: 10px 14px !important;
    font-size: 16px;
    border: 1px solid #ced8e3 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

    .samai-form-control:focus {
        border-color: #0f7b55 !important;
        box-shadow: 0 0 0 0.18rem rgba(15, 123, 85, 0.15) !important;
    }

.samai-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

/* Botones de acción */
.samai-btn-action {
    min-height: 42px;
    padding: 9px 22px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: 0 !important;
    border-radius: 12px !important;
}

.samai-btn-action--success {
    background: #0f8f5f !important;
    box-shadow: 0 8px 18px rgba(15, 143, 95, 0.24);
}

    .samai-btn-action--success:hover,
    .samai-btn-action--success:focus {
        color: #ffffff !important;
        background: #087a4f !important;
    }

/* Cajas informativas */
.samai-info-box {
    margin-top: 22px;
    padding: 15px 16px;
    color: #526173;
    font-size: 13px;
    line-height: 1.5;
    background: #f7fafc;
    border: 1px dashed #d7e1eb;
    border-radius: 14px;
}

    .samai-info-box strong {
        color: #24364b;
    }

/* Encabezados de resultado */
.samai-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.samai-result-header__heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.samai-result-header__title {
    margin: 0;
    color: #0c1f33;
    font-size: 24px;
    font-weight: 800;
}

.samai-section-label {
    display: block;
    margin-bottom: 2px;
    color: #607086;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Estados */
.samai-status-chip {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 18px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
    border-radius: 999px;
}

.samai-status-chip--info {
    color: #0b4f8a;
    background: #eef6ff;
    border: 1px solid #cfe3f7;
}

/* Listados de datos */
.samai-data-list {
    display: grid;
    gap: 12px;
}

.samai-data-list__item {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 14px;
}

.samai-data-list__label {
    color: #607086;
    font-size: 13px;
    font-weight: 700;
}

.samai-data-list__value {
    margin: 0;
    color: #172033;
    font-size: 14px;
    font-weight: 700;
    word-break: break-word;
}

/* Alertas */
.samai-alert {
    display: block;
    margin-top: 18px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 14px;
}

.samai-alert--danger {
    color: #9f1d1d;
    background: #fff1f1;
    border: 1px solid #f2c9c9;
}

@media (max-width: 992px) {
    .samai-page-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .samai-content-grid--split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .samai-page-shell {
        padding: 18px 12px 38px;
    }

    .samai-page-hero,
    .samai-content-card {
        padding: 20px;
        border-radius: 16px;
    }

    .samai-page-hero__title {
        font-size: 24px;
    }

    .samai-data-list__item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* Tablero de control del monitor */
.samai-monitor-dashboard {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

    .samai-monitor-dashboard .pricingTable {
        position: relative;
        width: 100%;
        max-width: 100%;
        overflow: hidden !important;
        box-sizing: border-box;
    }

        .samai-monitor-dashboard .pricingTable *, .samai-monitor-dashboard .pricingTable::before, .samai-monitor-dashboard .pricingTable::after {
            box-sizing: border-box;
        }

    .samai-monitor-dashboard .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .samai-monitor-dashboard .pricingTable table {
        width: 100% !important;
        max-width: 100%;
        table-layout: fixed;
        font-size: 11px;
    }

    .samai-monitor-dashboard .pricingTable th, .samai-monitor-dashboard .pricingTable td {
        padding: 6px 5px !important;
        vertical-align: middle !important;
        white-space: normal !important;
        word-break: break-word;
    }

    .samai-monitor-dashboard .btnpricingall {
        min-width: 36px;
        padding: 4px 7px !important;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.1;
        white-space: nowrap;
        border-radius: 6px;
    }

/* Encabezado y acciones del monitor */
.samai-monitor-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.samai-monitor-dispatch-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}

.samai-monitor-dispatch-toggle__icon {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.samai-monitor-dispatch-toggle.is-open .samai-monitor-dispatch-toggle__icon {
    transform: rotate(180deg);
}

/* Panel desplegable Mi despacho */
.samai-monitor-dispatch-panel {
    display: none;
    margin: 16px 0 22px;
    padding: 18px;
    background: #f7faf9;
    border: 1px solid #dce7e2;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 42, 70, 0.07);
}

    .samai-monitor-dispatch-panel.is-open {
        display: block;
    }

/* Tarjetas de acceso del despacho */
.samai-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    min-height: 112px;
    padding: 16px 18px;
    color: #172033 !important;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid #dbeaf5;
    border-left: 5px solid #1d8fe1;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(15, 42, 70, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

    .samai-stat-card:hover, .samai-stat-card:focus {
        color: #172033 !important;
        text-decoration: none !important;
        border-color: #83bfe8;
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(15, 42, 70, 0.12);
    }

.samai-stat-card__title {
    flex: 1;
    min-width: 0;
    color: #24435c;
    font-size: 15px;
    font-weight: 600 !important;
    line-height: 1.4;
}

.samai-stat-card__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #1d8fe1;
    background: #eaf6fd;
    border-radius: 10px;
}

.samai-stat-card__value {
    color: #1d8fe1;
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
}
.samai-stat-card__unit {
    color: #66756f;
    font-size: 12px;
    font-weight: 600;
}

.samai-stat-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.samai-stat-card__metric {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 14px;
}

/* Tarjeta CPACA */

    .samai-monitor-pricing-cpaca::before {
        position: absolute !important;
        inset: 0 !important;
        z-index: 0 !important;
        display: block !important;
        width: auto !important;
        height: auto !important;
        content: "" !important;
        pointer-events: none;
        background: rgba(2, 132, 199, 0.22);
        clip-path: polygon(100% 0, 100% 100%, 0 100%);
        transform: none !important;
    }

    .samai-monitor-pricing-cpaca::after, .samai-monitor-pricing-cpaca .pricingTable-header::before, .samai-monitor-pricing-cpaca .pricingTable-header::after, .samai-monitor-pricing-cpaca .pricing-content::before, .samai-monitor-pricing-cpaca .pricing-content::after {
        display: none !important;
        content: none !important;
    }

    .samai-monitor-pricing-cpaca .pricingTable-header {
        position: relative;
        z-index: 2;
        background: transparent !important;
    }

    .samai-monitor-pricing-cpaca .pricing-content {
        position: relative;
        z-index: 2;
        overflow: hidden;
        background: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.85);
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    }

        .samai-monitor-pricing-cpaca .pricing-content + .pricing-content {
            margin-top: 16px;
        }

    .samai-monitor-pricing-cpaca .title {
        color: #0284c7;
        font-weight: 400 !important;
        text-transform: uppercase;
    }

.samai-monitor-dashboard .pricingTable.yellow {
    overflow: hidden !important;
    border-radius: 18px;
}

@media (max-width: 768px) {
    .samai-monitor-header-actions {
        flex-wrap: wrap;
    }

        .samai-monitor-header-actions .btn {
            width: 100%;
        }

    .samai-monitor-dispatch-panel {
        padding: 12px;
    }

    .samai-monitor-dashboard .pricingTable table {
        font-size: 10.5px;
    }

    .samai-monitor-dashboard .btnpricingall {
        min-width: 34px;
        padding: 3px 6px !important;
        font-size: 10px;
    }
}
