/* Portal del dueño. Colores de la marca de Samira: marino y turquesa (#07A4A2). Sin dependencias externas. */
:root {
    --marino: #1F2A44;
    --marca: #07A4A2;
    --marca-suave: #E6F6F6;
    --fondo: #F5F7FA;
    --superficie: #FFFFFF;
    --texto: #1B2333;
    --texto-2: #5B6475;
    --borde: #DDE2EA;
    --rojo: #B42318;
    --rojo-suave: #FDECEA;
    --ambar-suave: #FFF6E0;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fondo: #0F1522;
        --superficie: #182033;
        --texto: #E8ECF3;
        --texto-2: #A3ADBF;
        --borde: #2A3550;
        --marca-suave: #0E3434;
        --rojo: #F97066;
        --rojo-suave: #3A1A1A;
        --ambar-suave: #3A3018;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

h1 { font-size: 1.5rem; margin: 0 0 .25rem; }

.barra {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: .75rem 1.25rem;
    background: var(--marino);
    color: #fff;
}

.marca { display: flex; align-items: center; gap: .6rem; }
.marca strong { display: block; font-size: 1rem; }
.marca small { display: block; opacity: .7; font-size: .75rem; }
.punto { width: 12px; height: 12px; border-radius: 50%; background: var(--marca); }

.menu { display: flex; gap: .25rem; flex-wrap: wrap; }
.menu a {
    color: #fff;
    text-decoration: none;
    padding: .4rem .75rem;
    border-radius: 6px;
    opacity: .8;
}
.menu a:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.menu a.active { opacity: 1; background: var(--marca); }

.usuario { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .85rem; min-width: 0; }
.usuario span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; opacity: .85; }
.barra .boton-texto { color: #fff; border-color: rgba(255, 255, 255, .35); }

.contenido { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.encabezado {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.nota { color: var(--texto-2); font-size: .85rem; margin: .25rem 0 0; max-width: 640px; }
.vacio { color: var(--texto-2); text-align: center; padding: 3rem 1rem; }

.aviso {
    background: var(--rojo-suave);
    color: var(--rojo);
    border-radius: 8px;
    padding: .75rem 1rem;
}
.aviso.suave { background: var(--ambar-suave); color: var(--texto); }

.tarjeta {
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: 10px;
    padding: 1.25rem;
}

.entrada { max-width: 460px; margin: 3rem auto; text-align: center; }
.entrada p { color: var(--texto-2); }

.boton, .boton-texto {
    font: inherit;
    border-radius: 8px;
    padding: .55rem 1rem;
    cursor: pointer;
}
.boton { background: var(--marca); color: #fff; border: none; font-weight: 600; }
.boton:hover { filter: brightness(1.05); }
.boton-texto { background: transparent; color: var(--texto); border: 1px solid var(--borde); }
.boton:disabled, .boton-texto:disabled { opacity: .6; cursor: default; }

.cifras {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.cifra {
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: 10px;
    padding: .9rem 1rem;
}
.cifra span { display: block; color: var(--texto-2); font-size: .8rem; }
.cifra strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.tabla-envoltura {
    overflow-x: auto;
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: 10px;
}
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--borde); white-space: nowrap; }
th { color: var(--texto-2); font-weight: 600; font-size: .8rem; background: var(--fondo); }
tbody tr:last-child td { border-bottom: none; }
td:first-child { white-space: normal; min-width: 220px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.rojo td { background: var(--rojo-suave); }

.etiqueta {
    display: inline-block;
    font-size: .75rem;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--marca-suave);
    margin: 0 .25rem .15rem 0;
}
.etiqueta.alerta { background: var(--rojo-suave); color: var(--rojo); }

.formulario {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .75rem;
    align-items: end;
    margin-bottom: 1.25rem;
}
.campo { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--texto-2); }
.campo input, .campo select {
    font: inherit;
    color: var(--texto);
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: 8px;
    padding: .5rem .6rem;
    min-width: 0;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: .75rem 1rem;
    background: var(--ambar-suave);
    color: var(--texto);
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

@media (max-width: 640px) {
    .barra { gap: .75rem; }
    .usuario { margin-left: 0; width: 100%; justify-content: space-between; }
    .contenido { padding: 1rem 1rem 2rem; }
}
