/* =========================================================
   Sistema de Prestamos Pro - Hoja de estilos principal
   ========================================================= */
:root {
    --sidebar-bg: #0f172a;
    --sidebar-bg-2: #1e293b;
    --sidebar-active: #2563eb;
    --sidebar-text: #cbd5e1;
    --sidebar-text-hover: #ffffff;
    --topbar-bg: #ffffff;
    --content-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, .10);
    --sidebar-w: 256px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--content-bg);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

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

/* ===================== SIDEBAR ===================== */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
    color: var(--sidebar-text);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform .25s ease;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sidebar__brand .logo {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: grid; place-items: center;
    color: #fff; font-size: 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .4);
}

.sidebar__brand .title { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.sidebar__brand .subtitle { font-size: 11px; color: #94a3b8; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #64748b; padding: 14px 14px 6px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-weight: 500;
    margin-bottom: 2px;
    transition: all .15s ease;
}
.nav-link i { font-size: 18px; width: 20px; text-align: center; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: var(--sidebar-text-hover); }
.nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .45);
}

.sidebar__footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: 11px;
    color: #64748b;
}

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

.topbar {
    height: 64px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar__left { display: flex; align-items: center; gap: 14px; }
.topbar .menu-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-dark); }
.topbar__title { font-size: 16px; font-weight: 700; }

.topbar__search {
    display: flex; align-items: center; gap: 8px;
    background: var(--content-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    width: 320px;
    max-width: 40vw;
}
.topbar__search input { border: none; background: transparent; outline: none; width: 100%; font-size: 13px; }

.topbar__right { display: flex; align-items: center; gap: 18px; }
.icon-btn { position: relative; font-size: 20px; color: var(--text-muted); cursor: pointer; }
.icon-btn .badge {
    position: absolute; top: -6px; right: -6px;
    background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: grid; place-items: center; padding: 0 4px;
}

/* Notificaciones (campana) */
.noti { position: relative; }
.noti .icon-btn { background: none; border: none; }
.noti-panel {
    position: absolute; top: 42px; right: 0; width: 320px;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--shadow-md); overflow: hidden; z-index: 50;
    display: none;
}
.noti-panel.open { display: block; }
.noti-head { padding: 14px 16px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.noti-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .15s; }
.noti-item:last-child { border-bottom: none; }
.noti-item:hover { background: #f8fafc; }
.noti-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 17px; flex-shrink: 0; }
.noti-t { font-size: 13px; font-weight: 600; color: var(--text-dark); }
.noti-d { font-size: 12px; color: var(--text-muted); }
.noti-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

.user-menu { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.user-menu .avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; display: grid; place-items: center; font-weight: 700;
    overflow: hidden;
}
.user-menu .avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu .name { font-size: 13px; font-weight: 600; }
.user-menu .role { font-size: 11px; color: var(--text-muted); }

.content { padding: 26px; flex: 1; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.page-subtitle { color: var(--text-muted); margin-bottom: 22px; }

/* ===================== STAT CARDS ===================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}
.stat-card {
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.stat-card .stat-icon { position: absolute; right: 16px; top: 16px; font-size: 38px; opacity: .25; }
.stat-card .stat-label { font-size: 12px; opacity: .9; font-weight: 500; letter-spacing: .3px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; margin-top: 6px; }
.stat-card .stat-foot { font-size: 11px; opacity: .85; margin-top: 6px; }

.bg-blue   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.bg-teal   { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.bg-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.bg-orange { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.bg-cyan   { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.bg-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* ===================== CARDS / CHARTS ===================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 15px;
    display: flex; align-items: center; justify-content: space-between;
}
.card__body { padding: 20px; }
.chart-wrap { position: relative; height: 280px; }

/* ===================== ACCESOS RAPIDOS ===================== */
.section-title { font-size: 16px; font-weight: 700; margin: 6px 0 16px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quick-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex; align-items: center; gap: 16px;
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.quick-card .q-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: grid; place-items: center; font-size: 24px; color: #fff; flex-shrink: 0;
}
.quick-card .q-title { font-weight: 700; font-size: 15px; }
.quick-card .q-desc { font-size: 12px; color: var(--text-muted); }

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

.badge-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.b-green { background: #dcfce7; color: #166534; }
.b-red { background: #fee2e2; color: #991b1b; }
.b-yellow { background: #fef3c7; color: #92400e; }
.b-blue { background: #dbeafe; color: #1e40af; }
.b-gray { background: #f1f5f9; color: #475569; }
.b-purple { background: #ede9fe; color: #6d28d9; }
.b-indigo { background: #e0e7ff; color: #3730a3; }

/* ===================== BUTTONS / FORMS ===================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-light { background: #fff; border-color: var(--border); color: var(--text-dark); }
.btn-light:hover { background: #f8fafc; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 10px; font-size: 12px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: #334155; }
.form-control {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
    font-family: inherit;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 13px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Paginacion (Bootstrap 5 markup) */
.pagination { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; list-style: none; padding: 0; align-items: center; }
.pagination .page-item .page-link {
    display: inline-block; padding: 7px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 13px; background: #fff; color: var(--text-dark);
}
.pagination .page-item.active .page-link { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-item.disabled .page-link { color: #cbd5e1; background: #f8fafc; }
.pagination svg { width: 16px; height: 16px; }

/* ===================== LOGIN ===================== */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--content-bg);
}
.login-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%);
    color: #fff;
    display: flex; flex-direction: column; justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}
.login-hero::after {
    content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%;
    background: rgba(255,255,255,.06); bottom: -120px; right: -100px;
}
.login-hero .logo {
    width: 64px; height: 64px; border-radius: 16px;
    background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 32px; margin-bottom: 28px;
}
.login-hero h1 { font-size: 34px; font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.login-hero p { font-size: 15px; color: #cbd5e1; max-width: 420px; }
.login-hero .features { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.login-hero .feature { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #e2e8f0; }
.login-hero .feature i { font-size: 18px; color: #60a5fa; }

/* Hero centrado con marca + features enriquecidas (estilo SaaS) */
.login-hero.centered { align-items: center; text-align: center; }
.login-brand-big { display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; }
.login-brand-big .logo {
    width: 84px; height: 84px; border-radius: 22px; font-size: 40px; margin-bottom: 18px;
    background: linear-gradient(135deg, #6d28d9 0%, #2563eb 100%);
    box-shadow: 0 12px 30px rgba(37,99,235,.45);
}
.login-brand-big .title { font-size: 30px; font-weight: 800; color: #fff; }
.login-brand-big .subtitle { font-size: 12px; letter-spacing: 2px; color: #93c5fd; text-transform: uppercase; margin-top: 4px; }
.login-feat-list { width: 100%; max-width: 420px; margin: 30px auto 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.login-feat {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
}
.login-feat .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; color: #fff; flex-shrink: 0; background: linear-gradient(135deg,#3b82f6,#2563eb); }
.login-feat .t { font-size: 14px; font-weight: 700; color: #fff; }
.login-feat .d { font-size: 12px; color: #cbd5e1; }
.login-mini-stats { display: flex; gap: 14px; margin-top: 30px; }
.login-mini-stats .box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px 22px; text-align: center; }
.login-mini-stats .num { font-size: 22px; font-weight: 800; color: #fff; }
.login-mini-stats .lbl { font-size: 11px; color: #94a3b8; }

/* Accesos rápidos de demostración */
.demo-divider { text-align: center; color: var(--text-muted); font-size: 12px; margin: 22px 0 14px; position: relative; }
.demo-divider::before, .demo-divider::after { content: ''; position: absolute; top: 50%; width: 32%; height: 1px; background: var(--border); }
.demo-divider::before { left: 0; } .demo-divider::after { right: 0; }
.demo-box { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #f8fafc; }
.demo-box .head { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #b45309; margin-bottom: 10px; }
.demo-row {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff;
    margin-bottom: 8px; cursor: pointer; font-size: 13px; transition: all .15s; font-family: inherit;
}
.demo-row:last-child { margin-bottom: 0; }
.demo-row:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.login-foot { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 22px; }
.login-foot a { color: var(--primary); font-weight: 700; }

.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .brand-mobile { display: none; }
.login-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.login-card .muted { color: var(--text-muted); margin-bottom: 28px; }
.login-card .form-group { margin-bottom: 18px; }
.login-card .check-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; font-size: 13px; }
.login-card .check-row label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.login-hint { margin-top: 22px; font-size: 12px; color: var(--text-muted); background: #fff; border: 1px dashed var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-icon .form-control { padding-left: 38px; }

/* ===================== PERFIL ===================== */
.profile-header {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}
.profile-cover {
    height: 120px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
    position: relative;
}
.profile-cover::after {
    content: ''; position: absolute; right: -60px; bottom: -80px;
    width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.06);
}
.profile-body { padding: 0 26px 22px; display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.profile-avatar {
    width: 104px; height: 104px; border-radius: 24px; margin-top: -52px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; display: grid; place-items: center; font-size: 42px; font-weight: 800;
    border: 4px solid #fff; box-shadow: var(--shadow-md); flex-shrink: 0;
    position: relative; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-cam {
    position: absolute; bottom: 0; right: 0; left: 0;
    background: rgba(15, 23, 42, .62); color: #fff;
    font-size: 13px; padding: 4px 0; text-align: center; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.avatar-cam:hover { background: rgba(15, 23, 42, .8); }
.profile-meta { flex: 1; min-width: 220px; padding-top: 12px; }
.profile-meta h1 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-meta .email { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.profile-meta .chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; background: var(--content-bg); color: var(--text-muted); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn {
    padding: 11px 18px; border: none; background: none; cursor: pointer;
    font-weight: 600; font-size: 14px; color: var(--text-muted);
    border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 8px;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.info-list { width: 100%; border-collapse: collapse; }
.info-list th { text-align: left; padding: 12px 0; color: var(--text-muted); font-weight: 600; font-size: 13px; width: 42%; border-bottom: 1px solid var(--border); }
.info-list td { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -26px; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--border); }
.timeline-item .t-title { font-weight: 600; font-size: 14px; }
.timeline-item .t-time { font-size: 12px; color: var(--text-muted); }

/* ===================== PLACEHOLDER ===================== */
.placeholder-box { text-align: center; padding: 80px 20px; }
.placeholder-box .p-icon {
    width: 90px; height: 90px; border-radius: 22px; margin: 0 auto 24px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: var(--primary);
    display: grid; place-items: center; font-size: 42px;
}
.placeholder-box h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.placeholder-box p { color: var(--text-muted); max-width: 480px; margin: 0 auto 8px; }
.placeholder-box .tag { display: inline-block; margin-top: 16px; background: #fef3c7; color: #92400e; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }

/* ===================== LANDING ===================== */
.lp { background: #fff; color: var(--text-dark); }
.lp-top {
    background: linear-gradient(160deg, #0b1220 0%, #14224d 45%, #1e3a8a 100%);
    color: #fff; position: relative; overflow: hidden;
}
.lp-top::after {
    content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.35), transparent 65%);
    top: -160px; right: -120px;
}
.lp-nav {
    position: relative; z-index: 5;
    max-width: 1180px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
}
.lp-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.lp-brand .logo {
    width: 40px; height: 40px; border-radius: 11px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: grid; place-items: center; font-size: 20px; color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .45);
}
.lp-navlinks { display: flex; align-items: center; gap: 28px; }
.lp-navlinks a { color: #cbd5e1; font-weight: 500; font-size: 14px; transition: color .15s; }
.lp-navlinks a:hover { color: #fff; }
.lp-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
    border: 1px solid transparent; cursor: pointer; transition: all .15s;
}
.lp-btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 6px 18px rgba(37,99,235,.4); }
.lp-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.lp-btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.lp-btn-ghost:hover { background: rgba(255,255,255,.16); }
.lp-btn-light { background: #fff; color: #1e3a8a; }
.lp-btn-light:hover { background: #eff6ff; }

.lp-hero { position: relative; z-index: 2; max-width: 880px; margin: 0 auto; text-align: center; padding: 70px 24px 90px; }
.lp-badge {
    display: inline-block; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
    color: #e0e7ff; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 30px; margin-bottom: 26px;
}
.lp-hero h1 { font-size: 56px; line-height: 1.05; font-weight: 800; margin-bottom: 22px; letter-spacing: -1px; }
.lp-hero h1 .grad {
    background: linear-gradient(120deg, #fff 0%, #93c5fd 55%, #60a5fa 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lp-hero p { font-size: 18px; color: #cbd5e1; max-width: 620px; margin: 0 auto 34px; }
.lp-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.lp-hero-cta .lp-btn { padding: 14px 26px; font-size: 15px; }
.lp-stats { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; }
.lp-stat .num { font-size: 34px; font-weight: 800; }
.lp-stat .lbl { font-size: 13px; color: #94a3b8; margin-top: 2px; }

.lp-section { max-width: 1180px; margin: 0 auto; padding: 80px 24px; }
.lp-section .eyebrow { text-align: center; color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.lp-section h2 { text-align: center; font-size: 34px; font-weight: 800; margin: 10px 0 12px; }
.lp-section .sub { text-align: center; color: var(--text-muted); max-width: 560px; margin: 0 auto 48px; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lp-feature {
    background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px;
    box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.lp-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.lp-feature .ic { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; color: #fff; margin-bottom: 16px; }
.lp-feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.lp-feature p { color: var(--text-muted); font-size: 14px; }

.lp-cta {
    background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff;
    border-radius: 22px; text-align: center; padding: 56px 24px; max-width: 1080px; margin: 0 auto 80px;
}
.lp-cta h2 { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.lp-cta p { color: #dbeafe; max-width: 520px; margin: 0 auto 28px; }

.lp-footer { background: #0b1220; color: #94a3b8; text-align: center; padding: 30px 24px; font-size: 13px; }
.lp-footer .lp-brand { justify-content: center; color: #fff; margin-bottom: 10px; }

/* ===================== RESPONSIVE ===================== */

/* Backdrop del menú lateral en móvil */
.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 35;
    opacity: 0; transition: opacity .25s ease;
}
.sidebar-backdrop.show { display: block; opacity: 1; }
@media (min-width: 861px) {
    .sidebar-backdrop { display: none !important; }
}

/* --- Escritorio mediano / laptops (≤ 1280px) --- */
@media (max-width: 1280px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* --- Tablet horizontal (≤ 1100px) --- */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-2 { grid-template-columns: 1fr !important; }
    .quick-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* --- Tablet / móvil: menú colapsable (≤ 860px) --- */
@media (max-width: 860px) {
    .login-page { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-card .brand-mobile { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }

    .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(15, 23, 42, .4); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }

    .topbar { padding: 0 16px; }
    .topbar .menu-toggle { display: block; }
    .topbar__search { display: none; }
    .topbar__right { gap: 12px; }
    .user-menu .name, .user-menu .role { display: none; }

    .content { padding: 18px 16px; }
    .quick-grid { grid-template-columns: 1fr !important; }
}

/* --- Móvil (≤ 640px) --- */
@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr !important; }
    .form-grid { grid-template-columns: 1fr; }

    .page-title { font-size: 19px; }
    .content { padding: 14px 12px; }

    .topbar__right { gap: 10px; }
    .icon-btn { font-size: 18px; }

    .profile-body { justify-content: center; text-align: center; }
    .profile-avatar { margin-top: -46px; }
    .profile-meta { text-align: left; }
    .profile-meta h1, .profile-meta .chips { justify-content: flex-start; }

    .tabs { flex-wrap: nowrap; overflow-x: auto; }
    .tab-btn { white-space: nowrap; }

    .form-actions { flex-wrap: wrap; }
    .form-actions .btn { flex: 1; justify-content: center; }

    .card__header { font-size: 14px; }
}

/* --- Landing responsive --- */
@media (max-width: 920px) {
    .lp-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .lp-navlinks a:not(.lp-btn) { display: none; }
    .lp-hero h1 { font-size: 38px; }
    .lp-hero p { font-size: 16px; }
    .lp-stats { gap: 32px; }
    .lp-features { grid-template-columns: 1fr; }
    .lp-section { padding: 56px 20px; }
    .lp-section h2, .lp-cta h2 { font-size: 26px; }
}
