/* ── AuthTrax — lenguaje visual (minimalismo Apple) ────────────────────────── */

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1:focus {
    outline: none;
}

/* Botones: sin MAYÚSCULAS, peso medio (estilo Apple) */
.mud-button-root {
    text-transform: none !important;
    font-weight: 500;
    letter-spacing: 0;
}

/* AppBar translúcida con blur */
.appbar-blur {
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--mud-palette-divider);
}

/* Drawer limpio */
.drawer-limpio {
    border-right: 1px solid var(--mud-palette-divider);
}

.drawer-limpio .mud-nav-link {
    border-radius: 10px;
    margin: 2px 6px;
    font-weight: 500;
}

.drawer-limpio .mud-nav-link.active {
    background: var(--mud-palette-primary);
    color: #fff !important;
}

.drawer-limpio .mud-nav-link.active .mud-icon-root {
    color: #fff !important;
}

/* Tarjetas y superficies: sombra suave, transición sutil */
.mud-paper {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mud-elevation-1, .mud-elevation-2 {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06) !important;
}

.tarjeta-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.10) !important;
}

/* DataGrid: encabezados discretos, filas cómodas */
.mud-table-root .mud-table-cell {
    border-bottom: 1px solid var(--mud-palette-table-lines);
}

.mud-data-grid .mud-table-cell {
    padding: 10px 16px;
}

.mud-data-grid th .mud-table-cell,
.mud-data-grid th {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary);
}

/* Estado vacío estándar */
.estado-vacio {
    padding: 56px 24px;
    text-align: center;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 16px;
    background: transparent;
}

/* Página de login: fondo suave */
.login-fondo {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(0,113,227,0.08), transparent 60%),
        radial-gradient(1000px 500px at -10% 110%, rgba(88,86,214,0.07), transparent 60%),
        var(--mud-palette-background);
}

/* Scrollbar discreto */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.35); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,0.55); background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

.validation-message {
    color: #e50000;
}

/* ── Barra de error del host ──────────────────────────────────────────────────
   La muestra blazor.web.js si el circuito falla de forma IRRECUPERABLE (última red,
   por debajo de los ErrorBoundary). Global (no scoped) para alcanzar el elemento de
   App.razor. Rebrandizada: card oscura discreta, no el 'lightyellow' de plantilla. */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3100;
    box-sizing: border-box;
    padding: 0.75rem 2.75rem 0.75rem 1.25rem;
    background: #1d1d1f;
    color: #f5f5f7;
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    line-height: 1.4;
}

    #blazor-error-ui .reload {
        color: #0a84ff;
        margin-left: 0.75rem;
        text-decoration: none;
        font-weight: 500;
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.9rem;
        top: 0.55rem;
        opacity: 0.7;
    }

/* Error boundary de plantilla (por si algún componente lo referencia). */
.blazor-error-boundary {
    background: #b32121;
    border-radius: 12px;
    padding: 1rem;
    color: white;
}

/* ── Cuentas de una identidad (script 009) ────────────────────────────────────
   Marco de cada cuenta cuando una identidad tiene varias (detalle y formulario).
   Una sola cuenta no lleva marco: se ve como siempre. */
.cred-marco {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    padding: 14px 16px 16px;
}
.cred-totp {
    padding-top: 10px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.cred-historial, .cred-eliminadas { padding: 4px 8px 0 12px; }
