/* ── Design Tokens ───────────────────────────────────────────────────────── */
:root {
    --teal:        #00C7B1;
    --teal-light:  #64FFDA;
    --teal-muted:  rgba(0,199,177,0.12);
    --dark:        #0A1628;
    --mid:         #112240;
    --border:      #1D3461;
    --muted-text:  #8892B0;
    --surface:     #F0F4F8;
    --card-radius: 14px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background: var(--surface);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1A202C;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper { flex: 1; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.lean-navbar {
    background: var(--dark);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.lean-logo {
    width: 34px; height: 34px;
    background: var(--teal);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; color: var(--dark); font-size: 1rem;
    flex-shrink: 0;
}

.env-badge {
    font-size: 0.65rem;
    background: rgba(246,173,85,0.2);
    color: #F6AD55;
    border: 1px solid rgba(246,173,85,0.4);
    border-radius: 20px;
    padding: 2px 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.nav-pill {
    display: inline-flex; align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    color: var(--muted-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-pill:hover  { background: rgba(255,255,255,0.07); color: #fff; }
.nav-pill.active { background: var(--teal-muted); color: var(--teal); }

/* ── Step Wizard ─────────────────────────────────────────────────────────── */
.wizard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2.5rem;
}

.wz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wz-circle {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid #CBD5E0;
    background: #fff;
    color: #A0AEC0;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.wz-circle.done {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.wz-circle.active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(0,199,177,0.18);
}

.wz-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #A0AEC0;
    margin-top: 7px;
    white-space: nowrap;
}
.wz-label.active { color: var(--teal); }

.wz-line {
    width: 90px; height: 2px;
    background: #CBD5E0;
    margin: 0 2px;
    margin-bottom: 24px;
    flex-shrink: 0;
}
.wz-line.done { background: var(--teal); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card-lean {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: var(--card-radius);
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.card-dark {
    background: var(--mid);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    color: #fff;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-lean {
    background: var(--teal);
    border: none;
    color: var(--dark);
    font-weight: 700;
    padding: 0.7rem 1.8rem;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none;
}
.btn-lean:hover {
    background: var(--teal-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,199,177,0.3);
    color: var(--dark);
}
.btn-lean:disabled {
    opacity: 0.55; cursor: not-allowed; transform: none;
}

.btn-lean-ghost {
    background: transparent;
    border: 2px solid var(--teal);
    color: var(--teal);
    font-weight: 600;
    padding: 0.65rem 1.6rem;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none;
}
.btn-lean-ghost:hover {
    background: var(--teal-muted);
    color: var(--teal);
}

/* ── Form Controls ───────────────────────────────────────────────────────── */
.field-wrap { margin-bottom: 1.4rem; }

.field-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: #4A5568;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.field-icon-wrap {
    position: relative;
}
.field-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--teal);
    font-size: 1rem;
    pointer-events: none;
}
.form-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    border: 1.5px solid #CBD5E0;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0,199,177,0.15);
}
.form-input.no-icon { padding-left: 1rem; }
select.form-input { padding-left: 1rem; cursor: pointer; }
.field-error { color: #E53E3E; font-size: 0.78rem; margin-top: 4px; }

/* ── Alert Boxes ─────────────────────────────────────────────────────────── */
.alert-teal {
    background: rgba(0,199,177,0.08);
    border: 1px solid rgba(0,199,177,0.3);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #065F56;
}

.alert-warn {
    background: #FFFBEB;
    border: 1px solid #F6E05E;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #744210;
}

.alert-danger-lean {
    background: #FFF5F5;
    border: 1px solid #FEB2B2;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #C53030;
}

/* ── Status Badges ───────────────────────────────────────────────────────── */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.badge-authorised { background: rgba(56,161,105,0.12); color: #276749; }
.badge-awaiting   { background: rgba(66,153,225,0.12); color: #2B6CB0; }
.badge-revoked    { background: rgba(229,62,62,0.12);  color: #C53030; }
.badge-expired    { background: rgba(160,174,192,0.15);color: #4A5568; }

/* ── Consent Card ────────────────────────────────────────────────────────── */
.consent-card {
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    background: #fff;
    transition: border-color 0.2s;
}
.consent-card.selected, .consent-card:has(input:checked) {
    border-color: var(--teal);
    background: rgba(0,199,177,0.04);
}

/* ── Icon Circles ────────────────────────────────────────────────────────── */
.icon-circle-teal {
    width: 52px; height: 52px;
    background: var(--teal-muted);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--teal);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.status-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 1.5rem;
}
.status-icon.success { background: rgba(72,187,120,0.15); color: #38A169; }
.status-icon.fail    { background: rgba(245,101,101,0.12); color: #E53E3E; }
.status-icon.pending { background: rgba(246,173,85,0.15);  color: #D69E2E; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--mid) 100%);
    border-radius: 18px;
    padding: 3rem 2.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    top: -40%; right: -10%;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(0,199,177,0.13) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Flow diagram boxes ──────────────────────────────────────────────────── */
.flow-box {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: #CBD5E0;
}
.flow-arrow {
    color: var(--teal);
    font-size: 1.3rem;
    text-align: center;
}

/* ── Payment amount field ────────────────────────────────────────────────── */
.amount-field-wrap {
    position: relative;
}
.amount-currency {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    background: var(--teal);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 5px;
}
.amount-input {
    font-size: 1.6rem;
    font-weight: 700;
    padding-right: 72px !important;
}

/* ── Consent list in payment ─────────────────────────────────────────────── */
.consent-select-option {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #EDF2F7;
    font-size: 0.85rem;
}
.consent-select-option:last-child { border-bottom: none; }

/* ── Payment result ──────────────────────────────────────────────────────── */
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #EDF2F7;
    font-size: 0.88rem;
}
.result-row:last-child { border-bottom: none; }
.result-label { color: #718096; }
.result-value { font-weight: 600; color: #1A202C; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.lean-footer {
    background: var(--dark);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* ── Spinner overlay ─────────────────────────────────────────────────────── */
.sdk-overlay {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1.2rem;
    background: rgba(0,199,177,0.06);
    border: 1px dashed var(--teal);
    border-radius: 10px;
    color: #065F56;
    font-size: 0.88rem;
    font-weight: 500;
}
.sdk-overlay.show { display: flex; }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider {
    display: flex; align-items: center; gap: 1rem;
    color: #A0AEC0; font-size: 0.78rem; margin: 1.2rem 0;
}
.divider::before, .divider::after {
    content: ''; flex: 1;
    height: 1px; background: #E2E8F0;
}
