:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --primary-light: #93C5FD;
    --success: #22c55e;
    --danger: #ef4444;
    --rose: #E11D48;
    --bg: #f1f5f9;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 8px 20px -8px rgba(15, 23, 42, 0.15);
    --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.25);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 60%, #f1f5f9 100%);
    color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.layout { min-height: 100vh; display: flex; flex-direction: column; }

/* Topbar */
.topbar { background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; position: sticky; top: 0; z-index: 50; }
.topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logotype { height: 36px; width: auto; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.topbar-link { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }

/* Language switcher */
.lang-switcher { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.7rem; border: 1px solid var(--border); background: white; border-radius: var(--radius-lg); font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-btn .lang-current-flag { font-size: 1rem; line-height: 1; }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 170px; background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 6px; display: none; z-index: 100; }
.lang-menu.open { display: block; }
.lang-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.55rem 0.75rem; background: none; border: none; border-radius: 8px; text-align: left; font: inherit; font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; }
.lang-item:hover { background: #f3f4f6; color: var(--text); }
.lang-item.active { background: rgba(59, 130, 246, 0.1); color: var(--primary); font-weight: 600; }
@media (max-width: 480px) { .topbar-link { display: none; } }

/* Main */
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; flex: 1; width: 100%; }

/* Hero */
.hero { text-align: center; margin: 1.5rem 0 2.25rem; }
.hero-eyebrow { display: inline-block; padding: 0.4rem 0.85rem; background: rgba(59,130,246,0.1); color: var(--primary); border-radius: 100px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.85rem; }
.hero h1 { font-size: clamp(1.85rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.1; margin-bottom: 0.85rem; letter-spacing: -0.025em; }
.hero p { font-size: 1.05rem; color: var(--text-secondary); max-width: 620px; margin: 0 auto; }

/* Plan toggle */
.plan-toggle { display: inline-flex; padding: 5px; background: white; border: 1px solid var(--border); border-radius: 100px; box-shadow: var(--shadow-sm); margin: 1rem auto; }
.plan-toggle button { padding: 0.55rem 1.5rem; border: none; background: none; border-radius: 100px; font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.plan-toggle button.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.plan-toggle .save-badge { display: inline-block; margin-left: 0.4rem; padding: 0.15rem 0.45rem; background: rgba(16,185,129,0.18); color: #059669; font-size: 0.7rem; font-weight: 700; border-radius: 100px; }
.plan-toggle button.active .save-badge { background: rgba(255,255,255,0.25); color: white; }

/* Plans grid */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 760px; margin: 1.5rem auto 2rem; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan-card { background: white; border: 2px solid var(--border); border-radius: var(--radius-xl); padding: 1.75rem; cursor: pointer; transition: all 0.2s; position: relative; }
.plan-card:hover { border-color: var(--primary-light); transform: translateY(-2px); }
.plan-card.selected { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); }
.plan-card .plan-name { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: 0.5rem; }
.plan-card .plan-price { font-size: 2.4rem; font-weight: 800; color: var(--text); letter-spacing: -0.025em; }
.plan-card .plan-suffix { font-size: 1rem; font-weight: 500; color: var(--text-muted); margin-left: 0.25rem; }
.plan-card .plan-strike { color: var(--text-muted); text-decoration: line-through; font-size: 0.95rem; margin-right: 0.4rem; }
.plan-card .plan-info { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.4rem; }
.plan-card .plan-badge { position: absolute; top: -10px; right: 1rem; padding: 0.25rem 0.7rem; background: var(--success); color: white; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; border-radius: 100px; box-shadow: var(--shadow-sm); }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.85rem; max-width: 760px; margin: 0 auto 2rem; }
.feature { display: flex; align-items: flex-start; gap: 0.55rem; padding: 0.85rem; background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.feature svg { color: var(--success); flex-shrink: 0; margin-top: 2px; }
.feature span { font-size: 0.85rem; color: var(--text); font-weight: 500; }

/* Form card */
.form-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 1.5rem; max-width: 720px; margin: 0 auto; box-shadow: var(--shadow-md); }
.form-card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.4rem; }
.form-card .subtitle { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.4rem; }
.section-title { display: flex; align-items: center; gap: 0.55rem; font-size: 0.95rem; font-weight: 700; color: var(--text); margin: 1.25rem 0 0.85rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.section-title:first-child { padding-top: 0; border-top: none; margin-top: 0; }
.section-title .num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: var(--primary); color: white; border-radius: 50%; font-size: 0.75rem; font-weight: 700; }

.field-row { display: grid; gap: 0.85rem; margin-bottom: 0.85rem; }
.field-row.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .field-row.cols-2 { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.35rem; }
.field input, .field textarea { width: 100%; padding: 0.7rem 0.9rem; border: 1.5px solid var(--border); border-radius: var(--radius-md); font: inherit; font-size: 0.9rem; color: var(--text); background: white; transition: border-color 0.15s; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.field input.is-invalid { border-color: var(--danger); }
.field .hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }

/* Promo input row */
.promo-row { display: flex; gap: 0.5rem; }
.promo-row input { text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, monospace; font-weight: 600; letter-spacing: 0.05em; }
.promo-row button { padding: 0 1rem; border: 1.5px solid var(--border); background: white; color: var(--text-secondary); border-radius: var(--radius-md); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.promo-row button:hover { border-color: var(--primary); color: var(--primary); }
.promo-status { padding: 0.6rem 0.85rem; border-radius: var(--radius-md); font-size: 0.85rem; margin-top: 0.6rem; display: none; align-items: center; gap: 0.5rem; }
.promo-status.success { background: rgba(34,197,94,0.1); color: #15803d; display: flex; }
.promo-status.error { background: rgba(239,68,68,0.1); color: #b91c1c; display: flex; }

/* Slot picker */
.slot-picker { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.85rem; margin-top: 0.5rem; }
.slot-picker .picker-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
@media (max-width: 600px) { .slot-picker .picker-row { grid-template-columns: 1fr; } }
.slot-picker select, .slot-picker input { width: 100%; padding: 0.6rem 0.8rem; border: 1.5px solid var(--border); border-radius: var(--radius-md); font: inherit; font-size: 0.85rem; background: white; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.4rem; margin-top: 0.6rem; }
.slot-btn { padding: 0.55rem 0.4rem; border: 1.5px solid var(--border); background: white; border-radius: var(--radius-md); font: inherit; font-size: 0.825rem; font-weight: 600; color: var(--text); cursor: pointer; }
.slot-btn:hover { border-color: var(--primary); color: var(--primary); }
.slot-btn.selected { background: var(--primary); color: white; border-color: var(--primary); }

/* Total + actions */
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 1.1rem 0; border-top: 1px solid var(--border); margin-top: 1.25rem; }
.total-row .label { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); }
.total-row .amount { font-size: 1.85rem; font-weight: 800; color: var(--text); letter-spacing: -0.025em; }
.total-row .amount-strike { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; margin-right: 0.5rem; }
.total-row .amount-suffix { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-left: 0.3rem; }

.actions { display: flex; flex-direction: column; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.5rem; border-radius: var(--radius-lg); font: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.15s; border: none; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 8px 16px -8px rgba(59,130,246,0.45); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(59,130,246,0.5); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.legal { font-size: 0.75rem; color: var(--text-muted); text-align: center; }

/* Alerts */
.alert { display: none; align-items: flex-start; gap: 0.6rem; padding: 0.85rem 1rem; border-radius: var(--radius-md); font-size: 0.875rem; margin-bottom: 1.25rem; }
.alert-error { background: rgba(239,68,68,0.1); color: #b91c1c; border: 1px solid rgba(239,68,68,0.25); }
.alert-success { background: rgba(34,197,94,0.1); color: #15803d; border: 1px solid rgba(34,197,94,0.25); }

/* Footer */
.footer { padding: 1.5rem; text-align: center; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); background: rgba(255,255,255,0.6); }

/* Success page */
.success-state { text-align: center; padding: 1.5rem; }
.success-state .icon { width: 84px; height: 84px; background: rgba(34,197,94,0.15); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--success); margin-bottom: 1rem; }
.success-state .icon svg { width: 44px; height: 44px; }
.success-state h2 { font-size: 1.65rem; font-weight: 800; margin-bottom: 0.5rem; }
.success-state p { color: var(--text-secondary); max-width: 480px; margin: 0 auto 1.25rem; }
