/* =============================================================================
   AGENTIA24 — Design System v2 · Premium, modern, mobile-first
   Inspired by Linear, Stripe, Apple, Notion, Airbnb, Framer
   ============================================================================= */

/* ─────────────────────────────────────────────────────────────
   1. TOKENS — Light (default)
   ───────────────────────────────────────────────────────────── */
:root {
    /* Brand */
    --c-primary:        #5b5bd6;
    --c-primary-hover:  #4a4ac7;
    --c-primary-dim:    rgba(91,91,214,.12);
    --c-primary-light:  #eef2ff;
    --c-secondary:      #06b6d4;
    --c-accent:         #f59e0b;

    /* Surface */
    --c-bg:             #ffffff;
    --c-bg-subtle:      #f8fafc;
    --c-bg-muted:       #f1f5f9;
    --c-surface:        #ffffff;
    --c-surface-raised: #f8fafc;

    /* Text */
    --c-text:           #0f172a;
    --c-text-secondary: #475569;
    --c-text-muted:     #94a3b8;

    /* Border */
    --c-border:         #e2e8f0;
    --c-border-subtle:  #f1f5f9;

    /* Semantic */
    --c-success:        #16a34a;
    --c-success-bg:     #f0fdf4;
    --c-success-border: #bbf7d0;
    --c-error:          #dc2626;
    --c-error-bg:       #fef2f2;
    --c-error-border:   #fecaca;
    --c-warning:        #d97706;
    --c-warning-bg:     #fffbeb;
    --c-warning-border: #fde68a;
    --c-info:           #2563eb;
    --c-info-bg:        #eff6ff;
    --c-info-border:    #bfdbfe;

    /* Sidebar (always dark) */
    --c-sb-bg:          #111218;
    --c-sb-text:        #8b8ea8;
    --c-sb-text-hover:  #e2e8f0;
    --c-sb-active-bg:   rgba(91,91,214,.2);
    --c-sb-active-border: #5b5bd6;
    --c-sb-border:      rgba(255,255,255,.06);
    --c-sb-section:     #3d3f57;

    /* Typography */
    --font:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, monospace;

    /* Scale */
    --text-xs:    .75rem;
    --text-sm:    .875rem;
    --text-base:  1rem;
    --text-lg:    1.125rem;
    --text-xl:    1.25rem;
    --text-2xl:   1.5rem;
    --text-3xl:   1.875rem;
    --text-4xl:   2.25rem;
    --text-5xl:   3rem;

    /* Spacing */
    --sp-1:  .25rem;
    --sp-2:  .5rem;
    --sp-3:  .75rem;
    --sp-4:  1rem;
    --sp-5:  1.25rem;
    --sp-6:  1.5rem;
    --sp-8:  2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;

    /* Radius */
    --r-sm:   6px;
    --r:      10px;
    --r-lg:   14px;
    --r-xl:   20px;
    --r-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 8px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
    --shadow-md: 0 8px 20px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
    --shadow-lg: 0 20px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.05);
    --shadow-xl: 0 32px 64px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.06);

    /* Layout */
    --container: 1240px;
    --header-h:  64px;
    --sidebar-w: 248px;
    --topbar-h:  58px;

    /* Transitions */
    --t-fast:   .12s ease;
    --t:        .18s ease;
    --t-slow:   .28s ease;
}

/* ─────────────────────────────────────────────────────────────
   2. RESET + BASE
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-feature-settings: 'cv02','cv03','cv04','cv11';
}

body {
    font-family:     var(--font);
    font-size:       var(--text-base);
    line-height:     1.6;
    color:           var(--c-text);
    background:      var(--c-bg);
    min-height:      100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary-hover); }
button { cursor: pointer; font: inherit; border: none; background: none; }
ul, ol { list-style: none; }
p { line-height: 1.65; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─────────────────────────────────────────────────────────────
   4. TYPOGRAPHY
   ───────────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--c-text);
    font-weight: 700;
}

.text-xs     { font-size: var(--text-xs); }
.text-sm     { font-size: var(--text-sm); }
.text-base   { font-size: var(--text-base); }
.text-lg     { font-size: var(--text-lg); }
.text-xl     { font-size: var(--text-xl); }
.text-2xl    { font-size: var(--text-2xl); }
.text-muted  { color: var(--c-text-muted); }
.text-secondary { color: var(--c-text-secondary); }
.text-primary { color: var(--c-primary); }
.text-center { text-align: center; }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }

.gradient-text {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─────────────────────────────────────────────────────────────
   5. LAYOUT
   ───────────────────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--sp-6);
}

.section  { padding-block: var(--sp-20); }
.section-sm { padding-block: var(--sp-12); }

/* ─────────────────────────────────────────────────────────────
   6. BUTTONS
   ───────────────────────────────────────────────────────────── */
.btn {
    display:         inline-flex;
    align-items:     center;
    gap:             var(--sp-2);
    padding:         .575rem 1.15rem;
    border-radius:   var(--r);
    font-size:       var(--text-sm);
    font-weight:     600;
    line-height:     1;
    white-space:     nowrap;
    text-decoration: none;
    border:          1.5px solid transparent;
    cursor:          pointer;
    transition:      background var(--t-fast), border-color var(--t-fast),
                     color var(--t-fast), box-shadow var(--t-fast),
                     transform var(--t-fast);
    user-select:     none;
}
.btn:active { transform: translateY(1px); }
.btn:hover  { text-decoration: none; }
.btn svg    { width: 16px; height: 16px; flex-shrink: 0; }

/* Primary */
.btn-primary {
    background:   var(--c-primary);
    color:        #fff;
    border-color: var(--c-primary);
    box-shadow:   0 1px 2px rgba(91,91,214,.3), 0 0 0 0 rgba(91,91,214,0);
}
.btn-primary:hover {
    background:   var(--c-primary-hover);
    border-color: var(--c-primary-hover);
    color:        #fff;
    box-shadow:   0 4px 12px rgba(91,91,214,.35);
}

/* Outline */
.btn-outline {
    background:   var(--c-surface);
    color:        var(--c-text);
    border-color: var(--c-border);
    box-shadow:   var(--shadow-xs);
}
.btn-outline:hover {
    background:   var(--c-bg-subtle);
    border-color: var(--c-text-muted);
    color:        var(--c-text);
}

/* Ghost */
.btn-ghost {
    background:   transparent;
    color:        var(--c-text-secondary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--c-bg-muted);
    color:      var(--c-text);
}

/* Danger */
.btn-danger {
    background:   transparent;
    color:        var(--c-error);
    border-color: var(--c-error-border);
}
.btn-danger:hover {
    background:   var(--c-error-bg);
    border-color: var(--c-error);
}

/* Success */
.btn-success {
    background:   #16a34a;
    color:        #fff;
    border-color: #16a34a;
}
.btn-success:hover { background: #15803d; border-color: #15803d; }

/* Sizes */
.btn-xs  { padding: .3rem .65rem;  font-size: .72rem; border-radius: var(--r-sm); }
.btn-sm  { padding: .42rem .85rem; font-size: .8rem; }
.btn-lg  { padding: .8rem 1.75rem; font-size: var(--text-base); border-radius: var(--r-lg); }
.btn-xl  { padding: 1rem 2.25rem;  font-size: var(--text-lg); border-radius: var(--r-xl); }
.btn-block { width: 100%; justify-content: center; }
.btn-icon  { padding: .575rem; aspect-ratio: 1; }

/* ─────────────────────────────────────────────────────────────
   7. FORMS
   ───────────────────────────────────────────────────────────── */
.form-group {
    display:        flex;
    flex-direction: column;
    gap:            var(--sp-2);
    margin-bottom:  var(--sp-4);
}

.form-label {
    font-size:   var(--text-sm);
    font-weight: 600;
    color:       var(--c-text-secondary);
    letter-spacing: .01em;
}

.form-control {
    width:         100%;
    padding:       .6rem .875rem;
    font-size:     var(--text-sm);
    font-family:   var(--font);
    border:        1.5px solid var(--c-border);
    border-radius: var(--r);
    background:    var(--c-surface);
    color:         var(--c-text);
    transition:    border-color var(--t-fast), box-shadow var(--t-fast),
                   background var(--t-slow);
    outline:       none;
    line-height:   1.5;
}
.form-control::placeholder { color: var(--c-text-muted); }
.form-control:hover { border-color: var(--c-text-muted); }
.form-control:focus {
    border-color: var(--c-primary);
    box-shadow:   0 0 0 3px var(--c-primary-dim);
}
.form-control.error { border-color: var(--c-error); }
.form-control.error:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.12); }

textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control   { cursor: pointer; }

.form-hint  { font-size: var(--text-xs); color: var(--c-text-muted); line-height: 1.5; }
.form-error { font-size: var(--text-xs); color: var(--c-error); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
}

.form-actions {
    display:        flex;
    gap:            var(--sp-3);
    justify-content: flex-end;
    margin-top:     var(--sp-6);
    padding-top:    var(--sp-5);
    border-top:     1px solid var(--c-border-subtle);
}

/* Checkbox / Radio */
.form-check {
    display:     flex;
    align-items: center;
    gap:         var(--sp-3);
    cursor:      pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width:  18px; height: 18px;
    cursor: pointer;
    accent-color: var(--c-primary);
    flex-shrink: 0;
}
.form-check-label {
    font-size: var(--text-sm);
    color:     var(--c-text-secondary);
}

/* Input with icon */
.input-wrap { position: relative; }
.input-icon {
    position:  absolute;
    left:      .875rem;
    top:       50%;
    transform: translateY(-50%);
    color:     var(--c-text-muted);
    pointer-events: none;
    width: 16px; height: 16px;
}
.input-wrap .form-control { padding-left: 2.5rem; }
.input-wrap .form-control.has-right-icon { padding-right: 2.5rem; }
.input-icon-right {
    position:  absolute;
    right:     .875rem;
    top:       50%;
    transform: translateY(-50%);
    color:     var(--c-text-muted);
}

/* ─────────────────────────────────────────────────────────────
   8. BADGES
   ───────────────────────────────────────────────────────────── */
.badge {
    display:      inline-flex;
    align-items:  center;
    gap:          .25rem;
    font-size:    .72rem;
    font-weight:  600;
    padding:      .2rem .6rem;
    border-radius: var(--r-full);
    letter-spacing: .02em;
    white-space:  nowrap;
    border:       1px solid transparent;
}

.badge-green  { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.badge-red    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.badge-yellow { background: #fef9c3; color: #a16207; border-color: #fef08a; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.badge-purple { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.badge-gray   { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.badge-orange { background: #ffedd5; color: #c2410c; border-color: #fdba74; }
.badge-indigo { background: #e0e7ff; color: #4338ca; border-color: #c7d2fe; }
.badge-primary { background: var(--c-primary-light); color: var(--c-primary); border-color: var(--c-primary-dim); }



/* Status dot */
.badge-dot {
    width:  7px; height: 7px;
    border-radius: var(--r-full);
    display: inline-block;
    flex-shrink: 0;
}
.dot-green  { background: #22c55e; }
.dot-red    { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-blue   { background: #3b82f6; }
.dot-gray   { background: #94a3b8; }

/* ─────────────────────────────────────────────────────────────
   9. ALERTS
   ───────────────────────────────────────────────────────────── */
.alert {
    display:      flex;
    align-items:  flex-start;
    gap:          var(--sp-3);
    padding:      var(--sp-4) var(--sp-5);
    border-radius: var(--r);
    font-size:    var(--text-sm);
    font-weight:  500;
    border:       1px solid transparent;
    line-height:  1.5;
    margin-bottom: var(--sp-5);
}

.alert-icon {
    font-size:  var(--text-base);
    flex-shrink: 0;
    margin-top:  .1rem;
}

.alert-success {
    background:   var(--c-success-bg);
    color:        var(--c-success);
    border-color: var(--c-success-border);
}
.alert-error, .alert-e {
    background:   var(--c-error-bg);
    color:        var(--c-error);
    border-color: var(--c-error-border);
}
.alert-warning, .alert-w {
    background:   var(--c-warning-bg);
    color:        var(--c-warning);
    border-color: var(--c-warning-border);
}
.alert-info, .alert-i {
    background:   var(--c-info-bg);
    color:        var(--c-info);
    border-color: var(--c-info-border);
}
.alert-s { background: var(--c-success-bg); color: var(--c-success); border-color: var(--c-success-border); }

/* Inline banner (full-width, borderless, at top of page) */
.alert-banner {
    border-radius: 0;
    border-left:   none;
    border-right:  none;
    border-top:    none;
    margin-bottom: 0;
    padding-inline: var(--sp-6);
}

/* ─────────────────────────────────────────────────────────────
   10. CARDS
   ───────────────────────────────────────────────────────────── */
.card {
    background:    var(--c-surface);
    border:        1px solid var(--c-border);
    border-radius: var(--r-lg);
    box-shadow:    var(--shadow-sm);
    transition:    box-shadow var(--t), border-color var(--t);
    overflow:      hidden;
}

.card-hover:hover {
    box-shadow:    var(--shadow-md);
    border-color:  var(--c-text-muted);
}

.card-hdr {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         var(--sp-5) var(--sp-6);
    border-bottom:   1px solid var(--c-border-subtle);
}

.card-hdr h2,
.card-title {
    font-size:   var(--text-base);
    font-weight: 700;
    color:       var(--c-text);
    margin:      0;
}

.card-body { padding: var(--sp-6); }
.card-footer {
    padding:     var(--sp-4) var(--sp-6);
    border-top:  1px solid var(--c-border-subtle);
    background:  var(--c-bg-subtle);
}

/* ─────────────────────────────────────────────────────────────
   11. STAT CARDS
   ───────────────────────────────────────────────────────────── */
.stat-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap:                   var(--sp-4);
    margin-bottom:         var(--sp-6);
}

.stat-card {
    background:    var(--c-surface);
    border:        1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding:       var(--sp-5) var(--sp-6);
    box-shadow:    var(--shadow-xs);
    transition:    box-shadow var(--t);
    display:       flex;
    align-items:   flex-start;
    gap:           var(--sp-4);
}
.stat-card:hover { box-shadow: var(--shadow); }

.stat-icon-wrap {
    width:           44px;
    height:          44px;
    border-radius:   var(--r);
    display:         flex;
    align-items:     center;
    justify-content: center;
    flex-shrink:     0;
}
.stat-icon-wrap svg { width: 22px; height: 22px; color: #fff; }

.si-blue   { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.si-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.si-green  { background: linear-gradient(135deg, #4ade80, #16a34a); }
.si-amber  { background: linear-gradient(135deg, #fbbf24, #d97706); }
.si-rose   { background: linear-gradient(135deg, #f87171, #e11d48); }
.si-cyan   { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.si-indigo { background: linear-gradient(135deg, #818cf8, #4f46e5); }

.stat-body { flex: 1; min-width: 0; }
.stat-label {
    font-size:      .72rem;
    font-weight:    600;
    text-transform: uppercase;
    letter-spacing: .07em;
    color:          var(--c-text-muted);
    margin-bottom:  var(--sp-1);
}
.stat-value {
    font-size:   1.8rem;
    font-weight: 800;
    color:       var(--c-text);
    line-height: 1;
    letter-spacing: -.03em;
}
.stat-sub {
    font-size:  .78rem;
    color:      var(--c-text-muted);
    margin-top: var(--sp-1);
}

/* ─────────────────────────────────────────────────────────────
   12. TABLES
   ───────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }

.tbl {
    width:           100%;
    border-collapse: collapse;
    font-size:       var(--text-sm);
}

.tbl th {
    text-align:     left;
    font-size:      .72rem;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color:          var(--c-text-muted);
    padding:        .65rem 1rem;
    border-bottom:  2px solid var(--c-border-subtle);
    white-space:    nowrap;
    background:     var(--c-bg-subtle);
}

.tbl td {
    padding:        .8rem 1rem;
    border-bottom:  1px solid var(--c-border-subtle);
    vertical-align: middle;
    color:          var(--c-text);
}

.tbl tbody tr {
    transition: background var(--t-fast);
}
.tbl tbody tr:hover td { background: var(--c-bg-subtle); }
.tbl tbody tr:last-child td { border-bottom: none; }

.tbl .nowrap { white-space: nowrap; }
.tbl .muted  { color: var(--c-text-muted); }
.tbl .small  { font-size: var(--text-xs); }

.tbl-empty {
    text-align:  center;
    padding:     3rem 1rem;
    color:       var(--c-text-muted);
}
.tbl-empty svg {
    width:        40px; height: 40px;
    opacity:      .25;
    margin:       0 auto var(--sp-4);
    display:      block;
}

/* Toolbar above table */
.tbl-toolbar {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         var(--sp-4) var(--sp-6);
    border-bottom:   1px solid var(--c-border-subtle);
    flex-wrap:       wrap;
    gap:             var(--sp-3);
}

.tbl-count { font-size: var(--text-xs); color: var(--c-text-muted); }

.search-wrap { position: relative; }
.search-wrap svg {
    position:  absolute;
    left:      .7rem;
    top:       50%;
    transform: translateY(-50%);
    width:     15px; height: 15px;
    color:     var(--c-text-muted);
    pointer-events: none;
}

.search-input {
    padding:       .45rem .75rem .45rem 2.1rem;
    border:        1.5px solid var(--c-border);
    border-radius: var(--r);
    font-size:     var(--text-sm);
    color:         var(--c-text);
    background:    var(--c-surface);
    outline:       none;
    width:         220px;
    transition:    border-color var(--t-fast), box-shadow var(--t-fast);
    font-family:   var(--font);
}
.search-input:focus {
    border-color: var(--c-primary);
    box-shadow:   0 0 0 3px var(--c-primary-dim);
}

/* ─────────────────────────────────────────────────────────────
   13. PAGINATION
   ───────────────────────────────────────────────────────────── */
.pagination {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         var(--sp-4) var(--sp-6);
    border-top:      1px solid var(--c-border-subtle);
    flex-wrap:       wrap;
    gap:             var(--sp-3);
}

.pagination .info { font-size: var(--text-xs); color: var(--c-text-muted); }
.pag-links { display: flex; gap: .3rem; }

.pag-link {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           32px; height: 32px;
    border-radius:   var(--r);
    border:          1px solid var(--c-border);
    font-size:       var(--text-xs);
    font-weight:     500;
    color:           var(--c-text);
    text-decoration: none;
    background:      var(--c-surface);
    transition:      all var(--t-fast);
}
.pag-link:hover     { background: var(--c-bg-muted); border-color: var(--c-text-muted); }
.pag-link.active    { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pag-link.disabled  { opacity: .4; pointer-events: none; }

/* ─────────────────────────────────────────────────────────────
   14. TOGGLE FORM (inline forms for status toggles)
   ───────────────────────────────────────────────────────────── */
.toggle-form { display: inline; }
.toggle-form button { background: none; border: none; cursor: pointer; padding: 0; }

/* ─────────────────────────────────────────────────────────────
   15. DIVIDER
   ───────────────────────────────────────────────────────────── */
.divider {
    height:     1px;
    background: var(--c-border);
    margin:     var(--sp-6) 0;
}

/* ─────────────────────────────────────────────────────────────
   16. PROGRESS BARS
   ───────────────────────────────────────────────────────────── */
.progress-bar {
    height:         8px;
    background:     var(--c-bg-muted);
    border-radius:  var(--r-full);
    overflow:       hidden;
}
.progress-fill {
    height:        100%;
    border-radius: var(--r-full);
    background:    var(--c-primary);
    transition:    width .5s ease;
}
.progress-fill.fill-green  { background: #22c55e; }
.progress-fill.fill-yellow { background: #f59e0b; }
.progress-fill.fill-red    { background: #ef4444; }

/* ─────────────────────────────────────────────────────────────
   17. PAGE HEADER (used in both dashboard + admin)
   ───────────────────────────────────────────────────────────── */
.page-hdr {
    display:         flex;
    align-items:     flex-start;
    justify-content: space-between;
    margin-bottom:   var(--sp-6);
    flex-wrap:       wrap;
    gap:             var(--sp-4);
}

.page-hdr h1 {
    font-size:   var(--text-2xl);
    font-weight: 800;
    color:       var(--c-text);
    margin:      0;
    letter-spacing: -.03em;
}

.page-hdr p {
    color:      var(--c-text-secondary);
    font-size:  var(--text-sm);
    margin-top: var(--sp-1);
}

/* ─────────────────────────────────────────────────────────────
   18. NOTIFICATION BELL
   ───────────────────────────────────────────────────────────── */
.notif-bell {
    position:        relative;
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:  36px; height: 36px;
    background:      var(--c-bg-muted);
    border-radius:   var(--r);
    color:           var(--c-text-secondary);
    transition:      background var(--t-fast), color var(--t-fast);
}
.notif-bell:hover { background: var(--c-border); color: var(--c-text); }
.notif-bell svg   { width: 18px; height: 18px; }
.notif-bell .dot  {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px;
    background:    #ef4444;
    border-radius: var(--r-full);
    border:        2px solid var(--c-surface);
}

/* ─────────────────────────────────────────────────────────────
   19. PUBLIC HEADER
   ───────────────────────────────────────────────────────────── */
.site-header {
    height:        var(--header-h);
    background:    rgba(255,255,255,.8);
    border-bottom: 1px solid var(--c-border);
    position:      sticky;
    top:           0;
    z-index:       200;
    backdrop-filter:         saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    transition:    background var(--t-slow), border-color var(--t-slow);
}


.header-inner {
    height:          100%;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             var(--sp-6);
}

/* Logo */
.logo {
    display:         flex;
    align-items:     center;
    gap:             var(--sp-2);
    font-weight:     800;
    font-size:       var(--text-xl);
    color:           var(--c-text);
    text-decoration: none;
    letter-spacing:  -.03em;
    flex-shrink:     0;
}
.logo:hover { color: var(--c-primary); text-decoration: none; }

.logo-mark {
    width:           34px; height: 34px;
    background:      linear-gradient(135deg, var(--c-primary) 0%, #7c3aed 100%);
    color:           #fff;
    border-radius:   var(--r);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       var(--text-base);
    font-weight:     900;
    box-shadow:      0 2px 8px rgba(91,91,214,.4);
    flex-shrink:     0;
}
.logo-sm .logo-mark { width: 26px; height: 26px; font-size: var(--text-sm); }

/* Main nav */
.main-nav {
    display:     flex;
    align-items: center;
    gap:         var(--sp-1);
    flex:        1;
    justify-content: center;
}

.nav-link {
    color:           var(--c-text-secondary);
    font-size:       var(--text-sm);
    font-weight:     500;
    text-decoration: none;
    padding:         var(--sp-2) var(--sp-3);
    border-radius:   var(--r);
    transition:      color var(--t-fast), background var(--t-fast);
}
.nav-link:hover {
    color:      var(--c-text);
    background: var(--c-bg-muted);
    text-decoration: none;
}

.nav-actions {
    display:     flex;
    align-items: center;
    gap:         var(--sp-2);
    flex-shrink: 0;
}


/* Hamburger */
.menu-toggle {
    display:        none;
    flex-direction: column;
    gap:            5px;
    background:     none;
    border:         none;
    padding:        var(--sp-2);
    cursor:         pointer;
    border-radius:  var(--r);
}
.menu-toggle span {
    display:       block;
    width:         22px; height: 2px;
    background:    var(--c-text-secondary);
    border-radius: var(--r-full);
    transition:    all var(--t);
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav dropdown */
@media (max-width: 768px) {
    .main-nav {
        display:        none;
        position:       absolute;
        top:            var(--header-h);
        left:           0; right: 0;
        background:     var(--c-surface);
        border-bottom:  1px solid var(--c-border);
        flex-direction: column;
        align-items:    flex-start;
        padding:        var(--sp-4);
        gap:            var(--sp-1);
        box-shadow:     var(--shadow-md);
    }
    .main-nav.nav-open { display: flex; }
    .nav-link { width: 100%; padding: var(--sp-3) var(--sp-4); }
    .menu-toggle { display: flex; }
    .nav-actions { gap: var(--sp-2); }
}

/* ─────────────────────────────────────────────────────────────
   20. FOOTER
   ───────────────────────────────────────────────────────────── */
.site-footer {
    background: #0f172a;
    color:      #94a3b8;
}


.footer-inner {
    display:               grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap:                   var(--sp-12);
    padding-block:         var(--sp-16);
}

.footer-brand .logo { color: #fff; }
.footer-brand .logo:hover { color: #a5b4fc; }
.footer-tagline {
    font-size:   var(--text-sm);
    color:       #64748b;
    line-height: 1.65;
    margin-top:  var(--sp-3);
    max-width:   280px;
}

.footer-col h4 {
    font-size:      .72rem;
    font-weight:    700;
    color:          #fff;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom:  var(--sp-4);
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col a {
    font-size:  var(--text-sm);
    color:      #64748b;
    transition: color var(--t-fast);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
    border-top:    1px solid rgba(255,255,255,.06);
    padding-block: var(--sp-6);
    font-size:     var(--text-sm);
    text-align:    center;
    color:         #475569;
}

/* ─────────────────────────────────────────────────────────────
   21. AUTH LAYOUT
   ───────────────────────────────────────────────────────────── */
.page-auth {
    min-height:     100vh;
    display:        flex;
    flex-direction: column;
    background:     var(--c-bg-subtle);
}

.auth-header {
    padding:       var(--sp-4) var(--sp-6);
    background:    var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    flex-shrink:   0;
}

.auth-logo-link {
    display:     inline-flex;
    align-items: center;
    gap:         var(--sp-2);
    text-decoration: none;
}
.auth-logo-mark {
    width:           36px;
    height:          36px;
    background:      var(--c-primary);
    color:           #fff;
    border-radius:   var(--r-md);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       1.1rem;
    font-weight:     900;
}
.auth-logo-name {
    font-size:   1.2rem;
    font-weight: 800;
    color:       var(--c-text);
    letter-spacing: -.02em;
}
.auth-logo-name span { color: var(--c-primary); }

.auth-main {
    flex:    1;
    display: flex;
    flex-direction: column;
}

.auth-alert {
    max-width: 420px;
    margin:    var(--sp-4) auto 0;
    width:     100%;
    padding:   0 var(--sp-6);
}

.auth-wrap {
    flex:            1;
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         var(--sp-10) var(--sp-6);
}

.auth-card {
    width:         100%;
    max-width:     420px;
    background:    var(--c-surface);
    border:        1px solid var(--c-border);
    border-radius: var(--r-xl);
    box-shadow:    var(--shadow-lg);
    padding:       var(--sp-10) var(--sp-8);
}

.auth-card h1 {
    font-size:   var(--text-2xl);
    font-weight: 800;
    margin-bottom: var(--sp-2);
    letter-spacing: -.03em;
}

.auth-subtitle {
    font-size:     var(--text-sm);
    color:         var(--c-text-secondary);
    margin-bottom: var(--sp-8);
    line-height:   1.5;
}

.auth-divider {
    text-align:  center;
    font-size:   var(--text-xs);
    color:       var(--c-text-muted);
    margin:      var(--sp-6) 0;
    position:    relative;
}
.auth-divider::before {
    content:  '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height:   1px;
    background: var(--c-border);
}
.auth-divider span {
    position:   relative;
    background: var(--c-surface);
    padding:    0 var(--sp-3);
}

.auth-footer {
    margin-top:  var(--sp-6);
    text-align:  center;
    font-size:   var(--text-sm);
    color:       var(--c-text-secondary);
}
.auth-footer a { color: var(--c-primary); font-weight: 600; }

/* Form spacing inside auth */
.auth-card .form-group { margin-bottom: var(--sp-4); }
.auth-card .form-row   { margin-bottom: var(--sp-4); }
.auth-card .btn-block  { margin-top: var(--sp-2); }

/* ─────────────────────────────────────────────────────────────
   22. ERROR PAGES
   ───────────────────────────────────────────────────────────── */
.error-layout {
    min-height:      100vh;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    padding:         var(--sp-8);
    text-align:      center;
    background:      var(--c-bg-subtle);
}

.error-page { max-width: 520px; }

.error-code {
    font-size:      7rem;
    font-weight:    900;
    line-height:    1;
    color:          var(--c-primary);
    opacity:        .15;
    letter-spacing: -.05em;
    margin-bottom:  var(--sp-4);
}

.error-title {
    font-size:     var(--text-3xl);
    font-weight:   800;
    margin-bottom: var(--sp-4);
    letter-spacing: -.03em;
}

.error-message {
    color:         var(--c-text-secondary);
    font-size:     var(--text-lg);
    margin-bottom: var(--sp-8);
    line-height:   1.6;
}

.error-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }
.error-back    { margin-top: var(--sp-8); font-size: var(--text-sm); color: var(--c-text-muted); }

/* ─────────────────────────────────────────────────────────────
   23. APP LAYOUT — Sidebar + Main (Dashboard + Admin)
   ───────────────────────────────────────────────────────────── */
.app-layout {
    display:    flex;
    min-height: 100vh;
    background: var(--c-bg-subtle);
}

/* ── SIDEBAR ── */
.app-sidebar {
    position:       fixed;
    top:            0; left: 0;
    width:          var(--sidebar-w);
    height:         100vh;
    background:     var(--c-sb-bg);
    display:        flex;
    flex-direction: column;
    overflow-y:     auto;
    z-index:        200;
    transition:     transform var(--t-slow);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}

.sidebar-brand {
    display:         flex;
    align-items:     center;
    gap:             var(--sp-3);
    padding:         var(--sp-5) var(--sp-5) var(--sp-4);
    border-bottom:   1px solid var(--c-sb-border);
    text-decoration: none;
    flex-shrink:     0;
}

.sidebar-brand-name {
    font-size:      var(--text-lg);
    font-weight:    800;
    color:          #fff;
    letter-spacing: -.03em;
}
.sidebar-brand-name span { color: #818cf8; }

.sidebar-badge {
    font-size:   .6rem;
    font-weight: 700;
    background:  rgba(91,91,214,.35);
    color:       #a5b4fc;
    padding:     .2rem .5rem;
    border-radius: var(--r-full);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-left: auto;
}

.sidebar-nav { padding: var(--sp-3) 0; flex: 1; }

.sidebar-section {
    font-size:      .65rem;
    font-weight:    700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color:          var(--c-sb-section);
    padding:        var(--sp-4) var(--sp-5) var(--sp-2);
}

.sidebar-link {
    display:     flex;
    align-items: center;
    gap:         var(--sp-3);
    padding:     var(--sp-2) var(--sp-5);
    color:       var(--c-sb-text);
    font-size:   var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition:  all var(--t-fast);
    position:    relative;
}
.sidebar-link:hover {
    color:      var(--c-sb-text-hover);
    background: rgba(255,255,255,.05);
    text-decoration: none;
}
.sidebar-link.active {
    color:            #fff;
    background:       var(--c-sb-active-bg);
    border-left-color: var(--c-sb-active-border);
    font-weight:      600;
}
.sidebar-link svg {
    width:     18px; height: 18px;
    flex-shrink: 0;
    opacity:   .7;
    transition: opacity var(--t-fast);
}
.sidebar-link:hover svg,
.sidebar-link.active svg { opacity: 1; }

.sidebar-link .link-badge {
    margin-left: auto;
    background:  #ef4444;
    color:       #fff;
    font-size:   .65rem;
    font-weight: 700;
    padding:     .1rem .4rem;
    border-radius: var(--r-full);
    line-height: 1.4;
}

.sidebar-footer {
    padding:     var(--sp-4) var(--sp-5);
    border-top:  1px solid var(--c-sb-border);
    flex-shrink: 0;
}

.sidebar-user {
    display:     flex;
    align-items: center;
    gap:         var(--sp-3);
    margin-bottom: var(--sp-3);
}

.sidebar-avatar {
    width:           34px; height: 34px;
    border-radius:   var(--r-full);
    background:      linear-gradient(135deg, var(--c-primary), #7c3aed);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       var(--text-sm);
    font-weight:     700;
    color:           #fff;
    flex-shrink:     0;
}

.sidebar-user-info { min-width: 0; }
.sidebar-user-name {
    font-size:  var(--text-sm);
    font-weight: 600;
    color:      #e2e8f0;
    white-space: nowrap;
    overflow:   hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    display:      inline-block;
    font-size:    .65rem;
    background:   rgba(91,91,214,.3);
    color:        #a5b4fc;
    padding:      .15rem .5rem;
    border-radius: var(--r-full);
    font-weight:  600;
    margin-top:   .2rem;
}

.sidebar-logout {
    display:         flex;
    align-items:     center;
    gap:             var(--sp-2);
    font-size:       var(--text-xs);
    color:           #6b7280;
    text-decoration: none;
    padding:         var(--sp-2) var(--sp-2);
    border-radius:   var(--r-sm);
    transition:      color var(--t-fast), background var(--t-fast);
}
.sidebar-logout:hover { color: #ef4444; background: rgba(239,68,68,.08); }
.sidebar-logout svg   { width: 14px; height: 14px; }

/* ── OVERLAY ── */
.sidebar-overlay {
    display:    none;
    position:   fixed;
    inset:      0;
    background: rgba(0,0,0,.5);
    z-index:    190;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ── MAIN WRAPPER ── */
.app-main {
    margin-left: var(--sidebar-w);
    min-height:  100vh;
    display:     flex;
    flex-direction: column;
    flex:        1;
    min-width:   0;
}

/* ── TOPBAR ── */
.app-topbar {
    height:          var(--topbar-h);
    background:      var(--c-surface);
    border-bottom:   1px solid var(--c-border);
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         0 var(--sp-6);
    position:        sticky;
    top:             0;
    z-index:         100;
    box-shadow:      var(--shadow-xs);
    transition:      background var(--t-slow), border-color var(--t-slow);
}

.topbar-left { display: flex; align-items: center; gap: var(--sp-4); }

.topbar-menu-btn {
    display:      none;
    align-items:  center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--r);
    color:        var(--c-text-secondary);
    background:   none;
    border:       none;
    cursor:       pointer;
    transition:   background var(--t-fast), color var(--t-fast);
}
.topbar-menu-btn:hover { background: var(--c-bg-muted); color: var(--c-text); }
.topbar-menu-btn svg   { width: 20px; height: 20px; }

.topbar-title {
    font-size:   var(--text-base);
    font-weight: 700;
    color:       var(--c-text);
    letter-spacing: -.01em;
}

.topbar-breadcrumb {
    font-size:  var(--text-xs);
    color:      var(--c-text-muted);
    margin-top: 1px;
}
.topbar-breadcrumb a { color: var(--c-primary); }

.topbar-right { display: flex; align-items: center; gap: var(--sp-3); }

.topbar-greeting {
    font-size:   var(--text-sm);
    color:       var(--c-text-secondary);
}
.topbar-greeting strong { color: var(--c-text); font-weight: 600; }

/* ── CONTENT ── */
.app-content { padding: var(--sp-6) var(--sp-6); flex: 1; }

/* ─────────────────────────────────────────────────────────────
   24. PUBLIC HERO
   ───────────────────────────────────────────────────────────── */
.hero {
    position:   relative;
    overflow:   hidden;
    background: linear-gradient(160deg, #f8f7ff 0%, #eef2ff 50%, #f0f9ff 100%);
    color:      var(--c-text);
    padding:    clamp(4rem, 10vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem);
}

/* Ambient glow orbs */
.hero::before {
    content:  '';
    position: absolute;
    width:    600px; height: 600px;
    top:      -200px; right: -150px;
    background: radial-gradient(circle, rgba(91,91,214,.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content:  '';
    position: absolute;
    width:    400px; height: 400px;
    bottom:   -100px; left: -100px;
    background: radial-gradient(circle, rgba(6,182,212,.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner { position: relative; text-align: center; z-index: 1; }

.hero-eyebrow {
    display:       inline-flex;
    align-items:   center;
    gap:           var(--sp-2);
    font-size:     var(--text-xs);
    font-weight:   600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color:         var(--c-primary);
    background:    var(--c-primary-light);
    border:        1px solid var(--c-primary-dim);
    border-radius: var(--r-full);
    padding:       .35rem .9rem;
    margin-bottom: var(--sp-6);
}

.hero-title {
    font-size:      clamp(2rem, 6vw, 3.75rem);
    font-weight:    900;
    line-height:    1.1;
    letter-spacing: -.04em;
    margin-bottom:  var(--sp-5);
    color:          var(--c-text);
}

.hero-highlight {
    background:  linear-gradient(135deg, #5b5bd6 0%, #6366f1 50%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size:     clamp(.95rem, 2.5vw, 1.2rem);
    color:         var(--c-text-secondary);
    max-width:     560px;
    margin:        0 auto var(--sp-10);
    line-height:   1.65;
}

/* Hero search */
.hero-search-bar {
    display:       flex;
    align-items:   stretch;
    gap:           0;
    background:    #fff;
    border-radius: var(--r-xl);
    max-width:     680px;
    width:         calc(100% - 3rem);
    margin:        0 auto var(--sp-10);
    box-shadow:    0 4px 24px rgba(91,91,214,.12), 0 1px 4px rgba(0,0,0,.06);
    border:        1px solid var(--c-border);
}

.hero-search-field {
    flex:          1;
    display:       flex;
    align-items:   center;
    gap:           var(--sp-3);
    padding:       var(--sp-4) var(--sp-5);
}
.hero-search-field svg {
    width:      18px; height: 18px;
    color:      #94a3b8;
    flex-shrink: 0;
}
.hero-search-field input {
    flex:       1;
    border:     none;
    outline:    none;
    font-size:  var(--text-base);
    color:      #0f172a;
    background: transparent;
    font-family: var(--font);
    min-width:  0;
}
.hero-search-field input::placeholder { color: #94a3b8; }

.hero-search-sep {
    width:      1px; height: 2rem;
    background: #e2e8f0;
    flex-shrink: 0;
}

.hero-search-btn {
    flex-shrink: 0;
    margin:      0;
    background:  var(--c-primary);
    color:       #fff;
    border:      none;
    border-radius: 0 var(--r-xl) var(--r-xl) 0;
    padding:     .75rem 1.5rem;
    font-size:   var(--text-base);
    font-weight: 700;
    cursor:      pointer;
    display:     flex;
    align-items: center;
    gap:         var(--sp-2);
    transition:  background var(--t-fast), box-shadow var(--t-fast);
    font-family: var(--font);
}
.hero-search-btn:hover {
    background:  var(--c-primary-hover);
    box-shadow:  0 4px 16px rgba(91,91,214,.5);
}

/* Hero stats */
.hero-stats {
    display:         flex;
    justify-content: center;
    flex-wrap:       wrap;
    gap:             var(--sp-8);
}

.hero-stat strong {
    font-size:   1.75rem;
    font-weight: 900;
    color:       var(--c-primary);
    display:     block;
    letter-spacing: -.03em;
    margin-bottom: .1rem;
}
.hero-stat span { font-size: var(--text-sm); color: var(--c-text-secondary); }

/* ─────────────────────────────────────────────────────────────
   25. HOME — SECTIONS
   ───────────────────────────────────────────────────────────── */
.section-head {
    text-align:    center;
    margin-bottom: var(--sp-12);
}
.section-head h2 {
    font-size:      clamp(1.5rem, 4vw, 2.25rem);
    font-weight:    800;
    color:          var(--c-text);
    margin-bottom:  var(--sp-3);
    letter-spacing: -.03em;
}
.section-head p {
    font-size: var(--text-lg);
    color:     var(--c-text-secondary);
    max-width: 540px;
    margin-inline: auto;
}

/* Category grid */
.cat-grid {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   var(--sp-4);
}

.cat-card {
    background:    var(--c-surface);
    border:        1.5px solid var(--c-border);
    border-radius: var(--r-lg);
    padding:       var(--sp-6) var(--sp-4);
    text-align:    center;
    text-decoration: none;
    color:         var(--c-text);
    display:       flex;
    flex-direction: column;
    align-items:   center;
    gap:           var(--sp-2);
    transition:    all var(--t);
    box-shadow:    var(--shadow-xs);
}
.cat-card:hover {
    border-color:  var(--c-primary);
    box-shadow:    0 4px 20px var(--c-primary-dim);
    transform:     translateY(-4px);
    color:         var(--c-primary);
    text-decoration: none;
}
.cat-card-icon  { font-size: 2.25rem; line-height: 1; }
.cat-card-name  { font-size: var(--text-sm); font-weight: 700; }
.cat-card-count { font-size: var(--text-xs); color: var(--c-text-muted); }

/* Featured business cards */
.feat-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap:                   var(--sp-5);
}

.feat-card {
    background:    var(--c-surface);
    border:        1px solid var(--c-border);
    border-radius: var(--r-xl);
    overflow:      hidden;
    text-decoration: none;
    color:         inherit;
    display:       flex;
    flex-direction: column;
    transition:    transform var(--t), box-shadow var(--t), border-color var(--t);
}
.feat-card:hover {
    transform:   translateY(-5px);
    box-shadow:  var(--shadow-lg);
    border-color: var(--c-text-muted);
}

.feat-card-img {
    width:            100%;
    height:           160px;
    object-fit:       cover;
    background:       linear-gradient(135deg, var(--c-primary) 0%, #7c3aed 100%);
    flex-shrink:      0;
}
.feat-card-img-ph {
    width:            100%;
    height:           160px;
    background:       linear-gradient(135deg, var(--c-primary) 0%, #7c3aed 100%);
    display:          flex;
    align-items:      center;
    justify-content:  center;
    font-size:        3rem;
    flex-shrink:      0;
}

.feat-card-body { padding: var(--sp-5); flex: 1; }

.feat-card-cat {
    font-size:      .7rem;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color:          var(--c-primary);
    margin-bottom:  var(--sp-1);
}

.feat-card-name {
    font-size:     var(--text-base);
    font-weight:   700;
    color:         var(--c-text);
    margin-bottom: var(--sp-1);
}

.feat-card-city {
    font-size:     var(--text-xs);
    color:         var(--c-text-muted);
    margin-bottom: var(--sp-4);
    display:       flex;
    align-items:   center;
    gap:           .25rem;
}

.feat-card-footer {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
}

.feat-card-stars { color: #f59e0b; font-size: var(--text-sm); letter-spacing: .05em; }

.feat-card-cta {
    font-size:     .8rem;
    font-weight:   600;
    color:         var(--c-primary);
    background:    var(--c-primary-light);
    padding:       .3rem .7rem;
    border-radius: var(--r-sm);
    transition:    all var(--t-fast);
}
.feat-card:hover .feat-card-cta {
    background: var(--c-primary);
    color:      #fff;
}

/* Steps — cómo funciona */
.steps-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap:                   var(--sp-6);
}

.step-card {
    text-align:    center;
    padding:       var(--sp-8) var(--sp-6);
    border-radius: var(--r-xl);
    border:        1px solid var(--c-border);
    background:    var(--c-surface);
    transition:    border-color var(--t), box-shadow var(--t);
}
.step-card:hover { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-dim); }

.step-num {
    width:           52px; height: 52px;
    border-radius:   var(--r-full);
    background:      linear-gradient(135deg, var(--c-primary), #7c3aed);
    color:           #fff;
    font-size:       var(--text-xl);
    font-weight:     900;
    display:         flex;
    align-items:     center;
    justify-content: center;
    margin:          0 auto var(--sp-5);
    box-shadow:      0 4px 16px rgba(91,91,214,.35);
}

.step-card h3 {
    font-size:     var(--text-lg);
    font-weight:   700;
    margin-bottom: var(--sp-2);
}
.step-card p { font-size: var(--text-sm); color: var(--c-text-secondary); line-height: 1.65; }

/* City pills */
.cities-wrap {
    display:         flex;
    flex-wrap:       wrap;
    gap:             var(--sp-3);
    justify-content: center;
}

.city-pill {
    background:    var(--c-surface);
    border:        1.5px solid var(--c-border);
    border-radius: var(--r-full);
    padding:       .45rem 1.1rem;
    font-size:     var(--text-sm);
    color:         var(--c-text-secondary);
    text-decoration: none;
    transition:    all var(--t-fast);
}
.city-pill:hover {
    border-color: var(--c-primary);
    color:        var(--c-primary);
    background:   var(--c-primary-light);
}

/* CTA block */
.cta-block {
    background:    linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #1e3a5f 100%);
    border-radius: var(--r-xl);
    padding:       clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
    display:       flex;
    align-items:   center;
    justify-content: space-between;
    gap:           var(--sp-10);
    color:         #fff;
    position:      relative;
    overflow:      hidden;
}
.cta-block::before {
    content:  '';
    position: absolute;
    width:    350px; height: 350px;
    top:      -120px; right: -80px;
    background: radial-gradient(circle, rgba(129,140,248,.2) 0%, transparent 70%);
    pointer-events: none;
}

.cta-block h2 {
    font-size:     clamp(1.4rem, 3vw, 1.9rem);
    font-weight:   900;
    color:         #fff;
    margin-bottom: var(--sp-3);
    letter-spacing: -.03em;
}

.cta-block p {
    font-size:     var(--text-base);
    color:         rgba(255,255,255,.75);
    margin-bottom: var(--sp-5);
    line-height:   1.65;
    max-width:     480px;
}

.cta-feats {
    display:  flex;
    flex-wrap: wrap;
    gap:      var(--sp-4) var(--sp-6);
    font-size: var(--text-sm);
    color:    rgba(255,255,255,.7);
}
.cta-feats span::before { content: '✓ '; color: #a5b4fc; font-weight: 700; }

.cta-buttons {
    display:     flex;
    flex-direction: column;
    gap:         var(--sp-3);
    flex-shrink: 0;
}

.btn-cta-primary {
    background:   #fff;
    color:        var(--c-primary);
    border:       none;
    padding:      .85rem 2rem;
    border-radius: var(--r-lg);
    font-size:    var(--text-base);
    font-weight:  700;
    white-space:  nowrap;
    text-decoration: none;
    display:      flex;
    align-items:  center;
    gap:          var(--sp-2);
    justify-content: center;
    transition:   box-shadow var(--t-fast);
}
.btn-cta-primary:hover { box-shadow: 0 6px 20px rgba(0,0,0,.25); color: var(--c-primary); }

.btn-cta-outline {
    background:   transparent;
    color:        rgba(255,255,255,.85);
    border:       1.5px solid rgba(255,255,255,.25);
    padding:      .82rem 2rem;
    border-radius: var(--r-lg);
    font-size:    var(--text-base);
    font-weight:  600;
    white-space:  nowrap;
    text-decoration: none;
    display:      flex;
    align-items:  center;
    justify-content: center;
    transition:   all var(--t-fast);
}
.btn-cta-outline:hover {
    background:   rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.5);
    color:        #fff;
}

/* ─────────────────────────────────────────────────────────────
   26. KEYFRAMES + ANIMATIONS
   ───────────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}

.animate-fade-up { animation: fadeUp .5s ease both; }
.animate-fade-in { animation: fadeIn .4s ease both; }

.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ─────────────────────────────────────────────────────────────
   27. RESPONSIVE
   ───────────────────────────────────────────────────────────── */
/* App layout mobile */
@media (max-width: 900px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.is-open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .topbar-menu-btn { display: flex; }
    .form-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --container: 100%;
        --sp-20: 3.5rem;
        --sp-24: 4rem;
    }

    .container { padding-inline: var(--sp-4); }
    .section   { padding-block: var(--sp-12); }

    /* Hero */
    .hero-search-bar { flex-wrap: wrap; padding: var(--sp-2); }
    .hero-search-field { width: 100%; }
    .hero-search-sep   { display: none; }
    .hero-search-btn   { width: calc(100% - var(--sp-4)); margin: 0 var(--sp-2) var(--sp-2); padding: .8rem; justify-content: center; }

    .hero-stats { gap: var(--sp-6); }

    /* Category grid */
    .cat-grid { grid-template-columns: repeat(3, 1fr); }

    /* Featured */
    .feat-grid { grid-template-columns: 1fr; }

    /* Steps */
    .steps-grid { grid-template-columns: 1fr; }

    /* CTA */
    .cta-block { flex-direction: column; gap: var(--sp-8); }
    .cta-buttons { flex-direction: row; flex-wrap: wrap; }

    /* Footer */
    .footer-inner { grid-template-columns: 1fr; gap: var(--sp-8); padding-block: var(--sp-10); }

    /* Auth */
    .auth-card { padding: var(--sp-8) var(--sp-6); }

    /* Table */
    .tbl-toolbar { flex-direction: column; align-items: flex-start; }
    .search-input { width: 100%; }

    /* Pagination */
    .pagination { flex-direction: column; align-items: flex-start; }

    /* Page header */
    .page-hdr { flex-direction: column; }

    /* Form actions */
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: 1fr; }
    .error-code { font-size: 5rem; }
    .hero-stats { flex-direction: column; gap: var(--sp-4); }
}

/* Print */
@media print {
    .app-sidebar, .app-topbar, .site-header, .site-footer { display: none !important; }
    .app-main { margin-left: 0 !important; }
}
