/* =============================================
   PORTAL CHRP · CSS PREMIUM
   ChilenitosRP — Same DNA, Elite Dashboard
   ============================================= */

:root {
    --bg-main: #07080c;
    --bg-card: #0f111a;
    --bg-card-hover: #141724;
    --bg-sidebar: #090b12;
    --chile-red: #ff124f;
    --chile-blue: #0088ff;
    --text-light: #ffffff;
    --text-muted: #8f9cae;
    --border: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(255, 255, 255, 0.12);
    --sidebar-width: 240px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --font: 'Inter', sans-serif;
    --mono: 'Space Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font); }
body {
    background: var(--bg-main);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    left: 0; top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.4rem 1.2rem;
    border-bottom: 1px solid var(--border);
    min-height: var(--topbar-height);
    overflow: hidden;
}

.brand-logo {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--chile-red), var(--chile-blue));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.brand-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.brand-icon-fallback { display: none; }
.brand-logo img[style*="display:none"] ~ .brand-icon-fallback { display: flex; }

.brand-text {
    display: flex; flex-direction: column;
    white-space: nowrap;
    overflow: hidden;
}
.brand-name { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.5px; }
.brand-sub { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-group { display: flex; flex-direction: column; gap: 2px; padding: 0 0.75rem; }
.nav-bottom { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-item i {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-light); }

.nav-item.active {
    background: rgba(255, 18, 79, 0.08);
    color: var(--text-light);
    border-left: 2px solid var(--chile-red);
}

.nav-item.active i { color: var(--chile-red); }

.nav-logout { color: var(--text-muted); }
.nav-logout:hover { color: var(--chile-red); background: rgba(255,18,79,0.06); }

.nav-badge {
    margin-left: auto;
    width: 18px; height: 18px;
    background: var(--chile-red);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    color: white;
    flex-shrink: 0;
}

.sidebar-collapse {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 10;
}

.sidebar-collapse:hover { color: var(--text-light); border-color: var(--chile-red); }
.sidebar.collapsed .sidebar-collapse i { transform: rotate(180deg); }

/* Collapsed sidebar text hiding */
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-item span:not(.nav-badge),
.sidebar.collapsed .nav-badge { 
    opacity: 0;
    pointer-events: none;
}

/* ========== MAIN WRAPPER ========== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-image:
        radial-gradient(circle at 85% 15%, rgba(0, 136, 255, 0.05), transparent 50%),
        radial-gradient(circle at 15% 75%, rgba(255, 18, 79, 0.05), transparent 50%);
}

.main-wrapper.expanded { margin-left: var(--sidebar-collapsed); }

/* ========== TOPBAR ========== */
.topbar {
    height: var(--topbar-height);
    background: rgba(7, 8, 12, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 1.5rem; }
.mobile-toggle {
    display: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 0.4rem;
    border-radius: 6px;
    transition: var(--transition);
}
.mobile-toggle:hover { color: var(--text-light); background: rgba(255,255,255,0.05); }

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    min-width: 220px;
    cursor: text;
    transition: var(--transition);
}
.search-bar:hover, .search-bar:focus-within { border-color: var(--border-glow); }
.search-bar i { color: var(--text-muted); font-size: 0.8rem; }
.search-bar input {
    background: none; border: none; outline: none;
    font-size: 0.85rem; color: var(--text-muted);
    font-family: var(--font);
    flex: 1;
}
.search-kbd {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: var(--mono);
}

.topbar-right { display: flex; align-items: center; gap: 1rem; }

.topbar-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition);
}
.topbar-btn:hover { color: var(--text-light); border-color: var(--border-glow); }

.notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--chile-red);
    border-radius: 50%;
    border: 1px solid var(--bg-main);
}

.topbar-user { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.user-info { display: flex; flex-direction: column; align-items: flex-end; }
.user-name { font-size: 0.875rem; font-weight: 700; }
.user-role { font-size: 0.7rem; color: var(--chile-blue); font-weight: 600; }

.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--chile-red), var(--chile-blue));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.9rem;
}

/* ========== CONTENT ========== */
.content { padding: 2rem; flex: 1; }

.page { display: none; animation: pageIn 0.3s ease; }
.page.active { display: block; }

@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 { font-size: 2rem; font-weight: 900; letter-spacing: -1px; }
.page-sub { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

.header-tag {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 0.5px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--chile-red), var(--chile-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-blue { color: var(--chile-blue); }
.text-red { color: var(--chile-red); }
.text-muted { color: var(--text-muted); }

/* ========== STATS ROW ========== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }

.stat-icon { font-size: 1.3rem; width: 42px; height: 42px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-body { display: flex; flex-direction: column; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.stat-val { font-size: 1.2rem; font-weight: 800; font-family: var(--mono); }

/* ========== DASHBOARD GRID ========== */
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; }

.dash-main, .dash-side {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* ========== SECTION LABELS ========== */
.section-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dot-red { width: 5px; height: 5px; background: var(--chile-red); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-blue { width: 5px; height: 5px; background: var(--chile-blue); border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ========== ACTIVITY LIST ========== */
.activity-list { display: flex; flex-direction: column; gap: 0; }

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.activity-body { flex: 1; display: flex; flex-direction: column; }
.activity-title { font-size: 0.875rem; font-weight: 600; }
.activity-sub { font-size: 0.75rem; color: var(--text-muted); }
.activity-amount { font-size: 0.875rem; font-weight: 800; font-family: var(--mono); }
.activity-amount.gain { color: #10b981; }
.activity-amount.loss { color: var(--chile-red); }

/* ========== QUICK LINKS ========== */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0; }

.quick-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}
.quick-btn i { font-size: 1.1rem; color: var(--chile-blue); }
.quick-btn:hover { background: rgba(0,136,255,0.06); border-color: rgba(0,136,255,0.2); color: var(--text-light); transform: translateY(-2px); }

/* ========== SERVER STATUS ========== */
.server-status { }
.srv-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem; }
.srv-row span { color: var(--text-muted); }

.progress-bar { height: 4px; background: rgba(255,255,255,0.05); border-radius: 4px; margin-bottom: 0.5rem; overflow: hidden; }
.progress-fill { height: 100%; background: var(--chile-red); border-radius: 4px; transition: width 0.8s ease; }
.progress-fill.blue { background: var(--chile-blue); }

/* ========== STATUS DOT ========== */
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); } 70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); } }
.status-dot { display: inline-block; width: 7px; height: 7px; background: #10b981; border-radius: 50%; animation: pulse 2s infinite; }

/* ========== BUTTONS ========== */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--text-light);
    color: var(--bg-main);
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-action:hover { box-shadow: 0 4px 14px rgba(255,255,255,0.2); transform: translateY(-2px); }
.btn-action.outline { background: transparent; color: var(--text-light); border-color: var(--border-glow); }
.btn-action.outline:hover { background: rgba(255,255,255,0.05); }
.btn-action.small { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--chile-blue), #0055bb);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    margin-top: 1.25rem;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,136,255,0.3); }

/* ========== REGISTRO CIVIL ========== */
.registro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

.cedula-wrap { }

.cedula-card {
    background: linear-gradient(135deg, #1a1f5e 0%, #0d1030 40%, #1a0530 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.cedula-card::before {
    content: '';
    position: absolute;
    top: -40%; right: -20%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(0,136,255,0.15), transparent 70%);
    pointer-events: none;
}

.cedula-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cedula-country {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.7);
}

.cedula-flags { display: flex; gap: 4px; }
.cflag { width: 14px; height: 14px; border-radius: 50%; }
.cflag.red { background: var(--chile-red); }
.cflag.blue { background: var(--chile-blue); }

.cedula-body { display: flex; gap: 1.25rem; align-items: flex-start; position: relative; }

.cedula-photo {
    width: 90px; height: 110px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.cedula-info { flex: 1; display: flex; flex-direction: column; gap: 0.85rem; }

.cedula-field { display: flex; flex-direction: column; gap: 2px; }
.cf-label { font-size: 0.58rem; color: rgba(255,255,255,0.45); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.cf-val { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.5px; }
.cf-run { font-family: var(--mono); font-size: 0.85rem; }

.cedula-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.cedula-fingerprint {
    position: absolute;
    bottom: 0; right: 0;
    font-size: 2rem;
    color: rgba(255,255,255,0.08);
}

/* ========== TRAMITES ========== */
.tramites-list { display: flex; flex-direction: column; gap: 0.75rem; }

.tramite-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}
.tramite-item:hover { border-color: var(--border-glow); transform: translateX(4px); }

.tramite-icon { width: 36px; height: 36px; background: rgba(0,136,255,0.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.tramite-body { flex: 1; display: flex; flex-direction: column; }
.tramite-name { font-size: 0.9rem; font-weight: 700; }
.tramite-sub { font-size: 0.75rem; color: var(--text-muted); }
.tramite-price { font-family: var(--mono); font-size: 0.85rem; font-weight: 700; color: var(--text-light); background: rgba(255,255,255,0.05); padding: 0.3rem 0.7rem; border-radius: 6px; white-space: nowrap; }
.tramite-price.free { color: #10b981; background: rgba(16,185,129,0.1); }
.tramite-btn { width: 32px; height: 32px; background: rgba(255,255,255,0.05); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.8rem; transition: var(--transition); }
.tramite-btn:hover { background: var(--chile-blue); color: white; }

/* ========== BANCO ========== */
.banco-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.5rem; }

.banco-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }

.main-balance { background: linear-gradient(135deg, #0f1a2e 0%, #0a0f1e 100%); border-color: rgba(0,136,255,0.2); }

.balance-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 0.5rem; }
.balance-amount { font-size: 2.8rem; font-weight: 900; font-family: var(--mono); margin-bottom: 1rem; letter-spacing: -2px; }
.balance-meta { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 1.5rem; }
.balance-actions { display: flex; gap: 0.75rem; }

/* ========== PERSONAJE ========== */
.personaje-grid { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; }

.personaje-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 0.75rem;
}

.personaje-avatar {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, rgba(255,18,79,0.2), rgba(0,136,255,0.2));
    border: 2px solid var(--border-glow);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.personaje-card h2 { font-size: 1.2rem; font-weight: 800; }
.personaje-tag { font-size: 0.7rem; background: rgba(0,136,255,0.1); color: var(--chile-blue); padding: 0.25rem 0.75rem; border-radius: 20px; font-weight: 700; letter-spacing: 0.5px; }

.personaje-stats { width: 100%; display: flex; flex-direction: column; gap: 0; margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.pstat { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.pstat:last-child { border-bottom: none; }
.pstat span { color: var(--text-muted); }

.licencias-list { display: flex; flex-direction: column; gap: 0.75rem; }

.licencia-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    font-size: 0.85rem;
}
.licencia-item i { font-size: 1.1rem; color: var(--text-muted); width: 24px; text-align: center; }
.licencia-item div { flex: 1; display: flex; flex-direction: column; }
.licencia-item div strong { font-size: 0.9rem; }
.licencia-item div span { color: var(--text-muted); font-size: 0.78rem; }
.licencia-item.locked { opacity: 0.4; }

.lic-badge { padding: 0.25rem 0.7rem; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.lic-badge.valid { background: rgba(16,185,129,0.1); color: #10b981; }
.lic-badge.expired { background: rgba(255,18,79,0.1); color: var(--chile-red); }
.lic-badge.locked-b { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ========== VEHICULOS ========== */
.vehiculos-grid { display: flex; flex-direction: column; gap: 1rem; }

.vehiculo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex; align-items: center; gap: 1.25rem;
    transition: var(--transition);
}
.vehiculo-card:hover { border-color: var(--border-glow); }

.vehiculo-icon { width: 48px; height: 48px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--text-muted); }
.vehiculo-info { flex: 1; }
.vehiculo-info h3 { font-size: 1rem; font-weight: 700; }
.vehiculo-plate { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); background: rgba(255,255,255,0.04); padding: 2px 8px; border-radius: 4px; }
.vehiculo-status { font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.vehiculo-status.ok { color: #10b981; }
.vehiculo-status.warn { color: #f59e0b; }

/* ========== MULTAS ========== */
.multas-list { display: flex; flex-direction: column; gap: 1rem; }

.multa-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex; align-items: center; gap: 1.25rem;
}
.multa-item.pending { border-left: 3px solid var(--chile-red); }
.multa-item.paid { border-left: 3px solid rgba(255,255,255,0.1); opacity: 0.7; }

.multa-icon { width: 42px; height: 42px; background: rgba(255,18,79,0.08); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--chile-red); }
.multa-item.paid .multa-icon { background: rgba(255,255,255,0.03); color: var(--text-muted); }
.multa-body { flex: 1; display: flex; flex-direction: column; }
.multa-body strong { font-size: 0.9rem; }
.multa-body span { font-size: 0.78rem; color: var(--text-muted); }
.multa-amount { font-family: var(--mono); font-weight: 800; color: var(--chile-red); }
.multa-amount.paid-txt { color: var(--text-muted); text-decoration: line-through; }
.multa-paid-tag { font-size: 0.78rem; font-weight: 700; color: #10b981; background: rgba(16,185,129,0.1); padding: 0.3rem 0.8rem; border-radius: 20px; }

/* ========== RECOMPENSA ========== */
.recompensa-center { display: flex; justify-content: center; padding: 2rem 0; }

.recompensa-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 380px;
    width: 100%;
}

.recompensa-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, rgba(255,18,79,0.15), rgba(0,136,255,0.15));
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    color: #f59e0b;
}

.recompensa-card h2 { font-size: 1.5rem; font-weight: 900; margin-bottom: 0.5rem; }
.recompensa-card p { color: var(--text-muted); margin-bottom: 1.5rem; }

.recompensa-amount {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: var(--mono);
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.recompensa-btn { background: linear-gradient(135deg, var(--chile-red), #cc0040); }
.recompensa-btn:hover { box-shadow: 0 6px 20px rgba(255,18,79,0.35); }

/* ========== LEGAL ========== */
.legal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--chile-red);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.75rem;
}
.legal-num { font-family: var(--mono); font-size: 0.75rem; color: var(--chile-red); margin-bottom: 0.5rem; font-weight: 700; letter-spacing: 1px; }
.legal-card h3 { font-weight: 800; margin-bottom: 0.75rem; }
.legal-card p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; }

/* ========== AJUSTES ========== */
.ajustes-list { display: flex; flex-direction: column; gap: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.ajuste-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}
.ajuste-item:last-child { border-bottom: none; }
.ajuste-item div { display: flex; flex-direction: column; gap: 2px; }
.ajuste-item div strong { font-size: 0.9rem; }
.ajuste-item div span { font-size: 0.8rem; color: var(--text-muted); }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 24px;
    cursor: pointer;
    transition: 0.3s;
}
.toggle-track::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px; left: 3px;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-track { background: var(--chile-blue); }
.toggle-switch input:checked + .toggle-track::before { transform: translateX(20px); }

.vip-badge { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; padding: 0.3rem 0.9rem; border-radius: 20px; font-size: 0.78rem; font-weight: 800; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
    .registro-grid, .banco-grid, .personaje-grid { grid-template-columns: 1fr; }
    .legal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
    .sidebar.mobile-open { transform: translateX(0); }
    .sidebar-collapse { display: none; }
    .main-wrapper { margin-left: 0 !important; }
    .mobile-toggle { display: flex; }
    .content { padding: 1.25rem; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .page-header h1 { font-size: 1.5rem; }
    .search-bar { display: none; }
    .cedula-body { flex-direction: column; }
    .cedula-photo { width: 100%; height: 80px; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
}

/* ========== MODALES (GLASSMORPHISM) ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(15, 17, 26, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.glass-modal {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* ========== UI BANCO ESTADO (ADAPTADO DARK THEME) ========== */
.banco-modal {
    max-width: 480px;
    padding: 2rem;
    background: var(--bg-card) !important;
    color: var(--text-light) !important;
    border-top: 5px solid var(--chile-blue) !important;
}

.banco-modal h2 {
    color: var(--text-light);
    font-size: 1.4rem;
    font-weight: 800;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-close:hover { color: var(--chile-red); }

.banco-input {
    width: 100%;
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-light);
    transition: all 0.2s;
}
.banco-input:focus {
    outline: none;
    border-color: var(--chile-blue);
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15);
}

.btn-banco {
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-banco-primary {
    background: var(--chile-blue);
    color: white;
}
.btn-banco-primary:hover {
    background: #0070d6;
    box-shadow: 0 4px 12px rgba(0, 136, 255, 0.3);
}
.btn-banco.outline {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-glow);
}
.btn-banco.outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.transfer-step label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.destinatario-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-glow);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.destinatario-box span { color: var(--text-muted); font-size: 0.85rem; }
.destinatario-box strong { color: var(--text-light); font-size: 1.1rem; }