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 Gestión Documental
   ============================ */

/* ============================
   Estilo empresarial compacto
   ============================ */

.page-container {
    padding: 1.25rem 1.6rem;
    background: #ffffff;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 500;
    color: #111827;
    margin: 0;
}

.page-subtitle {
    color: #4b5563;
    margin: 0.25rem 0 0 0;
    font-size: 0.95rem;
}

/* Tarjetas / paneles */
.modern-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    box-shadow: none;
    margin-bottom: 1rem;
}

.modern-card-header {
    padding: 0.85rem 1rem 0.25rem 1rem;
    border-bottom: none;
    background: #ffffff;
    border-radius: 5px 5px 0 0;
}

    .modern-card-header strong {
        color: #008080;
        font-size: 0.95rem;
        font-weight: 500;
    }

.modern-card-body {
    padding: 0.75rem 1rem 1rem 1rem;
}

/* Etiquetas de campos */
.form-label {
    color: #008080;
    font-weight: 400;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

/* Inputs */
.form-control,
.form-select {
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.95rem;
    min-height: 38px;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #008080;
        box-shadow: 0 0 0 0.15rem rgba(0, 128, 128, 0.15);
    }

/* Botón azul oscuro: Buscar / Guardar */
.btn-modern-primary {
    background: #064b7a;
    border: 1px solid #064b7a;
    color: #ffffff;
    border-radius: 5px;
    padding: 0.45rem 1.25rem;
    font-weight: 500;
}

    .btn-modern-primary:hover {
        background: #04395d;
        border-color: #04395d;
        color: #ffffff;
    }

/* Botón verde: Nuevo / Cargar documento */
.btn-modern-success {
    background: #059669;
    border: 1px solid #059669;
    color: #ffffff;
    border-radius: 5px;
    padding: 0.45rem 1.25rem;
    font-weight: 500;
}

    .btn-modern-success:hover {
        background: #047857;
        border-color: #047857;
        color: #ffffff;
    }

/* Botón secundario: Limpiar / Cancelar */
.btn-modern-secondary {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
    border: 1px solid #99f6e4;
    color: #115e59;
    border-radius: 6px;
    padding: 0.45rem 1.25rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

    .btn-modern-secondary:hover {
        background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 100%);
        border-color: #5eead4;
        color: #134e4a;
        box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12);
    }

    .btn-modern-secondary:active {
        background: #ccfbf1;
        border-color: #2dd4bf;
        color: #134e4a;
        box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
    }

/* Zona de carga compacta */
.upload-box {
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 0.85rem 1rem;
    background: #ffffff;
}

.upload-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 1.5rem;
    color: #008080;
    margin-bottom: 0;
}

.upload-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #008080;
    margin-bottom: 0.15rem;
}

.upload-text {
    color: #4b5563;
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Archivo seleccionado */
.selected-file-card {
    border: 1px solid #b6e3ea;
    background: #d9f5fb;
    border-radius: 5px;
    padding: 0.75rem 1rem;
    margin-top: 0.85rem;
}

/* Alertas */
.status-message {
    border-radius: 5px;
    padding: 0.75rem 1rem;
}

.alert-info-custom {
    background: #cff4fc;
    border: 1px solid #9eeaf9;
    color: #055160;
    border-radius: 5px;
    padding: 0.85rem 1rem;
}

/* Tabla */
.document-table {
    margin-bottom: 0;
}

    .document-table thead th {
        background: #f8fafc;
        color: #374151;
        font-size: 0.82rem;
        font-weight: 600;
        border-bottom: 1px solid #d1d5db;
    }

    .document-table tbody td {
        vertical-align: middle;
        color: #374151;
        font-size: 0.92rem;
    }

.document-name {
    font-weight: 500;
    color: #111827;
}

.document-description {
    color: #6b7280;
    font-size: 0.85rem;
}

.file-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #d9f5fb;
    color: #055160;
    text-transform: uppercase;
}

.action-buttons {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.empty-state {
    background: #cff4fc;
    border: 1px solid #9eeaf9;
    border-radius: 5px;
    padding: 1rem;
    color: #055160;
}

.empty-state-icon {
    display: none;
}



/* Botón de selección de archivo */
/*.file-input-modern::file-selector-button {
    background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
    border: 1px solid #0f766e;
    border-radius: 5px;
    padding: 0.42rem 1rem;
    margin-right: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

    .file-input-modern::file-selector-button:hover {
        background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
        border-color: #0d9488;
    }

    .file-input-modern::file-selector-button:active {
        background: #115e59;
        border-color: #115e59;
    }
*/

.file-input-modern::file-selector-button {
    background: linear-gradient(180deg, #0891b2 0%, #0e7490 100%);
    color: #ffffff;
    border: 1px solid #0e7490;
    border-radius: 5px;
    padding: 0.42rem 1rem;
    margin-right: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.global-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(90deg, #0891b2, #0d9488, #14b8a6);
    animation: loadingBarAnimation 1.2s infinite linear;
}

.global-loading-message {
    position: fixed;
    top: 12px;
    right: 18px;
    z-index: 9999;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

@keyframes loadingBarAnimation {
    0% {
        opacity: 0.35;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.35;
    }
}


.global-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    z-index: 99999;
    background: linear-gradient(90deg, #0891b2, #0d9488, #14b8a6);
    animation: loadingBarAnimation 1.2s infinite linear;
}

.global-loading-overlay {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 99999;
}

.global-loading-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

@keyframes loadingBarAnimation {
    0% {
        opacity: 0.35;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.35;
    }
}

.btn-modern-edit {
    background: linear-gradient(180deg, #0e7490 0%, #155e75 100%);
    border: 1px solid #155e75;
    color: #ffffff;
    border-radius: 5px;
    padding: 0.25rem 0.75rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

    .btn-modern-edit:hover {
        background: linear-gradient(180deg, #0891b2 0%, #0e7490 100%);
        border-color: #0e7490;
        color: #ffffff;
        box-shadow: 0 2px 5px rgba(15, 23, 42, 0.16);
    }

    .btn-modern-edit:active {
        background: #164e63;
        border-color: #164e63;
        color: #ffffff;
        box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.18);
    }


/* ============================
   Botones de acciones con íconos
   ============================ */

.btn-table-action {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    padding: 0;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: all 0.2s ease-in-out;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btn-table-action:hover {
        color: #ffffff;
        box-shadow: 0 2px 5px rgba(15, 23, 42, 0.18);
    }

    .btn-table-action:focus {
        color: #ffffff;
    }

    .btn-table-action:active {
        box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.18);
        transform: translateY(1px);
    }

/* Ver */
.btn-table-view {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
}

    .btn-table-view:hover {
        background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
        border-color: #2563eb;
    }

/* Editar */
.btn-table-edit {
    background: linear-gradient(180deg, #0e7490 0%, #155e75 100%);
    border-color: #155e75;
}

    .btn-table-edit:hover {
        background: linear-gradient(180deg, #0891b2 0%, #0e7490 100%);
        border-color: #0e7490;
    }

/* Descargar */
.btn-table-download {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    border-color: #047857;
}

    .btn-table-download:hover {
        background: linear-gradient(180deg, #10b981 0%, #059669 100%);
        border-color: #059669;
    }

/* Inactivar */
.btn-table-inactivate {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    border-color: #991b1b;
    color: #ffffff !important;
}

    .btn-table-inactivate:hover {
        background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
        border-color: #b91c1c;
        color: #ffffff !important;
    }

/* Activar */
.btn-table-activate {
    background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
    border-color: #166534;
    color: #ffffff !important;
}

    .btn-table-activate:hover {
        background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
        border-color: #15803d;
        color: #ffffff !important;
    }

/* Asegura que los íconos siempre se vean */
.btn-table-action span,
.btn-table-action i {
    color: #ffffff !important;
    font-size: 1rem;
    line-height: 1;
}.action-buttons {
    display: flex;
    gap: 0.35rem;
    flex-wrap: nowrap;
}}

/* Eliminar documento */
.btn-table-delete {
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
    border-color: #7f1d1d;
    color: #ffffff !important;
}

    .btn-table-delete:hover {
        background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
        border-color: #991b1b;
        color: #ffffff !important;
    }


/* Botón eliminar documento */
.btn-table-delete {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    border: 1px solid #991b1b !important;
    color: #ffffff !important;
}

    .btn-table-delete:hover {
        background: linear-gradient(180deg, #f87171 0%, #dc2626 100%) !important;
        border-color: #b91c1c !important;
        color: #ffffff !important;
    }

    .btn-table-delete:focus,
    .btn-table-delete:active {
        background: #991b1b !important;
        border-color: #7f1d1d !important;
        color: #ffffff !important;
    }

    /* Asegura que el ícono se vea siempre */
    .btn-table-delete span,
    .btn-table-delete i,
    .btn-table-delete .bi {
        color: #ffffff !important;
        opacity: 1 !important;
    }

.login-page {
    min-height: 100vh;
    background: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 6px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
    border: 1px solid #e5e7eb;
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

    .login-header h1 {
        font-size: 1.35rem;
        color: #0f172a;
        font-weight: 600;
        margin-bottom: 0.35rem;
    }

    .login-header p {
        color: #64748b;
        font-size: 0.9rem;
        margin-bottom: 0;
    }

.login-links {
    text-align: center;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

    .login-links a {
        color: #0e7490;
        text-decoration: none;
        font-size: 0.9rem;
    }

        .login-links a:hover {
            text-decoration: underline;
        }

.logout-button {
    color: #334155 !important;
    text-decoration: none;
    width: 100%;
    padding-left: 0;
    font-size: 0.95rem;
}

    .logout-button:hover {
        color: #b91c1c !important;
        text-decoration: none;
    }

    .logout-button .bi {
        color: inherit !important;
    }

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at top left, rgba(31, 160, 148, 0.20), transparent 30%), radial-gradient(circle at bottom right, rgba(13, 110, 253, 0.14), transparent 35%), linear-gradient(135deg, #f4f8fb 0%, #eef4f6 100%);
}

.login-wrapper {
    width: 100%;
    max-width: 1080px;
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(18, 38, 63, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.login-brand-panel {
    padding: 3.5rem 3rem;
    background: linear-gradient(160deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-badge {
    width: 74px;
    height: 74px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}

.login-brand-panel h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.login-brand-panel p {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: 1.8rem;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .brand-features li {
        margin-bottom: 0.9rem;
        padding-left: 1.6rem;
        position: relative;
        font-size: 0.98rem;
        opacity: 0.97;
    }

        .brand-features li::before {
            content: "•";
            position: absolute;
            left: 0;
            top: 0;
            font-size: 1.1rem;
            color: #d1fae5;
        }

.login-form-panel {
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.login-form-header {
    margin-bottom: 2rem;
}

    .login-form-header h2 {
        margin: 0 0 0.35rem 0;
        font-size: 1.9rem;
        font-weight: 700;
        color: #0f172a;
    }

    .login-form-header p {
        margin: 0;
        color: #64748b;
        font-size: 0.98rem;
    }

.modern-field {
    margin-bottom: 1.2rem;
}

.modern-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #0f766e;
    font-size: 0.95rem;
    font-weight: 500;
}

.modern-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-size: 0.96rem;
    background: #f8fbfc;
    color: #0f172a;
    transition: all 0.2s ease;
}

    .modern-input:focus {
        outline: none;
        border-color: #14b8a6;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
    }

.login-actions {
    margin-top: 1.4rem;
}

.btn-login-modern {
    width: 100%;
    border: none;
    border-radius: 14px;
    min-height: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    box-shadow: 0 12px 24px rgba(20, 184, 166, 0.22);
    transition: all 0.2s ease;
}

    .btn-login-modern:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 28px rgba(20, 184, 166, 0.28);
        background: linear-gradient(135deg, #0d6b63 0%, #0fae9d 100%);
    }

.login-links {
    margin-top: 1.2rem;
    text-align: center;
}

    .login-links a {
        color: #0f766e;
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
    }

        .login-links a:hover {
            text-decoration: underline;
        }

@media (max-width: 900px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 540px;
    }

    .login-brand-panel {
        padding: 2.2rem;
    }

    .login-form-panel {
        padding: 2.2rem;
    }
}

@media (max-width: 576px) {
    .login-shell {
        padding: 1rem;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 1.5rem;
    }

        .login-brand-panel h1 {
            font-size: 1.6rem;
        }

    .login-form-header h2 {
        font-size: 1.5rem;
    }
}

.document-preview-frame {
    width: 100%;
    height: 700px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
}

.notranslate {
    translate: no;
}