/* =====================================================================================================================
   owns.ai  -  ACCOUNT STYLES

   Sign in, sign up, password reset, plan & billing, checkout, invoices, the printable invoice and the profile.
   Builds on app.css and uses its tokens only, so both themes come out right.

   Coded By Darko G.
   ===================================================================================================================== */

/* ---- AUTH ---------------------------------------------------------------------------------------------------------- */

.auth-logo { display: inline-flex; margin-bottom: 26px; }
.auth-card .field .pw-wrap { position: relative; }
.auth-card .field .pw-wrap .input, .acct-pw-wrap .input { padding-right: 46px; }
.pw-wrap { position: relative; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 3px; background: transparent;
          color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-row a { font-size: .82rem; font-weight: 600; }

.pw-strength { display: flex; gap: 5px; margin-top: 2px; }
.pw-strength span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background .25s; }
.pw-strength[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.pw-strength[data-score="2"] span:nth-child(-n+2) { background: var(--warning); }
.pw-strength[data-score="3"] span:nth-child(-n+3) { background: #84CC16; }
.pw-strength[data-score="4"] span { background: var(--success); }
.pw-hint { font-size: .78rem; color: var(--faint); min-height: 1.2em; }

.auth-consent { font-size: .8rem; color: var(--faint); margin-top: 14px; text-align: center; line-height: 1.5; }
.auth-perks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 22px; font-size: .84rem; color: var(--muted); }
.auth-perks span { display: inline-flex; align-items: center; gap: 6px; }
.auth-perks i { color: var(--success); }
.auth-collapse summary { cursor: pointer; font-size: .86rem; color: var(--muted); font-weight: 600; list-style: none; margin-bottom: 12px; }
.auth-collapse summary::-webkit-details-marker { display: none; }
.auth-collapse summary i { transition: transform .2s; margin-right: 6px; }
.auth-collapse.is-open summary i { transform: rotate(90deg); }
/* The body animates its height (js/billing.js); the padding keeps the inputs' focus rings inside the clip. */
.auth-collapse-body { overflow: hidden; padding: 3px; margin: -3px; }

/* The demo assistant being claimed (js/billing.js claimDemo), in its own colour (--demo). */
.auth-demo { --demo: #009BDB; display: flex; align-items: center; gap: 14px; margin: 4px 0 20px; padding: 14px 16px; border-radius: 4px; color: var(--text); text-decoration: none;
             background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent;
             box-shadow: 0 14px 40px -22px rgba(0, 155, 219, .8); transition: transform .2s var(--ease), box-shadow .2s; animation: auth-demo-in .55s var(--ease) both; }
.auth-demo:hover { transform: translateY(-2px); box-shadow: 0 18px 46px -20px rgba(0, 155, 219, .9); color: var(--text); }
.auth-demo-av { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 4px; color: #fff; font-size: 1.35rem;
                background: linear-gradient(135deg, var(--demo), color-mix(in srgb, var(--demo) 55%, #0063D2)); box-shadow: 0 8px 20px -8px var(--demo); }
.auth-demo-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.auth-demo-txt small { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brand); }
.auth-demo-txt b { font: 800 1.08rem var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-demo-txt > span { font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-demo-txt > span em { font-style: normal; color: var(--faint); }
.auth-demo-ok { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 2px; font-size: .74rem; font-weight: 700;
                color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
@keyframes auth-demo-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* The return-offer discount, carried from the preview's offer plans (js/billing.js claimDemo). */
.auth-offer { display: flex; align-items: center; gap: 14px; margin: -8px 0 20px; padding: 14px 16px; border-radius: 4px; border: 1px dashed color-mix(in srgb, var(--success) 55%, transparent);
              background: color-mix(in srgb, var(--success) 9%, var(--surface)); animation: auth-demo-in .55s var(--ease) .12s both; }
.auth-offer-tag { width: 58px; height: 58px; flex: none; display: grid; place-content: center; text-align: center; border-radius: 4px; color: #fff; line-height: 1;
                  background: linear-gradient(135deg, #00D4AA, #009BDB 60%, #0063D2); box-shadow: 0 10px 24px -10px rgba(0, 155, 219, .8); transform: rotate(-4deg); }
.auth-offer-tag b { font: 800 1.15rem var(--font-display); }
.auth-offer-tag small { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .9; margin-top: 2px; }
.auth-offer-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: .84rem; color: var(--text-2); line-height: 1.4; }
.auth-offer-txt > b { font: 800 .98rem var(--font-display); color: var(--text); }
.auth-offer-txt em { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--success); }
.auth-offer-txt em i { margin-right: 4px; }
@media (max-width: 480px) { .auth-demo-ok { display: none; } }

.auth-aside h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 12px; }
.auth-aside .lead { font-size: 1rem; margin-bottom: 26px; }
.auth-benefits { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.auth-benefits li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); font-size: .94rem; }
.auth-benefits li i { width: 34px; min-width: 34px; height: 34px; border-radius: 3px; display: grid; place-items: center; background: var(--grad-soft); color: var(--brand); }
.auth-benefits strong { display: block; color: var(--text); font-family: var(--font-display); }

/* The little chat that plays on the right of the auth pages. Pure CSS: each bubble waits its turn. */
.mini-chat { border-radius: 4px; padding: 0; overflow: hidden; box-shadow: var(--shadow-lg); }
.mini-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--grad); color: #fff; }
/* The avatar is a span, so the status line's ".mini-chat-head span" rule (inline-flex, faded) must not reach it: it is a
   centred grid of its own, at full strength. */
.mini-chat-head .avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 1rem; opacity: 1; gap: 0; }
.mini-chat-head .avatar i { line-height: 1; }
.mini-chat-head strong { display: block; font-family: var(--font-display); font-size: .95rem; line-height: 1.2; }
.mini-chat-head span { font-size: .75rem; opacity: .85; display: inline-flex; align-items: center; gap: 6px; }
.mini-chat-head .dot-live { background: #A7F3D0; }
.mini-chat-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 20px; min-height: 250px; background: var(--surface); }
.mc-msg { max-width: 82%; padding: 10px 14px; border-radius: 4px; font-size: .88rem; line-height: 1.45; opacity: 0; transform: translateY(8px);
          animation: mc-in .5s var(--ease) forwards; }
.mc-user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 2px; }
.mc-bot { align-self: flex-start; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); border-bottom-left-radius: 2px; }
.mc-bot strong { color: var(--text); }
.mc-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border);
             opacity: 0; animation: mc-in .3s var(--ease) forwards, mc-out .3s var(--ease) forwards; }
.mc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: mc-dot 1s infinite; font-style: normal; }
.mc-typing i:nth-child(2) { animation-delay: .15s; } .mc-typing i:nth-child(3) { animation-delay: .3s; }
.mc-d1 { animation-delay: .4s; } .mc-d2 { animation-delay: 1.1s, 2.3s; } .mc-d3 { animation-delay: 2.4s; } .mc-d4 { animation-delay: 3.6s; } .mc-d5 { animation-delay: 4.3s, 5.4s; } .mc-d6 { animation-delay: 5.5s; }
.mc-d7 { animation-delay: 9.7s; }

/* The call-back form inside the last answer: Jane's name and number type themselves in (a stepped reveal), the button
   is pressed and turns to "Request sent", and the assistant confirms (.mc-d7). */
.mc-with-form { max-width: 92%; }
.mc-form { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; padding: 11px; border-radius: 3px; background: var(--surface); border: 1px solid var(--border); }
.mc-label { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mc-field { position: relative; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border-strong);
            color: var(--text); font-size: .84rem; margin-bottom: 4px; }
.mc-field i { color: var(--muted); font-size: .8rem; width: 14px; text-align: center; flex: none; }
.mc-ph { color: var(--faint); animation: mc-gone 0s forwards; }
.mc-type { position: absolute; left: 33px; font-weight: 500; white-space: nowrap; clip-path: inset(0 100% 0 0); animation: mc-type .8s steps(12, end) forwards; }
.mc-f1 { animation: mc-focus 1.1s ease; animation-delay: 6.3s; } .mc-f1 .mc-ph, .mc-f1 .mc-type { animation-delay: 6.45s; }
.mc-f2 { animation: mc-focus 1.2s ease; animation-delay: 7.45s; } .mc-f2 .mc-ph, .mc-f2 .mc-type { animation-delay: 7.6s; }
.mc-submit { position: relative; display: grid; height: 36px; margin-top: 4px; border-radius: 3px; background: var(--grad); color: #fff; font: 700 .82rem var(--font-display);
             overflow: hidden; animation: mc-press .35s var(--ease); animation-delay: 8.8s; }
.mc-submit > span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 7px; }
.mc-s1 { animation: mc-gone .25s forwards; animation-delay: 9s; }
.mc-s2 { opacity: 0; animation: mc-in .3s var(--ease) forwards; animation-delay: 9.1s; }
@keyframes mc-type { to { clip-path: inset(0 0 0 0); } }
@keyframes mc-gone { to { opacity: 0; } }
@keyframes mc-focus { 0%, 100% { border-color: var(--border-strong); box-shadow: none; } 15%, 85% { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 155, 219, .18); } }
@keyframes mc-press { 50% { transform: scale(.96); filter: brightness(1.1); } }
@media (prefers-reduced-motion: reduce) { .mc-type { clip-path: none; } .mc-ph, .mc-s1 { opacity: 0; } .mc-s2 { opacity: 1; } }
@keyframes mc-in { to { opacity: 1; transform: none; } }
@keyframes mc-out { to { opacity: 0; height: 0; padding: 0; margin: -5px 0; border-width: 0; } }
@keyframes mc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.mc-chips { display: flex; gap: 6px; flex-wrap: wrap; opacity: 0; animation: mc-in .5s var(--ease) forwards; animation-delay: 6.2s; }
.mc-chips span { font-size: .75rem; padding: 5px 10px; border-radius: 2px; border: 1px solid var(--border-strong); color: var(--text-2); }
.auth-stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.auth-stat { text-align: center; padding: 14px 8px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.auth-stat b { display: block; font-family: var(--font-display); font-size: 1.3rem; }
.auth-stat span { font-size: .74rem; color: var(--muted); }


/* ---- BILLING ------------------------------------------------------------------------------------------------------- */

.acct-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; margin-bottom: 28px; }
.plan-hero { overflow: hidden; background: radial-gradient(500px 220px at 100% 0%, rgba(0, 212, 170, .22), transparent 70%), var(--surface); }
.plan-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.plan-hero-name { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 6px; }
.plan-hero-price { font-family: var(--font-display); font-size: 1.05rem; color: var(--text-2); }
.plan-hero-price b { font-size: 1.6rem; color: var(--text); letter-spacing: -0.02em; }
.plan-hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.plan-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.plan-hero-meta i { color: var(--brand); }
.plan-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.usage-card .usage-row + .usage-row { margin-top: 22px; }
.usage-row .row-between { margin-bottom: 8px; font-size: .9rem; }
.usage-row .row-between b { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.usage-row .help { margin-top: 6px; }

.acct-section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 36px 0 18px; }
.acct-section-title h2 { font-size: 1.35rem; margin: 0; }
.acct-section-title p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }

/* Plan cards (Plans.card markup), scoped so they render identically whatever the marketing styles do. */
.acct-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.acct-plans .plan-card { position: relative; display: flex; flex-direction: column; padding: 24px 20px; border-radius: var(--r-lg); background: var(--surface);
                         border: 1px solid var(--border); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.acct-plans .plan-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.acct-plans .plan-card.is-featured { border-color: rgba(0, 155, 219, .55); box-shadow: var(--glow); background: linear-gradient(180deg, rgba(0, 155, 219, .09), transparent 60%), var(--surface); }
.acct-plans .plan-card.is-current { border-color: rgba(34, 197, 94, .45); }
.acct-plans .plan-badge { position: absolute; top: -11px; left: 20px; padding: 3px 11px; border-radius: 2px; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.acct-plans .plan-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.acct-plans .plan-tagline { font-size: .84rem; color: var(--muted); min-height: 2.6em; margin-top: 4px; line-height: 1.45; }
.acct-plans .plan-price { margin-top: 14px; display: flex; align-items: baseline; gap: 4px; }
.acct-plans .plan-amount { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; letter-spacing: -0.03em; }
.acct-plans .plan-per { color: var(--muted); font-size: .9rem; }
.acct-plans .plan-billed { font-size: .78rem; color: var(--faint); min-height: 2.4em; margin-top: 2px; }
.acct-plans .plan-save { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 2px; background: rgba(34, 197, 94, .14); color: var(--success); font-weight: 700; }
.acct-plans .plan-cta { margin: 16px 0 18px; }
.acct-plans .plan-cta .btn-lg { min-height: 46px; font-size: .95rem; }
.acct-plans .plan-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .85rem; color: var(--text-2); }
.acct-plans .plan-features li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.4; }
.acct-plans .plan-features i { color: var(--success); margin-top: 2px; }
.current-ribbon { position: absolute; top: 14px; right: 14px; }

.cancel-reasons { display: grid; gap: 8px; margin: 14px 0; }
.cancel-reasons label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 3px; border: 1px solid var(--border); cursor: pointer; font-size: .92rem; color: var(--text-2); }
.cancel-reasons label:has(input:checked) { border-color: var(--brand); background: var(--grad-soft); color: var(--text); }
.cancel-reasons input { accent-color: var(--brand); }
.lose-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: .88rem; color: var(--text-2); }
.lose-list i { color: var(--danger); margin-right: 8px; }


/* ---- CHECKOUT ------------------------------------------------------------------------------------------------------ */

.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.order-card .order-plan { display: flex; align-items: center; gap: 16px; }
.order-card .order-plan .avatar { border-radius: 3px; }
.order-plan h2 { font-size: 1.5rem; margin: 0; }
.order-features { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 18px; font-size: .9rem; color: var(--text-2); }
.order-features li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.4; }
.order-features i { color: var(--success); margin-top: 3px; }
.order-lines { border-top: 1px solid var(--border); padding-top: 16px; display: grid; gap: 10px; font-size: .94rem; }
.order-lines .row-between span:first-child { color: var(--muted); }
.order-total { border-top: 1px dashed var(--border-strong); padding-top: 14px; margin-top: 4px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.trial-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .25); font-size: .9rem; color: var(--text-2); margin-top: 18px; }
.trial-note i { color: var(--success); margin-top: 3px; }
.offer-note { background: var(--grad-soft); border-color: var(--line-accent); }
.offer-note i { color: var(--brand); }
.pay-card { position: sticky; top: calc(var(--nav-h) + 24px); }
.pay-card h3 { margin-bottom: 4px; }
#paypal-buttons { min-height: 150px; margin-top: 18px; position: relative; z-index: 1; }
.paypal-loading { display: grid; gap: 10px; }
.paypal-loading .skeleton { height: 48px; border-radius: 2px; }
.trust-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.trust-item { text-align: center; padding: 12px 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); font-size: .76rem; color: var(--muted); line-height: 1.3; }
.trust-item i { display: block; font-size: 1.1rem; color: var(--brand); margin-bottom: 6px; }
.pay-secure { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .78rem; color: var(--faint); margin-top: 14px; }
.paypal-mark { height: 16px; width: auto; display: inline-block; vertical-align: middle; }

.success-screen { text-align: center; max-width: 620px; margin: 40px auto; padding: 48px 32px; overflow: hidden; }
.success-burst { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 4px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 2.4rem;
                 box-shadow: var(--glow); animation: burst .8s var(--ease); }
@keyframes burst { 0% { transform: scale(.3) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: none; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: .9; animation: confetti 2.8s linear forwards; }
@keyframes confetti { to { transform: translateY(560px) rotate(720deg); opacity: 0; } }
.success-unlocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 26px 0; }
.success-unlocks div { padding: 14px 10px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.success-unlocks b { display: block; font-family: var(--font-display); font-size: 1.3rem; }
.success-unlocks span { font-size: .78rem; color: var(--muted); }


/* ---- INVOICE DOCUMENT -------------------------------------------------------------------------------------------- */
/* Paper, whatever the theme: an invoice is a document people print, forward and file. */

.invoice-doc { --ink: #0F172A; --ink-2: #475569; --ink-3: #94A3B8; --rule: #E2E8F0;
               max-width: 860px; margin: 0 auto; background: #FFFFFF; color: var(--ink); border-radius: 4px; box-shadow: var(--shadow-lg); padding: 52px 56px; position: relative; overflow: hidden; }
.invoice-doc::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #009BDB, #00D4AA 50%, #0063D2); }
.inv-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.inv-logo { display: block; height: 30px; width: auto; }    /* always the light-background logo: an invoice is paper */
.inv-title { text-align: right; }
.inv-title h2 { color: var(--ink); font-size: 1.9rem; margin: 0; letter-spacing: -0.03em; }
.inv-title .inv-no { color: var(--ink-2); font-family: var(--font-mono); font-size: .9rem; }
.inv-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 38px 0 30px; font-size: .9rem; color: var(--ink-2); line-height: 1.55; }
.inv-parties h4 { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; font-family: var(--font-display); }
.inv-parties strong { color: var(--ink); }
.inv-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.inv-table th { text-align: left; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 12px 0; border-bottom: 2px solid var(--ink); font-family: var(--font-display); }
.inv-table td { padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); vertical-align: top; }
.inv-table td strong { color: var(--ink); display: block; margin-bottom: 3px; }
.inv-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-totals { margin-left: auto; width: min(320px, 100%); margin-top: 18px; font-size: .94rem; }
.inv-totals div { display: flex; justify-content: space-between; padding: 7px 0; color: var(--ink-2); }
.inv-totals .inv-grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 12px; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.inv-stamp { position: absolute; top: 120px; right: 60px; transform: rotate(-12deg); border: 3px solid #16A34A; color: #16A34A; border-radius: 3px; padding: 6px 18px;
             font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: .12em; opacity: .85; pointer-events: none; }
.inv-stamp.is-refunded { border-color: #E11D48; color: #E11D48; }
.inv-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-3); }
.inv-foot code { color: var(--ink-2); }
.inv-thanks { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.05rem; margin-top: 30px; }
.inv-actions { max-width: 860px; margin: 0 auto 18px; }


/* ---- PROFILE ------------------------------------------------------------------------------------------------------- */

.profile-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.profile-nav { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.profile-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 3px; color: var(--text-2); font-size: .92rem; font-weight: 500; }
.profile-nav a:hover { background: var(--surface-2); color: var(--text); }
.profile-nav a i { width: 18px; color: var(--muted); text-align: center; }
.profile-nav .danger-link { color: var(--danger); } .profile-nav .danger-link i { color: var(--danger); }
.profile-me { display: flex; align-items: center; gap: 12px; padding: 8px 8px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.profile-me strong { display: block; font-family: var(--font-display); line-height: 1.2; }
.profile-me span { font-size: .78rem; color: var(--muted); }
.settings-card { margin-bottom: 22px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.settings-card .card-body { padding: 22px 24px 8px; }
.settings-card .card-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 50%, transparent); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-2 { grid-column: span 2; }
.notify-list { display: grid; gap: 4px; padding-bottom: 14px; }
.notify-list .switch { justify-content: space-between; width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); flex-direction: row-reverse; }
.notify-list .switch:last-child { border-bottom: 0; }
.notify-list .switch div { flex: 1; }
.notify-list .switch strong { display: block; color: var(--text); font-weight: 600; }
.notify-list .switch small { color: var(--muted); }
.danger-card { border-color: rgba(244, 63, 94, .3); }
.danger-card .card-title i { color: var(--danger); }


/* ---- SHARED ACCOUNT BITS ------------------------------------------------------------------------------------------- */

.acct-loading { display: grid; gap: 18px; }
.acct-loading .skeleton { height: 120px; border-radius: var(--r-lg); }
.status-badge-paid { background: rgba(34, 197, 94, .12); color: var(--success); border-color: rgba(34, 197, 94, .25); }
.sandbox-note { margin-bottom: 20px; }
.inv-number { font-family: var(--font-mono); font-size: .86rem; color: var(--text); }

@media (max-width: 1180px) { .acct-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) {
    .acct-hero, .checkout-grid, .profile-grid { grid-template-columns: minmax(0, 1fr); }
    .pay-card, .profile-nav { position: static; }
    .profile-nav { flex-direction: row; overflow-x: auto; }
    .profile-me { display: none; }
    .profile-nav a { white-space: nowrap; }
}
@media (max-width: 640px) {
    .acct-plans, .form-grid, .order-features { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span-2 { grid-column: auto; }
    .invoice-doc { padding: 34px 22px; border-radius: 3px; }
    .inv-parties { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .inv-title { text-align: left; }
    .inv-stamp { top: 24px; right: 18px; font-size: 1.1rem; }
    .success-unlocks, .trust-row, .auth-stat-row { grid-template-columns: minmax(0, 1fr); }
    .table-wrap .hide-sm { display: none; }
}

@media print {
    .app-side, .inv-actions, .app-head { display: none !important; }
    .app-shell { display: block; }
    .app-main { padding: 0; }
    .invoice-doc { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
    .invoice-doc::before { display: none; }
    #page-invoice { display: block !important; }
}
