/* ════════════════════════════════════════════
   Profile · Stadium bento rework (retour user #22)
   Two-column grid, capsule cards, explicit danger zone.
   Tokens only — light + dark.
   ════════════════════════════════════════════ */

.profile-page .page-title {
    margin-bottom: 0;
}

.profile-head {
    margin-bottom: 28px;
}

.profile-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text3);
}

.profile-title-muted {
    color: var(--text3);
    font-weight: 500;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    align-items: start;
    max-width: 980px;
}

.profile-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

/* ── Membership card : "platinum" object (VIP/TRIAL), theme-adaptive (silver/graphite) ── */
.pcard {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 20px;
    padding: 20px 22px;
    min-height: 196px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* VIP + TRIAL = membership card faced with an AI-generated aurora gradient
   (imagegen via Codex). Theme-adaptive: cream aurora on light, graphite aurora on
   dark. A soft scrim (::before) keeps the overlaid type legible. */
.pcard--vip,
.pcard--trial {
    --pc-ink: #1a1d22;
    --pc-sub: rgba(26, 29, 34, 0.62);
    --pc-state: rgba(26, 29, 34, 0.84);
    background: #f4ecd9 url("/app/img/card-light.webp") right bottom / cover no-repeat;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--pc-ink);
    box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.32);
}
/* legibility scrim over the aurora (type sits top/left, glow stays bottom/right) */
.pcard--vip::before,
.pcard--trial::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(118deg, rgba(244, 236, 217, 0.64) 0%, rgba(244, 236, 217, 0.18) 42%, transparent 66%);
}

/* dark theme : graphite aurora */
[data-theme="dark"] .pcard--vip,
[data-theme="dark"] .pcard--trial {
    --pc-ink: #ffffff;
    --pc-sub: rgba(243, 243, 238, 0.62);
    --pc-state: rgba(243, 243, 238, 0.86);
    background: #0d0f13 url("/app/img/card-dark.webp") right bottom / cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .pcard--vip::before,
[data-theme="dark"] .pcard--trial::before {
    background: linear-gradient(118deg, rgba(13, 15, 19, 0.68) 0%, rgba(13, 15, 19, 0.22) 42%, transparent 66%);
}

/* free = quiet inky frame that blends with the page */
.pcard--free {
    background: var(--input-bg);
    border: 2px solid var(--text);
    color: var(--text);
}

.pcard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pcard-brand {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.26em;
    color: var(--pc-sub);
}
.pcard--free .pcard-brand { color: var(--text3); }

.pcard-mid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pcard-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pc-sub);
}
.pcard--free .pcard-eyebrow { color: var(--text3); }

.pcard-tier {
    font-family: var(--font-display, var(--font-mono));
    font-size: 46px;
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.01em;
    color: var(--pc-ink);
}
.pcard--free .pcard-tier { color: var(--text); }

.pcard-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

/* left column of the bottom row: holder name stacked over the state line, so
   .pcard-bottom stays a two-child row (idblock | EXP) and keeps its baseline. */
.pcard-idblock {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

/* the embossed cardholder line of a real card: full ink, wide tracking */
.pcard-holder {
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pc-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcard--free .pcard-holder { color: var(--text); }

.pcard-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--pc-state);
}
.pcard--free .pcard-state { color: var(--text3); }

.pcard-dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: var(--ball);
    animation: pcard-pulse 1.8s ease-in-out infinite;
}
.pcard--trial .pcard-dot { background: #e0b25e; }
@keyframes pcard-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(207, 235, 43, 0.45); }
    50% { box-shadow: 0 0 0 5px rgba(207, 235, 43, 0); }
}

.pcard-exp {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--pc-sub);
}
.pcard--free .pcard-exp { color: var(--text3); }

/* ── Billing : rich row card (replaces the bare arrow) ── */
.bill-link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg2);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.bill-link:hover {
    border-color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -20px rgba(0, 0, 0, 0.55);
}

.bill-ico {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(207, 235, 43, 0.16);
    border: 1px solid rgba(207, 235, 43, 0.30);
    color: var(--text);
}

.bill-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}
.bill-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}
.bill-sub {
    font-size: 12px;
    color: var(--text3);
}

.bill-go {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--control-border);
    color: var(--text2);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.bill-link:hover .bill-go {
    background: var(--ball);
    border-color: var(--ball);
    color: var(--text-on-ball);
    transform: translateX(2px);
}

/* ── Section cards ── */
.profile-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--bg2);
    padding: 18px 20px;
}

.profile-card-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 14px;
}

/* Toggle rows */
.profile-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    cursor: pointer;
}
.profile-toggle-row:first-of-type { border-top: none; }

.profile-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.profile-toggle-desc {
    font-size: 12px;
    color: var(--text3);
}

.profile-toggle-row--push { cursor: default; }

/* ── Action pills ── */
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-pill-ghost,
.profile-pill-on,
.profile-pill-danger {
    padding: 10px 18px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-pill-ghost {
    border: 1px solid var(--control-border);
    background: transparent;
    color: var(--text2);
}
.profile-pill-ghost:hover { border-color: var(--text); color: var(--text); }

.profile-pill-on {
    border: 1px solid var(--ball);
    background: var(--ball);
    color: var(--text-on-ball);
}

.profile-pill-danger {
    border: 1px solid var(--fault);
    background: transparent;
    color: var(--fault);
}
.profile-pill-danger:hover { background: var(--fault); color: var(--input-bg); }
.profile-pill-danger:disabled { opacity: 0.55; cursor: wait; }

/* Danger zone */
.profile-danger .profile-card-label { color: var(--text3); }

.profile-delete-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-delete-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--fault);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.profile-delete-note {
    font-size: 11.5px;
    color: var(--text3);
}

.profile-upgrade { border-radius: 999px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pcard-dot { animation: none; }
    .bill-link, .bill-link:hover { transform: none; transition: none; }
    .bill-link:hover .bill-go { transform: none; }
}
