/* Smart Orders v3.2 — Premium Design System */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root,[data-theme="light"]{
  --bg:#e8ecf3;
  --bg-card:rgba(255,255,255,0.92);
  --bg-card-solid:#fff;
  --glass:rgba(255,255,255,0.6);
  --glass-strong:rgba(255,255,255,0.8);
  --text:#0f172a;
  --text-sec:#475569;
  --text-muted:#94a3b8;
  --border:rgba(0,0,0,0.06);
  --border-hover:rgba(59,130,246,0.25);
  --primary:#3b6df0;
  --primary-hover:#2b5cd6;
  --primary-soft:rgba(59,109,240,0.07);
  --accent:#6366f1;
  --success:#10b981;
  --warning:#f59e0b;
  --danger:#ef4444;
  --shadow-sm:0 1px 3px rgba(0,0,0,0.04);
  --shadow-md:0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg:0 12px 48px rgba(0,0,0,0.08);
  --r-xl:28px;--r-lg:22px;--r-md:14px;--r-sm:10px;--r-pill:999px;
  --nav-h:72px;
}

[data-theme="dark"]{
  --bg:#0c0f17;--bg-card:rgba(22,27,45,0.8);--bg-card-solid:#161b2d;
  --glass:rgba(30,35,55,0.65);--glass-strong:rgba(35,42,65,0.75);
  --text:#e8ecf4;--text-sec:#a0aec0;--text-muted:#5a6578;
  --border:rgba(255,255,255,0.06);--border-hover:rgba(99,102,241,0.3);
  --primary:#6366f1;--primary-hover:#818cf8;--primary-soft:rgba(99,102,241,0.1);
  --shadow-sm:0 1px 3px rgba(0,0,0,0.2);--shadow-md:0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg:0 12px 48px rgba(0,0,0,0.4);
}

html{font-size:15px;-webkit-font-smoothing:antialiased}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--text);min-height:100vh;padding-top:calc(var(--nav-h) + 16px)}
a{color:var(--primary);text-decoration:none}

/* ── Navbar (reference style) ── */
.navbar{position:fixed;top:12px;left:50%;transform:translateX(-50%);width:min(96%,1200px);height:var(--nav-h);background:var(--bg-card);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border-radius:var(--r-xl);border:1px solid var(--border);box-shadow:var(--shadow-md);display:flex;align-items:center;padding:0 24px;z-index:100;transition:all .3s}
.nav-brand{display:flex;align-items:center;gap:12px;margin-right:auto}
.nav-logo{width:44px;height:44px;background:var(--primary);border-radius:14px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:18px}
.nav-title{font-size:17px;font-weight:700;line-height:1.2}
.nav-title small{display:block;font-size:11px;font-weight:500;color:var(--text-muted);letter-spacing:1.5px;text-transform:uppercase}
.nav-tabs{display:flex;gap:6px;margin:0 auto}
.nav-tab{width:46px;height:46px;border-radius:14px;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:20px;cursor:pointer;transition:all .2s;border:none;background:transparent;text-decoration:none}
.nav-tab:hover{background:var(--primary-soft);color:var(--primary)}
.nav-tab.active{background:var(--primary-soft);color:var(--primary);box-shadow:0 0 0 1.5px rgba(59,109,240,0.15)}
.nav-right{display:flex;align-items:center;gap:12px;margin-left:auto}
.nav-bell{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:18px;color:var(--text-muted);cursor:pointer;position:relative}
.nav-avatar{width:40px;height:40px;border-radius:12px;overflow:hidden;background:linear-gradient(135deg,var(--primary),var(--accent));display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;font-size:14px}
.nav-avatar img{width:100%;height:100%;object-fit:cover}

/* ── Layout ── */
.container{max-width:1080px;margin:0 auto;padding:0 16px}

/* ── Cards (reference: huge radius, subtle border) ── */
.card{background:var(--bg-card-solid);border:1px solid var(--border);border-radius:var(--r-xl);padding:28px 32px;box-shadow:var(--shadow-sm);margin-bottom:16px;transition:box-shadow .2s}

/* ── Order Card (reference layout) ── */
.order-card{background:var(--bg-card-solid);border:1px solid var(--border);border-radius:var(--r-xl);padding:24px 28px;margin-bottom:14px;transition:all .25s}
.order-card:hover{box-shadow:var(--shadow-md)}
.oc-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px}
.oc-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.oc-cat{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:1px;color:var(--text-muted);background:var(--primary-soft);padding:4px 10px;border-radius:var(--r-pill)}
.oc-region{font-size:11px;color:var(--text-muted);display:flex;align-items:center;gap:4px}
.oc-price{text-align:right}
.oc-price-val{font-size:24px;font-weight:800;color:var(--text);line-height:1.1}
.oc-price-time{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;margin-top:2px}
.oc-title{font-size:18px;font-weight:700;line-height:1.35;margin-bottom:8px;color:var(--text)}
.oc-text{font-size:13.5px;color:var(--text-sec);line-height:1.6;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
.oc-text.expanded{-webkit-line-clamp:unset;overflow:visible}
.oc-expand{background:none;border:none;color:var(--primary);font-size:12px;font-weight:500;cursor:pointer;padding:4px 0;margin-top:4px}
.oc-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.oc-tag{font-size:11px;color:var(--primary);font-weight:500}
.oc-footer{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}
.oc-btn-hide{font-size:13px;font-weight:600;color:var(--text-muted);background:none;border:none;cursor:pointer;letter-spacing:.5px;text-transform:uppercase;padding:8px 16px;transition:color .2s}
.oc-btn-hide:hover{color:var(--text)}
.oc-btn-open{font-size:13px;font-weight:600;color:#fff;background:var(--text);border:none;border-radius:var(--r-pill);padding:10px 24px;cursor:pointer;letter-spacing:.5px;text-transform:uppercase;display:flex;align-items:center;gap:6px;transition:all .2s}
.oc-btn-open:hover{background:var(--primary);transform:translateY(-1px)}
.oc-fat{font-size:11px;font-weight:700;padding:3px 8px;border-radius:var(--r-pill);background:rgba(16,185,129,0.1);color:#059669}
.oc-fat-mid{background:rgba(245,158,11,0.1);color:#d97706}
.oc-fat-low{background:rgba(239,68,68,0.08);color:#dc2626}

/* new order pulse */
.order-new{border-left:3px solid var(--primary);animation:newPulse 2s ease-in-out infinite}
@keyframes newPulse{0%,100%{border-left-color:var(--primary)}50%{border-left-color:transparent}}

/* ── Filter Card ── */
.filter-card{background:var(--bg-card-solid);border:1px solid var(--border);border-radius:var(--r-lg);padding:16px 20px;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;transition:all .2s}
.filter-card:hover{box-shadow:var(--shadow-sm)}
.filter-active{border-left:3px solid var(--primary)}
.filter-inactive{opacity:.65}
.filter-info h4{font-size:15px;font-weight:600}
.filter-info p{font-size:12px;color:var(--text-muted);margin-top:2px}
.filter-actions{display:flex;gap:6px}

/* ── Stat Cards (reference: 3 KPI) ── */
.stats-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin-bottom:16px}
.stat-card{background:var(--bg-card-solid);border:1px solid var(--border);border-radius:var(--r-lg);padding:22px 24px;display:flex;align-items:center;justify-content:space-between}
.stat-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:1.5px;color:var(--text-muted);margin-bottom:4px}
.stat-value{font-size:28px;font-weight:800;color:var(--text)}
.stat-change{font-size:12px;font-weight:600;color:var(--success)}
.stat-icon{width:48px;height:48px;border-radius:14px;background:var(--primary-soft);display:flex;align-items:center;justify-content:center;font-size:22px;color:var(--primary)}

/* ── Forms ── */
.form-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;color:var(--primary);margin-bottom:8px;display:block}
.form-control{width:100%;padding:14px 18px;border:1.5px solid var(--border);border-radius:var(--r-md);font-size:14px;background:var(--bg-card-solid);color:var(--text);outline:none;transition:border .2s}
.form-control:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}
.form-control::placeholder{color:var(--text-muted)}
.form-hint{font-size:11.5px;color:var(--text-muted);margin-top:5px}
textarea.form-control{min-height:90px;resize:vertical}

/* ── Category Grid (2 columns like reference) ── */
.cat-grid-2col{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media(max-width:768px){.cat-grid-2col{grid-template-columns:1fr}}
.cat-group-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;color:var(--primary);margin:16px 0 8px;opacity:.7}
.cat-chips{display:flex;flex-wrap:wrap;gap:6px}
.cat-chip{display:inline-flex;align-items:center;gap:4px;padding:8px 16px;border-radius:var(--r-pill);border:1.5px solid var(--border);font-size:13px;font-weight:500;color:var(--text-sec);cursor:pointer;transition:all .2s;background:var(--bg-card-solid);user-select:none}
.cat-chip:hover{border-color:var(--border-hover);color:var(--primary)}
.cat-chip.selected{background:var(--primary-soft);border-color:var(--primary);color:var(--primary);font-weight:600}
.cat-chip input{display:none}

/* ── Buttons ── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:600;border:none;cursor:pointer;transition:all .2s;font-family:inherit}
.btn-primary{background:var(--text);color:#fff;border-radius:var(--r-pill);padding:14px 32px;font-size:14px;letter-spacing:.5px;text-transform:uppercase}
.btn-primary:hover{background:var(--primary);transform:translateY(-1px);box-shadow:var(--shadow-md)}
.btn-secondary{background:transparent;color:var(--text-sec);border:1.5px solid var(--border);border-radius:var(--r-pill);padding:10px 20px;font-size:13px}
.btn-secondary:hover{border-color:var(--border-hover);color:var(--primary)}
.btn-sm{padding:8px 16px;font-size:12px;border-radius:var(--r-pill)}
.btn-danger{background:rgba(239,68,68,0.08);color:var(--danger);border:none;border-radius:12px;padding:8px 12px}
.btn-danger:hover{background:rgba(239,68,68,0.15)}

/* ── Tabs ── */
.tabs{display:flex;gap:4px}
.tab{padding:8px 16px;border-radius:var(--r-pill);font-size:13px;font-weight:500;border:none;background:transparent;color:var(--text-muted);cursor:pointer;transition:all .2s}
.tab.active{background:var(--primary-soft);color:var(--primary);font-weight:600}

/* ── Badges ── */
.badge{display:inline-flex;padding:3px 10px;border-radius:var(--r-pill);font-size:10px;font-weight:600}
.badge-live{background:#ef4444;color:#fff;animation:livePulse 2s infinite}
@keyframes livePulse{0%,100%{opacity:1}50%{opacity:.6}}

/* ── Switch ── */
.switch{position:relative;display:inline-block;width:44px;height:24px}
.switch input{opacity:0;width:0;height:0}
.switch-slider{position:absolute;inset:0;background:var(--border);border-radius:24px;transition:.25s;cursor:pointer}
.switch-slider::before{content:'';position:absolute;width:18px;height:18px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.25s;box-shadow:0 1px 3px rgba(0,0,0,0.15)}
.switch input:checked+.switch-slider{background:var(--primary)}
.switch input:checked+.switch-slider::before{transform:translateX(20px)}

/* ── Empty State ── */
.empty-state{text-align:center;padding:48px 20px}
.empty-state h3{font-size:20px;font-weight:700;margin-bottom:8px}
.empty-state p{color:var(--text-muted);margin-bottom:16px}

/* ── Page Header ── */
.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;flex-wrap:wrap;gap:12px}
.page-title{font-size:24px;font-weight:800;line-height:1.2}

/* ── Toast ── */
.toast-container{position:fixed;top:90px;right:16px;z-index:999;display:flex;flex-direction:column;gap:8px}
.toast{padding:12px 20px;border-radius:var(--r-md);font-size:13px;font-weight:500;animation:toastIn .3s;color:#fff}
.toast-success{background:#059669}
.toast-error{background:#dc2626}
.toast-info{background:var(--primary)}
@keyframes toastIn{from{opacity:0;transform:translateX(60px)}to{opacity:1;transform:translateX(0)}}

/* ── Autocomplete ── */
.ac-wrap{position:relative}
.ac-dropdown{position:absolute;top:100%;left:0;right:0;z-index:50;background:var(--bg-card-solid);border:1px solid var(--border);border-radius:var(--r-md);box-shadow:var(--shadow-lg);max-height:220px;overflow-y:auto;display:none}
.ac-dropdown.open{display:block}
.ac-item{padding:10px 16px;font-size:13px;cursor:pointer;transition:background .15s;display:flex;align-items:center;gap:8px}
.ac-item:hover,.ac-item.ac-active{background:var(--primary-soft);color:var(--primary)}

/* ── Coming Soon ── */
.coming-soon{background:var(--bg-card-solid);border:1px solid var(--border);border-radius:var(--r-xl);padding:16px 24px;margin-bottom:16px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.coming-soon h4{font-size:12px;font-weight:700;color:var(--primary);text-transform:uppercase;letter-spacing:1px;white-space:nowrap}
.cs-chips{display:flex;flex-wrap:wrap;gap:6px}
.cs-chip{padding:5px 12px;border-radius:var(--r-pill);font-size:11px;font-weight:500;background:var(--primary-soft);color:var(--text-sec);border:1px solid var(--border)}

/* ── Support ── */
.support-block{text-align:center;padding:20px;font-size:12.5px;color:var(--text-muted)}
.support-block a{color:var(--primary);font-weight:600}

/* ── Chart bar ── */
.chart-bar{flex:1;background:linear-gradient(to top,var(--primary),var(--accent));border-radius:4px 4px 0 0;min-height:4px;transition:height .3s}

/* ── Responsive ── */
@media(max-width:768px){
  .navbar{top:0;border-radius:0;width:100%;padding:0 12px}
  body{padding-top:calc(var(--nav-h) + 8px)}
  .container{padding:0 10px}
  .card,.order-card{border-radius:var(--r-lg);padding:18px}
  .oc-title{font-size:15px}
  .oc-price-val{font-size:18px}
  .nav-title small{display:none}
  .stats-row{grid-template-columns:1fr}
  .cat-grid-2col{grid-template-columns:1fr}

  /* Mobile: actions row must not overflow */
  .oc-footer{flex-wrap:wrap;justify-content:flex-start;gap:10px}
  .oc-footer > div[style*="margin-left:auto"]{margin-left:0 !important; width:100%; justify-content:flex-end; flex-wrap:wrap}
  .oc-btn-open{width:auto;flex:1 1 auto;min-width:170px}
}

/* Hide hashtag tags block if any old markup still outputs it */
.oc-tags{display:none !important;}

/* ── Theme transition ── */
.theme-transition,.theme-transition *{transition:background .3s,color .3s,border-color .3s !important}

/* ═══════════════════════════════════════════════════════
   PREMIUM FILTERS STYLES — Added 2026-02-24
   ═══════════════════════════════════════════════════════ */

/* ─── Premium Container ─── */
.premium-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ─── Premium Teaser ─── */
.premium-teaser {
    max-width: 1160px;
    margin: 0 auto 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.teaser-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.teaser-content h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.teaser-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.teaser-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: white;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.teaser-chip:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.04);
}

/* ─── Section Header ─── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
}

/* ─── Premium Buttons ─── */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 6px;
}

.btn-premium-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.btn-premium-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-premium-secondary {
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-premium-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-premium-lg {
    padding: 14px 28px;
    font-size: 15px;
}

/* ─── Filters Grid ─── */
.filters-grid {
    display: grid;
    gap: 16px;
}

/* ─── Premium Filter Card ─── */
.filter-card-premium {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.25s ease;
}

.filter-card-premium:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.filter-card-premium.is-active {
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.02) 0%, white 100%);
}

.filter-card-premium.is-paused {
    opacity: 0.7;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.filter-name {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.filter-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-condition-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #475569;
}

.condition-icon {
    font-size: 14px;
}

.filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* ─── Premium Toggle ─── */
.premium-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.premium-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.premium-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.premium-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

/* ─── Icon Buttons ─── */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.btn-icon:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-icon-danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* ─── Empty State ─── */
.empty-state-premium {
    text-align: center;
    padding: 80px 24px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-premium h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.empty-state-premium p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px 0;
}

/* ─── Support Block ─── */
.support-block-premium {
    max-width: 1160px;
    margin: 32px auto 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fff 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    text-align: center;
}

.support-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #78350f;
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f59e0b;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.support-link:hover {
    color: #d97706;
    gap: 8px;
}

/* ═══════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════ */


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
    overflow-y: hidden;
}

.modal-overlay.active {
    display: flex;
}


.modal-premium {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    position: relative;
    animation: slideUp 0.3s ease;
}


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

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


.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}


.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}


.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}



.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}


/* ─── Form Fields ─── */
.form-field {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.required {
    color: #dc2626;
}

.field-input, .field-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #0f172a;
    background: white;
    transition: all 0.2s ease;
    font-family: inherit;
}

.field-input:focus, .field-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.field-input::placeholder {
    color: #94a3b8;
}

.field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

/* ─── Autocomplete ─── */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    max-height: 240px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    transition: background 0.15s ease;
}

.autocomplete-item:hover {
    background: #f8fafc;
}

/* ─── Category Search ─── */
.category-search-wrapper {
    margin-bottom: 16px;
}

/* ─── Category Groups ─── */
.category-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: min(400px, 50vh);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px;
}

.category-group {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.category-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    transition: all 0.2s ease;
}

.category-group-header:hover {
    background: #f1f5f9;
}

.group-chevron {
    transition: transform 0.3s ease;
    color: #94a3b8;
}

.category-group.expanded .group-chevron {
    transform: rotate(180deg);
}

.category-group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-group.expanded .category-group-content {
    max-height: 1000px;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
}

.category-chip {
    cursor: pointer;
    user-select: none;
}

.category-chip input[type="checkbox"] {
    display: none;
}

.chip-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
}

.category-chip:hover .chip-content {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.category-chip input[type="checkbox"]:checked + .chip-content {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: transparent;
    color: white;
}

/* ─── Show More Button ─── */
.show-more-btn {
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #6366f1;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background: rgba(99, 102, 241, 0.05);
}

.hidden-categories {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 16px;
}

.show-more-btn.expanded .show-more-text::after {
    content: ' ▲';
}

.show-more-btn.expanded .hidden-categories {
    display: flex;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .premium-container {
        padding: 16px 12px;
    }
    .section-title {
        font-size: 24px;
    }
    .modal-premium {
        max-width: 100%;
        max-height: calc(100vh - 16px);
        border-radius: 20px 20px 0 0;
        margin: auto auto 0 auto;
    }
    .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 20px 16px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .category-groups {
        max-height: min(300px, 40vh);
    }
    .premium-teaser {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* Prevent body scroll when modal open */
body.modal-open {
    overflow: hidden;
}
