:root {
    --bg: #f3f5fb;
    --surface: #ffffff;
    --border: #e6e8f0;
    --text: #1b1d2a;
    --muted: #6b6f85;
    --side: #0d1020;
    --gold: #f3c84b;
    --gold-3: #c9922a;
    --red: #d7262e;
    --green: #16a34a;
    --blue: #2563eb;
    --purple: #7c3aed;
    --orange: #ea580c;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Montserrat', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14.5px; }
a { color: inherit; }

/* Layout */
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: #cfd2e3; padding: 24px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 6px; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 18px; text-decoration: none; }
.side-brand .logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #ffe7a0, #f3c84b 40%, #c9922a); color: #3a2300; font-size: 20px; }
.side-brand b { color: #fff; font-family: 'Cinzel', serif; font-size: 14px; display: block; line-height: 1.2; }
.side-brand small { color: var(--gold); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #6f7391; padding: 10px 12px 6px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-decoration: none; font-weight: 600; transition: background .2s, color .2s; margin-bottom: 4px; }
.side-link i { font-size: 18px; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.active { background: linear-gradient(135deg, rgba(243,200,75,.2), rgba(243,200,75,.06)); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-weight: 800; flex-shrink: 0; }
.side-user b { color: #fff; font-size: 13.5px; display: block; }
.side-user small { color: #8a8ea8; font-size: 12px; }
.side-foot form button { width: 100%; margin-top: 8px; background: rgba(255,255,255,.06); color: #fff; border: 0; padding: 11px; border-radius: 12px; font: 600 14px 'Montserrat'; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.side-foot form button:hover { background: rgba(215,38,46,.8); }

.main { padding: 28px 32px 50px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 26px; font-weight: 800; }
.topbar p { margin: 4px 0 0; color: var(--muted); }
.menu-btn { display: none; background: var(--surface); border: 1px solid var(--border); width: 44px; height: 44px; border-radius: 12px; font-size: 22px; cursor: pointer; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; border: 1px solid transparent; font: 700 14px 'Montserrat', sans-serif; text-decoration: none; cursor: pointer; transition: filter .2s, transform .2s; white-space: nowrap; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary { background: var(--side); color: #fff; }
.btn-gold { background: linear-gradient(135deg, #ffe7a0, #f3c84b 45%, #c9922a); color: #2a1a00; }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-light { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); position: relative; overflow: hidden; }
.kpi .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 23px; margin-bottom: 14px; }
.kpi .label { color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi .value { font-size: 32px; font-weight: 800; line-height: 1.15; margin-top: 2px; }
.kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.kpi.hero-kpi { background: linear-gradient(135deg, #0d1020, #1d2350); color: #fff; border: 0; }
.kpi.hero-kpi .label, .kpi.hero-kpi .sub { color: #b9bdd6; }
.kpi.hero-kpi.red { background: linear-gradient(135deg, #a3121b, #d7262e); }
.kpi.hero-kpi.red .label, .kpi.hero-kpi.red .sub { color: #ffd0d2; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: currentColor; opacity: .04; }
.c-gold { background: #fdf4d8; color: #a16207; }
.c-red { background: #fde8e9; color: var(--red); }
.c-blue { background: #e3ecff; color: var(--blue); }
.c-green { background: #dcfce7; color: var(--green); }
.c-purple { background: #ede4ff; color: var(--purple); }
.c-orange { background: #ffedd5; color: var(--orange); }
.hero-kpi .ico { background: rgba(255,255,255,.12); color: var(--gold); }
.hero-kpi.red .ico { color: #fff; }

/* Cards */
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 18px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.card-head h3 i { color: var(--gold-3); }
.card-body { padding: 20px 22px; }

.bar-row { margin-bottom: 16px; }
.bar-row .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.bar-row .top b { font-weight: 700; }
.bar-row .top span { color: var(--muted); white-space: nowrap; }
.bar { height: 10px; border-radius: 999px; background: #eef0f6; overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f3c84b, #d7262e); }

.status-list { display: grid; gap: 12px; }
.status-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 12px; background: #f8f9fc; border: 1px solid var(--border); }
.status-item b { font-size: 20px; }

.logistic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.logistic div { padding: 16px; border-radius: 14px; background: #f8f9fc; border: 1px dashed #d8dbe6; }
.logistic i { font-size: 22px; color: var(--blue); }
.logistic b { display: block; font-size: 22px; margin-top: 6px; }
.logistic span { color: var(--muted); font-size: 12.5px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-pendiente { background: #fef3c7; color: #a16207; }
.b-contactado { background: #dbeafe; color: #1d4ed8; }
.b-confirmado { background: #dcfce7; color: #15803d; }
.b-cancelado { background: #fee2e2; color: #b91c1c; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-yes { background: #e0f2fe; color: #0369a1; }
.pill-no { background: #f1f2f6; color: #6b6f85; }

/* Tabla */
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--border); align-items: center; }
.search { position: relative; flex: 1 1 260px; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filters input, .filters select, .select { padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; font: 500 14px 'Montserrat'; background: #f8f9fc; color: var(--text); }
.search input { width: 100%; padding-left: 40px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 13px 16px; background: #f8f9fc; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: #fbfcff; }
.church { display: flex; align-items: center; gap: 12px; }
.church .ava { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: #fdf4d8; color: #a16207; flex-shrink: 0; }
.church b { display: block; }
.church small { color: var(--muted); }
.num-big { font-weight: 800; font-size: 16px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.summary-bar { display: flex; gap: 22px; flex-wrap: wrap; padding: 14px 22px; background: #fffbea; border-bottom: 1px solid #f6e7b0; font-size: 13.5px; }
.summary-bar b { font-size: 15px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty i { font-size: 46px; color: #c8cbd8; display: block; margin-bottom: 10px; }

/* Mobile cards en lugar de tabla */
.m-list { display: none; }
.m-item { padding: 16px 18px; border-bottom: 1px solid var(--border); display: block; text-decoration: none; }
.m-item .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }

/* Paginación */
.pagination-wrap { padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; background: var(--surface); font-weight: 600; }
.pager .active { background: var(--side); color: #fff; border-color: var(--side); }
.pager .disabled { opacity: .45; }

/* Detalle */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.info { display: flex; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.info:nth-child(odd) { border-right: 1px solid var(--border); }
.info .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.info small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; display: block; }
.info b { font-size: 15px; word-break: break-word; }
.info.full { grid-column: 1 / -1; border-right: 0; }
.detail-head { display: flex; align-items: center; gap: 18px; padding: 24px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.detail-head .ava { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; font-weight: 800; background: linear-gradient(135deg, #ffe7a0, #f3c84b 45%, #c9922a); color: #2a1a00; }
.detail-head h2 { margin: 0; font-size: 22px; }
.big-number { text-align: center; padding: 26px; }
.big-number b { font-size: 54px; font-weight: 800; display: block; line-height: 1; background: linear-gradient(135deg, #d7262e, #c9922a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stack { display: grid; gap: 10px; }

.flash { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 12px; background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; margin-bottom: 20px; font-weight: 600; }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.login-art { position: relative; background: radial-gradient(ellipse at 80% 10%, rgba(243,200,75,.3), transparent 50%), radial-gradient(ellipse at 10% 90%, rgba(215,38,46,.35), transparent 50%), linear-gradient(160deg, #070912, #121633 55%, #1d0b14); color: #fff; padding: 50px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.login-art img { width: 260px; border-radius: 18px; border: 2px solid rgba(243,200,75,.5); box-shadow: 0 30px 60px rgba(0,0,0,.5); transform: rotate(-4deg); align-self: center; }
.login-art h2 { font-family: 'Cinzel', serif; font-size: 32px; margin: 0; line-height: 1.15; }
.login-art h2 span { color: var(--gold); }
.login-art p { color: #b9bdd6; }
.login-box { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-form { width: 100%; max-width: 400px; }
.login-form h1 { font-size: 28px; margin: 18px 0 6px; }
.login-form p { color: var(--muted); margin: 0 0 28px; }
.login-form label { display: block; font-weight: 700; font-size: 13.5px; margin: 16px 0 7px; }
.login-form .inp { position: relative; }
.login-form .inp i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.login-form .inp input { width: 100%; padding: 14px 14px 14px 44px; border: 1.5px solid var(--border); border-radius: 12px; font: 500 15px 'Montserrat'; background: #f8f9fc; }
.login-form input:focus { outline: none; border-color: var(--gold-3); box-shadow: 0 0 0 4px rgba(243,200,75,.2); background: #fff; }
.login-form .btn { width: 100%; justify-content: center; padding: 15px; margin-top: 24px; font-size: 15px; }
.login-form .err { background: #fee2e2; color: #b91c1c; padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 13.5px; display: flex; gap: 8px; }
.remember { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13.5px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.back-link:hover { color: var(--text); }

.overlay { display: none; }

/* Responsive */
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1000px) {
    .grid-2, .detail-grid { grid-template-columns: 1fr; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .3s; }
    .sidebar.open { transform: none; }
    .overlay.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }
    .menu-btn { display: grid; place-items: center; }
    .main { padding: 20px 16px 40px; }
    .login-page { grid-template-columns: 1fr; }
    .login-art { display: none; }
}
@media (max-width: 720px) {
    .table-wrap { display: none; }
    .m-list { display: block; }
    .info-list { grid-template-columns: 1fr; }
    .info:nth-child(odd) { border-right: 0; }
    .logistic { grid-template-columns: 1fr; }
    .topbar h1 { font-size: 22px; }
}
@media (max-width: 480px) {
    .kpis { grid-template-columns: 1fr; }
    .kpi .value { font-size: 28px; }
}

/* ===== Registro de líder / formularios ===== */
.login-page { align-items: stretch; }
.login-art { position: sticky; top: 0; height: 100vh; }
.login-form.wide { max-width: 560px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-2 .full { grid-column: 1 / -1; }
.req { color: var(--red); }
.field-err { color: var(--red); font-size: 12.5px; font-weight: 600; margin-top: 5px; }
.pill-tag { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 18px; padding: 6px 12px; border-radius: 999px; background: #fdf4d8; color: #a16207; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.login-form .pill-tag + h1 { margin-top: 10px; }
.auth-switch { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 14px; }
.auth-switch a { color: var(--gold-3); font-weight: 700; text-decoration: none; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label, .login-form .choice label { margin: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 10px; border: 1.5px solid var(--border); border-radius: 12px; background: #f8f9fc; color: #4b4f63; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .2s; }
.choice label:hover { border-color: #d6c28a; }
.choice input:checked + label { border-color: var(--gold-3); background: #fdf6e1; color: #8a5a00; box-shadow: 0 0 0 3px rgba(243,200,75,.18); }
.choice input:focus-visible + label { outline: 2px solid var(--gold-3); }
.choice label i { font-size: 17px; }

/* ===== Formulario de vida (panel) ===== */
.vida-wrap { max-width: 820px; }
.identity { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, #0d1020, #1d2350); color: #fff; margin-bottom: 18px; }
.identity .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: rgba(243,200,75,.18); color: var(--gold); font-size: 22px; flex-shrink: 0; }
.identity b { display: block; }
.identity span { color: #b9bdd6; font-size: 13px; }
.identity .count { margin-left: auto; text-align: right; }
.identity .count b { font-size: 26px; color: var(--gold); line-height: 1; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.f-grid .full { grid-column: 1 / -1; }
.f-field label.lbl { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 7px; }
.f-input { position: relative; }
.f-input > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.f-input.top > i { top: 16px; transform: none; }
.f-input input, .f-input select, .f-input textarea { width: 100%; padding: 13px 14px 13px 42px; border: 1.5px solid var(--border); border-radius: 12px; background: #f8f9fc; font: 500 15px 'Montserrat'; color: var(--text); }
.f-input textarea { min-height: 90px; resize: vertical; }
.f-input input:focus, .f-input select:focus, .f-input textarea:focus { outline: none; border-color: var(--gold-3); background: #fff; box-shadow: 0 0 0 4px rgba(243,200,75,.2); }
.f-field.has-error input, .f-field.has-error select { border-color: var(--red); }
.f-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.f-actions .btn { padding: 15px 22px; }
.f-actions .grow { flex: 1; justify-content: center; }
.success-box { text-align: center; padding: 28px 22px; }
.success-box .check { width: 70px; height: 70px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; color: var(--green); background: #dcfce7; border: 1px solid #bbf7d0; }
.success-box h3 { margin: 0 0 6px; font-size: 22px; }
.success-box p { color: var(--muted); margin: 0 0 14px; }
.summary { text-align: left; max-width: 460px; margin: 0 auto; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.summary span:first-child { color: var(--muted); }
.summary span:last-child { font-weight: 700; text-align: right; }

/* ===== Gráficos ===== */
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
.charts.cols-2 { grid-template-columns: repeat(2, 1fr); }
.chart-card .card-body { padding: 16px 18px 20px; }
.chart-box { position: relative; height: 290px; }
.chart-box.tall { height: 320px; }
.chart-empty { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13.5px; }
.chart-empty i { font-size: 40px; color: #d3d6e2; display: block; margin-bottom: 6px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }

.rank { display: grid; gap: 10px; }
.rank-item { display: flex; align-items: center; gap: 12px; }
.rank-pos { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #f1f2f6; color: var(--muted); flex-shrink: 0; }
.rank-item:nth-child(1) .rank-pos { background: linear-gradient(135deg, #ffe7a0, #f3c84b); color: #6b4500; }
.rank-item:nth-child(2) .rank-pos { background: #e5e7eb; color: #374151; }
.rank-item:nth-child(3) .rank-pos { background: #fde3c8; color: #9a3412; }
.rank-item .grow { flex: 1; min-width: 0; }
.rank-item .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.rank-item .num { font-weight: 800; }

.zone-block { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.zone-block summary { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; cursor: pointer; font-weight: 700; background: #f8f9fc; list-style: none; }
.zone-block summary::-webkit-details-marker { display: none; }
.zone-block summary .z { display: flex; align-items: center; gap: 10px; }
.zone-block summary .z i { color: var(--red); }
.zone-block ul { list-style: none; margin: 0; padding: 6px 16px 12px; }
.zone-block li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.zone-block li:last-child { border-bottom: 0; }
.mini-table td, .mini-table th { padding: 10px 14px; }
.scroll-y { max-height: 360px; overflow-y: auto; }
.tag-dec { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f1f2f6; white-space: nowrap; }
.dec-0 { background: #dcfce7; color: #15803d; }
.dec-1 { background: #dbeafe; color: #1d4ed8; }
.dec-2 { background: #fef3c7; color: #a16207; }
.dec-3 { background: #ede4ff; color: #6d28d9; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.on { color: var(--green); } .off { color: var(--red); }

@media (max-width: 1200px) { .charts { grid-template-columns: repeat(2, 1fr); } .span-2 { grid-column: 1 / -1; } }
@media (max-width: 720px) {
    .charts, .charts.cols-2 { grid-template-columns: 1fr; }
    .form-2, .f-grid { grid-template-columns: 1fr; }
    .choices.cols-3 { grid-template-columns: 1fr 1fr; }
    .identity { flex-wrap: wrap; }
    .chart-box { height: 270px; }
}
.sidebar > * { flex-shrink: 0; }

/* ===== Avatar con foto / perfil / configuración ===== */
.avatar-img { object-fit: cover; display: block; border: 2px solid rgba(243,200,75,.6); }
.side-user { border-radius: 12px; transition: background .2s; }
.side-user:hover { background: rgba(255,255,255,.06); }
.profile-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.profile-card { text-align: center; padding: 30px 24px; }
.profile-card .photo { position: relative; width: 140px; height: 140px; margin: 0 auto 16px; }
.profile-card .photo .avatar { width: 140px !important; height: 140px !important; font-size: 54px !important; box-shadow: 0 12px 30px rgba(16,24,40,.18); }
.profile-card .photo label { position: absolute; right: 4px; bottom: 4px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--side); color: var(--gold); border: 3px solid #fff; cursor: pointer; font-size: 17px; transition: transform .2s; }
.profile-card .photo label:hover { transform: scale(1.08); }
.profile-card h2 { margin: 0; font-size: 20px; }
.profile-card .role { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 12px; border-radius: 999px; background: #fdf4d8; color: #a16207; font-size: 12px; font-weight: 700; }
.profile-card .meta { margin-top: 18px; display: grid; gap: 8px; text-align: left; font-size: 13.5px; color: var(--muted); }
.profile-card .meta i { color: var(--gold-3); width: 22px; display: inline-block; }
.photo-hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.photo-preview-actions { display: none; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.photo-preview-actions.show { display: flex; }
.stack-18 { display: grid; gap: 18px; }
.section-note { font-size: 13px; color: var(--muted); margin: -4px 0 16px; }
.input-prefix { position: relative; }
.wa-preview { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.wa-preview a { color: var(--green); font-weight: 700; text-decoration: none; }
.social-row .f-input > i { font-size: 17px; }
.social-row .f-input > i.bi-facebook { color: #1877f2; }
.social-row .f-input > i.bi-instagram { color: #e1306c; }
.social-row .f-input > i.bi-tiktok { color: #111; }
.config-hint { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #eff6ff; color: #1e3a8a; font-size: 13.5px; margin-bottom: 18px; border: 1px solid #dbeafe; }
.config-hint i { font-size: 18px; }
@media (max-width: 1000px) { .profile-grid { grid-template-columns: 1fr; } }

/* ===== Catalogos ===== */
.catalog-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.catalog-list { display: grid; }
.catalog-row { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row:hover { background: #fbfcff; }
.catalog-row .grow { flex: 1; min-width: 0; }
.catalog-row .grow b { display: block; }
.catalog-row .grow small { color: var(--muted); font-size: 12.5px; }
.cat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.cat-stats { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.catalog-row .actions form { display: inline; }
.pending-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.pending-item:last-child { border-bottom: 0; }
.pending-item b { display: block; font-size: 14px; }
.pending-item small { color: var(--muted); font-size: 12px; }
.toggle-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; background: #f8f9fc; cursor: pointer; }
.toggle-row input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }
.toggle-row b { display: block; font-size: 14px; }
.toggle-row small { color: var(--muted); font-size: 12.5px; }
.toggle-row.warn { background: #fffbea; border-color: #f6e7b0; }
.toggle-row.warn input { accent-color: var(--gold-3); }
@media (max-width: 1100px) { .catalog-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .cat-stats { display: none; } .catalog-row { padding: 12px 16px; } }

/* Selector de catalogo con opcion Otra */
.cat-otra { margin-top: 8px; }
.cat-otra[hidden] { display: none; }
.login-form .inp select { width: 100%; padding: 14px 40px 14px 44px; border: 1.5px solid var(--border); border-radius: 12px; font: 500 15px 'Montserrat'; background: #f8f9fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239b9eb1' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 15px center; appearance: none; color: var(--text); }
.login-form .inp select:focus { outline: none; border-color: var(--gold-3); box-shadow: 0 0 0 4px rgba(243,200,75,.2); background-color: #fff; }
.login-form .inp > i { z-index: 1; }
