@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --ink: #1A1B2E;
    --ink-soft: #4A4B63;
    --brand: #5B4FE8;
    --brand-dark: #4338CA;
    --brand-tint: #EEEDFC;
    --coral: #FF7A59;
    --coral-tint: #FFE9E2;
    --success: #1FAE7A;
    --success-tint: #E3F7EE;
    --warn: #B8860B;
    --warn-tint: #FDF3D9;
    --error: #E0483E;
    --error-tint: #FBE6E4;
    --surface: #FAFAFC;
    --card: #FFFFFF;
    --border: #E4E3F0;
    --radius: 16px;
    --shadow: 0 2px 8px rgba(26, 27, 46, 0.04), 0 8px 24px rgba(26, 27, 46, 0.06);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--surface);
    background-image:
        radial-gradient(circle at 8% 8%, var(--brand-tint) 0%, transparent 32%),
        radial-gradient(circle at 95% 25%, var(--coral-tint) 0%, transparent 28%);
    background-attachment: fixed;
    color: var(--ink);
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
    font-family: 'Sora', 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

/* ---------- Shell / layout ---------- */
.shell { max-width: 700px; margin: 0 auto; padding: 28px 20px 80px; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 17px;
}

.brand .mark {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), #8B7FF5);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.userchip { display: flex; align-items: center; gap: 10px; }
.userchip img { width: 30px; height: 30px; border-radius: 50%; }
.userchip .name { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
a.logout {
    color: var(--ink-soft); font-size: 13px; text-decoration: none;
    padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
    transition: all .15s;
}
a.logout:hover { background: var(--card); border-color: var(--brand); color: var(--brand); }

/* ---------- Stepper (chat-thread motif) ---------- */
.stepper {
    display: flex;
    margin-bottom: 32px;
    padding: 0 4px;
}
.step-track {
    display: flex; align-items: center; flex: 1;
}
.step-dot {
    width: 30px; height: 30px;
    border-radius: 50% 50% 50% 4px;
    background: var(--card);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--ink-soft);
    flex-shrink: 0;
    transition: all .2s;
}
.step-dot.done { background: var(--success); border-color: var(--success); color: white; }
.step-dot.active { background: var(--brand); border-color: var(--brand); color: white; box-shadow: 0 0 0 4px var(--brand-tint); }
.step-line {
    flex: 1; height: 2px; background: var(--border);
    margin: 0 6px;
    background-image: linear-gradient(90deg, var(--border) 50%, transparent 50%);
    background-size: 8px 2px;
}
.step-line.done { background-image: none; background-color: var(--success); }
.step-label {
    font-size: 11px; font-weight: 600; color: var(--ink-soft);
    text-align: center; margin-top: 6px; max-width: 90px;
}

/* ---------- Cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.card-head {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 20px;
}
.card-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--brand-tint);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.card-icon.coral { background: var(--coral-tint); }
.card-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; margin: 0 0 3px; }
.card-sub { font-size: 13px; color: var(--ink-soft); margin: 0; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 13px; margin: 16px 0 6px; color: var(--ink); }
label:first-child { margin-top: 0; }
input[type=text], input:not([type]), textarea, input[type=file] {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 14px; font-family: inherit; color: var(--ink);
    background: var(--surface);
    transition: border-color .15s;
}
input:focus, textarea:focus {
    outline: none; border-color: var(--brand); background: white;
}
textarea { min-height: 76px; resize: vertical; }
.field-hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }

/* ---------- Buttons ---------- */
button, .btn {
    font-family: inherit; font-size: 14px; font-weight: 600;
    border: none; border-radius: 10px; padding: 11px 20px;
    cursor: pointer; transition: transform .1s, opacity .15s;
}
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary, button:not(.secondary):not(.ghost) {
    background: var(--brand); color: white;
    box-shadow: 0 2px 8px rgba(91, 79, 232, 0.28);
}
button.primary:hover:not(:disabled), button:not(.secondary):not(.ghost):hover:not(:disabled) { background: var(--brand-dark); }
button.secondary {
    background: white; color: var(--ink); border: 1.5px solid var(--border);
}
button.secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
button.ghost {
    background: transparent; color: var(--brand); padding: 6px 10px;
}
button:active:not(:disabled) { transform: scale(0.98); }

/* ---------- Status pills ---------- */
.status { padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.status.connected { background: var(--success-tint); color: #0F6E4C; }
.status.pending { background: var(--warn-tint); color: #8A6300; }
.status.error { background: var(--error-tint); color: #A83229; }

img.qr {
    width: 220px; height: 220px; display: block; margin: 18px auto;
    border-radius: 12px; border: 1px solid var(--border); padding: 10px; background: white;
}

/* ---------- Help panel ---------- */
.help-toggle {
    position: fixed; bottom: 24px; right: 24px;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--brand); color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(91, 79, 232, 0.4);
    cursor: pointer; z-index: 50; border: none;
}
.help-panel {
    position: fixed; inset: 0; background: rgba(26,27,46,0.45);
    display: none; align-items: center; justify-content: center; z-index: 60;
    padding: 20px;
}
.help-panel.open { display: flex; }
.help-sheet {
    background: white; border-radius: 20px; max-width: 560px; width: 100%;
    max-height: 85vh; overflow-y: auto; padding: 32px;
}
.help-sheet h2 { margin-top: 0; }
.guide-step { display: flex; gap: 16px; margin-bottom: 24px; }
.guide-step:last-child { margin-bottom: 0; }
.guide-icon {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-tint);
}
.guide-icon.coral { background: var(--coral-tint); }
.guide-icon.green { background: var(--success-tint); }
.guide-body h4 { margin: 2px 0 6px; font-size: 14.5px; }
.guide-body p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.help-close { float: right; background: var(--surface); border-radius: 50%; width: 32px; height: 32px; padding: 0; color: var(--ink-soft); }

/* ---------- Login page ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
    background: var(--card); border-radius: 24px; padding: 48px 40px;
    box-shadow: var(--shadow); text-align: center; max-width: 380px; width: 100%;
    border: 1px solid var(--border); position: relative;
}
.login-back {
    position: absolute; top: 18px; left: 20px;
    font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
    text-decoration: none;
}
.login-back:hover { color: var(--brand); }
.login-mark {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--brand), var(--coral));
    display: flex; align-items: center; justify-content: center;
}
.login-card h1 { font-size: 22px; margin: 0 0 8px; }
.login-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 28px; }

@media (max-width: 480px) {
    .shell { padding: 20px 14px 80px; }
    .card { padding: 20px; }
}

/* ---------- Landing page ---------- */
.lp-nav {
    max-width: 1080px; margin: 0 auto; padding: 20px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.lp-nav .btn-cta {
    background: var(--brand); color: white; padding: 10px 20px; border-radius: 999px;
    text-decoration: none; font-weight: 600; font-size: 14px;
    box-shadow: 0 2px 8px rgba(91,79,232,.28);
}

.lp-hero {
    max-width: 780px; margin: 0 auto; padding: 60px 24px 40px; text-align: center;
}

.lp-hero-split {
    max-width: 1080px; margin: 0 auto; padding: 40px 24px 20px;
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center;
}
.lp-hero-text { text-align: left; }
.lp-hero-text .lp-cta-row { justify-content: flex-start; }
.lp-hero-visual { display: flex; justify-content: center; }
.lp-robot { width: 100%; max-width: 340px; }
.lp-hero-mock-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px 40px; }
.lp-hero-mock-wrap .lp-mock { max-width: 480px; margin: 0 auto; }

@media (max-width: 860px) {
    .lp-hero-split { grid-template-columns: 1fr; text-align: center; }
    .lp-hero-text { text-align: center; }
    .lp-hero-text .lp-cta-row { justify-content: center; }
    .lp-hero-visual { order: -1; }
}
.lp-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--brand-tint); color: var(--brand-dark);
    font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
    margin-bottom: 20px;
}
.lp-hero h1 {
    font-size: clamp(30px, 5vw, 46px); line-height: 1.15; margin: 0 0 18px;
}
.lp-hero h1 .accent { color: var(--brand); }
.lp-hero .lead {
    font-size: 17px; color: var(--ink-soft); max-width: 560px; margin: 0 auto 30px;
}
.lp-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-btn-primary {
    background: var(--brand); color: white; padding: 14px 28px; border-radius: 12px;
    text-decoration: none; font-weight: 700; font-size: 15.5px;
    box-shadow: 0 4px 16px rgba(91,79,232,.32);
    display: inline-flex; align-items: center; gap: 8px;
}
.lp-btn-secondary {
    background: white; color: var(--ink); padding: 14px 24px; border-radius: 12px;
    text-decoration: none; font-weight: 600; font-size: 15px; border: 1.5px solid var(--border);
}
.lp-hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 14px; }

.lp-mock {
    max-width: 620px; margin: 48px auto 0; background: var(--card);
    border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow);
    padding: 22px; text-align: left;
}
.lp-mock-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.lp-mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.lp-bubble { max-width: 78%; padding: 11px 15px; border-radius: 14px; font-size: 13.5px; margin-bottom: 10px; line-height: 1.4; }
.lp-bubble.them { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.lp-bubble.me { background: var(--brand); color: white; margin-left: auto; border-bottom-right-radius: 4px; }

.lp-section { max-width: 1080px; margin: 0 auto; padding: 70px 24px; }
.lp-section-head { text-align: center; max-width: 560px; margin: 0 auto 44px; }
.lp-section-head h2 { font-size: 28px; margin: 0 0 10px; }
.lp-section-head p { color: var(--ink-soft); font-size: 15px; margin: 0; }

.lp-features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.lp-feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.lp-feature-icon {
    width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.lp-feature-icon.coral { background: var(--coral-tint); }
.lp-feature-icon.green { background: var(--success-tint); }
.lp-feature h3 { font-size: 15.5px; margin: 0 0 8px; }
.lp-feature p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

.lp-steps-band { background: var(--ink); border-radius: 28px; padding: 56px 40px; color: white; }
.lp-steps-band .lp-section-head h2, .lp-steps-band .lp-section-head p { color: white; }
.lp-steps-band .lp-section-head p { color: rgba(255,255,255,.65); }
.lp-step-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.lp-step { text-align: left; }
.lp-step .num {
    width: 34px; height: 34px; border-radius: 50% 50% 50% 4px;
    background: var(--brand); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; margin-bottom: 14px;
}
.lp-step h4 { font-size: 15px; margin: 0 0 6px; }
.lp-step p { font-size: 13px; color: rgba(255,255,255,.65); margin: 0; line-height: 1.55; }

.lp-final-cta { text-align: center; padding: 70px 24px 90px; }
.lp-final-cta h2 { font-size: 26px; margin: 0 0 10px; }
.lp-final-cta p { color: var(--ink-soft); margin: 0 0 26px; }

.lp-pricing {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.lp-price-card {
    position: relative;
    border-radius: var(--radius);
    padding: 30px 26px; display: flex; flex-direction: column;
    border: 2px solid transparent;
}
.lp-price-card .badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: #1FAE7A; color: white; font-size: 10.5px; font-weight: 700;
    padding: 5px 14px; border-radius: 999px; white-space: nowrap; letter-spacing: .03em;
    box-shadow: 0 4px 10px rgba(31,174,122,.35);
}
.lp-price-card h3 { font-size: 17px; margin: 0 0 4px; font-family: 'Sora', sans-serif; }
.lp-price-card .note { font-size: 13px; margin: 0 0 16px; opacity: .8; min-height: 18px; }
.lp-price-card .amount { font-family: 'Sora', sans-serif; font-size: 32px; font-weight: 800; margin-bottom: 2px; }
.lp-price-card .per { font-size: 13px; margin-bottom: 20px; opacity: .8; }
.lp-price-card ul { list-style: none; padding: 0; margin: 20px 0 0; }
.lp-price-card li { font-size: 13px; padding: 5px 0; display: flex; gap: 8px; opacity: .85; }
.lp-price-card li::before { content: "✓"; font-weight: 700; }

.lp-price-btn {
    display: block; text-align: center; padding: 12px 20px; border-radius: 10px;
    font-weight: 700; font-size: 14.5px; text-decoration: none; color: white;
}

.tier-blue { background: #EAF2FE; }
.tier-blue h3, .tier-blue .amount { color: #1D4ED8; }
.tier-blue .lp-price-btn { background: #2E7CE4; }

.tier-green { background: #E9FBF2; border-color: #1FAE7A; box-shadow: 0 8px 28px rgba(31,174,122,.16); }
.tier-green h3, .tier-green .amount { color: #0F6E4C; }
.tier-green .lp-price-btn { background: #1FAE7A; }

.tier-gold { background: #FFF7E6; }
.tier-gold h3, .tier-gold .amount { color: #B8860B; }
.tier-gold .lp-price-btn { background: #E0A100; }

.tier-dark { background: #1B1830; }
.tier-dark h3, .tier-dark .amount { color: white; }
.tier-dark .note, .tier-dark .per, .tier-dark li { color: rgba(255,255,255,.75); }
.tier-dark li::before { color: #8B7FF5; }
.tier-dark .lp-price-btn { background: linear-gradient(135deg,#8B7FF5,#5B4FE8); }
.lp-price-card .lp-btn-primary, .lp-price-card .lp-btn-secondary { justify-content: center; width: 100%; }

.lp-footer {
    text-align: center; padding: 28px 24px; color: var(--ink-soft); font-size: 12.5px;
    border-top: 1px solid var(--border);
}
