/* ezHome · estilos base */
:root {
    --ez-brand: #1f5f8b;
    --ez-ink: #1d2733;
    --ez-muted: #6b7785;
    --ez-bg: #f4f6f8;
    --ez-line: #e3e8ee;
    --ez-sidebar: #15202b;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body { background: var(--ez-bg); color: var(--ez-ink); }
a { color: var(--ez-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .ez-nav-link:hover, .list-group-item:hover, .badge:hover { text-decoration: none; }
.btn-primary { --bs-btn-bg: var(--ez-brand); --bs-btn-border-color: var(--ez-brand); --bs-btn-hover-bg: color-mix(in srgb, var(--ez-brand) 85%, #000); --bs-btn-hover-border-color: color-mix(in srgb, var(--ez-brand) 85%, #000); --bs-btn-active-bg: color-mix(in srgb, var(--ez-brand) 75%, #000); }
.btn-outline-primary { --bs-btn-color: var(--ez-brand); --bs-btn-border-color: var(--ez-brand); --bs-btn-hover-bg: var(--ez-brand); --bs-btn-hover-border-color: var(--ez-brand); }
.text-brand { color: var(--ez-brand) !important; }

/* Estructura */
.ez-shell { display: flex; min-height: 100vh; }
.ez-sidebar { width: 248px; background: var(--ez-sidebar) !important; color: #c9d3dd; flex-shrink: 0; }
@media (min-width: 992px) {
    .ez-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.ez-sidebar.offcanvas-lg { --bs-offcanvas-bg: var(--ez-sidebar); --bs-offcanvas-width: 260px; }
.ez-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; }
.ez-brand a { display: flex; align-items: center; gap: .6rem; color: #fff; }
.ez-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--ez-brand); display: grid; place-items: center; font-size: 1.1rem; }
.ez-brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: .2px; }
.ez-tenant { margin: 0 1rem 1rem; padding: .7rem .85rem; border-radius: 10px; background: rgba(255,255,255,.06); color: #fff; }
.ez-tenant a { color: #9cc7e6; }
.ez-nav { padding: 0 .75rem 2rem; }
.ez-nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7d8a97; margin: 1rem .6rem .35rem; }
.ez-nav-link { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: 8px; color: #c9d3dd; text-decoration: none; font-size: .93rem; }
.ez-nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.ez-nav-link.active { background: var(--ez-brand); color: #fff; }
.ez-nav-link.disabled { opacity: .45; pointer-events: none; }
.ez-nav-link .badge { font-size: .62rem; font-weight: 500; }
.ez-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ez-topbar { display: flex; align-items: center; padding: .6rem 1.5rem; background: #fff; border-bottom: 1px solid var(--ez-line); position: sticky; top: 0; z-index: 10; }
.ez-content { padding: 1.5rem; max-width: 1280px; width: 100%; }
@media (max-width: 576px) { .ez-content { padding: 1rem .75rem; } }

/* Componentes */
.page-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.45rem; font-weight: 650; margin: 0; }
.page-head .sub { color: var(--ez-muted); font-size: .9rem; }
.card { border: 1px solid var(--ez-line); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--ez-line); font-weight: 600; border-radius: 12px 12px 0 0 !important; }
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ez-muted); font-weight: 600; background: #fafbfc; }
.table-hover tbody tr { cursor: default; }
.stat { padding: 1.1rem 1.2rem; }
.stat .label { color: var(--ez-muted); font-size: .82rem; }
.stat .value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.stat .icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--ez-brand) 12%, #fff); color: var(--ez-brand); font-size: 1.2rem; }
.dl-grid { display: grid; grid-template-columns: 160px 1fr; gap: .45rem 1rem; margin: 0; }
.dl-grid dt { color: var(--ez-muted); font-weight: 500; font-size: .88rem; }
.dl-grid dd { margin: 0; }
@media (max-width: 576px) { .dl-grid { grid-template-columns: 1fr; } .dl-grid dd { margin-bottom: .4rem; } }
.nav-tabs .nav-link { color: var(--ez-muted); }
.nav-tabs .nav-link.active { color: var(--ez-ink); font-weight: 600; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ez-muted); }
.empty i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }
.form-section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ez-muted); font-weight: 600; margin: 1.5rem 0 .5rem; padding-bottom: .35rem; border-bottom: 1px solid var(--ez-line); }
.form-section-title:first-child { margin-top: 0; }

/* Pantallas sin menú (login, instalación, errores) */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, #15202b 0%, #1f5f8b 100%); }
.auth-card { width: 100%; max-width: 410px; border-radius: 16px; border: 0; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-card .ez-logo { width: 46px; height: 46px; font-size: 1.4rem; color: #fff; background: #1f5f8b; }
