html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* --- Estilos de la pagina de Login --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1a2332;
}

.login-box {
    background: white;
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-icon {
    width: 56px;
    height: 56px;
    background-color: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 1rem auto;
}

.login-box h1 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    color: #1a2332;
    font-weight: 700;
}

.subtitle {
    color: #64748b;
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.1rem;
    text-align: left;
}

    .form-group label {
        display: block;
        margin-bottom: 0.4rem;
        font-weight: 700;
        font-size: 0.75rem;
        letter-spacing: 0.03em;
        color: #64748b;
    }

    .form-group input {
        width: 100%;
        padding: 0.7rem 0.85rem;
        border: 1px solid #dbeafe;
        background-color: #eff6ff;
        border-radius: 8px;
        box-sizing: border-box;
        font-size: 0.95rem;
        transition: border-color 0.15s, box-shadow 0.15s;
    }

        .form-group input:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
            background-color: white;
        }

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.15s;
}

    .btn-login:hover {
        background-color: #1d4ed8;
    }

.alert-error {
    background-color: #fdecea;
    color: #b91c1c;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    text-align: left;
}

/* --- Titulos de seccion dentro del menu lateral (ej: "TICKETS POR AREA") --- */
.nav-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.55);
    padding: 0.25rem 0;
}

/* --- Caja del formulario dentro de /crearticket (una vez elegida el area) --- */
.reportar-box {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 640px;
    margin: 3rem auto;
}

.reportar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.reportar-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background-color: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.reportar-box h1 {
    margin: 0;
    font-size: 1.4rem;
    color: #1a2332;
    font-weight: 700;
}

.reportar-box .subtitle {
    margin: 0.15rem 0 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 560px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.reportar-box .form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

    .reportar-box .form-group label {
        display: block;
        margin-bottom: 0.4rem;
        font-weight: 700;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        color: #475569;
    }

.form-group .req {
    color: #dc2626;
}

.form-select-custom,
.form-control-custom {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 0.95rem;
    color: #1e293b;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .form-select-custom:focus,
    .form-control-custom:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        background-color: white;
    }

    .form-control-custom[readonly] {
        background-color: #f1f5f9;
        color: #64748b;
    }

.btn-reportar {
    width: 100%;
    padding: 0.85rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.15s;
}

    .btn-reportar:hover:not(:disabled) {
        background-color: #1d4ed8;
    }

    .btn-reportar:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.alert-exito {
    background-color: #ecfdf5;
    color: #065f46;
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    text-align: center;
}

.numero-ticket {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 0.35rem;
}

/* --- Boton "Cambiar de area" dentro del formulario --- */
.btn-volver {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.5rem;
}

    .btn-volver:hover {
        text-decoration: underline;
    }

/* --- Pantalla de bienvenida en /crearticket --- */
.reportar-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background: linear-gradient(180deg, #eef2f9 0%, #dbe4f0 100%);
    padding: 0;
}

.bienvenida-wrapper {
    width: 100%;
    max-width: 780px;
    margin: 1.5rem auto;
}

.bienvenida-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #16324f 100%);
    border-radius: 14px 14px 0 0;
    padding: 1.5rem 2rem;
    text-align: center;
}

    .bienvenida-banner h1 {
        color: white;
        font-size: 1.3rem;
        font-weight: 700;
        margin: 0;
        line-height: 1.4;
    }

.bienvenida-cards {
    background: white;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 1.75rem 2rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

@media (max-width: 640px) {
    .bienvenida-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.area-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.btn-area {
    width: 100%;
    min-height: 46px;
    padding: 0.6rem 1rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .btn-area:hover {
        background-color: #1d4ed8;
    }

.area-image {
    width: 100%;
    max-width: 220px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* --- Tabla de tickets --- */
.tabla-tickets {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

    .tabla-tickets th {
        background-color: #1a2332;
        color: white;
        text-align: left;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .tabla-tickets td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e2e8f0;
        font-size: 0.9rem;
    }

    .tabla-tickets tbody tr:hover {
        background-color: #f8fafc;
    }

.badge-prioridad, .badge-estado {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-baja {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-alta {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-critica {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-nuevo {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-enprogreso {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-esperandorespuesta {
    background-color: #e9d5ff;
    color: #6b21a8;
}

.badge-resuelto {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-cerrado {
    background-color: #e2e8f0;
    color: #475569;
}

/* --- Iconos del menu lateral --- */
.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* --- Filtros de la tabla de tickets --- */
.filtros-tickets {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.filtro-item {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

    .filtro-item label {
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        color: #475569;
        margin-bottom: 0.35rem;
    }

.filtro-boton {
    min-width: auto;
}

.btn-limpiar-filtro {
    padding: 0.65rem 1rem;
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .btn-limpiar-filtro:hover {
        background-color: #e2e8f0;
    }

/* --- Texto del menu lateral: mayusculas, sin subrayado --- */
.nav-link {
    text-decoration: none !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

    .nav-link:hover {
        text-decoration: none !important;
    }

/* --- Encabezados ordenables: que se vean claramente clicables --- */
.th-ordenable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.15s;
}

    .th-ordenable:hover {
        background-color: #2c3a52;
    }

    .th-ordenable::after {
        content: "⇅";
        margin-left: 0.35rem;
        opacity: 0.4;
        font-size: 0.75rem;
    }

/* --- Boton "Cerrar sesion" en el menu lateral --- */
.btn-cerrar-sesion {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    border-radius: 4px;
}

    .btn-cerrar-sesion:hover {
        background-color: rgba(255,255,255,0.1);
        color: white;
    }

/* --- Enlace del asunto (abre el detalle) --- */
.link-asunto {
    color: #1e293b;
    text-decoration: none;
    cursor: pointer;
}

    .link-asunto:hover {
        color: #2563eb;
        text-decoration: underline;
    }

/* --- Modal de detalle del ticket --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-detalle {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

    .modal-header h2 {
        margin: 0;
        font-size: 1.2rem;
        color: #1a2332;
    }

.modal-cerrar {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

    .modal-cerrar:hover {
        color: #1e293b;
    }

.modal-body {
    padding: 1.5rem;
}

.detalle-fila {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.detalle-label {
    font-weight: 700;
    color: #64748b;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detalle-asunto, .detalle-mensaje {
    margin-top: 1rem;
}

    .detalle-asunto p, .detalle-mensaje p {
        margin: 0.35rem 0 0 0;
        padding: 0.75rem;
        background-color: #f8fafc;
        border-radius: 8px;
        font-size: 0.9rem;
        line-height: 1.5;
        white-space: pre-wrap;
    }
/* --- Botón "Exportar a Excel" --- */
.btn-exportar {
    padding: 0.65rem 1rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .btn-exportar:hover:not(:disabled) {
        background-color: #15803d;
    }

    .btn-exportar:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
/* --- Botón "Exportar a Excel" --- */
.btn-exportar {
    padding: 0.65rem 1rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .btn-exportar:hover:not(:disabled) {
        background-color: #15803d;
    }

    .btn-exportar:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* --- Ajustes del menú lateral: ancho y color --- */
.sidebar {
    background-image: none !important;
    background-color: #1e3a8a !important;
}

/* El ancho fijo de 280px solo aplica en pantallas grandes (escritorio).
   En celular, dejamos que el sidebar use el comportamiento responsive
   original de Blazor (colapsado detrás del botón ☰). */
@media (min-width: 641px) {
    .sidebar {
        width: 280px !important;
    }
}