:root {
  --c-dark: #0F172A; --c-primary: #2563EB; --c-accent: #14B8A6; --c-bg: #F8FAFC; --c-white: #FFFFFF; --c-muted: #64748B;
  --c-border: #E2E8F0; --radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
  --bs-primary: var(--c-primary); --bs-body-font-family: var(--font-family, 'Poppins', system-ui, sans-serif); --bs-body-bg: var(--c-bg); --bs-body-color: var(--c-dark);
  --bs-secondary-color: var(--c-muted); --bs-link-color: var(--c-primary); --bs-border-radius: 10px;
}
body { font-family: var(--font-family, 'Poppins', system-ui, sans-serif); background: var(--c-bg); color: var(--c-dark); }
.text-muted, .text-secondary { color: var(--c-muted) !important; }
.btn-primary { --bs-btn-bg: var(--c-primary); --bs-btn-border-color: var(--c-primary); --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8; --bs-btn-active-bg: #1e40af; font-weight: 500; }
.btn-accent { background: var(--c-accent); color: #04302b; border-color: var(--c-accent); font-weight: 600; }
.btn-accent:hover { background: #0fa294; color: #fff; }
.btn-outline-primary { --bs-btn-color: var(--c-primary); --bs-btn-border-color: var(--c-primary); --bs-btn-hover-bg: var(--c-primary); }
.btn { border-radius: 10px; }
.form-control, .form-select { border-color: var(--c-border); padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 .2rem rgba(37,99,235,.15); }
:focus-visible { outline: 3px solid rgba(37,99,235,.55); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 9999; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.card { border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }

/* ===== Portal ===== */
.site-header { background: var(--hdr-bg, #fff); color: var(--hdr-color, var(--c-dark)); border-bottom: 1px solid var(--c-border); z-index: 1030; }
.site-header.sticky { position: sticky; top: 0; }
.site-header .nav-link { color: inherit; font-weight: 500; padding: .5rem .8rem; }
.site-header .nav-link:hover { color: var(--c-primary); }
.brand { font-weight: 700; font-size: 1.25rem; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); display: inline-block; }
.offcanvas-menu { background: var(--mobile-bg, var(--c-dark)); color: #fff; }
.offcanvas-menu .nav-link { color: #fff; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer { background: var(--ftr-bg, var(--c-dark)); color: #cbd5e1; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h2 { font-size: 1rem; color: #fff; }
.sec { padding: var(--pad-y, 72px) 0; }
.sec .container, .sec .container-narrow { max-width: 1140px; }
.sec.w-narrow .container { max-width: 760px; }
.sec.w-wide .container { max-width: 1320px; }
.sec h2.sec-title { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.sec .sec-sub { color: var(--c-muted); max-width: 680px; }
.sec.t-center .sec-sub { margin-inline: auto; }
.sec.has-bg { background-size: cover; background-position: center; }
.hero h1 { font-weight: 700; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; }
.eyebrow { color: var(--c-accent); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.hero-img { border-radius: 20px; box-shadow: 0 20px 50px rgba(15,23,42,.2); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.feature-card { height: 100%; padding: 1.5rem; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(37,99,235,.1); color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: .8rem; }
.step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--c-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: .6rem; }
.plan-card { height: 100%; padding: 1.8rem; position: relative; }
.plan-card.highlight { border: 2px solid var(--c-primary); }
.plan-price { font-size: 2.2rem; font-weight: 700; }
.plan-card ul { list-style: none; padding: 0; }
.plan-card li { padding: .3rem 0; }
.plan-card li i { color: var(--c-accent); margin-right: .4rem; }
.tpl-card { overflow: hidden; height: 100%; }
.tpl-thumb { background: #e2e8f0; overflow: hidden; position: relative; aspect-ratio: 4/3; display: flex; align-items: flex-start; justify-content: center; }
.tpl-thumb .scaled { transform-origin: top left; position: absolute; left: 0; top: 0; pointer-events: none; }
.badge-premium { background: #f59e0b; color: #1f1300; }
.cta-sec { text-align: center; }
.accordion-button:not(.collapsed) { color: var(--c-primary); background: rgba(37,99,235,.06); }
.banner-top { background: var(--c-primary); color: #fff; text-align: center; padding: .5rem 1rem; font-size: .9rem; }
.banner-top a { color: #fff; font-weight: 600; }
.prose p { margin-bottom: 1rem; }
.prose ul { margin-bottom: 1rem; }
.carousel-slide { min-height: 340px; background-size: cover; background-position: center; display: flex; align-items: center; color: #fff; }
.carousel-slide .shade { background: rgba(15,23,42,.55); width: 100%; padding: 3rem 0; }
@media (max-width: 767.98px) { .hide-m { display: none !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .hide-t { display: none !important; } }
@media (min-width: 992px) { .hide-d { display: none !important; } }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: linear-gradient(135deg, #0F172A 0%, #1e3a8a 100%); }
.auth-card { max-width: 440px; width: 100%; padding: 2rem; }

/* ===== Paneles ===== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; background: var(--c-dark); color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: #fff; padding: 1.1rem 1.25rem; }
.sidebar .nav-link { color: #cbd5e1; padding: .6rem 1.25rem; display: flex; align-items: center; gap: .7rem; border-left: 3px solid transparent; border-radius: 0; font-size: .92rem; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active { background: rgba(37,99,235,.25); color: #fff; border-left-color: var(--c-accent); }
.sidebar .nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #64748b; padding: 1rem 1.25rem .3rem; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--c-border); padding: .6rem 1.25rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1020; }
.app-content { padding: 1.5rem; max-width: 1400px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.5rem; font-weight: 600; margin: 0; }
.kpi { padding: 1.1rem 1.25rem; }
.kpi .v { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.kpi .l { color: var(--c-muted); font-size: .85rem; }
.kpi .i { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; background: rgba(20,184,166,.12); color: var(--c-accent); }
.table > :not(caption) > * > * { padding: .8rem .9rem; vertical-align: middle; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); background: #f8fafc; border-bottom-color: var(--c-border); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--c-muted); }
.empty i { font-size: 2.6rem; color: #94a3b8; }
.progress { height: 8px; }
.progress-bar { background: var(--c-primary); }
.bro-card { overflow: hidden; height: 100%; }
.bro-card .tpl-thumb { aspect-ratio: 3/4; }
.toast-container { z-index: 2000; }
.spinner-inline { width: 1rem; height: 1rem; border-width: .15em; }
@media (max-width: 991.98px) {
  .sidebar { position: fixed; z-index: 1040; left: -260px; transition: left .2s; }
  .sidebar.open { left: 0; }
  .app-content { padding: 1rem; }
}
