@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --navy: #102a2e;
    --navy-2: #17383d;
    --gold: #b89558;
    --gold-light: #d7c39d;
    --bg: #f5f3ee;
    --card: #ffffff;
    --text: #1c2b2e;
    --muted: #718083;
    --border: #e7e4dd;
    --success: #2f7d5b;
    --warning: #c9892d;
    --danger: #b64a4a;
    --info: #376e9f;
    --shadow: 0 12px 35px rgba(16, 42, 46, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    width: 270px;
    background: linear-gradient(180deg, var(--navy), #0a1d20);
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    z-index: 20;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
    width: 46px; height: 46px;
    border: 1px solid var(--gold);
    border-radius: 12px;
    display: grid; place-items: center;
    font-family: "Playfair Display", serif;
    color: var(--gold-light);
    font-weight: 700;
}
.brand strong { display: block; letter-spacing: 2px; }
.brand span { display: block; margin-top: 4px; font-size: 12px; color: rgba(255,255,255,.65); }

.nav-menu { padding: 18px 14px; flex: 1; }
.nav-section-title {
    padding: 18px 14px 8px;
    color: var(--gold-light);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.7px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,.78);
    margin-bottom: 5px;
}
.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.nav-icon { width: 24px; text-align: center; color: var(--gold-light); }
.sidebar-footer { padding: 18px 22px 24px; color: rgba(255,255,255,.62); }
.sidebar-footer span, .sidebar-footer small { display: block; }
.sidebar-footer small { margin-top: 4px; font-size: 11px; }

.main-content { margin-left: 270px; width: calc(100% - 270px); min-height: 100vh; }
.topbar {
    min-height: 78px;
    padding: 14px 28px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}
.topbar-project { font-weight: 700; }
.topbar-subtitle { margin-top: 3px; color: var(--muted); font-size: 12px; }
.user-menu { display: flex; align-items: center; gap: 11px; }
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--navy);
    color: var(--gold-light);
    font-weight: 700;
}
.user-data strong, .user-data span { display: block; }
.user-data strong { font-size: 13px; }
.user-data span { font-size: 11px; color: var(--muted); margin-top: 2px; }
.logout-link {
    margin-left: 8px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
}
.page-container { padding: 28px; }

.page-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.7px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
}
.page-heading h1 {
    font-family: "Playfair Display", serif;
    margin: 6px 0 5px;
    font-size: 31px;
}
.page-heading p { margin: 0; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.stat-card { padding: 20px; }
.stat-top { display:flex; justify-content:space-between; align-items:center; color:var(--muted); font-size:12px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 12px; }
.stat-note { color: var(--muted); font-size: 12px; margin-top: 8px; }

.panel { padding: 22px; }
.panel h2 { margin: 0 0 4px; font-size: 17px; }
.panel p { margin: 0 0 18px; color:var(--muted); font-size: 13px; }

.status {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.status-success { background:#e7f4ed; color:var(--success); }
.status-warning { background:#fff2dd; color:var(--warning); }
.status-danger { background:#fbe9e9; color:var(--danger); }
.status-info { background:#e8f0f8; color:var(--info); }
.status-muted { background:#eceeed; color:#657074; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-light { background: #f3f1ec; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: #fff; }

.form-card { padding: 24px; max-width: 980px; }
.form-section { margin-bottom: 25px; }
.form-section h3 { margin: 0 0 16px; font-size: 15px; }
.form-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; }
.form-group label { display:block; margin-bottom:7px; font-size:12px; font-weight:600; }
.form-control {
    width:100%;
    border:1px solid var(--border);
    border-radius:10px;
    padding:11px 12px;
    background:#fff;
    color:var(--text);
    outline:none;
}
.form-control:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(184,149,88,.12); }
.form-actions { display:flex; gap:10px; justify-content:flex-end; }

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 13px;
}
.alert-success { background:#e7f4ed; color:var(--success); }
.alert-danger { background:#fbe9e9; color:var(--danger); }
.alert-warning { background:#fff2dd; color:var(--warning); }

.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th, td { padding:13px 12px; border-bottom:1px solid var(--border); text-align:left; font-size:13px; }
th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
tr:hover td { background:#fbfaf7; }

.login-page {
    min-height:100vh;
    display:grid;
    grid-template-columns:1.1fr .9fr;
    background:#fff;
}
.login-visual {
    background:
        linear-gradient(rgba(10,29,32,.48), rgba(10,29,32,.80)),
        url('../img/login-bg.svg') center/cover no-repeat;
    padding:58px;
    color:#fff;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}
.login-visual h1 {
    font-family:"Playfair Display",serif;
    font-size:54px;
    line-height:1.05;
    max-width:580px;
}
.login-visual p { max-width:500px; color:rgba(255,255,255,.78); line-height:1.7; }
.login-box-wrap { display:grid; place-items:center; padding:30px; background:var(--bg); }
.login-box { width:min(440px,100%); background:#fff; padding:38px; border-radius:22px; box-shadow:var(--shadow); }
.login-box h2 { font-family:"Playfair Display",serif; font-size:31px; margin:10px 0 5px; }
.login-box .subtitle { color:var(--muted); margin-bottom:26px; font-size:13px; }
.login-box .form-group { margin-bottom:16px; }
.login-box .btn { width:100%; margin-top:8px; padding:13px; }
.login-foot { margin-top:22px; color:var(--muted); font-size:11px; text-align:center; }

.mobile-menu { display:none; border:0; background:transparent; font-size:23px; }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .grid-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
    .sidebar { transform:translateX(-100%); transition:.25s ease; }
    .sidebar.open { transform:translateX(0); }
    .main-content { margin-left:0; width:100%; }
    .mobile-menu { display:block; }
    .topbar { gap:12px; }
    .topbar > div:nth-child(2) { flex:1; }
    .user-data { display:none; }
    .login-page { grid-template-columns:1fr; }
    .login-visual { display:none; }
}
@media (max-width: 620px) {
    .grid-4,.grid-3,.grid-2,.form-grid { grid-template-columns:1fr; }
    .page-container { padding:18px; }
    .page-heading { flex-direction:column; }
}

/* =========================================================
   LOGIN PREMIUM · LOTES / BARRIO DE SAN PEDRO
   Reemplaza la sección anterior del login o agrega al final
   de assets/css/app.css
========================================================= */

.premium-login-body {
    margin: 0;
    min-height: 100vh;
    background: #ece9e2;
    color: #13282c;
    font-family: Inter, Arial, sans-serif;
}

.premium-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(430px, .65fr);
}

/* HERO */

.premium-login-hero {
    position: relative;
    min-height: 100vh;
    padding: 42px 52px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(6, 23, 26, .84), rgba(13, 46, 49, .56)),
        radial-gradient(circle at 78% 18%, rgba(197, 163, 101, .34), transparent 28%),
        linear-gradient(145deg, #173b3f 0%, #0a2023 46%, #061517 100%);
}

.premium-login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, transparent 0 46%, rgba(255,255,255,.025) 46% 47%, transparent 47% 100%),
        linear-gradient(24deg, transparent 0 54%, rgba(255,255,255,.025) 54% 55%, transparent 55% 100%);
    pointer-events: none;
}

.premium-login-hero::after {
    content: "";
    position: absolute;
    width: 540px;
    height: 540px;
    right: -180px;
    bottom: -210px;
    border-radius: 50%;
    border: 1px solid rgba(215, 195, 157, .22);
    box-shadow:
        0 0 0 70px rgba(215, 195, 157, .035),
        0 0 0 140px rgba(215, 195, 157, .025);
}

.hero-overlay {
    position: absolute;
    inset: auto 0 0 0;
    height: 52%;
    background:
        linear-gradient(to top, rgba(5, 17, 19, .62), transparent),
        url('../img/hero-lots.svg') bottom center / cover no-repeat;
    opacity: .9;
    pointer-events: none;
}

.hero-top,
.hero-content,
.hero-footer {
    position: relative;
    z-index: 2;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.premium-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.premium-brand-seal {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(215, 195, 157, .78);
    background: rgba(255,255,255,.045);
    box-shadow: inset 0 0 0 5px rgba(255,255,255,.025);
}

.premium-brand-seal span {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 19px;
    color: #dcc79f;
    letter-spacing: 1px;
}

.premium-brand-copy strong,
.premium-brand-copy span {
    display: block;
}

.premium-brand-copy strong {
    font-size: 15px;
    letter-spacing: 3px;
}

.premium-brand-copy span {
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255,255,255,.64);
    letter-spacing: .35px;
}

.hero-system-label {
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.045);
    color: rgba(255,255,255,.72);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.55px;
    backdrop-filter: blur(8px);
}

.hero-content {
    width: min(720px, 92%);
    margin-top: auto;
    margin-bottom: auto;
    padding: 70px 0 20px;
}

.hero-kicker {
    margin-bottom: 18px;
    color: #d8c194;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(45px, 5vw, 72px);
    line-height: .98;
    font-weight: 600;
    letter-spacing: -.8px;
}

.hero-content h1 span {
    display: block;
    margin-top: 10px;
    color: #d9c39c;
}

.hero-content p {
    max-width: 610px;
    margin: 24px 0 0;
    color: rgba(255,255,255,.72);
    font-size: 15px;
    line-height: 1.8;
}

.hero-metrics {
    display: flex;
    align-items: stretch;
    gap: 22px;
    margin-top: 42px;
}

.hero-metric strong,
.hero-metric span {
    display: block;
}

.hero-metric strong {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 25px;
    color: #fff;
}

.hero-metric span {
    margin-top: 5px;
    color: rgba(255,255,255,.54);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-divider {
    width: 1px;
    background: rgba(255,255,255,.13);
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255,255,255,.43);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.15px;
}

/* PANEL */

.premium-login-panel {
    min-height: 100vh;
    padding: 44px 54px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top right, rgba(184,149,88,.10), transparent 28%),
        linear-gradient(180deg, #f7f5f0 0%, #efede7 100%);
}

.login-panel-inner {
    width: min(430px, 100%);
}

.login-panel-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 30px;
}

.login-mini-logo {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #112d31;
    color: #d7c39d;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(17,45,49,.16);
}

.login-heading-copy {
    padding-top: 1px;
}

.login-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #aa8449;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.login-heading-copy h2 {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    color: #173137;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 600;
}

.login-heading-copy p {
    margin: 10px 0 0;
    color: #788386;
    font-size: 13px;
    line-height: 1.65;
}

/* ALERTAS */

.premium-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid;
}

.premium-alert .alert-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
}

.premium-alert strong,
.premium-alert span {
    display: block;
}

.premium-alert strong {
    margin-bottom: 3px;
    font-size: 12px;
}

.premium-alert span {
    font-size: 11px;
    line-height: 1.45;
}

.premium-alert-danger {
    border-color: #edcaca;
    background: #fff1f1;
    color: #9a3f3f;
}

.premium-alert-danger .alert-icon {
    background: #b64a4a;
    color: #fff;
}

.premium-alert-warning {
    border-color: #ead7b7;
    background: #fff8ea;
    color: #98702f;
}

.premium-alert-warning .alert-icon {
    background: #c9892d;
    color: #fff;
}

/* FORM */

.premium-login-form {
    display: grid;
    gap: 18px;
}

.premium-field label {
    display: block;
    margin-bottom: 8px;
    color: #2b4044;
    font-size: 11px;
    font-weight: 700;
}

.premium-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.secure-caption {
    margin-bottom: 8px;
    color: #9aa2a4;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.premium-input-wrap {
    position: relative;
}

.premium-input-wrap input {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 48px;
    border: 1px solid #d9d7d0;
    border-radius: 14px;
    outline: none;
    background: rgba(255,255,255,.92);
    color: #183236;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(29,48,51,.035);
    transition: .2s ease;
}

.premium-input-wrap input::placeholder {
    color: #a5acad;
}

.premium-input-wrap input:focus {
    border-color: #b89558;
    box-shadow:
        0 0 0 4px rgba(184,149,88,.10),
        0 10px 24px rgba(29,48,51,.06);
    transform: translateY(-1px);
}

.premium-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: #8a9698;
    pointer-events: none;
}

.premium-input-icon svg,
.password-toggle svg,
.premium-submit svg,
.security-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 32px;
    height: 32px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8a9698;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle.active {
    background: #f1eee7;
    color: #8c6c3b;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.premium-submit {
    width: 100%;
    min-height: 56px;
    margin-top: 2px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 11px;
    background:
        linear-gradient(135deg, #173a3f, #0e292d);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .35px;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(15,43,47,.20);
    transition: .22s ease;
}

.premium-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15,43,47,.25);
}

.premium-submit:active {
    transform: translateY(0);
}

.premium-submit svg {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}

.premium-submit:hover svg {
    transform: translateX(4px);
}

/* SECURITY */

.premium-security-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
    padding: 15px;
    border-radius: 14px;
    border: 1px solid rgba(19,49,54,.08);
    background: rgba(255,255,255,.48);
}

.security-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    padding: 8px;
    border-radius: 10px;
    background: #e7eee9;
    color: #2f6f58;
}

.premium-security-note strong,
.premium-security-note span {
    display: block;
}

.premium-security-note strong {
    color: #314649;
    font-size: 11px;
}

.premium-security-note span {
    margin-top: 3px;
    color: #869092;
    font-size: 10px;
    line-height: 1.45;
}

.premium-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 28px;
    color: #9ca3a4;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.1px;
}

.footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #b89558;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
    .premium-login-shell {
        grid-template-columns: 1fr 470px;
    }

    .premium-login-hero {
        padding: 34px 38px;
    }

    .hero-content h1 {
        font-size: 52px;
    }

    .hero-metrics {
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .premium-login-shell {
        grid-template-columns: 1fr;
    }

    .premium-login-hero {
        display: none;
    }

    .premium-login-panel {
        min-height: 100vh;
        padding: 32px 22px;
    }

    .login-panel-inner {
        width: min(440px, 100%);
    }
}

@media (max-width: 520px) {
    .premium-login-panel {
        padding: 24px 18px;
    }

    .login-panel-heading {
        gap: 12px;
    }

    .login-heading-copy h2 {
        font-size: 29px;
    }

    .premium-input-wrap input {
        height: 52px;
    }
}