:root {
    --bg-page: #f4f7f6;
    --card-bg: #ffffff;
    --header-bg: #f8f9fa;
    --text-dark: #333333;
    --text-muted: #6c757d;
    --accent-yellow: #fff3cd;
    --accent-yellow-text: #856404;
    --border-color: #e9ecef;
    --check-green: #28a745;
}

* {
    padding: 0;
    margin: 0;
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

body {
    overflow-y: hidden;
    color: #212529;
}

.active-edit {
    display: none !important;
}


.content-empty-app{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* OVERLAY */
#black-screen {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1999;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.295);
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease-in-out;
}

    #black-screen[open] {
        opacity: 1;
        visibility: visible;
    }

    #black-screen::backdrop {
        background-color: rgba(0, 0, 0, 0.25);
        transition: background-color 0.35s ease-in-out;
    }

/* LAYOUT PRINCIPAL */

.container-page {
    background-color: #F4F6F9;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

main {
    overflow-x: hidden;
    overflow-y: hidden;
}

.content-main {
    padding: 20px 30px;
    box-sizing: border-box;
    width: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 89vh;
}

.footer-page {
    display: none;
}

/* HEADER */

.section-container-main {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: start;
    align-items: start;
}

.options-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    height: 50px;
    box-sizing: border-box;
    background-color: #FDFDFD;
    border-bottom: 1px solid #EAEAEA;
    width: 100%;
    z-index: 4000;
}

.title-page-app {
    font-size: 16px;
}

.options-header .ul-edit-header {
    display: flex;
    flex-direction: row;
    list-style: none;
    align-items: center;
    font-size: 12px;
    gap: 5px;
}

.option-edit-app {
    padding: 10px;
    display: flex;
    flex-direction: row;
    gap: 5px;
    text-decoration: none;
    color: #212529;
    border-radius: 5px;
    cursor: pointer;
}

    .option-edit-app:hover {
        background-color: #EAEAEA;
    }

h1:focus {
    outline: none;
}

/* VALIDACIONES */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #28a745;
}

.invalid {
    outline: 1px solid #dc3545;
}

.validation-message {
    color: #dc3545;
}

/* ERROR BLAZOR */

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2Zy...) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: #ffffff;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* FORM */

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* HOME */

.options-home {
    box-sizing: border-box;
    height: calc(100vh - 60px);
    justify-content: center;
    width: 100%;
    overflow-y: auto;
    padding: 20px;
}

.container-options-home {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.section-home {
    display: flex;
    flex-direction: column;
    width: 50%;
}

.title-section {
    width: 100%;
    margin-top: 20px;
}

.grid-option {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-auto-rows: 150px;
    gap: 20px;
    width: 100%;
    max-width: calc(200px * 5 + 80px);
    margin: 0 auto;
}

.options-app {
    background-color: #FFFFFF;
    box-sizing: border-box;
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #212529;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    cursor: pointer;
}

    .options-app:active {
        scale: 1.05;
    }

.container-option-app {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.label-target {
    font-size: 14px;
    text-align: center;
}

.img-icon {
    width: 60px;
    height: 40px;
}

/* DETALLE */

.container-main {
    display: flex;
    flex-direction: row;
    gap: 30px;
    justify-content: start;
    align-items: start;
    padding: 10px;
}

.container-details-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.form-container-detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: solid 1px #e2e2e2;
    border-radius: 5px;
    gap: 20px;
    min-width: 30%;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

    .form-container-detail.mwidth {
        min-width: 50%;
    }

.header-form-detail {
    background-color: #F3F3F3;
    border-radius: 5px 5px 0px 0px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.article-form-detail {
    padding: 0px 20px 20px 20px;
}

.form-container-footer {
    display: flex;
    justify-content: end;
    padding: 0px 20px 20px 20px;
}

/* REVISION */

.container-detail-revision {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.revisor-detail {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.reviewer-number {
    background-color: #FF6C37;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 14px;
    color: #ffffff;
}

/*tarjetas*/

.card {
    width: 100%;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-sizing:border-box;
}

    .card.w40{
        width: 40%;
    }

    /* Encabezado */
    .card-header {
        background-color: var(--header-bg);
        padding: 12px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
        height: 50px;
    }

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.status-badge {
    background-color: var(--accent-yellow);
    color: var(--accent-yellow-text);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Contenido */
/*.card-body {
    padding: 30px 25px;
    display: grid;*/
/*    grid-template-columns: 1fr 1fr;*/
    /*gap: 15px;
    overflow-y: auto;
    max-height: calc( 100vh - 280px );
}*/

.field-group {
    display: flex;
    flex-direction: column;
}

.full-width {
    grid-column: span 2;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.value {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

    .value.title {
        font-size: 1.2rem;
        font-weight: 700;
        color: #000;
    }

/* Icono de check */
.icon-check {
    color: var(--check-green);
    font-size: 1.1rem;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(241, 245, 249, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 2000;
}

    .loader-overlay.task-active {
        display: flex !important;
    }

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(42, 77, 105, 0.1);
    border-left-color: #2A4D69;
    border-top-color: #FF6B35;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    margin-top: 15px;
    color: #2A4D69;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}



/* RESPONSIVE */

@media (max-width: 1620px) {
    .content-main {
        height: calc(100vh - 180px);
        padding: 10px 5px;
    }

    .section-container-main {
        flex-direction: column;
    }

    .card.w40 {
        width: 100%;
    }

}

@media (max-width: 1024px) {
    .content-main {
        height: calc(100vh - 200px);
        padding: 10px 5px;
    }

    .section-container-main {
        flex-direction: column;
    }

    .section-home {
        width: 100%;
    }

    .card.w40 {
        width: 100%;
    }
}

@media (max-width:800px) {

    .section-home {
        width: 100%;
    }

    .card.w40 {
        width: 100% !important;
    }
}


@media (max-width: 490px) {
    .content-main {
        height: calc(100vh - 240px);
        padding: 10px 5px;
    }

    .section-container-main {
        flex-direction: column;
    }

    .options-home {
        height: calc(100vh - 210px);
    }


    .section-home {
        width: 100%;
    }

    .card.w40 {
        width: 100% !important;
    }
}
