/* =========================================================
   INMOBILIARIA ORTIZ — Hoja de estilos principal
   ========================================================= */

:root {
    /* Marca */
    --primary: #4f46e5;
    --primary-600: #4338ca;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --accent: #f59e0b;
    --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

    /* Superficies y texto */
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --faint: #94a3b8;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    /* Sidebar */
    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    --sidebar-text: #cbd5e1;
    --sidebar-muted: #64748b;
    --sidebar-width: 260px;

    /* Estados */
    --success: #059669;
    --success-50: #ecfdf5;
    --danger: #dc2626;
    --danger-600: #b91c1c;
    --danger-50: #fef2f2;
    --info: #2563eb;

    /* Forma */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 16px -4px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, .28);
    --ring: 0 0 0 4px rgba(79, 70, 229, .15);

    --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.text-muted { color: var(--muted); }
.text-faint { color: var(--faint); }
.pre-line { white-space: pre-line; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: middle; }

/* =========================================================
   Layout
   ========================================================= */
.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed; inset: 0 auto 0 0;
    display: flex; flex-direction: column;
    z-index: 40;
    transition: transform .25s var(--ease);
}
.sidebar-brand {
    display: flex; align-items: center; gap: .8rem;
    padding: 1.4rem 1.25rem;
    color: #fff;
}
.brand-logo {
    display: inline-grid; place-items: center;
    width: 42px; height: 42px; border-radius: var(--radius);
    background: var(--gradient); color: #fff;
    box-shadow: 0 8px 20px -6px rgba(124, 58, 237, .6);
}
.brand-logo .icon { width: 24px; height: 24px; }
.brand-logo-lg { width: 64px; height: 64px; border-radius: var(--radius-lg); }
.brand-logo-lg .icon { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; letter-spacing: .08em; font-size: .95rem; }
.brand-sub { font-weight: 600; letter-spacing: .32em; font-size: .75rem; color: #a5b4fc; }

.sidebar-nav { padding: .5rem .85rem; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-section {
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: var(--sidebar-muted); padding: 1rem .75rem .4rem;
}
.nav-link {
    position: relative;
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem .85rem; border-radius: var(--radius-sm);
    color: var(--sidebar-text); font-weight: 500;
    transition: background .15s, color .15s;
}
.nav-link .nav-icon { width: 20px; height: 20px; color: #94a3b8; transition: color .15s; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link:hover .nav-icon { color: #e2e8f0; }
.nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, .35), rgba(124, 58, 237, .15));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(165, 180, 252, .15);
}
.nav-link.active .nav-icon { color: #c7d2fe; }
.nav-link.active::before {
    content: ""; position: absolute; left: -.85rem; top: 22%; bottom: 22%;
    width: 4px; border-radius: 0 4px 4px 0; background: #a5b4fc;
}
.sidebar-footer {
    display: flex; justify-content: space-between;
    padding: 1rem 1.5rem; font-size: .75rem; color: var(--sidebar-muted);
    border-top: 1px solid rgba(255, 255, 255, .06);
}

/* ---------- Main / Topbar ---------- */
.main { flex: 1; margin-left: var(--sidebar-width); min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 68px;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 1rem; padding: 0 2rem;
    position: sticky; top: 0; z-index: 20;
}
.topbar-date { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; flex: 1; }
.topbar-date .icon { color: var(--faint); }
.topbar-user { display: flex; align-items: center; gap: .5rem; }
.topbar-user form { margin: 0; }
.user-chip {
    display: flex; align-items: center; gap: .65rem;
    padding: .3rem .85rem .3rem .3rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta strong { font-size: .875rem; }
.user-meta small { font-size: .75rem; color: var(--muted); }

.content { padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; width: 100%; max-width: 1400px; }

.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }

/* ---------- Encabezado de página ---------- */
.page-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1rem 2rem; flex-wrap: wrap;
}
.page-title { font-size: 1.75rem; font-weight: 750; }
.page-subtitle { color: var(--muted); margin-top: .25rem; }

/* =========================================================
   Componentes
   ========================================================= */

/* ---------- Avatar ---------- */
.avatar {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary-100); color: var(--primary-600);
    font-weight: 700; font-size: .85rem; letter-spacing: .02em;
}
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; background: var(--gradient); color: #fff; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; background: var(--gradient); color: #fff; }

/* ---------- Card ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow);
}
.card-flush { padding: 0; overflow: hidden; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .65rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid transparent;
    font: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2;
    cursor: pointer; white-space: nowrap;
    transition: background .15s, box-shadow .15s, transform .1s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .6); }
.btn-primary:hover { box-shadow: 0 10px 22px -6px rgba(79, 70, 229, .7); filter: brightness(1.05); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-600); }
.btn-ghost-danger { background: transparent; color: var(--danger); }
.btn-ghost-danger:hover { background: var(--danger-50); }
.btn-light { background: #fff; color: var(--primary-600); box-shadow: var(--shadow); }
.btn-light:hover { background: var(--primary-50); }
.btn-lg { padding: .85rem 1.25rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    background: transparent; border: none; color: var(--muted); cursor: pointer;
    transition: background .15s, color .15s;
}
.icon-btn .icon { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; background: transparent; }
.icon-btn-danger:hover { background: var(--danger-50); color: var(--danger); }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.form-group label { font-weight: 600; font-size: .85rem; color: #334155; }
input, select, textarea {
    width: 100%;
    font: inherit; font-size: .925rem;
    padding: .68rem .85rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: #94a3b8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 80px; }
input[type="checkbox"], input[type="radio"] { width: auto; }

.input-icon { position: relative; }
.input-icon > .icon {
    position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
    color: var(--faint); pointer-events: none;
}
.input-icon > input { padding-left: 2.6rem; }

.form-section { border: none; padding: 0; margin: 0; min-width: 0; }
.form-section legend {
    font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); margin-bottom: .75rem; padding: 0;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.req { color: var(--danger); }

.field-error { color: var(--danger); font-size: .8rem; min-height: 0; }
.field-error:empty { display: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.has-error input:focus, .has-error select:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }

.checkbox-group { display: flex; gap: .6rem; flex-wrap: wrap; }
.check-card {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .55rem .95rem; border: 1px solid var(--border-strong); border-radius: 999px;
    cursor: pointer; font-weight: 500; font-size: .9rem; user-select: none;
    transition: all .15s;
}
.check-card input { accent-color: var(--primary); margin: 0; }
.check-card:hover { border-color: var(--primary); }
.check-card:has(input:checked) { background: var(--primary-50); border-color: var(--primary); color: var(--primary-600); }
.check-card:has(input:focus-visible) { box-shadow: var(--ring); }
.form-section.has-error .check-card { border-color: var(--danger); }

/* ---------- Alertas (login) ---------- */
.alert {
    display: flex; align-items: center; gap: .6rem;
    padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500;
}
.alert-error { background: var(--danger-50); color: var(--danger-600); }
.alert-success { background: var(--success-50); color: var(--success); }

/* ---------- Badges ---------- */
.badges { display: flex; gap: .35rem; flex-wrap: wrap; }
.badge {
    display: inline-flex; align-items: center; padding: .2rem .6rem;
    border-radius: 999px; font-size: .72rem; font-weight: 650; letter-spacing: .01em;
    background: #f1f5f9; color: var(--muted);
}
.badge-comprador   { background: #dbeafe; color: #1d4ed8; }
.badge-vendedor    { background: #ffedd5; color: #c2410c; }
.badge-inquilino   { background: #ede9fe; color: #6d28d9; }
.badge-propietario { background: #d1fae5; color: #047857; }

/* ---------- Barra de filtros ---------- */
.filter-bar {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--surface);
}
.filter-search { flex: 1 1 280px; max-width: 460px; }
.filter-search input { background: var(--surface-2); border-color: var(--border); }
.filter-search input:focus { background: var(--surface); }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-block; padding: .45rem .9rem; border-radius: 999px;
    font-size: .85rem; font-weight: 600; color: var(--muted);
    background: var(--surface-2); border: 1px solid var(--border);
    transition: all .15s;
}
.chip:hover span { color: var(--text); border-color: var(--border-strong); }
.chip input:checked + span { background: var(--text); color: #fff; border-color: var(--text); }
.chip input:focus-visible + span { box-shadow: var(--ring); }

/* ---------- Tabla ---------- */
.listado { transition: opacity .15s; }
.listado.is-loading { opacity: .45; pointer-events: none; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .9rem 1.25rem; text-align: left; vertical-align: middle; }
.table th {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td { border-bottom: 1px solid #f1f5f9; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: #f8faff; }
.table tbody tr:last-child td { border-bottom: none; }
.col-actions { width: 1%; white-space: nowrap; text-align: right !important; }

.cell-person { display: flex; align-items: center; gap: .8rem; min-width: 220px; }
.cell-person > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.cell-person small { font-size: .8rem; }
.cell-stack { display: flex; flex-direction: column; gap: .15rem; font-size: .875rem; }
.cell-stack span { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.cell-stack .icon { width: 14px; height: 14px; color: var(--faint); }

.row-actions { display: inline-flex; gap: .15rem; opacity: .55; transition: opacity .15s; }
.table tbody tr:hover .row-actions, .row-actions:focus-within { opacity: 1; }

.list-footer {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: .85rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface-2);
    font-size: .875rem;
}
.pagination { display: flex; align-items: center; gap: .5rem; }

/* ---------- Empty state ---------- */
.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    text-align: center; padding: 3.5rem 1.5rem;
}
.empty-state h3 { font-size: 1.1rem; }
.empty-state .btn { margin-top: .75rem; }
.empty-icon {
    display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
    background: var(--primary-50); color: var(--primary); margin-bottom: .5rem;
}
.empty-icon .icon { width: 28px; height: 28px; }

/* ---------- Dashboard ---------- */
.hero-card {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
    padding: 2rem 2.25rem; border-radius: var(--radius-lg);
    background: var(--gradient); color: #fff;
    box-shadow: 0 20px 40px -18px rgba(79, 70, 229, .7);
}
.hero-card::after {
    content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px;
    border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none;
}
.hero-card h1 { font-size: 1.85rem; font-weight: 750; margin: .35rem 0 .4rem; }
.hero-card p { color: rgba(255, 255, 255, .85); max-width: 560px; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    background: rgba(255, 255, 255, .15); padding: .3rem .7rem; border-radius: 999px;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.stat-card {
    display: flex; align-items: center; gap: 1rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.35rem; color: inherit; box-shadow: var(--shadow);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -12px rgba(15, 23, 42, .2); border-color: var(--primary-100); }
.stat-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius); flex-shrink: 0; }
.stat-icon .icon { width: 24px; height: 24px; }
.stat-icon-blue   { background: #dbeafe; color: #2563eb; }
.stat-icon-green  { background: #d1fae5; color: #059669; }
.stat-icon-amber  { background: #fef3c7; color: #d97706; }
.stat-icon-violet { background: #ede9fe; color: #7c3aed; }
.stat-body { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat-value { font-size: 1.9rem; font-weight: 800; margin: .2rem 0; letter-spacing: -.02em; }
.stat-sub { font-size: .78rem; color: var(--faint); }
.stat-arrow { color: var(--faint); transition: transform .2s, color .2s; }
.stat-card:hover .stat-arrow { transform: translateX(3px); color: var(--primary); }

/* =========================================================
   Modales
   ========================================================= */
.modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px);
    opacity: 0; transition: opacity .18s ease;
}
.modal-dialog {
    position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 3rem);
    display: flex; flex-direction: column; margin: 0;
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(12px) scale(.98);
    transition: opacity .18s ease, transform .18s var(--ease);
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-dialog { opacity: 1; transform: none; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 780px; }

.modal-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1.35rem 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-header p { font-size: .85rem; margin-top: .2rem; }
.modal-body { padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem; }
.modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: .6rem;
    padding: 1rem 1.5rem; border-top: 1px solid var(--border);
    background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.confirm-body { align-items: center; text-align: center; gap: .6rem; padding-top: 2rem; }
.confirm-icon {
    display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: var(--danger-50); color: var(--danger); margin-bottom: .25rem;
}
.confirm-icon .icon { width: 26px; height: 26px; }
.confirm-body h3 { font-size: 1.15rem; }

/* Detalle dentro de modal */
.detail-person { display: flex; align-items: center; gap: 1rem; }
.detail-person h3 { margin-bottom: .35rem; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.5rem; margin: 0; }
.detail-list > div:last-child, .detail-list > div[data-bloque] { grid-column: 1 / -1; }
.detail-list dt {
    display: flex; align-items: center; gap: .4rem;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
}
.detail-list dt .icon { width: 14px; height: 14px; color: var(--faint); }
.detail-list dd { margin: .3rem 0 0; font-weight: 500; word-break: break-word; }

/* =========================================================
   Toasts
   ========================================================= */
.toasts {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 200;
    display: flex; flex-direction: column; gap: .6rem; pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex; align-items: center; gap: .65rem;
    min-width: 260px; max-width: 380px;
    padding: .85rem 1.1rem; border-radius: var(--radius);
    background: #0f172a; color: #fff; font-size: .9rem; font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(10px);
    transition: opacity .25s ease, transform .25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: none; }
.toast::before {
    content: ""; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    background: var(--info); box-shadow: 0 0 0 4px rgba(37, 99, 235, .25);
}
.toast-success::before { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .25); }
.toast-error::before { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .25); }

/* =========================================================
   Login
   ========================================================= */
.auth-body {
    min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
    background: radial-gradient(circle at 20% 20%, #312e81 0%, transparent 45%),
                radial-gradient(circle at 80% 80%, #581c87 0%, transparent 45%),
                #0f172a;
    overflow: hidden; position: relative;
}
.auth-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; pointer-events: none; }
.auth-blob-1 { width: 420px; height: 420px; background: #6366f1; top: -120px; left: -100px; }
.auth-blob-2 { width: 380px; height: 380px; background: #a855f7; bottom: -120px; right: -80px; }

.auth-wrapper { position: relative; width: 100%; max-width: 940px; }
.auth-card {
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--surface); border-radius: 24px; overflow: hidden;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .55);
}
.auth-hero {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
    padding: 3rem; color: #fff; background: var(--gradient);
}
.auth-hero::after {
    content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
    right: -110px; bottom: -110px; background: rgba(255, 255, 255, .1);
}
.auth-hero .brand-logo { background: rgba(255, 255, 255, .18); box-shadow: none; }
.auth-hero-title { font-size: 2rem; font-weight: 800; letter-spacing: .06em; line-height: 1.1; }
.auth-hero-title span { letter-spacing: .4em; font-weight: 600; color: #c7d2fe; font-size: 1.35rem; }
.auth-hero-text { color: rgba(255, 255, 255, .85); max-width: 320px; }
.auth-hero-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.auth-hero-list li {
    display: flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 500;
    background: rgba(255, 255, 255, .12); padding: .55rem .75rem; border-radius: var(--radius-sm);
}

.auth-form { padding: 3rem; display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.auth-form-header h2 { font-size: 1.6rem; font-weight: 750; margin-bottom: .3rem; }
.auth-footer { font-size: .8rem; text-align: center; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop {
        display: block; position: fixed; inset: 0; z-index: 30;
        background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px);
    }
    .main { margin-left: 0; }
    .sidebar-toggle { display: inline-grid; }
}

@media (max-width: 760px) {
    .topbar { padding: 0 1rem; }
    .topbar-date span, .user-meta { display: none; }
    .user-chip { padding: .3rem; }
    .content { padding: 1.25rem 1rem; }
    .page-header { align-items: stretch; }
    .page-header .btn { width: 100%; }
    .page-title { font-size: 1.45rem; }
    .hero-card { padding: 1.5rem; }
    .filter-search { max-width: none; }
    .modal { padding: 0; align-items: flex-end; }
    .modal-dialog { max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .detail-list { grid-template-columns: 1fr; }
    .toasts { left: 1rem; right: 1rem; bottom: 1rem; }
    .toast { max-width: none; }
    .auth-card { grid-template-columns: 1fr; }
    .auth-hero { padding: 2rem; }
    .auth-hero-list, .auth-hero-text { display: none; }
    .auth-form { padding: 2rem; }
    .row-actions { opacity: 1; }
}
