/* HIDE UNTIL VUE IS INITIALIZED */

[v-cloak] { display: none; }

.body_login .v-card__text{
    padding: 50px 50px 50px 50px !important;
}

.body_login .v-card__text .v-btn--absolute{
    left: 50%;
    top: -45px !important;
    margin-left: -45px;
    height: 90px;
    width: 90px;
}

.body_login .v-card__text h2{
    text-align: center;
    margin-top: 16px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.body_login .v-card__text img{
    display: block;
    height: 100px;
    margin-top: -15px;
}

/* BLOCK UI */

.spinner-container{
    display: block !important;
    margin: 0 !important;
    /* background: rgba(255,255,255,.8); */
    /*background: rgba(80, 80, 80, 0.7);*/
    background: rgba(155, 173, 206, 0.77);
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 9999999999;
    top: 0;
    left: 0;
    visibility: hidden;
      
    opacity: 1;
}

.spinner-container .v-progress-linear{
    margin: 0 !important;
    position: absolute;
    bottom: 0;
    left: 0;
}

.spinner-container.show-spinner{
    opacity: 1 !important;
    visibility: visible !important;
}

.spinner:after {
    content: '';
    width: 50px;
    height: 50px;
    margin: auto;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: 100%;
    /*
    border: 8px solid rgba(48, 54, 65, 0.2);
    border-bottom-color: #303641;
    */
    border: 8px solid rgba(255, 255, 255, 0.4);
    border-bottom-color: rgba(255, 255, 255, 1);
    animation: spin 1s linear 0s infinite;
}

@font-face {
    font-family: Advent;
    src: url('../fonts/Advent-Sans-Logo.otf');
}

@-moz-keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
@-webkit-keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* FIX TABLE */

.v-data-table-header th{
    white-space: nowrap;
}

.itemLanguageSelect{
    background-color: var(--brand, #8c57ff) !important;
    font-weight: 500; 
    color: #fff !important;
}
.itemMenuSelect{
    background: var(--brand, #8c57ff) !important;
    font-weight: 500; 
    color: #fff !important;
    border-radius: 8px !important;
    padding: 5px !important;
}
.iconSidebarSelect{
    font-size: 23px !important;
    color: #fff !important;
}

.itemLanguage{
    font-weight: 500; 
    color: #4b5563 !important;
}
.itemMenu{
    font-weight: 500; 
    color: #4b5563 !important;
    padding: 5px !important;
}
.iconSidebar{
    font-size: 23px !important;
    color: #9ca3af !important;
}

/* ---------------- SIDEBAR: CABECERA DE MARCA ---------------- */

.sidebarBrand {
    padding: 18px 16px 14px;
}

.v-application a.sidebarBrand__link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.sidebarBrand__link img {
    height: 34px;
    width: 34px;
    object-fit: contain;
    flex: 0 0 34px;
}

.sidebarBrand__name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #312d4b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebarBrand__rule {
    margin-bottom: 8px;
}

.sidebarList {
    padding-top: 4px !important;
}

/* Realce al pasar el cursor: antes no habia respuesta visible */
.itemMenu:hover {
    background: #f4f4fa !important;
    border-radius: 8px !important;
}

.itemMenu:hover .iconSidebar {
    color: var(--brand, #8c57ff) !important;
}

/* ---------------- NAVBAR ---------------- */

/* Antes era un morado casi identico al de la barra: sin contraste.
   El blanco translucido funciona sobre cualquier --brand. */
.v-application .navbarLogout.v-btn {
    background: rgba(255, 255, 255, .18) !important;
    border: 1px solid rgba(255, 255, 255, .30) !important;
    border-radius: 10px !important;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none !important;
    font-size: 14px !important;
}

.v-application .navbarLogout.v-btn:hover {
    background: rgba(255, 255, 255, .28) !important;
    border-color: rgba(255, 255, 255, .45) !important;
}

/* ---------------- RIGHTBAR ---------------- */

/* Esta clase se usaba en el markup pero nunca se definio. */
.userEmail {
    font-size: 13px;
    line-height: 1.5;
    color: #7c7a94;
    word-break: break-word;
    margin-top: 2px;
}

/* ---------------- CAMPOS ---------------- */

/* Vuetify empuja los iconos interiores con margin-top (4px de base, 8px en
   dense+outlined, 18px en enclosed), y quedan descentrados respecto al texto.
   Se anula en todas las variantes y se deja que el flex del slot los centre.
   Se excluye v-textarea: ahi el icono si debe quedar arriba, no a media caja. */
.v-text-field:not(.v-textarea) .v-input__prepend-inner,
.v-text-field:not(.v-textarea) .v-input__append-inner,
.v-text-field:not(.v-textarea) .v-input__prepend-outer,
.v-text-field:not(.v-textarea) .v-input__append-outer {
    margin-top: 0 !important;
    align-self: center;
}

/* ====================================================================== *
        PANTALLAS DE ADMINISTRACION (app, role, campo)
        Patron compartido: cabecera + barra de herramientas + tabla en tarjeta.
 * ====================================================================== */

.adm {
    --adm-ink: #1a1730;
    --adm-muted: #6f6c85;
    --adm-line: #e8e8f2;
}

/* ---------------- CABECERA ---------------- */

.adm__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin: 4px 0 20px;
}

.adm__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.adm__title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--adm-ink);
    margin: 0 0 4px;
    line-height: 1.25;
}

.adm__subtitle {
    font-size: 14.5px;
    color: var(--adm-muted);
    margin: 0;
}

.adm__count {
    min-width: 26px;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--adm-line);
    color: var(--adm-muted);
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-application .adm__cta.v-btn {
    height: 42px !important;
    border-radius: 11px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: .01em !important;
    text-transform: none !important;
    padding: 0 18px !important;
}

/* ---------------- BARRA DE HERRAMIENTAS ---------------- */

.adm__tools {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* .v-input trae su propio ancho: hace falta subir la especificidad. */
.v-application .adm__tools .adm__search {
    flex: 0 1 340px;
    max-width: 340px;
}

.v-application .adm__tools .adm__filter {
    flex: 0 1 190px;
    max-width: 190px;
}

.adm__tools .v-input__slot {
    background: #ffffff !important;
    border-radius: 11px !important;
    min-height: 44px !important;
}

.adm__tools fieldset {
    border-color: var(--adm-line);
}

/* ---------------- TABLA EN TARJETA ---------------- */

.adm__card {
    background: #ffffff;
    border: 1px solid var(--adm-line);
    border-radius: 14px;
    overflow: hidden;
}

.adm__card .v-data-table {
    background: transparent !important;
}

.adm__card .v-data-table-header th {
    background: #fafafd;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8a879f !important;
    height: 46px !important;
    border-bottom: 1px solid var(--adm-line) !important;
}

.adm__card .v-data-table > .v-data-table__wrapper > table > tbody > tr > td {
    height: 60px;
    font-size: 14px;
    color: #302d45;
    border-bottom: 1px solid #f2f2f8 !important;
}

.adm__card .v-data-table > .v-data-table__wrapper > table > tbody > tr:last-child > td {
    border-bottom: none !important;
}

.adm__card .v-data-table > .v-data-table__wrapper > table > tbody > tr:hover {
    background: #fafafd !important;
}

.adm__card .v-data-footer {
    border-top: 1px solid var(--adm-line) !important;
    font-size: 13px;
}

/* Acciones de fila: discretas, se encienden al pasar el cursor */
.adm__row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
    white-space: nowrap;
}

.v-application .adm__act.v-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px !important;
}

.adm__act .v-icon {
    font-size: 19px !important;
    color: #a9a7bd !important;
    transition: color .15s ease;
}

tr:hover .adm__act--edit .v-icon,
.adm__act--edit:hover .v-icon { color: #4c6ef5 !important; }

tr:hover .adm__act--del .v-icon,
.adm__act--del:hover .v-icon { color: #e5484d !important; }

.v-application .adm__act--edit:hover { background: #eef1fe !important; }
.v-application .adm__act--del:hover { background: #fdeeee !important; }

/* ---------------- CELDAS ---------------- */

/* Identidad: tile de icono + nombre + apodo/descripcion */
.adm-ident {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.adm-ident__tile {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adm-ident__tile .v-icon { font-size: 19px !important; }

.adm-ident__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--adm-ink);
    line-height: 1.3;
}

.adm-ident__meta {
    font-size: 12.5px;
    color: var(--adm-muted);
    line-height: 1.3;
}

/* Muestra de color con su hex */
.adm-swatch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.adm-swatch__chip {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1px solid rgba(0, 0, 0, .12);
    flex: 0 0 22px;
}

.adm-swatch__hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    color: var(--adm-muted);
    text-transform: uppercase;
}

/* Etiqueta neutra para valores cortos (nivel, id, dominio) */
.adm-tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border-radius: 7px;
    background: #f4f4fa;
    border: 1px solid var(--adm-line);
    font-size: 12.5px;
    font-weight: 600;
    color: #5b5875;
}

.adm-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    color: var(--adm-muted);
}

.v-application a.adm-mono {
    color: #5b5875;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.v-application a.adm-mono:hover {
    color: var(--brand, #8c57ff);
    text-decoration: underline;
}

.v-application a.adm-mono .v-icon {
    color: #b9b7cc !important;
}

/* Chip de app teñido con su propio color */
.adm-app {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 26px;
    padding: 0 10px 0 7px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
}

.adm-app__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 8px;
}

/* ---------------- ESTADO VACIO ---------------- */

.adm-empty {
    text-align: center;
    padding: 54px 24px;
}

.adm-empty__icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #f4f4fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.adm-empty__title {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--adm-ink);
    margin: 0 0 5px;
}

.adm-empty__hint {
    font-size: 13.5px;
    color: var(--adm-muted);
    margin: 0;
}

/* ---------------- DIALOGOS ---------------- */

.dlg {
    border-radius: 16px !important;
}

.dlg__head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--adm-line);
}

.dlg__icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dlg__icon--danger { background: #fdeeee; }
.dlg__icon--danger .v-icon { color: #e5484d !important; }

.dlg__title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--adm-ink);
    line-height: 1.3;
}

.dlg__sub {
    font-size: 13px;
    color: var(--adm-muted);
    line-height: 1.4;
}

.dlg__body {
    padding: 22px 24px;
}

.dlg__foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--adm-line);
    background: #fafafd;
}

.v-application .dlg__btn.v-btn {
    height: 40px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: .01em !important;
    text-transform: none !important;
    padding: 0 18px !important;
}

.dlg__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3f3d56;
    margin-bottom: 6px;
}

.dlg__field {
    margin-bottom: 18px;
}

.dlg__section {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #8a879f;
    padding-bottom: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--adm-line);
}

/* Resumen del registro que se va a borrar */
.dlg__target {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border-radius: 11px;
    background: #fafafd;
    border: 1px solid var(--adm-line);
    margin-bottom: 18px;
}

.dlg__target-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--adm-ink);
}

.dlg__warn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #6f6c85;
}

.dlg__warn .v-icon {
    margin-top: 1px;
}

.dlg__warn ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.dlg__warn li { margin-bottom: 4px; }

@media (max-width: 599px) {
    .adm__head { margin-bottom: 16px; }
    .adm__title { font-size: 21px; }
    .adm__cta.v-btn { width: 100%; }
    .adm__search, .adm__filter { max-width: none; }
    .dlg__foot { flex-direction: column-reverse; }
    .v-application .dlg__btn.v-btn { width: 100%; }
}
