/* ═══════════════════════════════════════════════════════════════════════════
   ananas.codes Onboarding Platform
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
    --c-bg:          #f5f5f7;
    --c-surface:     #ffffff;
    --c-surface-alt: #fafafa;
    --c-border:      #d2d2d7;
    --c-border-lt:   #e8e8ed;
    --c-text:        #1d1d1f;
    --c-text-2:      #6e6e73;
    --c-text-3:      #aeaeb2;
    --c-success:     #34c759;
    --c-success-bg:  #f0faf3;
    --c-warning:     #ff9f0a;
    --c-warn-bg:     #fff8ec;
    --c-error:       #ff3b30;
    --c-error-bg:    #fff2f1;
    --c-muted-bg:    #f2f2f7;

    --p-primary:  #0071e3;
    --p-hover:    #005ec4;
    --p-light:    #e8f0fe;
    --p-text:     #ffffff;

    --font:  -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --mono:  "SF Mono", "Fira Code", Menlo, monospace;

    --r-sm:  8px;
    --r:    12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --sh-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --sh:    0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.05);
    --sh-lg: 0 8px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
    --t:    .18s ease;
}

/* ── Product Themes ──────────────────────────────────────────────────────── */
[data-product="james"] { --p-primary:#f9b03d; --p-hover:#e09a28; --p-light:#fef6e7; }
[data-product="fabi"]  { --p-primary:#49ad63; --p-hover:#3a9451; --p-light:#eaf7ee; }
[data-product="conni"] { --p-primary:#E21954; --p-hover:#c8154a; --p-light:#fde8ef; }

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header {
    background: rgba(255,255,255,.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--c-border-lt);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 1.5rem;
}
.header-inner {
    max-width: 800px;
    margin: 0 auto;
    min-height: 80px;
    padding: .75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: var(--c-text);
}
.brand-logo {
    height: 60px;
    width: auto;
    display: block;
    object-fit: contain;
}
.wizard-product-logo {
    height: 32px;
    width: auto;
    display: block;
    object-fit: contain;
}
.brand-name {
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--c-text-2);
}
.header-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* Product badge in header */
.product-badge {
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: -.01em;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--p-light);
    color: var(--p-primary);
}
.product-logo {
    display: block;
    object-fit: contain;
    height: 28px;
    width: auto;
}

/* Lang switcher */
.lang-switcher { display: flex; align-items: center; gap: 2px; }
.lang-btn {
    font-size: .75rem;
    font-weight: 600;
    color: var(--c-text-2);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all var(--t);
}
.lang-btn:hover { color: var(--c-text); background: var(--c-muted-bg); }
.lang-btn.lang-active { color: var(--p-primary); background: var(--p-light); }


/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.landing-body { background: #f5f5f7; }
.landing-main { flex: 1; padding: 0 1.5rem 5rem; }

/* Hero */
.landing-hero {
    text-align: center;
    padding: 4rem 1rem 2.5rem;
    max-width: 620px;
    margin: 0 auto;
}
.landing-lock-icon {
    width: 56px; height: 56px;
    background: #fff;
    border: 1.5px solid #e8e8ed;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    color: #1d1d1f;
}
.landing-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.035em;
    color: var(--c-text);
    margin-bottom: .875rem;
    line-height: 1.2;
}
.landing-subtitle {
    font-size: .9375rem;
    color: var(--c-text-2);
    line-height: 1.7;
    max-width: 540px;
    margin: 0 auto;
}

/* Trust badges */
.landing-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .625rem;
    margin-top: 1.75rem;
}
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .75rem;
    font-weight: 600;
    color: #3a3a3c;
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 100px;
    padding: 5px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.trust-badge svg { color: #34c759; flex-shrink: 0; }

/* Section title */
.landing-products { max-width: 900px; margin: 0 auto 2.5rem; }
.landing-section-title {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--c-text-3);
    margin-bottom: 1rem;
    padding-left: .25rem;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.product-card {
    background: #fff;
    border: 1.5px solid #e8e8ed;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--p-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,.11);
    border-color: var(--p-primary);
}
.product-card:hover::before { transform: scaleX(1); }

.product-card-inner {
    padding: 1.625rem;
    display: flex;
    flex-direction: column;
    gap: .875rem;
    flex: 1;
}

/* Logo: colored box for initials, transparent for images */
.product-logo-wrap {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--p-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.product-logo-wrap--img {
    background: transparent;
    border: none;
    width: auto; height: auto;
    border-radius: 0;
    align-items: flex-start;
}
.product-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    display: block;
}
.product-initial {
    font-size: 1.375rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.02em;
}
.product-card-body { flex: 1; min-height: 0; }
.product-name {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--c-text);
    margin-bottom: .375rem;
}
.product-desc {
    font-size: .875rem;
    color: var(--c-text-2);
    line-height: 1.55;
}
.product-card-cta {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--p-primary);
    display: block;
}

/* Help section */
.landing-help {
    max-width: 900px;
    margin: 0 auto;
}
.landing-help-inner {
    background: #fff;
    border: 1.5px solid #e8e8ed;
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.landing-help-icon {
    width: 44px; height: 44px;
    background: #f5f5f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #3a3a3c;
}
.landing-help-body { flex: 1; }
.landing-help-body strong { font-size: .9375rem; color: var(--c-text); display: block; margin-bottom: .25rem; }
.landing-help-body p { font-size: .875rem; color: var(--c-text-2); line-height: 1.5; margin: 0; }
@media (max-width: 560px) {
    .landing-help-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .landing-help-inner .btn { align-self: stretch; text-align: center; justify-content: center; }
    .landing-trust { gap: .5rem; }
    .landing-title { font-size: 1.625rem; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   WIZARD PROGRESS STEPPER
   ═══════════════════════════════════════════════════════════════════════════ */
.wizard-progress {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--c-border-lt);
    background: var(--c-surface);
}
.stepper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 0;
}
.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .375rem;
    flex: 1;
    position: relative;
    cursor: default;
}
/* connector line between dots */
.stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: calc(50% + 17px);
    right: calc(-50% + 17px);
    height: 1.5px;
    background: var(--c-border);
    transition: background .3s;
}
.stepper-item.done:not(:last-child)::after { background: var(--p-primary); }

/* dot (used by JS for data-step, toggles .active/.done) */
.step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--c-border);
    background: var(--c-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--c-text-3);
    transition: all .2s ease;
    position: relative;
    z-index: 1;
}
.step-dot.done {
    background: var(--p-primary);
    border-color: var(--p-primary);
    color: transparent;
}
.step-dot.done::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 5.5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px,-1px);
}
.step-dot.active {
    background: var(--p-primary);
    border-color: var(--p-primary);
    color: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-primary) 18%, transparent);
}
.stepper-label {
    font-size: .625rem;
    font-weight: 500;
    color: var(--c-text-3);
    text-align: center;
    letter-spacing: .01em;
    line-height: 1.3;
    transition: color .2s;
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stepper-item.active .stepper-label { color: var(--p-primary); font-weight: 600; }
.stepper-item.done .stepper-label   { color: var(--c-text-2); }


/* ═══════════════════════════════════════════════════════════════════════════
   WIZARD MAIN + STEPS
   ═══════════════════════════════════════════════════════════════════════════ */
.wizard-main {
    flex: 1;
    padding: 2rem 1.5rem 4rem;
}
.wizard-container {
    max-width: 640px;
    margin: 0 auto;
}

/* Hide all steps by default; show only .active */
.wizard-step {
    display: none;
}
.wizard-step.active {
    display: block;
    animation: fadeUp .25s ease;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* The white card wrapping each step */
.step-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-xl);
    box-shadow: var(--sh);
    padding: 2rem 2rem 1.75rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--c-text);
    margin-bottom: .5rem;
}
.step-subtitle {
    font-size: .9375rem;
    color: var(--c-text-2);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group:last-of-type { margin-bottom: 0; }

label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    color: var(--c-text);
    margin-bottom: .4rem;
}
.req-star { color: var(--c-error); margin-left: 1px; }
.optional { color: var(--c-text-3); font-weight: 400; }

.form-control {
    width: 100%;
    padding: 10px 13px;
    font-family: var(--font);
    font-size: .9375rem;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-sm);
    transition: border-color var(--t), box-shadow var(--t);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.form-control::placeholder { color: var(--c-text-3); }
.form-control:hover  { border-color: #b0b0b8; }
.form-control:focus  {
    border-color: var(--p-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-primary) 14%, transparent);
}
.form-control.error {
    border-color: var(--c-error);
    box-shadow: 0 0 0 3px rgba(255,59,48,.10);
}
textarea.form-control { min-height: 88px; resize: vertical; }
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e6e73' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.hint-text {
    font-size: .8125rem;
    color: var(--c-text-2);
    line-height: 1.5;
    margin-top: .75rem;
    margin-bottom: .25rem;
}
.field-error {
    font-size: .8125rem;
    color: var(--c-error);
    margin-top: .35rem;
}
.field-hint {
    font-size: .75rem;
    color: var(--c-text-3);
    margin-top: .25rem;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SYSTEM SELECTION CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.systems-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: .75rem;
}
.system-col-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--c-text-3);
    margin-bottom: .625rem;
}
.system-cards { display: flex; flex-direction: column; gap: .5rem; }

.system-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .875rem 1rem;
    border: 1.5px solid var(--c-border);
    border-radius: var(--r);
    background: var(--c-surface);
    cursor: pointer;
    transition: border-color var(--t), background var(--t), box-shadow var(--t);
    position: relative;
    user-select: none;
}
.system-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.system-card:hover {
    border-color: var(--p-primary);
    background: var(--p-light);
}
.system-card:has(input:checked) {
    border-color: var(--p-primary);
    background: var(--p-light);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-primary) 12%, transparent);
}
.system-card.disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}
.system-card-body { flex: 1; min-width: 0; }
.system-name {
    display: block;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.3;
}
.system-desc {
    display: block;
    font-size: .78125rem;
    color: var(--c-text-2);
    margin-top: 2px;
    line-height: 1.4;
}

/* Custom radio dot */
.system-card-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--c-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t);
}
.system-card:has(input:checked) .system-card-check {
    border-color: var(--p-primary);
    background: var(--p-primary);
}
.system-card:has(input:checked) .system-card-check::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
}


/* ═══════════════════════════════════════════════════════════════════════════
   DATA TYPE CARDS (built by JS)
   ═══════════════════════════════════════════════════════════════════════════ */
.dt-card {
    border: 1.5px solid var(--c-border-lt);
    border-radius: var(--r);
    background: var(--c-surface);
    margin-bottom: .625rem;
    overflow: hidden;
    transition: border-color var(--t);
}
.dt-card.dt-unavailable { opacity: .55; }

.dt-card-header {
    display: flex;
    align-items: center;
    padding: .875rem 1.125rem;
    gap: .75rem;
}

.dt-toggle {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    cursor: pointer;
}
.dt-toggle.disabled { cursor: not-allowed; }
.dt-checkbox { display: none; }

/* Toggle switch — .dt-switch is injected by JS right after .dt-checkbox */
.dt-switch {
    width: 34px;
    height: 21px;
    min-width: 34px;
    background: var(--c-border);
    border-radius: 100px;
    position: relative;
    transition: background var(--t);
    flex-shrink: 0;
    cursor: pointer;
}
.dt-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transition: transform var(--t);
}
/* checkbox:checked is immediately before .dt-switch */
.dt-checkbox:checked + .dt-switch { background: var(--p-primary); }
.dt-checkbox:checked + .dt-switch::after { transform: translateX(13px); }

.dt-toggle-label {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--c-text);
}

.dt-badge {
    font-size: .6875rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 100px;
    white-space: nowrap;
}
.dt-badge.coming-soon  { background: var(--c-warn-bg); color: #7a4a00; border: 1px solid rgba(255,159,10,.25); }
.dt-badge.unavailable  { background: var(--c-muted-bg); color: var(--c-text-3); border: 1px solid var(--c-border); }
.dt-badge--core        { background: color-mix(in srgb, var(--p-primary) 12%, transparent); color: var(--p-primary); border: 1px solid color-mix(in srgb, var(--p-primary) 25%, transparent); }
.dt-toggle--locked     { cursor: default; opacity: .85; }

.dt-desc {
    font-size: .8125rem;
    color: var(--c-text-2);
    line-height: 1.5;
    padding: 0 1.125rem .875rem;
}

.dt-direction-wrap {
    border-top: 1px solid var(--c-border-lt);
    padding: .875rem 1.125rem 1rem;
}
.dt-direction-label {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--c-text-2);
    margin-bottom: .625rem;
}
.dt-direction-options { display: flex; flex-direction: column; gap: .5rem; }

.dir-option {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .625rem .875rem;
    border: 1.5px solid var(--c-border-lt);
    border-radius: var(--r-sm);
    background: var(--c-surface-alt);
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    color: var(--c-text);
    transition: all var(--t);
}
.dir-option:hover { border-color: var(--p-primary); background: var(--p-light); }
.dir-option input[type="radio"] { display: none; }
.dir-option:has(input:checked) {
    border-color: var(--p-primary);
    background: var(--p-light);
    color: var(--p-primary);
}

.dt-dir-error { font-size: .8125rem; color: var(--c-error); margin-top: .375rem; }


/* ═══════════════════════════════════════════════════════════════════════════
   CONFIG / CREDENTIALS STEP (built by JS)
   ═══════════════════════════════════════════════════════════════════════════ */
.config-section {
    margin-bottom: 1.5rem;
}
.config-section:last-child { margin-bottom: 0; }

.config-section-title {
    font-size: .875rem;
    font-weight: 700;
    color: var(--p-primary);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .625rem;
}
.config-hint {
    font-size: .8125rem;
    color: var(--c-text-2);
    line-height: 1.55;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    background: var(--c-muted-bg);
    border-radius: var(--r-sm);
}
.doc-link {
    color: var(--p-primary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--t);
}
.doc-link:hover { color: var(--p-hover); text-decoration: underline; }
.empty-hint { font-size: .9375rem; color: var(--c-text-2); }

/* Security notice above credential fields */
.security-notice {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    color: color-mix(in srgb, var(--p-primary) 80%, #000);
    background: var(--p-light);
    border: 1px solid color-mix(in srgb, var(--p-primary) 25%, transparent);
    border-radius: var(--r-sm);
    padding: .625rem .875rem;
    margin-bottom: 1.5rem;
    line-height: 1.45;
}
.security-notice svg { flex-shrink: 0; color: var(--p-primary); }


/* ═══════════════════════════════════════════════════════════════════════════
   SUMMARY STEP
   ═══════════════════════════════════════════════════════════════════════════ */
.summary-section {
    margin-bottom: 1.5rem;
}
.summary-section:last-of-type { margin-bottom: 0; }
.summary-section > h3 {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--c-text-3);
    margin-bottom: .625rem;
}

.sum-row {
    display: flex;
    padding: .625rem .875rem;
    gap: 1rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-bottom: none;
    align-items: flex-start;
}
.sum-row:first-child { border-radius: var(--r-sm) var(--r-sm) 0 0; }
.sum-row:last-child  { border-bottom: 1px solid var(--c-border-lt); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.sum-row:only-child  { border-radius: var(--r-sm); border-bottom: 1px solid var(--c-border-lt); }
.sum-label {
    font-size: .8125rem;
    color: var(--c-text-2);
    min-width: 130px;
    flex-shrink: 0;
}
.sum-val {
    font-size: .875rem;
    color: var(--c-text);
    font-weight: 500;
    flex: 1;
    word-break: break-word;
}
.sum-empty {
    font-size: .875rem;
    color: var(--c-text-3);
    font-style: italic;
    padding: .625rem 0;
}

.privacy-notice {
    font-size: .8125rem;
    color: var(--c-text-2);
    line-height: 1.55;
    margin-top: 1.25rem;
    padding: .75rem 1rem;
    background: var(--c-muted-bg);
    border-radius: var(--r-sm);
}


/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    padding: 10px 22px;
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--t);
    text-decoration: none;
    white-space: nowrap;
    -webkit-appearance: none;
    user-select: none;
}
.btn-primary {
    background: var(--p-primary);
    color: #fff;
    box-shadow: 0 1px 4px color-mix(in srgb, var(--p-primary) 35%, transparent);
}
.btn-primary:hover {
    background: var(--p-hover);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--p-primary) 35%, transparent);
}
.btn-primary:active { transform: none; box-shadow: none; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-ghost {
    background: transparent;
    color: var(--c-text-2);
    border: 1.5px solid var(--c-border);
}
.btn-ghost:hover { background: var(--c-muted-bg); color: var(--c-text); border-color: #b0b0b8; }

.btn-secondary {
    background: var(--c-surface);
    color: var(--c-text);
    border: 1.5px solid var(--c-border);
    box-shadow: var(--sh-sm);
}
.btn-secondary:hover { background: var(--c-surface-alt); border-color: #b0b0b8; }

.btn-sm  { padding: 7px 16px; font-size: .875rem; }
.btn-xs  { padding: 5px 12px; font-size: .8125rem; }
.btn-danger-outline {
    background: transparent;
    color: var(--c-error);
    border: 1.5px solid rgba(255,59,48,.35);
}
.btn-danger-outline:hover { background: var(--c-error-bg); border-color: var(--c-error); }

.step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border-lt);
}
.step-actions--end { justify-content: flex-end; }


/* ═══════════════════════════════════════════════════════════════════════════
   ALERTS & FLASH MESSAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.flash {
    max-width: 800px;
    margin: 1rem auto;
    padding: .875rem 1.125rem;
    border-radius: var(--r-sm);
    font-size: .9375rem;
    line-height: 1.5;
}
.flash-error   { background: var(--c-error-bg); border: 1px solid rgba(255,59,48,.3); color: #c0392b; }
.flash-success { background: var(--c-success-bg); border: 1px solid rgba(52,199,89,.3); color: #1a5c2e; }
.flash-info    { background: var(--p-light); border: 1px solid color-mix(in srgb, var(--p-primary) 25%, transparent); color: var(--p-primary); }

.flash-link {
    background: var(--c-success-bg);
    border: 1px solid rgba(52,199,89,.3);
    color: #1a5c2e;
}
.token-url-box {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .625rem;
    padding: .625rem .875rem;
    background: white;
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-sm);
    flex-wrap: wrap;
}
.token-url-box code {
    font-family: var(--mono);
    font-size: .8125rem;
    color: var(--c-text);
    word-break: break-all;
    flex: 1;
}

.token-greeting {
    max-width: 640px;
    margin: 1.25rem auto .25rem;
    font-size: .9375rem;
    color: var(--c-text-2);
    line-height: 1.5;
    padding: 0 1rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--c-border-lt);
    font-size: .8125rem;
    color: var(--c-text-3);
}
.footer-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}
.footer-links { display: flex; align-items: center; gap: 1.25rem; }
.footer-links a { color: var(--c-text-2); text-decoration: none; transition: color var(--t); }
.footer-links a:hover { color: var(--p-primary); }
.footer-back {
    font-size: .875rem;
    font-weight: 500;
    color: var(--c-text-2);
    text-decoration: none;
    transition: color var(--t);
}
.footer-back:hover { color: var(--c-text); }


/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN
   ═══════════════════════════════════════════════════════════════════════════ */
/* Admin uses the ananas brand color #88e1ff */
.admin-body {
    background: #f5f5f7;
    --p-primary: #88e1ff;
    --p-hover:   #5ecff7;
    --p-light:   #e8f8ff;
    --p-text:    #003d54;
}
.admin-body .btn-primary {
    color: #003d54;
    box-shadow: 0 1px 4px rgba(136,225,255,.4);
}
.admin-body .btn-primary:hover {
    box-shadow: 0 3px 10px rgba(136,225,255,.45);
}

.admin-header {
    background: #1d1d1f;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80px;
    padding: .75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-brand {
    font-size: .9375rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -.01em;
}
.admin-nav { display: flex; align-items: center; gap: .125rem; }
.admin-nav a {
    color: rgba(255,255,255,.6);
    font-size: .875rem;
    text-decoration: none;
    padding: .375rem .75rem;
    border-radius: 6px;
    transition: all .18s;
}
.admin-nav a:hover { color: white; background: rgba(255,255,255,.1); }
.admin-nav a.active { color: white; background: rgba(255,255,255,.14); }
.admin-logout { color: rgba(255,255,255,.45) !important; }

.admin-main {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Stats row */
.admin-stats {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.stat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r);
    padding: 1rem 1.25rem;
    box-shadow: var(--sh-sm);
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 80px;
}
.stat-num   { font-size: 1.625rem; font-weight: 700; letter-spacing: -.03em; color: var(--c-text); }
.stat-label { font-size: .75rem; color: var(--c-text-2); font-weight: 500; }
.stat-new .stat-num    { color: #ff9f0a; }
.stat-viewed .stat-num { color: #0071e3; }
.stat-done .stat-num   { color: #34c759; }

/* Admin table */
.admin-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}
.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    font-size: .875rem;
}
.admin-table th {
    text-align: left;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-text-3);
    padding: .75rem 1rem;
    background: var(--c-surface-alt);
    border-bottom: 1px solid var(--c-border-lt);
}
.admin-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--c-border-lt);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.row-done   { opacity: .55; }
.admin-table tr.row-expired{ opacity: .5; }
.table-empty { text-align: center; color: var(--c-text-3); padding: 2rem !important; }
.table-actions { display: flex; gap: .375rem; align-items: center; white-space: nowrap; }

/* Admin cards */
.admin-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    box-shadow: var(--sh-sm);
    margin-bottom: 1.75rem;
}
.admin-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 1.25rem;
}
.admin-section-title {
    font-size: .875rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: .875rem;
}

/* Token create form */
.token-create-form .form-row { align-items: end; flex-wrap: wrap; }

/* Product badge in tables */
.product-badge-sm {
    display: inline-flex;
    font-size: .6875rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--p-light);
    color: var(--p-primary);
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .6875rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 100px;
    white-space: nowrap;
}
.badge-new      { background: rgba(255,159,10,.12); color: #7a4a00; border: 1px solid rgba(255,159,10,.3); }
.badge-viewed   { background: rgba(0,113,227,.10);  color: #0050a3; border: 1px solid rgba(0,113,227,.25); }
.badge-done     { background: rgba(52,199,89,.10);  color: #1a5c2e; border: 1px solid rgba(52,199,89,.3); }
.badge-expired  { background: var(--c-muted-bg); color: var(--c-text-3); border: 1px solid var(--c-border); }

/* Inline code */
code {
    font-family: var(--mono);
    font-size: .875em;
    background: var(--c-muted-bg);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--c-text);
    border: 1px solid var(--c-border-lt);
}


/* ═══════════════════════════════════════════════════════════════════════════
   SUCCESS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.success-wrap {
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: 480px;
    margin: 0 auto;
}
.success-icon {
    width: 72px;
    height: 72px;
    background: var(--c-success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: popIn .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
.success-icon svg { width: 36px; height: 36px; color: var(--c-success); }
.success-title    { font-size: 1.625rem; font-weight: 700; letter-spacing: -.03em; margin-bottom: .625rem; animation: fadeUp .35s ease .15s both; }
.success-subtitle { font-size: 1rem; color: var(--c-text-2); line-height: 1.6; margin-bottom: 1.5rem; animation: fadeUp .35s ease .25s both; }
.ref-box {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r);
    padding: .875rem 1.25rem;
    box-shadow: var(--sh-sm);
    animation: fadeUp .35s ease .35s both;
}
.ref-label { font-size: .8125rem; color: var(--c-text-2); }
.ref-val   { font-family: var(--mono); font-size: .9375rem; font-weight: 600; color: var(--c-text); }

@keyframes popIn  { 0% { transform:scale(.6);opacity:0; } 70% { transform:scale(1.06); } 100% { transform:scale(1);opacity:1; } }
@keyframes fadeUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }


/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.login-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-lg);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 360px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN VIEW PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.view-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.view-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-lg);
    padding: 1.375rem 1.5rem;
    box-shadow: var(--sh-sm);
}
.view-card--secrets {
    border-color: rgba(226,25,84,.2);
    background: #fff9fb;
}
.view-card-title {
    font-size: .875rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-wrap: wrap;
}
.view-section-label {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--c-text-3);
    margin: 1rem 0 .5rem;
}
.view-section-label:first-child { margin-top: 0; }

/* Data list */
.data-list { display: flex; flex-direction: column; }
.data-row {
    display: flex;
    gap: .75rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--c-border-lt);
    align-items: flex-start;
}
.data-row:last-child { border-bottom: none; }
.data-row dt {
    font-size: .8125rem;
    color: var(--c-text-2);
    min-width: 90px;
    flex-shrink: 0;
    font-weight: 400;
    padding-top: 1px;
}
.data-row dd {
    font-size: .875rem;
    color: var(--c-text);
    font-weight: 500;
    flex: 1;
    word-break: break-word;
}

/* Secrets */
.secrets-hint {
    font-size: .8125rem;
    color: #b81247;
    background: rgba(226,25,84,.06);
    border-radius: var(--r-sm);
    padding: .5rem .75rem;
    margin-bottom: .875rem;
    line-height: 1.5;
}
.data-row--secret dd {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.secret-mask { font-family: var(--mono); letter-spacing: .08em; color: var(--c-text-3); }
.secret-val  { font-family: var(--mono); font-size: .875rem; word-break: break-all; color: var(--c-text); }
.secret-btns { display: flex; gap: .375rem; margin-left: auto; }

/* Extra button variants */
.btn-success {
    background: #34c759;
    color: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(52,199,89,.3);
}
.btn-success:hover { background: #28a745; transform: translateY(-1px); }

.btn-danger {
    background: var(--c-error);
    color: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(255,59,48,.25);
}
.btn-danger:hover    { background: #e0342a; transform: translateY(-1px); }
.btn-danger:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Delete zone */
.delete-zone {
    background: var(--c-surface);
    border: 1.5px solid rgba(255,59,48,.22);
    border-radius: var(--r-lg);
    padding: 1.375rem 1.5rem;
    box-shadow: var(--sh-sm);
    max-width: 600px;
}
.delete-zone-title {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--c-error);
    margin-bottom: .375rem;
}
.delete-zone-text {
    font-size: .875rem;
    color: var(--c-text-2);
    margin-bottom: 1rem;
    line-height: 1.55;
}
.delete-confirm {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    cursor: pointer;
    user-select: none;
}
.delete-confirm input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.delete-confirm span { font-size: .875rem; color: var(--c-text); line-height: 1.5; }

/* form-control-sm for admin toolbars */
.form-control-sm { padding: 7px 11px; font-size: .875rem; }
.admin-toolbar select { max-width: 220px; }
.admin-count { font-size: .8125rem; color: var(--c-text-3); margin-left: auto; }

/* Clickable table rows */
.admin-table-row { cursor: pointer; transition: background var(--t); }
.admin-table-row:hover td { background: var(--c-surface-alt); }

/* Two-column token layout */
.admin-two-col {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) {
    .admin-two-col { grid-template-columns: 1fr; }
}

/* Token list */
.token-list { display: flex; flex-direction: column; gap: .625rem; }
.token-item {
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r);
    padding: 1rem 1.125rem;
    box-shadow: var(--sh-sm);
    transition: border-color var(--t);
}
.token-item--used    { opacity: .55; }
.token-item--expired { opacity: .5; }
.token-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .375rem;
}
.token-item-label {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--c-text);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.token-item-meta {
    font-size: .78125rem;
    color: var(--c-text-3);
    margin-bottom: .625rem;
    line-height: 1.5;
}
.token-item-actions {
    display: flex;
    align-items: center;
    gap: .375rem;
    flex-wrap: wrap;
}

/* New link flash card */
.flash-link-card {
    background: var(--c-success-bg);
    border: 1px solid rgba(52,199,89,.3);
    border-radius: var(--r);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.flash-link-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    font-weight: 600;
    color: #1a5c2e;
    margin-bottom: .625rem;
}
.flash-link-url {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fff;
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r-sm);
    padding: .625rem .875rem;
    flex-wrap: wrap;
}
.flash-link-url code {
    flex: 1;
    font-family: var(--mono);
    font-size: .8125rem;
    color: var(--c-text);
    word-break: break-all;
    background: transparent;
    border: none;
    padding: 0;
}

/* Admin empty state */
.admin-empty {
    background: var(--c-surface);
    border: 1px solid var(--c-border-lt);
    border-radius: var(--r);
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: var(--sh-sm);
}

/* Token message reveal box */
.token-message-wrap { margin-top: .25rem; }
.token-message-mask {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .875rem 1rem;
    background: var(--c-muted-bg);
    border-radius: var(--r-sm);
}
.token-message-pre {
    font-family: var(--font);
    font-size: .9375rem;
    color: var(--c-text);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--c-muted-bg);
    border-radius: var(--r-sm);
    padding: 1rem;
    margin: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .wizard-main { padding: 1.25rem 1rem 3rem; }
    .step-card   { padding: 1.5rem 1.25rem; }
    .systems-cols { grid-template-columns: 1fr; }
    .stepper-label { display: none; }
    .step-actions  { flex-direction: column-reverse; align-items: stretch; }
    .step-actions .btn { width: 100%; justify-content: center; }
    .step-actions--end { flex-direction: column; }
    .product-grid { grid-template-columns: 1fr; }
    .form-row     { grid-template-columns: 1fr; }
    .landing-title { font-size: 1.625rem; }
    .admin-main { padding: 1.25rem 1rem; }
    .admin-stats { gap: .5rem; }
    .footer-inner { flex-direction: column; text-align: center; }
}
