/* ══════════════════════════════════════════════════════════════════════
   Getting in — sign up, your account, connect channels, sign in.

   A split screen: the brand panel on the left, the task on the right.
   The task side is built from the app's own tokens (see app.css), so light
   and dark follow the theme with no extra rules. The brand panel is
   black-green with mint in both themes, as the brand guidelines set out.
   Everything is prefixed `su-`.
   ══════════════════════════════════════════════════════════════════════ */

.su {
    display: grid;
    grid-template-columns: minmax(340px, 40%) 1fr;
    min-height: 100vh;
    background: var(--bg-page);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-pri);
}

/* ── Brand panel ───────────────────────────────────────────────────── */
.su-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 48px 56px;
    color: #fff;
    background: #022c22;
    overflow: hidden;
    position: sticky;      /* stays put while the task scrolls */
    top: 0;
    height: 100vh;
}
.su-brand { display: inline-flex; align-self: flex-start; }
.su-brand img { display: block; width: 190px; height: auto; }
.su-aside-body { max-width: 440px; }
.su-aside h2 {
    margin: 0 0 20px;
    font: 800 clamp(32px, 3.4vw, 48px)/1.1 'Manrope', sans-serif;
    letter-spacing: -.02em;
    color: #fff;
}
.su-aside-lead { margin: 0; font-size: 18px; line-height: 1.55; color: #d1fae5; }
.su-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 18px; }
.su-points li { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.su-points .su-point-icon { flex: none; display: flex; color: #6ee7b7; }
.su-points strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.su-points span.su-point-text { color: #a7f3d0; }
.su-aside-foot { font-size: 13px; color: #a7f3d0; }

/* ── Task panel ────────────────────────────────────────────────────── */
.su-main { display: flex; flex-direction: column; min-width: 0; padding: 26px clamp(20px, 5vw, 64px) 40px; }
.su-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.su-top-right { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 13px; color: var(--text-sec); }
.su-top-right a { color: var(--color-primary-text); font-weight: 600; text-decoration: none; }
.su-top-right a:hover { text-decoration: underline; }

.su-stage { flex: 1; display: grid; place-items: center; padding-top: 28px; }
.su-card {
    width: 100%; max-width: 600px;
    padding: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}
.su-main:not(:has(.su-stepper)) .su-card { max-width: 480px; }
/* The channel step lays its own cards straight on the page. */
.su-card.wide { max-width: 680px; padding: 0; background: none; border: 0; }
@keyframes su-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Stepper ───────────────────────────────────────────────────────── */
.su-stepper { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.su-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-sec); white-space: nowrap; }
.su-step + .su-step::before {
    content: ""; display: block; width: clamp(18px, 4vw, 40px); height: 2px; margin: 0 4px 0 12px;
    background: var(--border); border-radius: 2px; transition: background .3s;
}
.su-step.done + .su-step::before { background: var(--color-primary); }
.su-step-dot {
    display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    font-size: 13px; font-weight: 600; color: var(--text-sec);
    background: var(--bg-surface); border: 1.5px solid var(--text-ph);
    transition: all .25s;
}
.su-step.active { color: var(--text-pri); font-weight: 600; }
.su-step.active .su-step-dot { color: var(--text-on-primary); background: var(--color-primary); border-color: var(--color-primary); }
.su-step.done .su-step-dot { color: var(--color-primary-text); background: var(--color-secondary); border-color: var(--color-secondary); }

/* ── Headings and copy ─────────────────────────────────────────────── */
.su-title { margin: 0 0 8px; font: 800 32px/1.2 'Manrope', sans-serif; letter-spacing: -.02em; color: var(--text-pri); }
.su-sub { margin: 0 0 28px; font-size: 15px; line-height: 1.55; color: var(--text-sec); }

/* ── Form ──────────────────────────────────────────────────────────── */
.su-form { display: grid; gap: 22px; }
.su-field { display: grid; gap: 8px; }
.su-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text-pri); }
.su-input {
    display: flex; align-items: center; gap: 10px;
    height: 48px; padding: 0 14px;
    background: var(--bg-surface); border: 1.5px solid var(--text-ph); border-radius: 10px;
    color: var(--text-muted);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.su-input:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-glow); }
.su-input input {
    flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
    font: 400 15px 'Inter', sans-serif; color: var(--text-pri);
}
.su-input input::placeholder { color: var(--text-ph); }
.su-field.invalid .su-input { border-color: var(--color-danger); background: var(--color-danger-bg); }
.su-field.invalid .su-input:focus-within { box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }
.su-help { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-sec); }
.su-err { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--color-danger); }
.su-err a { color: inherit; text-decoration: underline; }
.su-addr { display: inline-block; vertical-align: bottom; font-weight: 600; color: var(--color-primary-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-icon-btn { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.su-icon-btn:hover { background: var(--bg-hover); color: var(--text-pri); }

/* password strength */
.su-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.su-meter i { height: 4px; border-radius: 4px; background: var(--border); transition: background .2s; }
.su-meter.s1 i:nth-child(-n+1) { background: var(--color-danger); }
.su-meter.s2 i:nth-child(-n+2) { background: var(--color-warning); }
.su-meter.s3 i:nth-child(-n+3) { background: #34d399; }
.su-meter.s4 i { background: var(--color-success); }
.su-meter-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* ── Choice cards (radio-style) ───────────────────────────────────── */
.su-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.su-choice {
    position: relative; display: grid; gap: 10px; align-content: start; text-align: left;
    padding: 14px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--text-pri);
    background: var(--bg-surface); border: 1.5px solid var(--border);
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.su-choice:hover { border-color: var(--color-primary); }
.su-choice:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--color-primary-glow); border-color: var(--color-primary); }
.su-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.su-choice:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-light); box-shadow: inset 0 0 0 1px var(--color-primary); }
.su-choice-icon { display: flex; color: var(--color-primary); }
.su-choice strong { font-size: 13px; font-weight: 600; line-height: 1.35; }
.su-choice-check {
    position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
    background: var(--color-primary); color: var(--text-on-primary); opacity: 0; transform: scale(.6); transition: all .15s;
}
.su-choice:has(input:checked) .su-choice-check { opacity: 1; transform: none; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.su-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.su-actions-split .su-btn.primary { flex: 1 1 220px; }
.su-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 28px; border-radius: 10px; border: 1.5px solid transparent;
    font: 600 15px 'Inter', sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: box-shadow .15s, background .15s, border-color .15s, opacity .15s;
}
.su-btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--color-primary-glow); }
.su-btn.primary { color: var(--text-on-primary); background: var(--color-primary); }
.su-btn.primary:hover:not(:disabled) { color: var(--text-on-primary); background: var(--color-primary-hover); }
.su-btn.secondary { color: var(--color-primary-text); background: var(--bg-surface); border-color: var(--color-primary); }
.su-btn.secondary:hover:not(:disabled) { color: var(--color-primary-text); background: var(--color-primary-light); }
.su-btn.small { height: 44px; padding: 0 18px; font-size: 14px; }
.su-btn:disabled { opacity: .6; cursor: not-allowed; }
.su-spin { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--color-primary); animation: su-spin .7s linear infinite; }
.su-btn .su-spin { border-color: color-mix(in srgb, currentColor 35%, transparent); border-top-color: currentColor; }
@keyframes su-spin { to { transform: rotate(360deg); } }
.su-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 4px; border: 0; background: none; font: 600 15px 'Inter', sans-serif; color: var(--color-primary-text); cursor: pointer; text-decoration: none; }
.su-link:hover { text-decoration: underline; }

.su-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 20px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-pri); background: var(--color-danger-bg); border: 1px solid rgba(239, 68, 68, .5); }
.su-alert .material-symbols-rounded { color: var(--color-danger); }
.su-note { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 10px; font-size: 13px; color: var(--text-sec); background: var(--bg-elevated); border: 1px solid var(--border); }

/* ── Channels ──────────────────────────────────────────────────────── */
.su-channels { display: grid; gap: 16px; margin-bottom: 26px; }
.su-channel {
    display: grid; gap: 14px; padding: 22px; border-radius: 16px;
    background: var(--bg-surface); border: 1.5px solid var(--border);
    transition: border-color .2s, box-shadow .2s;
}
.su-channel.connected { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); }
.su-channel-head { display: flex; align-items: center; gap: 14px; }
.su-channel-tile { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; color: var(--color-primary); background: var(--color-primary-light); }
.su-channel-meta { flex: 1; min-width: 0; display: grid; gap: 3px; }
.su-channel-meta h2 { margin: 0; font: 700 18px/1.3 'Manrope', sans-serif; color: var(--text-pri); }
.su-channel-meta span { font-size: 14px; line-height: 1.4; color: var(--text-sec); }
.su-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text-sec); background: var(--bg-elevated); border: 1px solid var(--border); }
.su-pill.ok { color: var(--text-on-primary); background: var(--color-primary); border-color: var(--color-primary); }
.su-pill.warn { color: var(--text-pri); background: var(--color-warning-bg); border-color: var(--color-warning); }
.su-channel-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.su-channel-foot p { margin: 0; font-size: 13px; color: var(--text-sec); }
.su-panel { padding: 16px; border-radius: 12px; background: var(--bg-elevated); border: 1px solid var(--border); }
.su-panel .wa-panel-actions { margin-top: 14px; background: var(--bg-elevated); }

.su-finish { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 6px; }

/* A quiet line under a card: a way out, never a distraction. */
.su-foot { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--text-sec); }
.su-foot a { color: var(--color-primary-text); font-weight: 600; text-decoration: none; }
.su-foot a:hover { text-decoration: underline; }

/* Too short to show the whole panel: keep the brand and the footer, drop the bullets. */
@media (max-height: 700px) {
    .su-points { display: none; }
}

/* ── Small screens ─────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .su { grid-template-columns: 1fr; align-content: start; }
    .su-aside { position: static; height: auto; padding: 20px 24px; }
    .su-brand img { width: 150px; }
    .su-aside-body, .su-aside-foot { display: none; }
    .su-main { padding: 18px 20px 36px; }
    .su-card { padding: 26px 20px; }
    .su-card.wide { padding: 0; }
    .su-title { font-size: 28px; }
    .su-step span.su-step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .su-step.active span.su-step-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@media (max-width: 600px) {
    .su-choices { grid-template-columns: 1fr; }
    .su-choice { grid-template-columns: auto 1fr; align-items: center; min-height: 52px; padding-right: 44px; }
    .su-choice-check { top: 50%; margin-top: -10px; }
    /* The status pill drops below the text instead of squeezing it. */
    .su-channel-head { flex-wrap: wrap; }
    .su-channel-meta { flex-basis: 190px; }
}

@media (prefers-reduced-motion: reduce) {
    .su-btn, .su-choice, .su-step-dot, .su-channel, .su-input, .su-meter i { animation: none; transition: none; }
    .su-spin { animation-duration: 2.4s; }
}

/* A step's content eases in each time it changes (keyed in the page). */
.su-anim { animation: su-in .3s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) { .su-anim { animation: none; } }
