body {
    margin: 0;
    background: #f4f6f9;
    color: #263238;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: #1565c0;
    text-decoration: none;
}

.page {
    max-width: none;
    width: calc(100vw - 48px);
    margin: 0 auto;
    padding: 24px;
}

.topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #dbe3ea;
    display: flex;
    justify-content: space-between;
    padding: 14px 24px;
}

.topbar .btn {
    border: 1px solid #cfd8dc;
    margin-left: 8px;
    width: auto;
}

.topbar-action {
    min-width: 92px;
}

.topbar-user {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.topbar-user .btn {
    border: 1px solid #c8d2da !important;
    flex: 0 0 auto;
    min-width: 92px;
    padding: 7px 12px;
    width: auto !important;
}

.popup-body {
    background: #f6f8fb;
    min-width: 0;
}

.popup-topbar {
    padding: 12px 16px;
}

.popup-topbar .brand {
    font-size: 18px;
}

.popup-topbar .btn {
    border: 1px solid #c8d2da !important;
    padding: 7px 12px;
    width: auto !important;
}

.popup-page {
    max-width: 480px;
    padding: 16px;
}

.popup-page .login-card {
    max-width: none;
}

.popup-page .actions {
    display: flex;
    gap: 8px;
}

.popup-page .actions .btn {
    flex: 1 1 0;
}

.brand {
    font-size: 20px;
    font-weight: 700;
}

.muted {
    color: #607d8b;
    font-size: 13px;
}

.panel {
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding: 18px;
}

.grid-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(8, 1fr);
}

.summary-item {
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    color: #263238;
    display: block;
    padding: 14px;
    text-decoration: none;
}

.summary-item:hover {
    filter: brightness(0.98);
}

.summary-value {
    font-size: 26px;
    font-weight: 700;
    min-height: 32px;
}

.summary-label {
    color: #607d8b;
    font-size: 12px;
}

.summary-total {
    background: #ffffff;
    border-color: #dbe3ea;
}

.summary-pendiente {
    background: #fff7ed;
    border-color: #fdba74;
}

.summary-pendiente .summary-label,
.summary-pendiente .summary-value {
    color: #9a3412;
}

.summary-pendiente-clasificacion {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.summary-pendiente-clasificacion .summary-label,
.summary-pendiente-clasificacion .summary-value {
    color: #075985;
}

.summary-desarrollo {
    background: #eff6ff;
    border-color: #93c5fd;
}

.summary-desarrollo .summary-label,
.summary-desarrollo .summary-value {
    color: #1d4ed8;
}

.summary-pausada-prioridad {
    background: #fef3c7;
    border-color: #f59e0b;
}

.summary-pausada-prioridad .summary-label,
.summary-pausada-prioridad .summary-value {
    color: #92400e;
}

.summary-critica {
    background: #fee2e2;
    border-color: #f87171;
}

.summary-critica .summary-label,
.summary-critica .summary-value {
    color: #991b1b;
}

.summary-sin-asignar {
    background: #f5f7f9;
    border-color: #cfd8dc;
}

.summary-sin-asignar .summary-label,
.summary-sin-asignar .summary-value {
    color: #455a64;
}

.summary-vencida {
    background: #fee2e2;
    border-color: #f87171;
}

.summary-vencida .summary-label,
.summary-vencida .summary-value {
    color: #991b1b;
}

.summary-resuelta {
    background: #dcfce7;
    border-color: #86efac;
}

.summary-resuelta .summary-label,
.summary-resuelta .summary-value {
    color: #14532d;
}

.dashboard-summary {
    grid-template-columns: repeat(5, 1fr);
    margin-bottom: 18px;
}

.dashboard-filters {
    align-items: end;
    grid-template-columns: repeat(6, minmax(135px, 1fr)) auto;
}

.dashboard-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
    justify-content: flex-start;
    margin-top: 0;
    width: auto;
}

.dashboard-actions .btn {
    width: auto !important;
}

.dashboard-actions .btn-dashboard {
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.15;
    min-height: 28px;
    min-width: 0;
    padding: 6px 9px;
    white-space: nowrap;
    width: auto !important;
}

.dashboard-actions .btn-dashboard-secondary {
    background: #9aacb5;
    color: #ffffff;
}

.dashboard-actions .btn-dashboard-secondary:hover {
    background: #8fa3ad;
}

.dashboard-grid {
    min-width: 980px;
}

.section-title {
    color: #263238;
    font-size: 16px;
    margin: 0 0 14px;
}

.progress-cell {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 190px;
}

.progress-track {
    background: #e9eef2;
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
    width: 100px;
}

.progress-track-wide {
    width: 135px;
}

.progress-fill {
    height: 100%;
}

.progress-fill-solicitudes {
    background: #2563eb;
}

.progress-fill-tareas {
    background: #22c55e;
}

.progress-label {
    color: #37474f;
    font-size: 12px;
    font-weight: 700;
    min-width: 36px;
}

.dashboard-charts {
    display: grid;
    gap: 12px;
}

.dashboard-chart-row {
    background: #ffffff;
    border-bottom: 1px solid #edf1f4;
    display: grid;
    gap: 16px;
    grid-template-columns: 220px 1fr;
    padding: 10px 0;
}

.dashboard-chart-name {
    color: #263238;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-chart-bars {
    display: grid;
    gap: 6px;
}

.dashboard-chart-line {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 80px 1fr 36px;
}

.dashboard-chart-line span,
.dashboard-chart-line strong {
    color: #455a64;
    font-size: 12px;
}

.dashboard-chart-track {
    background: #e9eef2;
    border-radius: 999px;
    border: 1px solid #dbe3ea;
    height: 14px;
    overflow: hidden;
}

.dashboard-chart-fill {
    height: 100%;
}

.chart-asignadas {
    background: #2563eb;
}

.chart-resueltas {
    background: #22c55e;
}

.chart-vencidas {
    background: #ef4444;
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, 1fr);
}

.form-grid.two {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid.three {
    grid-template-columns: repeat(3, 1fr);
}

.alert-filter-row {
    align-items: end;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
}

.alert-filter-row .field {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.alert-filter-row .field:first-child {
    flex-basis: 360px;
}

.alert-filter-row select {
    min-width: 260px;
    width: 100%;
}

.field-button-only {
    display: block;
}

.field-button-only .btn {
    min-width: 120px;
    width: auto;
}

.field-button-only:last-child .btn {
    min-width: 210px;
}

.alert-filter-summary {
    margin-top: 10px;
}

.field {
    margin-bottom: 14px;
}

.field label {
    color: #455a64;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

input, select, textarea {
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    padding: 9px;
    width: 100%;
}

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

.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.reply-recipient-option {
    margin-top: 10px;
}

.account-selector {
    max-width: 360px;
}

.email-date-filters {
    grid-template-columns: repeat(2, minmax(180px, 260px));
    margin-top: 10px;
}

.email-read-option {
    margin-top: 8px;
}

.reply-recipient-option .muted {
    margin-top: 4px;
}

.reply-recipient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 6px;
}

.reply-recipient-list input {
    margin-right: 5px;
}

.btn {
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    padding: 10px 14px;
}

.btn-primary {
    background: #1565c0;
    color: #ffffff;
}

.btn-secondary {
    background: #607d8b;
    color: #ffffff;
}

.btn-light {
    background: #e9eef2;
    color: #263238;
}

.btn-alerta-critica {
    background: #fff1f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    font-weight: 700;
}

.btn-alerta-critica:hover {
    background: #ffe4e6;
}

.grid {
    border-collapse: collapse;
    min-width: 1450px;
    width: 100%;
}

.grid th {
    background: #e9eef2;
    color: #37474f;
    font-size: 12px;
    padding: 10px;
    text-align: left;
}

.grid td {
    border-bottom: 1px solid #edf1f4;
    font-size: 13px;
    padding: 10px;
}

.grid select {
    max-width: 160px;
    padding: 6px;
}

.grid-state-select {
    font-weight: 700;
}

.color-swatch {
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    white-space: nowrap;
}

.select-pendiente {
    background: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
}

.select-pendiente-clasificacion {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #075985;
}

.select-asignado {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.select-desarrollo {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.select-prueba {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.select-resuelto {
    background: #dcfce7;
    border-color: #86efac;
    color: #14532d;
}

.select-postergado {
    background: #fef9c3;
    border-color: #fde047;
    color: #854d0e;
}

.select-rechazado,
.select-critica {
    background: #fee2e2;
    border-color: #f87171;
    color: #991b1b;
}

.select-alta {
    background: #ffedd5;
    border-color: #fb923c;
    color: #9a3412;
}

.select-media {
    background: #fef9c3;
    border-color: #facc15;
    color: #854d0e;
}

.select-baja {
    background: #ecfccb;
    border-color: #bef264;
    color: #3f6212;
}

.select-mejora {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.select-sin-asignar,
.select-neutro {
    background: #f5f7f9;
    border-color: #cfd8dc;
    color: #455a64;
}

.select-responsable-0 {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #075985;
}

.select-responsable-1 {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #5b21b6;
}

.select-responsable-2 {
    background: #fae8ff;
    border-color: #d946ef;
    color: #86198f;
}

.select-responsable-3 {
    background: #fce7f3;
    border-color: #f472b6;
    color: #9d174d;
}

.select-responsable-4 {
    background: #ccfbf1;
    border-color: #5eead4;
    color: #115e59;
}

.select-responsable-5 {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1e40af;
}

.select-responsable-6 {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
}

.select-responsable-7 {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #334155;
}

.select-modulo-0 {
    background: #eef2ff;
    border-color: #818cf8;
    color: #3730a3;
}

.select-modulo-1 {
    background: #ecfeff;
    border-color: #22d3ee;
    color: #155e75;
}

.select-modulo-2 {
    background: #f0fdf4;
    border-color: #4ade80;
    color: #166534;
}

.select-modulo-3 {
    background: #fefce8;
    border-color: #eab308;
    color: #713f12;
}

.select-modulo-4 {
    background: #fff1f2;
    border-color: #fb7185;
    color: #9f1239;
}

.select-modulo-5 {
    background: #fdf4ff;
    border-color: #e879f9;
    color: #86198f;
}

.select-modulo-6 {
    background: #eff6ff;
    border-color: #60a5fa;
    color: #1e40af;
}

.select-modulo-7 {
    background: #f7fee7;
    border-color: #a3e635;
    color: #3f6212;
}

.select-modulo-8 {
    background: #fff7ed;
    border-color: #fb923c;
    color: #9a3412;
}

.select-modulo-9 {
    background: #f0fdfa;
    border-color: #2dd4bf;
    color: #115e59;
}

.select-modulo-10 {
    background: #faf5ff;
    border-color: #c084fc;
    color: #6b21a8;
}

.select-modulo-11 {
    background: #f8fafc;
    border-color: #64748b;
    color: #334155;
}

.login-wrapper {
    align-items: center;
    display: flex;
    height: 100vh;
    justify-content: center;
}

.login-card {
    background: #ffffff;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    padding: 28px;
    width: 380px;
}

.check-option {
    align-items: center;
    color: #455a64;
    display: flex;
    font-size: 13px;
    gap: 8px;
    margin: 4px 0 16px;
}

.check-option input {
    width: auto;
}

.message-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    color: #b71c1c;
    margin-bottom: 14px;
    padding: 10px;
}

.message-ok {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    color: #1b5e20;
    margin-bottom: 14px;
    padding: 10px;
}

.detail-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.task-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    max-width: 100%;
    width: 100%;
}

.task-row {
    align-items: center;
    background: #fbfcfd;
    border: 1px solid #edf1f4;
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 130px) minmax(130px, 160px);
    padding: 8px;
}

.task-row span {
    overflow-wrap: anywhere;
}

.task-row select {
    font-weight: 700;
    padding: 6px;
}

.task-pendiente {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #7a5a00;
}

.task-desarrollo {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #0d47a1;
}

.task-prueba {
    background: #ede7f6;
    border: 1px solid #b39ddb;
    color: #4527a0;
}

.task-resuelta {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
}

.task-descartada {
    background: #eceff1;
    border: 1px solid #cfd8dc;
    color: #455a64;
}

.task-state-select {
    min-width: 0;
    width: 100%;
}

.task-admin-select {
    background: #f6f8fb;
    border: 1px solid #cfd8e3;
    color: #243447;
    min-width: 0;
    width: 100%;
}

.task-admin-select:disabled {
    opacity: .7;
}

.row-inactive {
    opacity: .62;
}

.row-inactive td {
    background: #f7f8fa;
}

.missing-file-name {
    color: #53606d;
    display: inline-block;
    margin-right: 8px;
}

.missing-file-badge {
    background: #fff3cd;
    border: 1px solid #ffe08a;
    border-radius: 4px;
    color: #7a5a00;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 7px;
}

.file-ok-badge {
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 4px;
    color: #14532d;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 7px;
}

.history-detail {
    max-width: 620px;
    white-space: pre-wrap;
}

@media (max-width: 900px) {
    .grid-summary, .form-grid, .form-grid.two, .form-grid.three, .alert-filter-row {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 14px;
        width: calc(100vw - 28px);
    }
}
