.account-body {
    min-height: 100vh;
}

.account-app,
.login-shell {
    position: relative;
    z-index: 1;
}

.account-app {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    min-height: 100vh;
}

.account-side {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100vh;
    padding: 28px 18px 22px;
    border-inline-start: 1px solid var(--line);
    background:
        radial-gradient(120px 160px at 50% 72px, rgba(255, 77, 106, 0.18), transparent 70%),
        #0c0c0a;
}

.side-mark {
    position: relative;
    width: 148px;
    height: 148px;
    margin: 0 auto 4px;
}

.side-mark::before {
    content: "";
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 77, 106, 0.42), transparent 68%);
    animation: side-pulse 3.8s ease-in-out infinite;
}

.side-user {
    position: relative;
    width: 100%;
    height: 100%;
}

.side-user .ring {
    fill: none;
    stroke: var(--magenta);
    stroke-width: 1.7;
    stroke-dasharray: 12 9;
    transform-box: fill-box;
    transform-origin: center;
    animation: side-spin 14s linear infinite;
}

.side-user .head,
.side-user .shoulders {
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 140;
    stroke-dashoffset: 140;
    animation: side-draw 1.3s ease forwards;
}

.side-name {
    margin: 0;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
}

.side-role {
    margin: 0 0 16px;
    text-align: center;
    color: var(--lime);
    font-size: 0.82rem;
}

.side-nav {
    display: grid;
    gap: 6px;
}

.side-nav-site {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.side-nav a,
.side-exit {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    text-align: start;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.side-nav svg,
.side-exit svg {
    width: 34px;
    height: 34px;
    flex: none;
}

.nav-ico .ico-line {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-ico .ico-fill { fill: currentColor; }

.nav-ico .ico-hot {
    fill: var(--magenta);
    stroke: none;
}

.nav-ico .ico-mark {
    fill: none;
    stroke: var(--magenta);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.side-exit .nav-ico .ico-line { stroke: var(--muted); }
.side-exit:hover .nav-ico .ico-line { stroke: var(--ink); }

.nav-ico .ico-dash {
    fill: none;
    stroke: var(--magenta);
    stroke-width: 2;
    stroke-dasharray: 5 3.6;
    transform-box: fill-box;
    transform-origin: center;
    animation: side-spin 14s linear infinite;
}

.side-nav a.is-on .nav-ico { color: var(--lime); }

.side-nav a:hover,
.side-exit:hover {
    color: var(--ink);
    border-color: rgba(255, 77, 106, 0.45);
    transform: translateX(-4px);
}

.side-nav a.is-on {
    color: var(--ink);
    background: rgba(255, 77, 106, 0.12);
    border-color: rgba(226, 255, 77, 0.4);
}

.account-side > form {
    width: 100%;
    margin-top: auto;
}

.side-exit {
    width: 100%;
    margin-top: 0;
    color: var(--magenta);
}

.account-view {
    position: relative;
    min-width: 0;
    padding: 36px 28px 64px;
}

#account-stage {
    width: min(860px, 100%);
}

.login-shell {
    width: min(560px, calc(100% - 32px));
    margin: 0 auto;
}

.ax-load {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 30;
    place-items: center;
    background: rgba(9, 9, 8, 0.72);
    backdrop-filter: blur(10px);
}

.ax-load.is-on { display: grid; }

.ax-core {
    width: 148px;
    display: grid;
    justify-items: center;
}

@keyframes side-spin { to { transform: rotate(360deg); } }
@keyframes side-draw { to { stroke-dashoffset: 0; } }
@keyframes side-pulse {
    50% { opacity: 0.45; transform: scale(1.08); }
}

.login-shell {
    min-height: 100vh;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 18px;
}

.login-hero {
    position: relative;
    width: min(250px, 72vw);
    margin-bottom: 2px;
    overflow: visible;
}

.think {
    position: absolute;
    z-index: 4;
    top: 14px;
    left: 0;
    width: min(210px, 48vw);
    transform: translateX(calc(-100% + 52px));
    padding: 10px 12px 12px;
    border: 1px solid rgba(255, 77, 106, 0.55);
    border-radius: 18px 18px 8px 18px;
    background: rgba(12, 12, 10, 0.94);
    color: var(--ink);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
    pointer-events: none;
}

.think[hidden] { display: none; }

.think-line {
    margin: 0;
    min-height: 1.7em;
    font-size: 0.92rem;
    line-height: 1.75;
}

.think[data-mood="ok"] { border-color: rgba(226, 255, 77, 0.7); }
.think[data-mood="wait"] { border-color: rgba(226, 255, 77, 0.35); }

.think-pips {
    position: absolute;
    left: calc(100% + 4px);
    top: 22px;
    width: 40px;
    height: 28px;
}

.think-pips i {
    position: absolute;
    display: block;
    border-radius: 50%;
    border: 1px solid rgba(255, 77, 106, 0.75);
    background: #121210;
}

.think-pips i:nth-child(1) { width: 9px; height: 9px; left: 0; top: 0; }
.think-pips i:nth-child(2) { width: 6px; height: 6px; left: 14px; top: 8px; }
.think-pips i:nth-child(3) { width: 4px; height: 4px; left: 26px; top: 14px; }

@media (max-width: 720px) {
    .login-shell {
        align-content: start;
        /* با ربات بالای فرم: padding: 150px 16px 32px; */
        padding: 32px 16px;
    }

    .think {
        left: 50%;
        top: 0;
        width: min(250px, 88vw);
        transform: translate(-50%, calc(-100% - 40px));
    }

    .think-pips {
        left: auto;
        right: 8px;
        top: calc(100% - 2px);
        bottom: auto;
        width: 34px;
        height: 46px;
        display: block;
        transform: none;
    }

    .think-pips i:nth-child(1) { width: 9px; height: 9px; left: 22px; top: 0; }
    .think-pips i:nth-child(2) { width: 6px; height: 6px; left: 11px; top: 16px; }
    .think-pips i:nth-child(3) { width: 4px; height: 4px; left: 0; top: 34px; }
}

.login-person {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    color: var(--ink);
}

.login-person .person-ring {
    fill: none;
    stroke: var(--magenta);
    stroke-width: 1.6;
    stroke-dasharray: 10 8;
    transform-box: fill-box;
    transform-origin: center;
    animation: side-spin 18s linear infinite;
}

.login-person .head,
.login-person .limb,
.login-person .elbow,
.login-person .face ellipse,
.login-person .face path,
.login-person #login-hand,
.login-person use {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-person .limb-body { stroke-width: 2.8; }

.login-person .elbow { stroke-width: 2.4; }

.login-person .elbow-core {
    fill: var(--magenta);
    stroke: none;
}

.login-person .pupil { fill: currentColor; stroke: none; }
.login-person .catch { fill: var(--lime); stroke: none; }

.login-person .lid {
    transform-box: fill-box;
    transform-origin: center;
    animation: person-blink 4.8s ease-in-out infinite;
}

.login-person .pupil { transition: transform 0.6s ease; }
.login-person[data-pose="point"] .pupil { transform: translateY(1.4px); }
.login-person[data-pose="scratch"] .pupil { transform: translateY(-1.6px); }

.login-person .mouth { opacity: 0; transition: opacity 0.55s ease; }
.login-person[data-pose="wave"] .mouth-smile,
.login-person[data-pose="point"] .mouth-smile,
.login-person[data-pose="fold"] .mouth-flat,
.login-person[data-pose="scratch"] .mouth-think { opacity: 1; }

.login-card { width: 100%; }

.login-back {
    margin-top: 16px;
    color: var(--muted);
}

@keyframes person-blink {
    0%, 42%, 50%, 100% { transform: scaleY(1); }
    46% { transform: scaleY(0.08); }
}

@media (prefers-reduced-motion: reduce) {
    .login-person .lid,
    .login-person .person-ring { animation: none; }
}

.login-card,
.sheet,
.welcome-card {
    border: 1px solid var(--line);
    background: rgba(16, 16, 14, 0.92);
    padding: 22px;
}

.login-card h1 {
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.2;
    margin: 0 0 8px;
    text-wrap: balance;
}

.sheet h1,
.welcome h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    margin: 0 0 8px;
}

.sheet h2 { margin: 0 0 12px; }

.account-flash {
    margin: 0 0 16px;
    color: var(--ok);
}

.login-step { display: none; margin-top: 14px; }
.login-card[data-step="phone"] [data-login="phone"],
.login-card[data-step="secret"] [data-login="secret"],
.login-card[data-step="code"] [data-login="code"] { display: grid; gap: 12px; }

.login-otp { width: 100%; }

#login button.is-wait {
    position: relative;
    color: transparent;
}

#login .send.is-wait {
    background: #121210;
}

#login .login-otp.is-wait {
    border-color: rgba(226, 255, 77, 0.45);
}

.login-dots {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    gap: 7px;
    pointer-events: none;
}

#login button.is-wait .login-dots { display: flex; }

.login-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    animation: login-dot 0.9s linear infinite;
}

.login-dots i:nth-child(2) { animation-delay: -0.3s; }
.login-dots i:nth-child(3) { animation-delay: -0.6s; }

@keyframes login-dot {
    0% { background: var(--magenta); transform: scale(1.28); }
    34%, 100% { background: var(--lime); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .login-dots i { animation: none; transform: none; }
    .login-dots i:nth-child(2) { background: var(--magenta); }
}
.login-hint { margin: 0; color: var(--muted); }

.field textarea.is-short { min-height: 88px; }

.check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check input {
    width: 18px;
    height: 18px;
    accent-color: var(--magenta);
}

.discount-fields { display: grid; gap: 14px; }
.discount-fields[hidden] { display: none; }

.product-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #141412;
}
.sheet-head, .people li, .inbox header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.welcome { margin-bottom: 22px; }
.welcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.welcome-card span { color: var(--lime); font-weight: 700; }
.welcome-card strong { display: block; margin: 8px 0 4px; font-size: 1.2rem; }
.welcome-card p { margin: 0; color: var(--muted); }

.people, .inbox {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.people li, .inbox li {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.people b { display: block; font-weight: 400; color: var(--muted); }
.people-actions, .people form { display: flex; gap: 10px; align-items: center; }
.people button, .people a { color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0; }

.inbox header { flex-wrap: wrap; }
.inbox header span, .inbox time, .inbox-intent { color: var(--muted); }
.inbox p { margin: 8px 0 0; }

.player {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.player audio { display: none; }

.player button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    background: var(--lime);
    color: var(--lime-ink);
    font-weight: 700;
    cursor: pointer;
}

.player-track {
    position: relative;
    height: 6px;
    background: #2a2a26;
    cursor: pointer;
}

.player-track i {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 0;
    background: var(--magenta);
}

.player-time { color: var(--muted); }

.choice-row { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.choice { display: flex; gap: 6px; align-items: center; }

.identity {
    display: grid;
    gap: 12px;
    margin: 18px 0 8px;
}

.identity div {
    display: grid;
    gap: 4px;
}

.identity dt { color: var(--muted); }
.identity dd { margin: 0; }
.identity a { display: block; color: var(--lime); }

.site-list { display: grid; gap: 14px; }

#account-stage:has(.bill-desk) { width: 100%; }

.account-app:has(.bill-desk) {
    height: auto;
    min-height: 100vh;
    overflow: visible;
}

.account-view:has(.bill-desk) {
    height: auto;
    overflow: visible;
    padding: 28px 22px 48px;
}

.bill-desk {
    height: auto;
    align-items: start;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.9fr);
    gap: 14px;
}

.bill-show {
    height: auto;
    overflow: visible;
    padding: 16px;
}

.bill-show h1 {
    font-size: 1.55rem;
    line-height: 1;
    margin: 0;
}

.bill-show .sheet-head { margin-bottom: 8px; }

.bill-fit {
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.bill-scale {
    position: relative;
    flex: none;
    overflow: hidden;
}

.bill-side {
    align-content: start;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bill-side > .sheet:first-child,
.bill-side > .sheet:last-child { grid-column: 1 / -1; }

.bill-side .sheet {
    height: auto;
    overflow: visible;
    padding: 14px 16px;
}

.bill-side h2 { font-size: 1.05rem; margin: 0 0 8px; }
.bill-side .sheet-form { gap: 8px; margin-top: 8px; }
.bill-side .field textarea { min-height: 58px; }
.bill-side .send { min-height: 40px; margin-top: 8px; }
.bill-side .paycard { padding: 10px; gap: 10px; }
.bill-side .paycard-mark { width: 64px; height: 64px; }
.bill-callout { margin: 0 0 10px; line-height: 1.7; font-size: 0.92rem; }

.out-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.out-row form { margin: 0; }
.out-row .btn { text-decoration: none; }

.invoice-frame {
    width: 900px;
    height: 1100px;
    border: 0;
    background: #e9e9e9;
    display: block;
}

.bill-row {
    display: grid;
    grid-template-columns: 1.3fr 1.2fr 0.9fr 88px 120px auto;
    gap: 8px;
    align-items: end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.bill-row .field { gap: 6px; }
.bill-row .btn { margin-bottom: 2px; }

.bill-callout {
    margin: 0 0 16px;
    line-height: 1.9;
    color: var(--ink);
}

.paycard {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    padding: 16px;
    background:
        radial-gradient(140px 90px at 8% 20%, rgba(255, 77, 106, 0.22), transparent 70%),
        rgba(12, 12, 10, 0.4);
}

.paycard-mark {
    width: 92px;
    height: 92px;
}

.paycard-mark svg { width: 100%; height: 100%; }
.paycard-mark .ico-dash {
    fill: none;
    stroke: var(--magenta);
    stroke-width: 2;
    stroke-dasharray: 5 3.6;
    transform-box: fill-box;
    transform-origin: center;
    animation: side-spin 14s linear infinite;
}
.paycard-mark .ico-line {
    fill: none;
    stroke: var(--lime);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.paycard-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
    gap: 12px 18px;
    min-width: 0;
}

.paycard dl {
    display: grid;
    gap: 12px;
    margin: 0;
    min-width: 0;
}

.paycard dl > div,
.paycard dd { min-width: 0; }

.paycard dd[dir="ltr"] {
    text-align: end;
    overflow-wrap: anywhere;
}

.paycard dt { color: var(--muted); }
.paycard dd { margin: 4px 0 0; font-weight: 700; }
.paycard .iban { color: var(--lime); letter-spacing: 0.04em; }

.receipt-shot {
    display: block;
    max-width: min(420px, 100%);
    margin-top: 12px;
    border: 1px solid var(--line);
}

.ask[hidden] { display: none !important; }
.ask:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(9, 9, 8, 0.72);
    backdrop-filter: blur(8px);
}

.ask-card {
    width: min(460px, 100%);
    border: 1px solid var(--line);
    background: #121210;
    padding: 22px;
}

.ask-card p { margin: 0 0 18px; line-height: 1.9; }
.ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-actions button {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}
.ask-actions [data-ask-act="send"] {
    border-color: transparent;
    background: var(--lime);
    color: var(--lime-ink);
    font-weight: 800;
}
.ask-actions [data-ask-act="keep"] { border-color: rgba(226, 255, 77, 0.45); }

@media (max-width: 1100px) {
    .account-app:has(.bill-desk),
    .account-view:has(.bill-desk) {
        height: auto;
        overflow: visible;
    }
    .bill-desk {
        height: auto;
        grid-template-columns: 1fr;
    }
    .bill-show { overflow: visible; }
    .bill-fit {
        height: 400px;
        overflow: hidden;
        align-items: center;
    }
    .bill-side { grid-template-columns: 1fr; grid-template-rows: none; }
}

.side-toggle,
.side-veil { display: none; }

@media (max-width: 800px) {
    .account-app { grid-template-columns: minmax(0, 1fr); }
    .account-view { padding: 18px 14px 128px; }
    .sheet-head, .people li { align-items: flex-start; flex-direction: column; }
    .bill-row { grid-template-columns: 1fr; }
    .paycard { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .paycard-mark { width: 72px; height: 72px; }

    .side-toggle {
        display: grid;
        place-items: center;
        position: fixed;
        z-index: 48;
        right: calc(16px + env(safe-area-inset-right));
        bottom: calc(16px + env(safe-area-inset-bottom));
        width: 58px;
        height: 58px;
        padding: 0;
        border: 1px solid rgba(255, 77, 106, 0.72);
        border-radius: 50%;
        background: #121210;
        color: var(--ink);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
        cursor: pointer;
    }

    .side-toggle svg { width: 30px; height: 30px; }

    .side-veil {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 46;
        background: rgba(9, 9, 8, 0.38);
        backdrop-filter: blur(14px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .side-veil.is-on {
        opacity: 1;
        pointer-events: auto;
    }

    .account-side {
        position: fixed;
        z-index: 47;
        top: 12px;
        bottom: 12px;
        left: 12px;
        width: min(320px, calc(100vw - 88px));
        height: auto;
        border: 1px solid var(--line);
        border-radius: 22px;
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
        transform: translateX(calc(-100% - 28px));
        transition: transform 0.35s cubic-bezier(0.4, 0.05, 0.2, 1);
        overflow: auto;
        padding: 22px 16px 16px;
    }

    .account-side.is-open { transform: none; }

    .side-mark { width: 112px; height: 112px; }

    body.side-open { overflow: hidden; }
}

@media (max-width: 800px) and (prefers-reduced-motion: reduce) {
    .account-side,
    .side-veil { transition: none; }
}
