/**
 * Estilos Base ZUconsulta SST 2.0.0
 */
.zusst-module {
    --zusst-green: #188038;
    --zusst-green-dark: #0f6b2a;
    --zusst-green-soft: #eaf6ed;
    --zusst-border: #e2e8f0;
    --zusst-text: #0f172a;
    --zusst-muted: #64748b;
    max-width: 100%;
}
.zusst-module * { box-sizing: border-box; }
.zusst-module .zgc-module-head {
    display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin: 0 0 22px;
}
.zusst-module .zgc-module-head h1 {
    font-size: 32px; line-height: 1.1; margin: 6px 0 8px; color: var(--zusst-text); font-weight: 800;
}
.zusst-module .zgc-breadcrumb {
    font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #334155; font-weight: 800;
}
.zusst-module .zgc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px; padding: 12px 18px; font-weight: 800; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.zusst-module .zgc-btn-primary { background: var(--zusst-green); color: #fff; box-shadow: 0 14px 30px rgba(24,128,56,.18); }
.zusst-module .zgc-btn-primary:hover { background: var(--zusst-green-dark); color: #fff; }
.zusst-module .zgc-btn-secondary { background: #f1f5f9; color: #334155; }
.zusst-module .zusst-btn-danger { background: #ef4444; color: #fff; }
.zusst-module .zusst-btn-danger-soft { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }

.zusst-module .zgc-tabs {
    display: flex; gap: 10px; margin-bottom: 24px; border-bottom: 1px solid var(--zusst-border); padding-bottom: 12px; overflow-x: auto; white-space: nowrap;
}
.zusst-module .zgc-tabs a {
    text-decoration: none; color: var(--zusst-muted); font-weight: 800; padding: 8px 16px; border-radius: 99px;
}
.zusst-module .zgc-tabs a.active { background: var(--zusst-green-soft); color: var(--zusst-green-dark); }
.zusst-module .zgc-subtabs { margin-bottom: 16px; border-bottom: 0; }

.zusst-module .zgc-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.zusst-module .zgc-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 22px; }
.zusst-module .zgc-card { background: #fff; border: 1px solid var(--zusst-border); border-radius: 18px; padding: 22px; box-shadow: 0 12px 30px rgba(15,23,42,.05); }

.zusst-tab-panel, .zusst-inspection-panel { display: none; }
.zusst-tab-panel.is-active, .zusst-inspection-panel.is-active { display: block; }

.zusst-module .zgc-form label { display: block; font-weight: 800; color: #334155; margin-bottom: 14px; }
.zusst-module .zgc-form input, .zusst-module .zgc-form select, .zusst-module .zgc-form textarea {
    display: block; width: 100%; margin-top: 7px; border: 1px solid #cbd5e1; border-radius: 12px; padding: 11px 12px; font-family: inherit;
}
.zusst-module .zgc-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.zusst-trace-row { display: none; }
.zusst-trace-row.is-active { display: table-row; }
.zusst-trace-panel { padding: 15px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; }
.zusst-trace-list { list-style: none; padding: 0; margin: 10px 0; font-size: 13px; }
.zusst-trace-list li { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px dashed #cbd5e1; }
.zusst-semaforo { display: inline-block; padding: 4px 10px; border-radius: 99px; font-weight: bold; font-size: 12px; }
.zusst-semaforo-verde { background: #dcfce7; color: #166534; }
.zusst-semaforo-amarillo { background: #fef9c3; color: #854d0e; }
.zusst-semaforo-rojo { background: #fee2e2; color: #991b1b; }
.zusst-semaforo-gris { background: #f1f5f9; color: #334155; }

.zusst-modal { position: fixed; inset: 0; background: rgba(15,23,42,0.8); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.zusst-modal[hidden] { display: none !important; }
.zusst-modal-panel { background: #fff; width: 100%; max-width: 600px; border-radius: 18px; display: flex; flex-direction: column; max-height: 90vh; overflow-y: auto; }
.zusst-modal-panel-small { max-width: 400px; }
.zusst-modal-head { display: flex; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--zusst-border); }
.zusst-modal-head button { background: transparent; border: 0; font-size: 24px; cursor: pointer; }
.zusst-modal-body { padding: 20px; }
.zusst-modal-actions { display: flex; gap: 10px; margin-top: 20px; }

.zusst-template-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.zusst-template-table th, .zusst-template-table td { border: 1px solid #cbd5e1; padding: 8px; }
.zusst-section-row td { background: #f1f5f9; font-weight: bold; text-align: center; }
.zgc-table-wrap { overflow-x: auto; margin-bottom: 20px; }

@media (max-width: 1024px) {
    .zusst-module .zgc-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .zusst-module .zgc-grid-4, .zusst-module .zgc-grid-2, .zusst-module .zgc-form-grid { grid-template-columns: 1fr; }
    .zusst-module .zgc-module-head { flex-direction: column; gap: 12px; }
    .zusst-modal-panel { max-width: 95%; margin: 20px; }
    .zusst-template-header { flex-direction: column; gap: 10px; }
}
@media (max-width: 430px) {
    .zusst-module .zgc-tabs { flex-wrap: nowrap; overflow-x: scroll; }
    .zusst-module .zgc-btn { width: 100%; justify-content: center; margin-bottom: 8px; }
    .zusst-modal-actions { flex-direction: column; }
}
