/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

.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;
}
button { font: inherit; }

:root {
    --color-bg: #0f1115;
    --color-surface: #171a21;
    --color-surface-raised: #1f232c;
    --color-border: #2a2f3a;
    --color-text: #eef0f4;
    --color-text-muted: #9aa1b0;
    --color-primary: #6d5bff;
    --color-primary-hover: #5a49e6;
    --color-success: #33c481;
    --color-warning: #e8a33d;
    --color-danger: #e5484d;
    --radius: 10px;
    --container-width: 1080px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}
/* Every section rule below that shares an element with .container (e.g.
   <section class="how-it-works container">) must set padding-top/
   padding-bottom as separate longhand declarations, never a `padding:
   Xpx 0 Ypx` shorthand — a 3-value (or 2-value) shorthand also sets
   left/right to 0, silently overriding this rule's 20px side padding
   since it's a same-specificity, later-in-source declaration. On
   desktop this is masked by .container's own centering margin; on
   mobile, where .container spans the full viewport width, it puts
   content flush against the screen edges. Found live on
   .how-it-works and fixed everywhere else it had already happened
   (docs/LANDING-PAGE-MOBILE-PLAN.md). */

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
a { color: var(--color-primary); }

/* ---------- Navbar ---------- */
.navbar {
    border-bottom: 1px solid var(--color-border);
    position: relative; /* anchors .navbar__links' collapsed dropdown below 720px */
}
.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}
.navbar__brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-text);
}
.navbar__brand svg {
    /* 1em ties the icon directly to .navbar__brand's own font-size
       (currently 1.2rem), matching the wordmark's height exactly and
       staying in sync automatically if that font-size ever changes. */
    width: 1em;
    height: 1em;
    color: var(--color-primary);
    flex-shrink: 0;
}
.navbar__links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.navbar__links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}
.navbar__links a:hover { color: var(--color-text); }
.navbar__links a.navbar__cta {
    color: #fff;
    background: var(--color-primary);
    padding: 8px 16px;
    border-radius: var(--radius);
}
.navbar__links a.navbar__cta:hover { background: var(--color-primary-hover); }

.navbar__toggle {
    display: none; /* shown only below 720px, see the responsive block */
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px; /* close to the standard ~44px minimum touch target, not just the icon's own footprint */
    height: 40px;
    padding: 0 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}
.navbar__toggle:hover { background: var(--color-surface-raised); }
.navbar__toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(2) { opacity: 0; }
.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 720px) {
    .navbar__toggle { display: flex; }
    .navbar__links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 20px 20px;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
    }
    .navbar__links.is-open { display: flex; }
    .navbar__links a {
        padding: 10px 0;
        font-size: 1rem;
        border-bottom: 1px solid var(--color-border);
    }
    .navbar__links a:last-child { border-bottom: none; }
    .navbar__links a.navbar__cta {
        margin-top: 8px;
        padding: 12px 16px;
        text-align: center;
        border-bottom: none;
    }
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--color-border);
    margin-top: 64px;
}
.footer__inner {
    padding: 24px 20px;
}
.footer__inner p {
    font-size: 0.85rem;
    margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}
.btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.btn--primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.btn--block { width: 100%; }
.btn--secondary {
    background: var(--color-surface-raised);
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn--secondary:hover:not(:disabled) { border-color: var(--color-primary); }
.btn--danger {
    background: transparent;
    color: var(--color-danger);
    border-color: var(--color-danger);
}
.btn--danger:hover:not(:disabled) { background: var(--color-danger); color: #fff; }

/* ---------- Cards ---------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
}

/* ---------- Hero ---------- */
.hero { padding: 96px 0 64px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.hero__subtitle {
    max-width: 620px;
    margin: 0 auto 32px;
    font-size: 1.1rem;
}
.hero__cta-hint {
    margin-top: 12px;
    font-size: 0.85rem;
}

/* ---------- Landing page ---------- */
.landing-hero__actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.landing-flow {
    position: relative;
    width: 360px;
    height: 160px;
    margin: 40px auto 0;
}
.landing-flow__path { position: absolute; inset: 0; width: 100%; height: 100%; }
.landing-flow__line { stroke: var(--color-border); stroke-width: 1.5; stroke-dasharray: 3 6; }
.landing-flow__dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    offset-path: path("M 30 40 C 150 40, 210 120, 330 120");
    offset-distance: 0%;
    animation: landing-flow-travel 4.5s linear infinite;
}
.landing-flow__dot--2 { animation-delay: 1.1s; opacity: 0.7; }
.landing-flow__dot--3 { animation-delay: 2.3s; opacity: 0.45; }
@keyframes landing-flow-travel {
    from { offset-distance: 0%; }
    to { offset-distance: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .landing-flow__dot { animation: none; offset-distance: 45%; }
}
.landing-flow__pill {
    position: absolute;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}
.landing-flow__pill--source { top: 24px; left: 0; }
.landing-flow__pill--dest { bottom: 8px; right: 0; }

.trust-strip { padding-top: 8px; padding-bottom: 56px; text-align: center; }
.trust-strip__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}
.trust-strip__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.trust-strip__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
}

.features { padding-top: 32px; padding-bottom: 72px; }
.features h2 { text-align: center; max-width: 560px; margin: 0 auto 40px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature p { margin: 0; font-size: 0.92rem; }

.pricing-teaser { padding-top: 32px; padding-bottom: 72px; text-align: center; }
.pricing-teaser h2 { margin-bottom: 8px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.pricing-teaser .pricing-grid { margin: 32px auto 24px; }
.pricing-teaser__link { font-weight: 600; }

.final-cta { text-align: center; padding-top: 32px; padding-bottom: 96px; }
.final-cta h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.final-cta p { margin: 12px 0 28px; }

@media (max-width: 720px) {
    .features__grid { grid-template-columns: 1fr; }
    .hero { padding: 56px 0 40px; }
    /* Below 360px-wide, .landing-flow itself is narrower than the SVG
       line's own 360x160 viewBox, which scales to fit via
       preserveAspectRatio="none" — but the dots' offset-path is fixed
       CSS-pixel coordinates from that same 360x160 space and doesn't
       scale with the container, so they'd visibly drift off the line.
       Hiding the dots (not the line/pills, which scale fine) avoids
       that rather than chasing exact offset-path scaling. */
    .landing-flow { width: 100%; max-width: 360px; height: 100px; margin-top: 24px; }
    .landing-flow__dot { display: none; }
}

/* ---------- Service selector ---------- */
.selectors {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 64px;
}
.selectors__arrow {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    padding-top: 52px;
}
.service-selector__heading {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 16px;
}
.service-selector__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.service-card:hover { border-color: var(--color-primary); }
.service-card.is-selected {
    border-color: var(--color-primary);
    background: var(--color-surface-raised);
    box-shadow: 0 0 0 1px var(--color-primary) inset;
}
.service-card__name { font-weight: 600; }
.service-card__badge {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    background: var(--color-surface-raised);
    border-radius: 999px;
    padding: 2px 8px;
}
.service-card__badge--active { color: var(--color-success); }

/* ---------- How it works ---------- */
.how-it-works { padding-top: 32px; padding-bottom: 64px; }
.how-it-works h2 { text-align: center; margin-bottom: 40px; }
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.steps__item h3 { font-size: 1.05rem; }
.steps__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* ---------- Status note ---------- */
.status-note { padding-bottom: 96px; }
.status-note .card p { margin: 0; color: var(--color-text); }

/* ---------- Toasts ---------- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}
.toast {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.9rem;
    max-width: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    animation: toast-in 0.15s ease;
}
.toast--success { border-color: var(--color-success); }
.toast--error { border-color: var(--color-danger); }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Auth forms ---------- */
.auth-page { padding-top: 64px; padding-bottom: 64px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.5rem; }
.auth-card form { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.auth-card label { font-size: 0.85rem; font-weight: 600; margin-top: 10px; }
.auth-card input {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--color-text);
    font-size: 0.95rem;
}
.auth-card input:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.auth-card button { margin-top: 18px; }
.auth-card__footer { margin-top: 20px; font-size: 0.9rem; text-align: center; }
.auth-card__divider { color: var(--color-text-muted); font-size: 0.8rem; text-align: center; margin: 16px 0; }
.auth-card .btn--google { margin-top: 0; }
.form-optional { color: var(--color-text-muted); font-weight: 400; }
.form-error { color: var(--color-danger); font-size: 0.85rem; margin: 2px 0 0; }
.form-success { color: var(--color-success); font-size: 0.9rem; }

/* ---------- Plain forms outside the auth card (e.g. Last.fm connect) ---------- */
.connect-form { max-width: 420px; display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.connect-form label { font-size: 0.85rem; font-weight: 600; margin-top: 10px; }
.connect-form input, .connect-form select {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--color-text);
    font-size: 0.95rem;
}
.connect-form input:focus, .connect-form select:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }

/* ---------- Connections & playlists ---------- */
.connections-page { padding-top: 48px; padding-bottom: 96px; }
.connections-page h1 { margin-bottom: 4px; }
.connection-list, .playlist-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.connection-card, .playlist-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.connection-card h3, .playlist-card h3 { margin-bottom: 2px; font-size: 1rem; }
.connection-card__status { margin: 0; font-size: 0.85rem; }
.connection-card__actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.connection-card__actions form { margin: 0; }
.connection-card__actions .btn { width: 100%; }
.playlist-card__image {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.playlist-card p { margin: 0; font-size: 0.85rem; }
.playlist-card--selectable {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}
.playlist-card--selectable input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}
.playlist-card--selectable:has(input:checked) {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary) inset;
}

/* ---------- Track table ---------- */
.track-table-wrap { overflow-x: auto; margin-top: 24px; }
.track-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.track-table th {
    text-align: left;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
}
.track-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
.track-table tbody tr:hover { background: var(--color-surface); }

/* ---------- Transfer form & status ---------- */
.transfer-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 20px 0 32px;
    flex-wrap: wrap;
}
.transfer-form label { font-size: 0.8rem; color: var(--color-text-muted); display: block; margin-bottom: 4px; }
.transfer-form select, .transfer-form input {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--color-text);
}
.transfer-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.transfer-summary div {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}
.transfer-summary strong { display: block; font-size: 1.4rem; }
.transfer-summary span { font-size: 0.78rem; color: var(--color-text-muted); }
.inline-form { display: inline-flex; gap: 6px; margin: 0; }
.inline-form .btn { padding: 6px 12px; font-size: 0.82rem; }
.inline-form .btn.is-active { border-color: var(--color-primary); color: var(--color-primary); }

/* ---------- Wizard shell ---------- */
.wizard-page { padding-top: 48px; padding-bottom: 96px; max-width: 720px; margin: 0 auto; }
.wizard-page .selectors { margin-bottom: 32px; }
.wizard-page > h1 { margin-top: 24px; }
.wizard-prompt { text-align: center; padding: 40px 24px; }
.wizard-prompt h1 { margin-bottom: 8px; }
.wizard-prompt .btn { margin-top: 16px; }
.wizard-done-actions { display: flex; gap: 12px; margin-top: 28px; }

/* ---------- Step indicator ---------- */
.step-indicator {
    display: flex;
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    counter-reset: step;
}
.step-indicator__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    text-align: center;
}
.step-indicator__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    background: var(--color-border);
}
.step-indicator__item.is-done:not(:last-child)::after { background: var(--color-primary); }
.step-indicator__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 1;
}
.step-indicator__item.is-current .step-indicator__dot { border-color: var(--color-primary); color: var(--color-primary); }
.step-indicator__item.is-done .step-indicator__dot { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.step-indicator__label { font-size: 0.75rem; color: var(--color-text-muted); }
.step-indicator__item.is-current .step-indicator__label { color: var(--color-text); font-weight: 600; }

/* ---------- Progress bar ---------- */
.progress-block { margin: 24px 0; }
.progress-block__label { font-size: 0.9rem; margin-bottom: 8px; }
.progress-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
}
.progress-bar__fill {
    height: 100%;
    background: var(--color-primary);
    transition: width 0.4s ease;
}
.progress-bar__label { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 6px; }

/* ---------- Track match rows (review step) ---------- */
.track-match-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.track-match-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 16px;
}
.track-match-row__info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.track-match-row__info strong { font-size: 0.95rem; }
.track-match-row__info span { font-size: 0.82rem; color: var(--color-text-muted); }
.track-match-row__confidence { font-size: 0.8rem; color: var(--color-text-muted); white-space: nowrap; }

/* ---------- Static (non-interactive) service cards ---------- */
.planned-services { padding-bottom: 48px; }
.service-card--static { cursor: default; opacity: 0.75; }
.service-card--static:hover { border-color: var(--color-border); }

/* ---------- File import & export ---------- */
.import-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 480px;
    margin-top: 20px;
}
.import-form label { font-size: 0.85rem; font-weight: 600; margin-top: 12px; }
.import-form input, .import-form select, .import-form textarea {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.9rem;
}
.import-form__or { color: var(--color-text-muted); font-size: 0.8rem; text-align: center; margin: 8px 0 0; }
.import-form__hint { color: var(--color-text-muted); font-size: 0.8rem; margin: 4px 0 0; }
.export-links { font-size: 0.9rem; }
.export-links a { margin-right: 10px; }

/* ---------- Admin dashboard ---------- */
.navbar--admin { background: var(--color-surface); }
.admin-dashboard { padding-top: 40px; padding-bottom: 96px; }
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 24px 0 40px;
}
.admin-stat { text-align: center; }
.admin-stat strong { display: block; font-size: 1.6rem; }
.admin-stat span { font-size: 0.78rem; color: var(--color-text-muted); }
.admin-stat--ok { color: var(--color-success); }
.admin-stat--bad { color: var(--color-danger); }
.admin-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 24px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--color-border); }
.admin-table th { color: var(--color-text-muted); font-size: 0.78rem; text-transform: uppercase; }
.admin-table--full { display: block; overflow-x: auto; white-space: nowrap; }
.admin-event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-event {
    font-size: 0.85rem;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--color-surface);
    border-left: 3px solid var(--color-border);
}
.admin-event--warning { border-left-color: var(--color-warning); }
.admin-event--error { border-left-color: var(--color-danger); }
.admin-event__category { text-transform: uppercase; font-size: 0.7rem; color: var(--color-text-muted); margin-right: 6px; }
.admin-event__time { display: block; font-size: 0.72rem; color: var(--color-text-muted); margin-top: 2px; }

/* ---------- Import history (library page) ---------- */
.history-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--color-surface);
    border-left: 3px solid var(--color-success);
}
.history-item--failed { border-left-color: var(--color-danger); }
.history-item__source { font-weight: 600; }
.history-item__status { font-size: 0.78rem; color: var(--color-text-muted); }
.history-item--failed .history-item__status { color: var(--color-danger); }
.history-item__time { font-size: 0.78rem; color: var(--color-text-muted); white-space: nowrap; }

@media (max-width: 720px) {
    .admin-columns { grid-template-columns: 1fr; }
}

/* ---------- Plan summary & pricing ---------- */
.plan-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}
.plan-summary p { margin: 4px 0 0; font-size: 0.85rem; }
.pricing-page { padding-top: 56px; padding-bottom: 96px; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
    max-width: 640px;
}
.pricing-card { text-align: center; }
.pricing-card h2 { margin-bottom: 4px; }
.pricing-card__price { font-size: 1.6rem; font-weight: 700; color: var(--color-text); margin-bottom: 16px; }
.pricing-card__features { list-style: none; padding: 0; margin: 0 0 20px; font-size: 0.9rem; }
.pricing-card__features li { padding: 6px 0; border-top: 1px solid var(--color-border); }
.pricing-card__features li:first-child { border-top: none; }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.modal__message { margin: 0 0 20px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Error page ---------- */
.error-page { padding-top: 96px; padding-bottom: 96px; text-align: center; }
.error-page h1 { font-size: 3rem; }
.error-page__debug {
    text-align: left;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 32px;
    overflow-x: auto;
    font-size: 0.8rem;
    color: var(--color-danger);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .selectors { grid-template-columns: 1fr; }
    .selectors__arrow { display: none; }
    .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .service-selector__grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}
