:root {
    color-scheme: light;

    --color-primary-950: #0b1f33;
    --color-primary-800: #12395b;
    --color-primary-600: #1e5a8a;
    --color-cyan: #29a8b8;

    --color-copper: #c97b36;
    --color-warning: #d9a441;
    --color-danger: #b23a3a;
    --color-success: #2e8b57;

    --color-background: #f4f7fa;
    --color-surface: #ffffff;
    --color-graphite: #2e3a46;
    --color-text: #1b1f24;
    --color-muted: #637180;
    --color-border: #dbe3ea;

    --gradient-brand: linear-gradient(
        135deg,
        #0b1f33 0%,
        #12395b 40%,
        #1e5a8a 75%,
        #29a8b8 100%
    );

    --shadow-sm: 0 2px 8px rgba(11, 31, 51, 0.06);
    --shadow-md: 0 12px 30px rgba(11, 31, 51, 0.1);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --content-width: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--color-background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--color-text);
    background: var(--color-background);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--color-primary-600);
}

img {
    display: block;
    max-width: 100%;
}

/* Encabezado principal */

.app-header {
    position: sticky;
    z-index: 100;
    top: 0;
    color: #ffffff;
    background: var(--gradient-brand);
    box-shadow: 0 4px 20px rgba(11, 31, 51, 0.18);
}

.app-header__inner {
    display: flex;
    width: min(100%, var(--content-width));
    min-height: 68px;
    margin: 0 auto;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    min-width: 0;
    color: #ffffff;
    text-decoration: none;
}

.brand__name {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand__tagline {
    display: none;
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-link,
.header-button {
    display: inline-flex;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    cursor: pointer;
}

.header-link:hover,
.header-button:hover {
    background: rgba(255, 255, 255, 0.16);
}

.header-label {
    display: none;
}

.logout-form {
    margin: 0;
}

/* Contenido */

.app-main {
    width: min(100%, var(--content-width));
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.page-header {
    margin-bottom: 22px;
}

.page-header__eyebrow {
    margin: 0 0 5px;
    color: var(--color-primary-600);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-header h1 {
    margin: 0;
    color: var(--color-primary-950);
    font-size: clamp(1.65rem, 6vw, 2.4rem);
    line-height: 1.15;
}

.page-header p {
    max-width: 700px;
    margin: 8px 0 0;
    color: var(--color-muted);
}

/* Tarjetas */

.card {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.card--accent {
    border-top: 4px solid var(--color-cyan);
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.action-card {
    display: flex;
    min-height: 170px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    flex-direction: column;
    color: inherit;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.action-card:hover {
    border-color: var(--color-cyan);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.action-card__title {
    margin: 0 0 8px;
    color: var(--color-primary-800);
    font-size: 1.1rem;
}

.action-card__description {
    margin: 0 0 18px;
    color: var(--color-muted);
}

.action-card__link {
    margin-top: auto;
    color: var(--color-primary-600);
    font-weight: 750;
}

/* Botones */

.button {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    background: var(--color-primary-600);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--color-primary-800);
}

.button--secondary {
    border-color: var(--color-border);
    color: var(--color-primary-800);
    background: #ffffff;
}

.button--secondary:hover {
    background: #edf3f7;
}

.button--danger {
    background: var(--color-danger);
}

.button--copper {
    background: var(--color-copper);
}

/* Formularios */

.form-card {
    max-width: 760px;
}

.form-group,
form p {
    margin: 0 0 18px;
}

label {
    display: block;
    margin-bottom: 7px;
    color: var(--color-graphite);
    font-size: 0.9rem;
    font-weight: 700;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    background: #ffffff;
    outline: none;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 0 3px rgba(41, 168, 184, 0.16);
}

.helptext {
    display: block;
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.errorlist {
    margin: 6px 0;
    padding-left: 20px;
    color: var(--color-danger);
    font-size: 0.88rem;
}

/* Mensajes */

.messages {
    display: grid;
    margin: 0 0 20px;
    padding: 0;
    gap: 10px;
    list-style: none;
}

.alert {
    padding: 13px 15px;
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.alert--success {
    border-left-color: var(--color-success);
}

.alert--warning {
    border-left-color: var(--color-warning);
}

.alert--error {
    border-left-color: var(--color-danger);
}

.alert--info {
    border-left-color: var(--color-cyan);
}

/* Tablas */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

th {
    color: #ffffff;
    background: var(--color-primary-800);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #f7fafc;
}

/* Estados */

.badge {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 750;
    white-space: nowrap;
}

.badge--info {
    color: #145d68;
    background: #dff5f7;
}

.badge--success {
    color: #236c47;
    background: #e2f3e9;
}

.badge--warning {
    color: #755514;
    background: #fff2ce;
}

.badge--danger {
    color: #8f2e2e;
    background: #f9dfdf;
}

.badge--neutral {
    color: #45525e;
    background: #e9eef2;
}

/* Responsive */

@media (min-width: 600px) {
    .brand__tagline,
    .header-label {
        display: inline;
    }

    .button {
        width: auto;
    }

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

    .app-main {
        padding-top: 32px;
    }
}

@media (min-width: 960px) {
    .app-header__inner {
        min-height: 76px;
        padding-inline: 24px;
    }

    .app-main {
        padding-inline: 24px;
    }

    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .card,
    .action-card {
        padding: 24px;
    }
}

/* Accesibilidad y navegación */

.skip-link {
    position: fixed;
    z-index: 200;
    top: 8px;
    left: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    background: var(--color-primary-950);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-primary-600);
    outline-offset: 3px;
}

.app-header a:focus-visible,
.app-header button:focus-visible {
    outline-color: #ffffff;
}

.header-link,
.header-button {
    gap: 8px;
}

.header-actions svg {
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* Login: primero teléfonos */

.login-layout {
    width: 100%;
    max-width: 980px;
    margin: 8px auto;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
}

.login-brand {
    position: relative;
    padding: 28px 24px;
    color: #ffffff;
    background: var(--gradient-brand);
}

.login-brand::before {
    display: block;
    width: 36px;
    height: 4px;
    margin-bottom: 18px;
    border-radius: 2px;
    background: var(--color-copper);
    content: "";
}

.login-brand__label {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.login-brand h1 {
    margin: 20px 0 12px;
    font-size: clamp(1.65rem, 5vw, 2.7rem);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.login-brand p {
    max-width: 340px;
    margin: 0;
    color: #e4edf5;
    font-size: 0.95rem;
}

.login-brand__footer {
    display: none;
}

.login-panel {
    min-width: 0;
    padding: 28px 24px;
}

.login-panel__heading {
    margin-bottom: 24px;
}

.login-panel__heading h2 {
    margin: 8px 0;
    color: var(--color-primary-950);
    font-size: 1.65rem;
    letter-spacing: -0.025em;
}

.login-panel__heading p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.95rem;
}

.login-alert {
    margin-bottom: 20px;
}

.login-form .login-submit {
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
}

.login-help {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .login-layout {
        display: grid;
        min-height: 540px;
        margin: 48px auto;
        grid-template-columns: 1fr 1fr;
    }

    .login-brand {
        display: flex;
        padding: 48px 36px;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    .login-brand__footer {
        display: block;
        margin-top: 48px;
        color: #e4edf5;
        font-size: 0.8rem;
    }

    .login-panel {
        display: flex;
        padding: 48px 36px;
        flex-direction: column;
        justify-content: center;
    }
}

/* Panel institucional y marca compartida */
.app-header { background: #fff; color: var(--color-primary-950); border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.app-header__inner { flex-wrap: wrap; gap: 12px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--color-primary-950); }
.brand__logo { width: 130px; height: auto; }
.brand__identity { display: none; padding-left: 16px; border-left: 1px solid var(--color-border); }
.brand__name { font-size: 1rem; }
.brand__tagline { color: var(--color-muted); font-size: .75rem; }
.header-link, .header-button { color: var(--color-primary-800); border-color: var(--color-border); background: #fff; }
.header-link:hover, .header-button:hover { background: var(--color-background); }
.app-header a:focus-visible, .app-header button:focus-visible { outline-color: var(--color-primary-600); }
.dashboard-welcome { display: flex; flex-direction: column; gap: 16px; padding: 8px 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--color-border); }
.dashboard-welcome h1 { margin: 10px 0; font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: -.025em; line-height: 1.2; color: var(--color-primary-950); overflow-wrap: anywhere; }
.dashboard-welcome p { margin: 0; color: var(--color-muted); }
.dashboard-welcome .dashboard-eyebrow { color: var(--color-primary-600); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.dashboard-role { align-self: flex-start; flex-shrink: 0; background: #e7eef5; color: var(--color-primary-800); border-radius: 6px; padding: 6px 12px; font-size: .85rem; }
.dashboard-section-title { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; margin-bottom: 16px; }
.dashboard-section-title h2 { margin: 0; font-size: 1.15rem; color: var(--color-primary-950); }
.dashboard-section-title > span { color: var(--color-muted); font-size: .85rem; }
.dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.dashboard-grid .action-card { border: 1px solid var(--color-border); border-radius: 12px; min-width: 0; min-height: 185px; }
.dashboard-grid .action-card:first-child { border-left: 4px solid var(--color-primary-600); }
.dashboard-grid .action-card__description { max-width: 60ch; }
.dashboard-grid .action-card__link { display: flex; min-height: 44px; align-items: center; }
.dashboard-grid .action-card:only-child { background: linear-gradient(110deg, #fff 60%, #edf4f8); }
.dashboard-notifications { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 20px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; text-decoration: none; }
.dashboard-notifications > span:first-child { color: var(--color-muted); }
.dashboard-notifications strong { color: var(--color-primary-800); }
@media (min-width: 600px) { .brand__identity { display: block; } .brand__tagline { display: block; } .brand__logo { width: 160px; } }
@media (min-width: 768px) { .dashboard-welcome { flex-direction: row; justify-content: space-between; align-items: center; padding-top: 16px; } }


/* Reportes y solicitudes: portal de atención */

.portal-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.portal-breadcrumb a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

.report-layout {
    display: grid;
    gap: 24px;
    align-items: start;
}

.report-card {
    min-width: 0;
}

.report-card h2,
.report-guidance h2 {
    margin: 0 0 20px;
    color: var(--color-primary-800);
    font-size: 1.1rem;
}

.report-card .alert {
    margin-bottom: 20px;
}

.report-card select {
    min-width: 0;
    max-width: 100%;
}

.report-card input[type="file"] {
    max-width: 100%;
    padding: 10px 0;
    border: 0;
    background: transparent;
    font-size: 0.9rem;
}

.report-card input::file-selector-button {
    min-height: 44px;
    margin-right: 8px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-primary-800);
    background: #ffffff;
    cursor: pointer;
}

.field-optional {
    color: var(--color-muted);
    font-weight: 400;
}

.report-upload {
    padding: 16px;
    border: 1px dashed #94a9ba;
    border-radius: 10px;
    background: var(--color-background);
}

.report-card .report-hint {
    margin: 0 0 8px;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.report-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.report-guidance {
    padding: 24px;
    border-left: 3px solid var(--color-cyan);
    border-radius: 8px;
    background: #edf4f8;
}

.report-guidance p {
    color: var(--color-graphite);
}

.requests-heading {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.requests-heading .page-header {
    margin: 0;
}

.request-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.request-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.request-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.request-card__top h2 {
    margin: 0;
    color: var(--color-primary-800);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.request-card .badge {
    white-space: normal;
}

.request-equipment {
    color: var(--color-primary-950);
    font-size: 1.1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.request-details {
    display: grid;
    margin: 0 0 20px;
    gap: 12px;
}

.request-details dt {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.request-details dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.request-card > .button {
    margin-top: auto;
}

.requests-empty {
    padding: 32px 24px;
    text-align: center;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.pagination a {
    display: inline-flex;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    align-items: center;
    background: #ffffff;
}

@media (min-width: 700px) {
    .requests-heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

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

    .report-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (min-width: 960px) {
    .report-layout {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
}


/* Agenda técnica y detalle de órdenes */

.agenda-heading {
    margin-bottom: 24px;
}

.agenda-heading .page-header {
    margin: 0;
}

.agenda-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.summary-card {
    display: flex;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    flex-direction: column;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.summary-card__label {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.summary-card strong {
    margin-top: 6px;
    color: var(--color-primary-950);
    font-size: 1.8rem;
    line-height: 1;
}

.agenda-section {
    margin-top: 32px;
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 2px 0 0;
    color: var(--color-primary-950);
    font-size: 1.2rem;
}

.section-heading > span {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.section-heading__eyebrow {
    margin: 0;
    color: var(--color-primary-600);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.section-heading--compact {
    align-items: center;
}

.work-order-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.work-order-card {
    display: flex;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary-600);
    border-radius: 12px;
    flex-direction: column;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.work-order-card--overdue {
    border-left-color: var(--color-danger);
    background: #fffafa;
}

.work-order-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.work-order-card__header h3 {
    margin: 5px 0 0;
    color: var(--color-primary-950);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.work-order-card__number {
    color: var(--color-primary-600);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.work-order-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 16px 0;
}

.work-order-card__details {
    display: grid;
    margin: 0 0 20px;
    gap: 12px;
}

.work-order-card__details dt,
.detail-grid dt,
.resolution-details dt {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.work-order-card__details dd,
.detail-grid dd,
.resolution-details dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.work-order-card > .button {
    margin-top: auto;
}

.empty-state {
    padding: 24px;
    border: 1px dashed #a9b8c5;
    border-radius: 10px;
    color: var(--color-muted);
    background: #ffffff;
    text-align: center;
}

.empty-state h3,
.empty-state p {
    margin: 6px 0;
}

.order-heading {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-border);
}

.order-heading h1 {
    margin: 5px 0;
    color: var(--color-primary-950);
    font-size: clamp(1.6rem, 6vw, 2.3rem);
    overflow-wrap: anywhere;
}

.order-heading p {
    margin: 0;
    color: var(--color-muted);
}

.order-heading__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.order-layout {
    display: grid;
    gap: 20px;
    align-items: start;
}

.order-main,
.order-actions-panel {
    display: grid;
    min-width: 0;
    gap: 20px;
}

.order-section {
    min-width: 0;
}

.order-section > h2,
.action-panel > h2 {
    margin: 0 0 18px;
    color: var(--color-primary-800);
    font-size: 1.1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
    gap: 16px;
}

.order-description,
.resolution-details dd {
    overflow-wrap: anywhere;
}

.resolution-card {
    border-left: 4px solid var(--color-success);
}

.resolution-details {
    display: grid;
    margin: 0;
    gap: 18px;
}

.evidence-carousel {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.evidence-carousel__stage {
    position: relative;
}

.evidence-carousel__slide {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-background);
}

.evidence-carousel__slide[hidden] {
    display: none;
}

.evidence-carousel__preview {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    color: #ffffff;
    background: var(--color-primary-950);
    cursor: zoom-in;
}

.evidence-carousel__preview img {
    display: block;
    width: 100%;
    height: clamp(260px, 72vw, 580px);
    object-fit: contain;
    background: var(--color-primary-950);
}

.evidence-carousel__preview span {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(11, 31, 51, 0.84);
    font-size: 0.75rem;
    font-weight: 800;
    backdrop-filter: blur(5px);
}

.evidence-card figcaption {
    padding: 12px 14px;
    color: var(--color-primary-800);
    font-size: 0.84rem;
    font-weight: 800;
}

.evidence-card figcaption span {
    display: block;
    margin-top: 4px;
    color: var(--color-muted);
    font-weight: 400;
}

.evidence-carousel__control {
    position: absolute;
    z-index: 2;
    top: clamp(130px, 36vw, 290px);
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(11, 31, 51, 0.82);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transform: translateY(-50%);
}

.evidence-carousel__control:hover,
.evidence-carousel__control:focus-visible {
    background: var(--color-primary-600);
}

.evidence-carousel__control span {
    margin-top: -3px;
    font-size: 2rem;
    line-height: 1;
}

.evidence-carousel__control--previous {
    left: 10px;
}

.evidence-carousel__control--next {
    right: 10px;
}

.evidence-carousel__status {
    display: flex;
    padding: 12px 2px 10px;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--color-muted);
    text-align: center;
}

.evidence-carousel__status strong {
    color: var(--color-primary-800);
    font-size: 0.86rem;
}

.evidence-carousel__status span {
    font-size: 0.76rem;
}

.evidence-carousel__thumbnails {
    display: flex;
    max-width: 100%;
    padding: 4px 2px 8px;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 9px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.evidence-carousel__thumbnail {
    width: 68px;
    height: 58px;
    padding: 3px;
    flex: 0 0 68px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #e7edf2;
    cursor: pointer;
    scroll-snap-align: center;
}

.evidence-carousel__thumbnail[aria-current="true"] {
    border-color: var(--color-primary-600);
    box-shadow: 0 0 0 2px rgba(30, 90, 138, 0.14);
}

.evidence-carousel__thumbnail img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
}

.evidence-lightbox {
    width: min(96vw, 1100px);
    max-width: none;
    max-height: 94vh;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: var(--radius-md);
    color: #ffffff;
    background: transparent;
}

.evidence-lightbox::backdrop {
    background: rgba(5, 16, 27, 0.9);
    backdrop-filter: blur(3px);
}

.evidence-lightbox__content {
    position: relative;
    display: grid;
    max-height: 94vh;
    padding: 14px;
    border-radius: var(--radius-md);
    gap: 12px;
    background: #071726;
    box-shadow: var(--shadow-lg);
}

.evidence-lightbox__content img {
    display: block;
    width: 100%;
    max-height: calc(94vh - 155px);
    margin: auto;
    border-radius: 8px;
    object-fit: contain;
}

.evidence-lightbox__content p {
    min-height: 1.2em;
    margin: 0;
    color: #d6e1ea;
    font-size: 0.82rem;
    text-align: center;
}

.evidence-lightbox__close {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(11, 31, 51, 0.88);
    cursor: pointer;
}

.evidence-lightbox__close span {
    margin-top: -3px;
    font-size: 1.9rem;
    line-height: 1;
}

.evidence-lightbox__controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.evidence-lightbox__controls .button {
    width: 100%;
}

@media (min-width: 620px) {
    .evidence-carousel__preview img {
        height: clamp(390px, 54vw, 580px);
    }

    .evidence-carousel__control {
        top: clamp(195px, 27vw, 290px);
        width: 48px;
        height: 48px;
    }

    .evidence-carousel__control--previous {
        left: 16px;
    }

    .evidence-carousel__control--next {
        right: 16px;
    }

    .evidence-carousel__status {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }

    .evidence-carousel__thumbnail {
        width: 82px;
        height: 68px;
        flex-basis: 82px;
    }

    .evidence-carousel__thumbnails {
        justify-content: center;
    }
}

.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
}

.timeline li:not(:last-child)::before {
    position: absolute;
    top: 17px;
    bottom: 0;
    left: 6px;
    width: 2px;
    background: var(--color-border);
    content: "";
}

.timeline__marker {
    z-index: 1;
    width: 14px;
    height: 14px;
    margin-top: 5px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--color-primary-600);
    box-shadow: 0 0 0 1px var(--color-primary-600);
}

.timeline__content {
    min-width: 0;
    padding-bottom: 22px;
}

.timeline__heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.timeline__heading strong {
    color: var(--color-primary-800);
}

.timeline__heading time,
.timeline__content p {
    color: var(--color-muted);
    font-size: 0.83rem;
}

.timeline__content p {
    margin: 5px 0;
    overflow-wrap: anywhere;
}

.action-panel {
    min-width: 0;
}

.action-panel > p {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.action-panel form p {
    margin-bottom: 16px;
}

.action-panel input[type="file"] {
    max-width: 100%;
    padding: 8px 0;
    border: 0;
}

.action-panel .button {
    width: 100%;
}

.action-panel button:disabled {
    color: #71808d;
    background: #dce3e8;
    cursor: not-allowed;
}

.action-panel--close {
    border-top: 4px solid var(--color-primary-600);
}

.action-panel--close .alert {
    margin-bottom: 18px;
}

.order-back {
    display: flex;
    margin-top: 24px;
}

@media (min-width: 620px) {
    .agenda-summary {
        width: min(100%, 480px);
    }

    .work-order-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .evidence-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .timeline__heading {
        flex-direction: row;
        justify-content: space-between;
        gap: 16px;
    }

    .order-heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 1100px) {
    .order-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .order-actions-panel {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        align-items: start;
        position: static;
    }

    .order-actions-panel .action-panel {
        min-width: 0;
    }

    .order-actions-panel .parts-editor {
        grid-column: span 3;
    }

    .order-actions-panel .action-panel--evidence,
    .order-actions-panel .action-panel--close {
        grid-column: 1 / -1;
    }
}


/* Selector de fotografías */

.file-upload {
    position: relative;
    display: grid;
    margin: 12px 0 16px;
    padding: 16px;
    border: 1px dashed #94a9ba;
    border-radius: 10px;
    gap: 10px;
    background: var(--color-background);
    text-align: center;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.file-upload__button {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--color-primary-600);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--color-primary-800);
    background: #ffffff;
    font-weight: 750;
    cursor: pointer;
}

.file-upload__button:hover {
    background: #edf4f8;
}

.file-upload input[type="file"]:focus-visible + .file-upload__button {
    outline: 3px solid var(--color-primary-600);
    outline-offset: 3px;
}

.file-upload__status {
    color: var(--color-muted);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.file-upload__status--error {
    color: var(--color-danger);
    font-weight: 700;
}


/* Cámara y eliminación de evidencias */

.file-upload__options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.file-upload__button--camera {
    color: #ffffff;
    border-color: var(--color-primary-600);
    background: var(--color-primary-600);
}

.file-upload__button--camera:hover {
    background: var(--color-primary-800);
}

.file-upload small {
    color: var(--color-muted);
    font-size: 0.75rem;
}

.evidence-delete-form {
    margin: 0;
    padding: 0 10px 10px;
}

.button--small {
    width: 100%;
    min-height: 40px;
    padding: 7px 10px;
    font-size: 0.8rem;
}

.button--danger:hover {
    background: #8f2e2e;
}

@media (min-width: 480px) {
    .file-upload__options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Requerimientos de repuestos en avisos */

.parts-option {
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #f8fafc;
}

.parts-option legend {
    padding: 0 6px;
    color: var(--color-primary-800);
    font-size: 0.95rem;
    font-weight: 800;
}

.parts-option > .report-hint {
    margin-bottom: 14px;
}

.choice-pills ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.choice-pills label {
    display: flex;
    min-height: 46px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    align-items: center;
    gap: 9px;
    background: #ffffff;
    cursor: pointer;
}

.choice-pills input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary-600);
}

.parts-option__fields {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.parts-option__fields[hidden] {
    display: none;
}

.parts-fields-grid {
    display: grid;
    gap: 14px;
}

.parts-fields-grid .form-group {
    margin: 0;
}

.parts-summary__grid {
    display: grid;
    gap: 14px;
}

.parts-summary__item {
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-background);
}

.parts-summary__item dl {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(80px, 1fr);
    gap: 14px;
    margin: 14px 0 0;
}

.parts-summary__item dl div {
    min-width: 0;
}

.parts-summary__item dt {
    margin-bottom: 4px;
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.parts-summary__item dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--color-primary-950);
    font-weight: 700;
}

@media (min-width: 600px) {
    .parts-fields-grid,
    .parts-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Editor técnico de repuestos */

.parts-editor__toggle {
    margin: 16px 0;
    padding: 0;
    border: 0;
}

.parts-editor__toggle legend {
    margin-bottom: 9px;
    color: var(--color-graphite);
    font-size: 0.9rem;
    font-weight: 700;
}

.parts-editor__fields {
    margin: 16px 0;
    padding: 16px 0;
    border-block: 1px solid var(--color-border);
}

.parts-editor__fields[hidden],
.parts-row[hidden] {
    display: none;
}

.parts-editor__rows {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.parts-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(90px, 0.45fr);
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-background);
}

.parts-row .form-group {
    margin: 0;
}

.parts-row input[name$="-DELETE"] {
    display: none;
}

.parts-row__remove {
    grid-column: 1 / -1;
    justify-self: start;
}

.parts-editor__save {
    width: 100%;
}

.parts-summary__group + .parts-summary__group {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.parts-table {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.parts-table__row {
    display: flex;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--color-background);
}

.parts-table__row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.parts-table__row strong {
    flex-shrink: 0;
    color: var(--color-primary-800);
    font-size: 0.88rem;
}

@media (min-width: 600px) {
    .parts-editor__save {
        width: auto;
    }

    .parts-row {
        grid-template-columns: minmax(0, 1fr) 130px auto;
        align-items: end;
    }

    .parts-row__remove {
        grid-column: auto;
        align-self: end;
        margin-bottom: 2px;
    }
}


/* Correcciones de controles y distribución en escritorio */

.choice-pills > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.choice-pills > div > div {
    min-width: 0;
}

@media (min-width: 1100px) {
    .order-actions-panel .choice-pills label {
        justify-content: center;
    }

    .order-actions-panel .parts-row {
        grid-template-columns: minmax(0, 1fr) 100px;
    }

    .order-actions-panel .parts-row__remove {
        grid-column: 1 / -1;
        justify-self: start;
        margin-bottom: 0;
    }

    .action-panel--evidence form {
        display: block;
    }

    .action-panel--evidence .file-upload {
        width: 100%;
        margin: 12px 0 16px;
    }

    .action-panel--evidence button[type="submit"] {
        width: 100%;
        min-width: 0;
        margin: 0;
    }

    .close-order-form {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 16px;
        align-items: end;
    }

    .close-order-form p {
        min-width: 0;
        margin: 0;
    }

    .close-order-form p:nth-of-type(1),
    .close-order-form p:nth-of-type(2) {
        grid-column: span 3;
    }

    .close-order-form p:nth-of-type(3),
    .close-order-form p:nth-of-type(4),
    .close-order-form p:nth-of-type(5) {
        grid-column: span 2;
    }

    .close-order-form p:nth-of-type(6) {
        grid-column: 1 / -1;
    }

    .close-order-form button[type="submit"] {
        grid-column: 1 / -1;
        width: auto;
        min-width: 220px;
        justify-self: end;
    }
}


/* Borrador automático del cierre */

.close-draft-status {
    display: flex;
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid #cbdce8;
    border-radius: var(--radius-sm);
    align-items: center;
    gap: 8px;
    color: var(--color-primary-800);
    background: #f2f7fa;
    font-size: 0.84rem;
}

.close-draft-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: var(--color-cyan);
}

.close-draft-status--restored {
    border-color: #b8d9c7;
    color: #236b45;
    background: #f1f8f4;
}

.close-draft-status--restored::before {
    background: var(--color-success);
}


/* Panel operativo de supervisión */

.supervisor-heading {
    display: flex;
    margin-bottom: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.supervisor-heading__actions {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 10px;
}

.supervisor-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.supervisor-summary .summary-card {
    min-height: 128px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary-600);
    border-radius: var(--radius-md);
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.supervisor-summary .summary-card > span {
    color: var(--color-primary-800);
    font-size: 0.83rem;
    font-weight: 800;
}

.supervisor-summary .summary-card > strong {
    margin: 6px 0 2px;
    color: var(--color-primary-950);
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1;
}

.supervisor-summary .summary-card > small {
    margin-top: auto;
    color: var(--color-muted);
    font-size: 0.76rem;
}

.supervisor-summary a.summary-card {
    transition:
        border-color 150ms ease,
        transform 150ms ease,
        box-shadow 150ms ease;
}

.supervisor-summary a.summary-card:hover {
    border-color: #aabfce;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.supervisor-summary .summary-card--warning {
    border-top-color: var(--color-warning);
}

.supervisor-summary .summary-card--danger {
    border-top-color: var(--color-danger);
}

.supervisor-summary .summary-card--parts {
    grid-column: 1 / -1;
    border-top-color: var(--color-copper);
}

.supervisor-filters {
    margin-bottom: 28px;
}

.supervisor-filter-form {
    display: grid;
    gap: 14px;
}

.supervisor-filter-form .form-group {
    min-width: 0;
    margin: 0;
}

.supervisor-filter-form__submit {
    width: 100%;
    align-self: end;
}

.supervisor-results-heading {
    display: flex;
    margin: 0 0 14px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.supervisor-results-heading h2 {
    margin: 2px 0 0;
    color: var(--color-primary-950);
    font-size: 1.25rem;
}

.supervisor-table-wrap {
    display: none;
    padding: 0;
    overflow-x: auto;
}

.supervisor-table {
    width: 100%;
    border-collapse: collapse;
}

.supervisor-table th {
    padding: 13px 14px;
    color: #ffffff;
    background: var(--color-primary-800);
    font-size: 0.78rem;
    text-align: left;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.supervisor-table td {
    min-width: 130px;
    padding: 14px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.supervisor-table tbody tr:last-child td {
    border-bottom: 0;
}

.supervisor-table tbody tr:hover {
    background: #f8fafc;
}

.supervisor-table td > strong,
.supervisor-table td > span,
.supervisor-table td > time,
.supervisor-table td > small {
    display: block;
    margin-bottom: 5px;
}

.supervisor-table td > small,
.supervisor-table td > time,
.supervisor-table td > span:not(.badge):not(.sla-label):not(.requirement-tag) {
    color: var(--color-muted);
    font-size: 0.82rem;
}

.order-number-link {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--color-primary-600);
    font-weight: 900;
    text-decoration: none;
}

.order-number-link:hover {
    text-decoration: underline;
}

.text-warning {
    color: #9a5b0b;
}

.text-muted {
    color: var(--color-muted);
}

.sla-label {
    display: inline-flex !important;
    width: fit-content;
    margin-top: 7px;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--color-muted);
    background: #edf1f4;
    font-size: 0.74rem !important;
    font-weight: 800;
}

.sla-label--info {
    color: #17527a;
    background: #e8f2f8;
}

.sla-label--warning {
    color: #81530c;
    background: #fff3d8;
}

.sla-label--danger {
    color: #8c2929;
    background: #fbeaea;
}

.sla-label--success {
    color: #236b45;
    background: #e9f5ee;
}

.requirement-tag {
    display: inline-flex;
    width: fit-content;
    margin: 0 5px 6px 0;
    padding: 5px 8px;
    border-radius: 999px;
    color: #17527a;
    background: #e8f2f8;
    font-size: 0.74rem;
    font-weight: 800;
}

.requirement-tag--copper {
    color: #7f4314;
    background: #f9ecdf;
}

.supervisor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.supervisor-mobile-list {
    display: grid;
    gap: 14px;
}

.supervisor-order-card {
    min-width: 0;
}

.supervisor-order-card__heading {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.supervisor-order-card__heading > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.supervisor-order-card__heading > div > span {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.supervisor-order-card__equipment {
    display: flex;
    margin-bottom: 16px;
    flex-direction: column;
    gap: 3px;
}

.supervisor-order-card__equipment span {
    color: var(--color-muted);
    font-size: 0.84rem;
}

.supervisor-order-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.supervisor-order-card__meta > div {
    display: flex;
    min-width: 0;
    padding: 11px;
    border-radius: var(--radius-sm);
    flex-direction: column;
    background: var(--color-background);
}

.supervisor-order-card__meta small {
    margin-bottom: 3px;
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.supervisor-order-card__meta span {
    overflow-wrap: anywhere;
    font-size: 0.86rem;
    font-weight: 700;
}

.supervisor-order-card__requirements {
    margin-bottom: 14px;
}

.supervisor-actions--mobile {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.supervisor-actions--mobile .button {
    width: 100%;
}

.supervisor-pagination {
    justify-content: center;
    margin-top: 24px;
}

.supervisor-empty {
    text-align: center;
}

.supervisor-empty h2 {
    margin-top: 0;
}

@media (min-width: 700px) {
    .supervisor-heading {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .supervisor-heading__actions {
        width: auto;
        flex-direction: row;
    }

    .supervisor-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .supervisor-summary .summary-card--parts {
        grid-column: auto;
    }

    .supervisor-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .supervisor-filter-form__search {
        grid-column: 1 / -1;
    }

    .supervisor-filter-form__submit {
        width: auto;
        min-width: 180px;
    }
}

@media (min-width: 1000px) {
    .supervisor-table-wrap {
        display: block;
    }

    .supervisor-mobile-list {
        display: none;
    }

    .supervisor-filter-form {
        grid-template-columns:
            minmax(220px, 1.4fr)
            repeat(3, minmax(145px, 1fr))
            auto;
        align-items: end;
    }

    .supervisor-filter-form__search {
        grid-column: auto;
    }

    .supervisor-summary .summary-card {
        min-height: 142px;
        padding: 20px;
    }

    .supervisor-summary .summary-card > strong {
        font-size: 2.6rem;
    }
}


/* Gestión de supervisión dentro del detalle */

.order-management {
    display: flex;
    margin: 24px 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    border-left: 4px solid var(--color-primary-600);
}

.order-management h2 {
    margin: 2px 0 5px;
    color: var(--color-primary-950);
    font-size: 1.2rem;
}

.order-management p {
    margin: 0;
    color: var(--color-muted);
}

.order-management__actions {
    display: grid;
    width: 100%;
    gap: 10px;
}

.order-management__actions .button {
    width: 100%;
}

@media (min-width: 700px) {
    .order-management {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .order-management__actions {
        display: flex;
        width: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .order-management__actions .button {
        width: auto;
    }
}


/* Planificación preventiva diaria */

.preventive-day-nav {
    display: flex;
    min-height: 0;
    margin: -8px 0 24px;
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
}

.preventive-day-nav__date {
    display: flex;
    margin-right: auto;
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.preventive-day-nav__date span {
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.preventive-day-nav__date strong {
    color: var(--color-primary-950);
    font-size: 1.05rem;
}

.preventive-day-nav__controls {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.preventive-day-nav .button {
    width: 100%;
    min-width: 0;
    padding-inline: 9px;
    font-size: 0.76rem;
    white-space: nowrap;
}

.preventive-filter-form {
    display: grid;
    gap: 14px;
}

.preventive-filter-form .form-group {
    min-width: 0;
    margin: 0;
}

.preventive-filter-form .button {
    width: 100%;
    align-self: end;
}

.preventive-order-card > .button {
    width: 100%;
}

.preventive-table td:first-child,
.preventive-table td:nth-child(2) {
    min-width: 95px;
}

@media (min-width: 700px) {
    .preventive-day-nav {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .preventive-day-nav__controls {
        display: flex;
        width: auto;
        margin-left: auto;
    }

    .preventive-day-nav .button {
        width: auto;
    }

    .preventive-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
        align-items: end;
    }

    .preventive-filter-form .button {
        width: auto;
        min-width: 160px;
    }
}


@media (min-width: 1000px) {
    .preventive-planning-heading {
        align-items: flex-start;
    }

    .preventive-planning-heading > div:first-child {
        max-width: 600px;
    }

    .preventive-planning-heading .supervisor-heading__actions {
        display: grid;
        width: 340px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .preventive-planning-heading .supervisor-heading__actions .button {
        display: inline-flex;
        width: 100%;
        min-height: 42px;
        padding: 8px 13px;
        align-items: center;
        justify-content: center;
        line-height: 1.15;
        white-space: nowrap;
    }
}

@media (min-width: 1200px) {
    .preventive-planning-heading .supervisor-heading__actions {
        width: auto;
        grid-template-columns: repeat(4, max-content);
        align-items: center;
    }

    .preventive-planning-heading .supervisor-heading__actions .button {
        width: auto;
        min-width: 118px;
    }
}


/* Carta Gantt preventiva */

.gantt-filter-form {
    display: grid;
    gap: 14px;
}

.gantt-filter-form .form-group {
    min-width: 0;
    margin: 0;
}

.gantt-filter-form .button {
    width: 100%;
    align-self: end;
}

.gantt-toolbar {
    display: flex;
    margin: 0 0 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.gantt-toolbar h2 {
    margin: 2px 0 0;
    color: var(--color-primary-950);
    font-size: 1.25rem;
}

.gantt-toolbar__exports {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.gantt-toolbar__exports .button {
    width: 100%;
}

.gantt-card {
    padding: 0;
    overflow: hidden;
}

.gantt-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: var(--color-primary-600) #e8eef3;
}

.gantt-scroll:focus-visible {
    outline: 3px solid rgba(41, 168, 184, 0.35);
    outline-offset: -3px;
}

.gantt-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.gantt-table th,
.gantt-table td {
    height: 52px;
    padding: 8px 10px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 0.78rem;
    vertical-align: middle;
}

.gantt-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 58px;
    color: #ffffff;
    background: var(--color-primary-800);
    text-align: left;
}

.gantt-table tbody tr:last-child td {
    border-bottom: 0;
}

.gantt-table tbody tr:hover td {
    background: #f8fbfd;
}

.gantt-table td > strong,
.gantt-table td > small {
    display: block;
}

.gantt-table td > small {
    margin-top: 3px;
    color: var(--color-muted);
}

.gantt-table__order {
    width: 105px;
    min-width: 105px;
}

.gantt-table__ceco {
    width: 110px;
    min-width: 110px;
}

.gantt-table__equipment {
    width: 190px;
    min-width: 190px;
}

.gantt-table__technician {
    width: 155px;
    min-width: 155px;
}

.gantt-table__action {
    width: 100px;
    min-width: 100px;
}

.gantt-table__day,
.gantt-table__slot {
    width: 43px;
    min-width: 43px;
    padding-inline: 4px !important;
    text-align: center !important;
}

.gantt-table__day span,
.gantt-table__day small {
    display: block;
}

.gantt-table__day small {
    margin-top: 2px;
    color: #cfe1ed;
    font-size: 0.65rem;
    text-transform: uppercase;
}

.gantt-table th:first-child,
.gantt-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 4px 0 8px rgba(11, 31, 51, 0.08);
}

.gantt-table th:first-child {
    z-index: 4;
}

.gantt-table td.gantt-table__slot--scheduled {
    color: #ffffff;
    background: var(--color-cyan) !important;
    font-size: 1rem;
    font-weight: 900;
}

.gantt-help {
    margin: 0;
    padding: 11px 14px;
    color: var(--color-muted);
    background: #f8fafc;
    font-size: 0.76rem;
}

@media (min-width: 700px) {
    .gantt-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gantt-filter-form .button {
        width: auto;
        min-width: 180px;
    }

    .gantt-toolbar {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .gantt-toolbar__exports {
        display: flex;
        width: auto;
    }

    .gantt-toolbar__exports .button {
        width: auto;
    }
}

@media (min-width: 1100px) {
    .gantt-filter-form {
        grid-template-columns:
            repeat(2, minmax(130px, 0.75fr))
            repeat(3, minmax(140px, 1fr))
            minmax(130px, 0.8fr)
            auto;
        gap: 10px;
        align-items: end;
    }
}


/* Pendientes de planificación preventiva */

.pending-filter-form {
    display: grid;
    gap: 14px;
}

.pending-filter-form .form-group {
    min-width: 0;
    margin: 0;
}

.pending-filter-form .button {
    width: 100%;
    align-self: end;
}

.pending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pending-tags .requirement-tag {
    margin: 0;
}

@media (min-width: 700px) {
    .pending-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pending-filter-form__search {
        grid-column: 1 / -1;
    }

    .pending-filter-form .button {
        width: auto;
        min-width: 180px;
    }
}

@media (min-width: 1000px) {
    .pending-filter-form {
        grid-template-columns:
            minmax(230px, 1.4fr)
            repeat(2, minmax(170px, 1fr))
            auto;
        align-items: end;
    }

    .pending-filter-form__search {
        grid-column: auto;
    }
}


/* Ajuste definitivo de cabecera preventiva */
@media (min-width: 1000px) {
    .page-header.preventive-planning-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 32px;
    }

    .page-header.preventive-planning-heading
    .supervisor-heading__actions {
        align-self: center;
    }

    .page-header.preventive-planning-heading
    .supervisor-heading__actions .button {
        height: 42px;
        min-height: 42px;
        padding: 0 14px;
        line-height: 1;
        white-space: nowrap;
    }

    .card.preventive-day-nav {
        width: 100%;
        min-height: 64px;
        padding: 10px 14px;
        align-items: center;
        justify-content: flex-start;
    }

    .card.preventive-day-nav
    .preventive-day-nav__date {
        margin-right: auto;
        margin-left: 0;
        align-items: flex-start;
        text-align: left;
    }

    .card.preventive-day-nav
    .preventive-day-nav__controls {
        width: auto;
        margin-right: 0;
        margin-left: auto;
    }
}


/* Carta Gantt mensual consolidada por equipo */
.gantt-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.gantt-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.gantt-legend__swatch {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
    border: 1px solid rgba(11, 31, 51, 0.15);
    border-radius: 0.25rem;
}

.gantt-legend__swatch--planned,
.gantt-table td.gantt-table__slot--planned {
    background: #1E5A8A;
}

.gantt-legend__swatch--executed,
.gantt-table td.gantt-table__slot--executed {
    background: #2E8B57;
}

.gantt-legend__swatch--both,
.gantt-table td.gantt-table__slot--both {
    background: #29A8B8;
}

.gantt-table__code {
    min-width: 9rem;
}

.gantt-table__location {
    min-width: 13rem;
}

.gantt-table--equipment .gantt-table__equipment {
    min-width: 15rem;
}

.gantt-table td.gantt-table__slot--planned,
.gantt-table td.gantt-table__slot--executed,
.gantt-table td.gantt-table__slot--both {
    border-color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 700px) {
    .gantt-legend {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.65rem;
    }
}


.gantt-table__work-site {
    min-width: 10.5rem;
}

.gantt-table__casino {
    min-width: 10rem;
}

.gantt-table__area {
    min-width: 9rem;
}


/* Flujos de asignación y planificación preventiva */

.workflow-shell {
    width: min(100%, 980px);
    margin: 0 auto;
}

.workflow-shell--wide {
    width: min(100%, var(--content-width));
}

.workflow-reference {
    display: inline-flex;
    padding: 0.5rem 0.75rem;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-primary-800);
    background: #eaf2f8;
    font-size: 0.85rem;
    font-weight: 800;
}

.workflow-layout {
    display: grid;
    gap: 1rem;
}

.workflow-summary,
.workflow-form-card,
.workflow-guide,
.import-file-summary,
.import-confirm,
.import-results {
    padding: 1.15rem;
}

.workflow-data {
    display: grid;
    margin: 0;
    gap: 0;
}

.workflow-data > div {
    display: grid;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
    grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.4fr);
    gap: 0.75rem;
}

.workflow-data > div:last-child {
    border-bottom: 0;
}

.workflow-data dt {
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.workflow-data dd {
    min-width: 0;
    margin: 0;
    color: var(--color-primary-950);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.stack-form {
    display: grid;
    gap: 1rem;
}

.stack-form .form-group {
    margin: 0;
}

.form-help {
    display: block;
    margin-top: 0.35rem;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.field-errors,
.field-errors .errorlist {
    margin: 0.35rem 0 0;
    padding: 0;
    color: var(--color-danger);
    font-size: 0.84rem;
    list-style: none;
}

.message--error {
    border-color: rgba(178, 58, 58, 0.3);
    color: #8f2e2e;
    background: #fff1f0;
}

.workflow-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.workflow-actions .button {
    width: 100%;
}

.workflow-steps {
    display: grid;
    margin: 0 0 1rem;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.workflow-step {
    display: flex;
    min-height: 3rem;
    padding: 0.65rem 0.8rem;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-muted);
    background: var(--color-surface);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.workflow-step b {
    display: inline-grid;
    width: 1.7rem;
    height: 1.7rem;
    flex: 0 0 1.7rem;
    place-items: center;
    border-radius: 50%;
    color: var(--color-primary-800);
    background: #eaf2f8;
}

.workflow-step--active {
    border-color: var(--color-primary-600);
    color: #ffffff;
    background: var(--color-primary-600);
}

.workflow-step--active b {
    color: var(--color-primary-800);
    background: #ffffff;
}

.checkbox-panel {
    padding: 0;
    border: 0;
}

.checkbox-panel legend {
    margin-bottom: 0.25rem;
    color: var(--color-primary-950);
    font-weight: 800;
}

.checkbox-panel ul {
    display: grid;
    max-height: 17rem;
    margin: 0.75rem 0 0;
    padding: 0.4rem;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-background);
    list-style: none;
}

.checkbox-panel li label {
    display: flex;
    min-height: 2.75rem;
    padding: 0.55rem;
    align-items: center;
    gap: 0.65rem;
    border-radius: 6px;
    cursor: pointer;
}

.checkbox-panel li label:hover {
    background: #eaf2f8;
}

.checkbox-panel input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
}

.workflow-guide h2,
.import-confirm h2 {
    margin: 0 0 0.65rem;
    color: var(--color-primary-950);
    font-size: 1.2rem;
}

.workflow-guide ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    color: var(--color-muted);
}

.workflow-guide li + li {
    margin-top: 0.55rem;
}

.upload-zone {
    display: grid;
    min-height: 9rem;
    padding: 1.25rem;
    place-items: center;
    align-content: center;
    gap: 0.35rem;
    border: 2px dashed #9cb9cf;
    border-radius: var(--radius-md);
    color: var(--color-muted);
    background: #f7fafc;
    text-align: center;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.upload-zone:hover,
.upload-zone:focus-within {
    border-color: var(--color-primary-600);
    background: #edf6fb;
}

.upload-zone__title {
    color: var(--color-primary-800);
    font-weight: 800;
}

.upload-zone__name {
    max-width: 100%;
    overflow: hidden;
    color: var(--color-text);
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visually-hidden-file {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.import-file-summary {
    display: grid;
    margin-bottom: 1rem;
    gap: 0.9rem;
}

.import-file-summary div {
    min-width: 0;
}

.import-file-summary span {
    display: block;
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.import-file-summary strong {
    display: block;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.import-summary {
    margin-bottom: 1rem;
}

.import-confirm {
    display: grid;
    margin: 1rem 0;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid var(--color-success);
}

.import-confirm p {
    margin: 0;
    color: var(--color-muted);
}

.import-results {
    margin-top: 1rem;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.data-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: #ffffff;
    background: var(--color-primary-800);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.data-table td {
    font-size: 0.88rem;
}

.import-row--valid {
    background: #f1faf5;
}

.import-row--invalid {
    background: #fff5f4;
}

.compact-errors {
    margin: 0;
    padding-left: 1rem;
    color: var(--color-danger);
}

@media (min-width: 700px) {
    .workflow-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .workflow-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .workflow-actions .button {
        width: auto;
    }

    .import-file-summary {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .import-confirm {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (min-width: 900px) {
    .workflow-layout {
        grid-template-columns: minmax(0, 1.05fr) minmax(19rem, 0.8fr);
        align-items: start;
    }

    .workflow-summary,
    .workflow-form-card,
    .workflow-guide,
    .import-file-summary,
    .import-confirm,
    .import-results {
        padding: 1.4rem;
    }
}


/* Dashboard de indicadores */

.indicator-shell {
    width: min(100%, var(--content-width));
    margin: 0 auto;
}

.indicator-filters,
.indicator-panel {
    padding: 1.15rem;
}

.indicator-filter-form {
    display: grid;
    gap: 0.85rem;
}

.indicator-filter-form .form-group {
    min-width: 0;
    margin: 0;
}

.indicator-filter-form .button {
    width: 100%;
    align-self: end;
}

.indicator-filter-note {
    margin: 0.9rem 0 0;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.indicator-kpis {
    display: grid;
    margin: 1rem 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.indicator-card {
    display: flex;
    min-width: 0;
    min-height: 9.5rem;
    padding: 1rem;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-top: 3px solid #9cb9cf;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.indicator-card--primary {
    border-top-color: var(--color-primary-600);
}

.indicator-card--accent {
    border-top-color: var(--color-cyan);
}

.indicator-card--success {
    border-top-color: var(--color-success);
}

.indicator-card > span {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.indicator-card > strong {
    margin: auto 0 0.35rem;
    color: var(--color-primary-950);
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    line-height: 1;
}

.indicator-card > strong.indicator-card__duration {
    font-size: clamp(1.2rem, 3.6vw, 1.7rem);
}

.indicator-card > small {
    color: var(--color-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.indicator-grid {
    display: grid;
    margin-bottom: 1rem;
    gap: 1rem;
}

.indicator-panel {
    margin-bottom: 1rem;
}

.indicator-panel h2 {
    margin: 0;
    color: var(--color-primary-950);
    font-size: 1.2rem;
}

.indicator-panel__heading {
    display: flex;
    margin-bottom: 1rem;
    flex-direction: column;
    gap: 1rem;
}

.indicator-panel__heading h2 {
    margin-bottom: 0.35rem;
}

.indicator-panel__heading p {
    margin: 0;
    color: var(--color-muted);
}

.indicator-highlight {
    display: flex;
    min-width: 8rem;
    padding: 0.75rem 1rem;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--color-primary-950);
    background: #eaf2f8;
}

.indicator-highlight strong {
    font-size: 1.7rem;
}

.indicator-highlight span {
    color: var(--color-muted);
    font-weight: 800;
}

.indicator-distribution {
    display: grid;
    gap: 0.9rem;
}

.indicator-distribution__row {
    display: grid;
    grid-template-columns: minmax(7rem, 1fr) minmax(5rem, 1.6fr) 3.2rem;
    align-items: center;
    gap: 0.65rem;
}

.indicator-distribution__row > div {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    gap: 0.5rem;
}

.indicator-distribution__row span {
    overflow: hidden;
    color: var(--color-muted);
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.indicator-distribution__row strong,
.indicator-distribution__row small {
    color: var(--color-primary-950);
    font-weight: 800;
}

.indicator-distribution__row small {
    text-align: right;
}

.indicator-distribution progress {
    width: 100%;
    height: 0.65rem;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e5edf3;
    appearance: none;
}

.indicator-distribution progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e5edf3;
}

.indicator-distribution progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--color-primary-600),
        var(--color-cyan)
    );
}

.indicator-distribution progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--color-primary-600);
}

.indicator-empty {
    padding: 1.5rem 1rem;
}

@media (min-width: 700px) {
    .indicator-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .indicator-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .indicator-panel__heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 900px) {
    .indicator-filters,
    .indicator-panel {
        padding: 1.4rem;
    }

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

@media (min-width: 1100px) {
    .indicator-filter-form {
        grid-template-columns:
            repeat(2, minmax(130px, 0.75fr))
            repeat(3, minmax(140px, 1fr))
            minmax(135px, 0.8fr)
            auto;
        gap: 10px;
        align-items: end;
    }

    .indicator-filter-form .button {
        width: auto;
        min-width: 150px;
    }
}


/* Centro de notificaciones */

.header-link {
    position: relative;
}

.notification-count {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--color-danger);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.notification-page-header {
    display: flex;
    margin: 18px 0 22px;
    flex-direction: column;
    gap: 18px;
}

.notification-page-header h1 {
    margin: 0;
    color: var(--color-primary-950);
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    line-height: 1.15;
}

.notification-page-header > div > p:last-child {
    margin: 8px 0 0;
    color: var(--color-muted);
}

.notification-summary {
    display: flex;
    width: fit-content;
    min-width: 112px;
    padding: 12px 16px;
    border: 1px solid #c7e9ed;
    border-radius: var(--radius-md);
    align-items: baseline;
    gap: 8px;
    color: var(--color-primary-800);
    background: #edf9fa;
}

.notification-summary strong {
    font-size: 1.65rem;
    line-height: 1;
}

.notification-summary span {
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.notification-toolbar {
    display: flex;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    flex-direction: column;
    gap: 12px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.notification-toolbar form {
    margin: 0;
}

.notification-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.notification-toolbar .button {
    min-height: 42px;
}

.button--active {
    border-color: var(--color-primary-600);
    background: var(--color-primary-600);
}

.filter-count {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-800);
    background: #ffffff;
    font-size: 0.72rem;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-item {
    position: relative;
    display: grid;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.notification-item--unread {
    border-left: 4px solid var(--color-cyan);
    background: linear-gradient(110deg, #f3fbfc 0%, #ffffff 70%);
}

.notification-item__icon {
    display: flex;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-800);
    background: #e8f0f6;
    font-size: 1.15rem;
    font-weight: 800;
}

.notification-item__icon--new_order {
    color: #8a4d16;
    background: #fbead9;
}

.notification-item__icon--assignment {
    color: #236c47;
    background: #e2f3e9;
}

.notification-item__icon--reassignment {
    color: #145d68;
    background: #dff5f7;
}

.notification-item__heading {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.notification-item__heading h2 {
    margin: 3px 0 0;
    color: var(--color-primary-950);
    font-size: 1rem;
    line-height: 1.3;
}

.notification-item__heading time {
    color: var(--color-muted);
    font-size: 0.78rem;
}

.notification-item__state {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 999px;
    color: #145d68;
    background: #dff5f7;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notification-item__body > p {
    margin: 10px 0;
    color: var(--color-graphite);
}

.notification-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    color: var(--color-muted);
    font-size: 0.78rem;
}

.notification-item__meta strong {
    color: var(--color-primary-800);
}

.notification-item__actions {
    display: grid;
    margin-top: 14px;
    gap: 8px;
}

.notification-item__actions form {
    margin: 0;
}

.notification-item__actions .button {
    min-height: 42px;
    font-size: 0.85rem;
}

.notification-pagination {
    display: flex;
    margin-top: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.notification-empty {
    padding-block: 44px;
    text-align: center;
}

.notification-empty__icon {
    display: flex;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #236c47;
    background: #e2f3e9;
    font-size: 1.4rem;
    font-weight: 800;
}

.notification-empty h2 {
    margin: 0;
    color: var(--color-primary-950);
}

.notification-empty p {
    margin: 8px auto 20px;
    color: var(--color-muted);
}

@media (min-width: 600px) {
    .notification-page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .notification-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .notification-filters {
        display: flex;
    }

    .notification-item__heading {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
    }

    .notification-item__heading time {
        flex-shrink: 0;
    }

    .notification-item__actions {
        display: flex;
        flex-wrap: wrap;
    }
}

@media (min-width: 960px) {
    .notification-list {
        gap: 14px;
    }

    .notification-item {
        padding: 22px;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 18px;
    }

    .notification-item__icon {
        width: 48px;
        height: 48px;
    }
}


/* Auditoría de órdenes */

.audit-heading {
    display: flex;
    margin: 18px 0 22px;
    flex-direction: column;
    gap: 18px;
}

.audit-heading h1 {
    margin: 0;
    color: var(--color-primary-950);
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    line-height: 1.15;
}

.audit-heading > div > p:last-child {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--color-muted);
}

.audit-total {
    display: flex;
    width: fit-content;
    padding: 12px 16px;
    border: 1px solid #c7e9ed;
    border-radius: var(--radius-md);
    align-items: baseline;
    gap: 8px;
    color: var(--color-primary-800);
    background: #edf9fa;
}

.audit-total strong {
    font-size: 1.65rem;
    line-height: 1;
}

.audit-total span {
    color: var(--color-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.audit-filters {
    margin-bottom: 22px;
}

.audit-filters__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.audit-filters .form-group {
    margin: 0;
}

.audit-filters__actions {
    display: grid;
    margin-top: 18px;
    gap: 8px;
}

.audit-list {
    display: grid;
    gap: 0;
}

.audit-entry {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
}

.audit-entry__rail {
    position: relative;
    display: flex;
    justify-content: center;
}

.audit-entry__rail::after {
    position: absolute;
    top: 24px;
    bottom: -1px;
    width: 2px;
    background: #cfdae3;
    content: "";
}

.audit-entry:last-child .audit-entry__rail::after {
    display: none;
}

.audit-entry__rail span {
    z-index: 1;
    width: 13px;
    height: 13px;
    margin-top: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--color-primary-600);
    box-shadow: 0 0 0 1px var(--color-primary-600);
}

.audit-entry__content {
    min-width: 0;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.audit-entry__header {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.audit-entry__header h2 {
    margin: 6px 0 0;
    color: var(--color-primary-950);
    font-size: 1.08rem;
}

.audit-entry__header time {
    color: var(--color-muted);
    font-size: 0.78rem;
}

.audit-event-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    color: #145d68;
    background: #dff5f7;
    font-size: 0.7rem;
    font-weight: 800;
}

.audit-entry__location {
    display: flex;
    margin: 12px 0;
    flex-direction: column;
    gap: 2px;
}

.audit-entry__location strong {
    color: var(--color-primary-800);
}

.audit-entry__location span {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.audit-entry__facts {
    display: grid;
    margin: 0;
    padding: 12px;
    border-radius: var(--radius-sm);
    gap: 12px;
    background: var(--color-background);
}

.audit-entry__facts div {
    min-width: 0;
}

.audit-entry__facts dt {
    margin-bottom: 3px;
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.audit-entry__facts dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--color-graphite);
    font-size: 0.86rem;
    font-weight: 650;
}

.audit-entry__notes {
    margin: 12px 0 0;
    padding: 11px 12px;
    border-left: 3px solid var(--color-copper);
    color: var(--color-graphite);
    background: #fff8f0;
    font-size: 0.86rem;
}

.audit-entry__details {
    margin-top: 12px;
    color: var(--color-muted);
    font-size: 0.8rem;
}

.audit-entry__details summary {
    color: var(--color-primary-600);
    font-weight: 700;
    cursor: pointer;
}

.audit-entry__details pre {
    max-width: 100%;
    margin: 8px 0 0;
    padding: 10px;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    color: var(--color-graphite);
    background: #eef3f6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.audit-entry__link {
    display: inline-flex;
    min-height: 42px;
    margin-top: 12px;
    align-items: center;
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: none;
}

.audit-pagination {
    display: flex;
    margin-top: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.audit-empty {
    padding-block: 42px;
    text-align: center;
}

.audit-empty h2 {
    margin: 0;
    color: var(--color-primary-950);
}

.audit-empty p {
    margin: 8px 0 20px;
    color: var(--color-muted);
}

@media (min-width: 600px) {
    .audit-heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .audit-filters__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-filters__actions {
        display: flex;
        justify-content: flex-end;
    }

    .audit-entry {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 14px;
    }

    .audit-entry__header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
    }

    .audit-entry__header time {
        flex-shrink: 0;
    }

    .audit-entry__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .audit-filters__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .audit-entry__content {
        padding: 22px;
    }

    .audit-entry__facts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* Búsqueda de equipos en el reporte de casino */

.equipment-picker {
    display: grid;
    gap: 8px;
}

.equipment-picker__filters {
    display: grid;
    gap: 10px;
    margin-bottom: 6px;
}

.equipment-picker__filters label {
    margin-bottom: 6px;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.equipment-picker__filters select {
    min-height: 46px;
}

.equipment-picker__search-label {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.equipment-picker__search {
    padding-right: 40px;
}

.equipment-picker__status {
    min-height: 20px;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.equipment-picker__empty {
    margin: 2px 0 0;
    color: var(--color-danger);
    font-size: 0.86rem;
    font-weight: 600;
}


@media (min-width: 760px) {
    .equipment-picker__filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* Cierre integrado y confirmación ejecutiva */

.close-order-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.close-order-form > p {
    display: grid;
    min-width: 0;
    gap: 7px;
    margin: 0;
}

.close-order-form textarea,
.close-order-form input,
.close-order-form select {
    width: 100%;
}

.close-order-form textarea {
    min-height: 104px;
}

.close-order-form button[type="submit"] {
    width: 100%;
}

.close-time-validation {
    margin: 2px 0 0;
    color: var(--color-danger, #B23A3A);
    font-size: 0.84rem;
    font-weight: 700;
}

.close-order-form input[aria-invalid="true"] {
    border-color: var(--color-danger, #B23A3A);
    box-shadow: 0 0 0 3px rgba(178, 58, 58, 0.12);
}

.closure-review-dialog {
    width: min(720px, calc(100% - 28px));
    max-height: calc(100dvh - 28px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 18px;
    color: var(--color-text);
    box-shadow: 0 24px 70px rgba(11, 31, 51, 0.3);
}

.closure-review-dialog::backdrop {
    background: rgba(11, 31, 51, 0.68);
    backdrop-filter: blur(3px);
}

.closure-review-dialog__content {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.closure-review-dialog__content h2,
.closure-review-dialog__content p {
    margin: 0;
}

.closure-review-dialog [data-closure-summary] {
    max-height: min(55dvh, 520px);
    padding: 2px;
    overflow: auto;
}

.closure-review-dialog .resolution-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-border);
}

.closure-review-dialog .resolution-details > div {
    padding: 11px 13px;
    background: var(--color-surface);
}

.closure-review-dialog .resolution-details dt {
    color: var(--color-muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.closure-review-dialog .resolution-details dd {
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.closure-review-dialog__actions {
    display: grid;
    gap: 10px;
}

.closure-review-dialog__actions .button {
    width: 100%;
}

.order-report-download {
    display: grid;
    gap: 18px;
    margin-top: 24px;
    border-left: 4px solid var(--color-cyan);
}

.order-report-download h2 {
    margin: 2px 0 6px;
    color: var(--color-primary-900);
    font-size: 1.2rem;
}

.order-report-download p {
    margin: 0;
    color: var(--color-muted);
}

.order-report-download .button {
    width: 100%;
}

@media (min-width: 700px) {
    .closure-review-dialog__actions {
        grid-template-columns: 1fr 1fr;
    }

    .order-report-download {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .order-report-download .button {
        width: auto;
    }
}

@media (min-width: 900px) {
    .action-panel--close .close-order-form {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        column-gap: 20px;
        row-gap: 18px;
        align-items: start;
    }

    .action-panel--close .close-order-form > p:nth-of-type(1) {
        grid-column: span 8;
    }

    .action-panel--close .close-order-form > p:nth-of-type(2) {
        grid-column: span 4;
    }

    .action-panel--close .close-order-form > p:nth-of-type(3),
    .action-panel--close .close-order-form > p:nth-of-type(4) {
        grid-column: span 6;
    }

    .action-panel--close .close-order-form > p:nth-of-type(5),
    .action-panel--close .close-order-form > p:nth-of-type(6),
    .action-panel--close .close-order-form > p:nth-of-type(7) {
        grid-column: span 4;
    }

    .action-panel--close .close-order-form > p:nth-of-type(8),
    .action-panel--close .close-order-form > .errorlist,
    .action-panel--close .close-order-form button[type="submit"] {
        grid-column: 1 / -1;
    }

    .action-panel--close .close-order-form button[type="submit"] {
        width: auto;
        min-width: 240px;
        justify-self: end;
    }
}

/* Historial de equipos: mobile first */
.equipment-history-filters,
.equipment-history-detail-filter-form { display:grid; gap:16px; align-items:end; }
.equipment-history-filters .form-group,
.equipment-history-detail-filter-form .form-group { min-width:0; }
.equipment-history-filters input,
.equipment-history-filters select,
.equipment-history-detail-filter-form select { width:100%; min-height:44px; }
.equipment-history-heading,
.equipment-last-service,
.equipment-history-card__heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; }
.equipment-profile,
.equipment-last-service,
.equipment-history-summary,
.equipment-history-detail-filters { margin-bottom:24px; }
.equipment-history-card,
.equipment-history-order-card { padding:20px; display:grid; gap:16px; min-width:0; }
.equipment-history-card h2,
.equipment-history-order-card h2 { font-size:1.1rem; margin:0; }
.equipment-history-card p,
.equipment-history-order-card p { margin:0; overflow-wrap:anywhere; }
.equipment-history-card__heading > div { display:grid; gap:6px; }
.equipment-history-card__metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0; }
.equipment-history-card__metrics dt { font-size:.8rem; color:#607487; }
.equipment-history-card__metrics dd { margin:4px 0 0; overflow-wrap:anywhere; }
.equipment-history-card .button,
.equipment-history-order-card .button { width:100%; min-height:44px; }
@media(min-width:700px) {
 .equipment-history-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .equipment-history-filters__search { grid-column:1/-1; }
 .equipment-history-detail-filter-form { grid-template-columns:1fr 1fr auto; }
}
@media(min-width:1100px) {
 .equipment-history-filters { grid-template-columns:2fr 1fr 1fr 1fr auto; }
 .equipment-history-filters__search { grid-column:auto; }
}


/* Declaración independiente de quiebre preventivo */
.preventive-break-banner {
    display: flex;
    margin-bottom: var(--space-4);
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    border-left: 4px solid var(--color-accent);
}

.preventive-break-banner h2,
.preventive-break-banner p {
    margin: 0;
}

.preventive-break-banner .section-heading__eyebrow {
    margin-bottom: 4px;
}

.preventive-break-dialog {
    width: min(92vw, 620px);
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.preventive-break-dialog::backdrop {
    background: rgba(5, 16, 27, 0.72);
    backdrop-filter: blur(2px);
}

.preventive-break-dialog__content {
    display: grid;
    padding: clamp(20px, 4vw, 32px);
    gap: var(--space-4);
}

.preventive-break-dialog__content p,
.preventive-break-dialog__content label {
    margin: 0;
}

.preventive-break-dialog__content select {
    width: 100%;
    margin-top: 6px;
}

.preventive-break-dialog__content small {
    display: block;
    margin-top: 6px;
    color: var(--color-text-muted);
}

.preventive-break-dialog__close {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-primary-900);
    background: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.preventive-break-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

@media (max-width: 619px) {
    .preventive-break-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .preventive-break-banner .button,
    .preventive-break-dialog__actions .button {
        width: 100%;
    }

    .preventive-break-dialog__actions {
        flex-direction: column-reverse;
    }
}


/* Quiebre preventivo: acción excepcional (mantención no realizada) */
.preventive-break-banner--danger {
    border-left-color: #bd3539;
    background: linear-gradient(90deg, #fff5f5 0%, #ffffff 42%);
}

.preventive-break-banner--danger .section-heading__eyebrow,
.preventive-break-banner--danger h2 {
    color: #8f2428;
}

.preventive-break-banner--danger > div > p:last-child {
    max-width: 680px;
    color: #5e3436;
}

.preventive-break-dialog {
    overflow: hidden;
    outline: none;
}

.preventive-break-dialog__content > .section-heading {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.preventive-break-dialog__warning {
    display: grid;
    padding: 14px 16px;
    border: 1px solid #e7b8ba;
    border-left: 4px solid #bd3539;
    border-radius: var(--radius-sm);
    gap: 4px;
    color: #702327;
    background: #fff5f5;
}

.preventive-break-dialog__warning strong,
.preventive-break-dialog__warning span {
    display: block;
}

@media (min-width: 900px) {
    .preventive-break-banner {
        padding: 22px 26px;
    }

    .preventive-break-banner > .button {
        min-width: 245px;
        justify-content: center;
    }

    .close-order-form--preventive {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        align-items: start;
    }

    .close-order-form--preventive p:nth-of-type(1),
    .close-order-form--preventive p:nth-of-type(2),
    .close-order-form--preventive p:nth-of-type(3) {
        grid-column: span 2;
    }

    .close-order-form--preventive p:nth-of-type(4) {
        grid-column: 1 / -1;
    }

    .close-order-form--preventive textarea {
        min-height: 96px;
    }

    .close-order-form--preventive button[type="submit"] {
        margin-top: 2px;
    }
}


/* Espaciado y jerarquía visual del modal de quiebre */
.preventive-break-dialog {
    width: min(94vw, 720px);
    max-height: 90vh;
    overflow-y: auto;
}

.preventive-break-dialog__content {
    padding: clamp(24px, 4vw, 38px);
    gap: 22px;
}

.preventive-break-dialog__content > .section-heading {
    padding-bottom: 18px;
}

.preventive-break-dialog__content > p,
.preventive-break-dialog__content > [data-corrective-order-field] {
    display: grid;
    margin: 0;
    gap: 8px;
}

.preventive-break-dialog__content label {
    color: var(--color-primary-950);
    font-weight: 700;
}

.preventive-break-dialog__content select {
    min-height: 46px;
    margin-top: 0;
    padding-inline: 14px 40px;
}

.preventive-break-dialog__content small {
    margin-top: 2px;
    line-height: 1.45;
}

.preventive-break-dialog__warning {
    padding: 16px 18px;
    gap: 8px;
    line-height: 1.5;
}

.preventive-break-dialog__actions {
    margin-top: 2px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    align-items: center;
}

.preventive-break-dialog__actions .button {
    min-height: 44px;
    padding-inline: 20px;
}

@media (max-width: 619px) {
    .preventive-break-dialog {
        width: calc(100vw - 24px);
    }

    .preventive-break-dialog__content {
        padding: 22px 18px;
        gap: 18px;
    }

    .preventive-break-dialog__actions {
        gap: 10px;
    }
}


.preventive-break-dialog__content
[data-corrective-order-field][hidden] {
    display: none !important;
}


/* Separación de acciones del modal de quiebre */
.preventive-break-dialog__actions {
    width: 100%;
    margin-top: 8px;
    padding-top: 24px;
    justify-content: space-between;
    gap: 24px;
}

@media (max-width: 619px) {
    .preventive-break-dialog__actions {
        gap: 12px;
    }
}


/* Panel operacional de planificación preventiva */
.preventive-operations-summary {
    display: grid;
    margin-bottom: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.operations-kpi {
    display: flex;
    min-width: 0;
    min-height: 132px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-top: 4px solid #8ca4b7;
    border-radius: var(--radius-md);
    flex-direction: column;
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.operations-kpi > span {
    color: var(--color-primary-800);
    font-size: 0.8rem;
    font-weight: 800;
}

.operations-kpi > strong {
    margin: 8px 0 4px;
    color: var(--color-primary-950);
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    line-height: 1;
}

.operations-kpi > small {
    margin-top: auto;
    color: var(--color-muted);
    font-size: 0.76rem;
}

.operations-kpi--primary,
.operations-kpi--progress {
    border-top-color: var(--color-primary-600);
}

.operations-kpi--success,
.operations-kpi--operational {
    border-top-color: #2e8b57;
}

.operations-kpi--danger {
    border-top-color: #bd3539;
    background: linear-gradient(180deg, #fff7f7, #ffffff);
}

.operations-kpi--danger > strong {
    color: #9e292d;
}

.operations-kpi--warning {
    border-top-color: var(--color-warning);
}

.operations-progress {
    width: 100%;
    height: 8px;
    margin: 4px 0 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf3;
}

.operations-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--color-primary-600),
        var(--color-cyan)
    );
}

.gantt-legend__swatch--break,
.gantt-table td.gantt-table__slot--break {
    background: #bd3539;
}

.gantt-table td.gantt-table__slot--break {
    border-color: rgba(255, 255, 255, 0.65);
}

.gantt-order-links {
    display: flex;
    margin-top: 7px;
    flex-wrap: wrap;
    gap: 5px;
}

.gantt-order-link {
    display: inline-flex;
    padding: 3px 7px;
    border: 1px solid #b8cad8;
    border-radius: 999px;
    color: var(--color-primary-800);
    background: #f4f7fa;
    font-size: 0.68rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.gantt-order-link:hover {
    border-color: var(--color-primary-600);
    background: #eaf2f8;
}

.gantt-order-link--done {
    border-color: #9ac8ae;
    color: #236b45;
    background: #f1f8f4;
}

.gantt-order-link--break {
    border-color: #e0a7a9;
    color: #92282c;
    background: #fff3f3;
}

@media (min-width: 760px) {
    .preventive-operations-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .preventive-operations-summary {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}


/* Variante sobria del resumen preventivo */
.preventive-operations-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.operations-kpi {
    min-height: 112px;
    padding: 16px 18px;
    border-top-width: 2px;
    border-top-color: #8fa5b6;
    background: var(--color-surface);
    box-shadow: 0 2px 8px rgba(11, 31, 51, 0.05);
}

.operations-kpi > strong {
    margin-top: 10px;
    font-size: clamp(1.7rem, 4vw, 2.15rem);
}

.operations-kpi--alert {
    border-top-color: #bd7779;
    background: var(--color-surface);
}

.operations-kpi--alert > strong {
    color: #8f2f33;
}

.operations-progress {
    height: 6px;
    margin-bottom: 8px;
}

.operations-progress i {
    background: var(--color-primary-600);
}

@media (min-width: 900px) {
    .preventive-operations-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .preventive-operations-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* Gestión de prioridad y cancelación de órdenes */

.workflow-reference--danger {
    border-color: rgba(178, 58, 58, 0.28);
    color: #8f2e2e;
    background: #fff1f0;
}

.workflow-form-card--priority {
    border-top: 3px solid var(--color-copper);
}

.workflow-form-card--danger {
    border-top: 3px solid var(--color-danger);
}

.workflow-note {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-muted);
    background: var(--color-background);
    font-size: 0.86rem;
    line-height: 1.5;
}

.workflow-note strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--color-primary-950);
}

.workflow-note p,
.destructive-warning p {
    margin: 0;
}

.priority-guide {
    display: grid;
    margin: 0.35rem 0 1.5rem;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
}

.priority-guide > div {
    display: grid;
    min-height: 4.25rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.2rem;
    background: var(--color-background);
}

.priority-guide strong {
    display: block;
    color: var(--color-primary-950);
    font-size: 0.88rem;
    line-height: 1.2;
}

.priority-guide small {
    display: block;
    grid-column: 2;
    color: var(--color-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.priority-dot {
    width: 0.65rem;
    height: 0.65rem;
    grid-row: span 2;
    border-radius: 50%;
}

.priority-dot--low {
    background: #6f8798;
}

.priority-dot--medium {
    background: #2d759d;
}

.priority-dot--high {
    background: var(--color-copper);
}

.priority-dot--critical {
    background: var(--color-danger);
}

.destructive-warning {
    margin-bottom: 1.2rem;
    padding: 1rem;
    border: 1px solid rgba(178, 58, 58, 0.3);
    border-left: 4px solid var(--color-danger);
    border-radius: var(--radius-sm);
    color: #762b2b;
    background: #fff5f4;
    font-size: 0.86rem;
    line-height: 1.5;
}

.destructive-warning strong {
    display: block;
    margin-bottom: 0.3rem;
    color: #762b2b;
}

.confirmation-check {
    display: flex;
    min-height: 3rem;
    margin: 0;
    padding: 0.75rem 0.85rem;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-primary-950);
    background: var(--color-background);
    cursor: pointer;
}

.confirmation-check input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 1.1rem;
    accent-color: var(--color-danger);
}

.confirmation-check span {
    font-size: 0.84rem;
    line-height: 1.4;
}

@media (min-width: 480px) {
    .priority-guide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.workflow-form-card--priority .stack-form {
    gap: 1.25rem;
}

.workflow-form-card--priority .workflow-actions {
    margin-top: 0.25rem;
}


/* El cierre de supervisión permanece oculto hasta solicitarlo. */
.order-actions-panel[hidden] {
    display: none !important;
}
