:root {
  --bg: #e8edf6; --surface: #f6f8fc; --surface-2: #e3e8f3; --text: #25334e; --muted: #65718a; --line: #cad3e2; --accent: #5b5aa1; --accent-ink: #fff; --good: #327568; --warning: #947031; --danger: #b04e66; --radius: 24px; --font: Vazirmatn, system-ui, sans-serif;
  --glass: rgba(249,251,255,.76); --glass-border: rgba(255,255,255,.9); --wash: rgba(255,255,255,.46); --shadow: 0 12px 32px #465e8920; --orb-a: #c9bcea; --orb-b: #a6d6dd; --scene: rgba(224,233,246,.69);
}
:root[data-theme="dark"] {
  --bg: #1c2539; --surface: #303e55; --surface-2: #3b4961; --text: #f2f4fd; --muted: #b2bed1; --line: #516078; --accent: #b7b3ef; --accent-ink: #252444; --good: #8ed6bd; --warning: #efcb86; --danger: #ffa0b5;
  --glass: rgba(40,54,76,.83); --glass-border: rgba(180,199,226,.2); --wash: rgba(58,73,99,.58); --shadow: 0 12px 32px #03091c2b; --orb-a: #555780; --orb-b: #376875; --scene: rgba(21,31,50,.79);
}
html, body { background: var(--bg); }
body { font-size: 13px; }
button { transition: background .18s, transform .18s; }
button:active { transform: scale(.96); }
button:focus-visible, a:focus-visible { outline-offset: 2px; }
.haze-shell { max-width: 640px; padding-top: max(env(safe-area-inset-top),var(--host-safe-top,0px)); isolation: isolate; }
.haze-aurora { position: fixed; z-index: -1; inset: 0; max-width: 640px; margin: auto; overflow: hidden; background: radial-gradient(ellipse at 4% 18%, var(--orb-b), transparent 52%), radial-gradient(ellipse at 100% 65%, var(--orb-a), transparent 56%); opacity: .85; pointer-events: none; }
.haze-aurora:after { content: ''; position: absolute; width: 180px; height: 450px; left: 36%; top: 10%; border-radius: 50%; background: var(--wash); transform: rotate(-25deg); filter: blur(45px); }
.app-header { padding: 20px 19px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.haze-brand { display: flex; align-items: center; gap: 8px; }
.haze-mark { width: 33px; height: 33px; color: var(--accent); }
.haze-brand strong { display: block; font-size: 12px; }
.haze-brand div > span { font-size: 9px; letter-spacing: 3px; color: var(--muted); display: block; line-height: 1.1; margin-top: 3px; }
.haze-head-controls { display: flex; align-items: center; gap: 4px; }
.haze-icon, .haze-language { height: 42px; min-width: 42px; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; }
.haze-icon span { display: none; }
.haze-language { font-size: 11px; }
.app-main { padding: 5px 14px 116px; min-height: calc(100dvh - 85px); }
.haze-workspace-heading { display: flex; align-items: center; justify-content: space-between; padding: 5px 5px 18px; gap: 8px; }
.haze-workspace-heading h1 { font-size: 23px; letter-spacing: -.7px; }
.haze-workspace-heading p { font-size: 10px; color: var(--muted); margin-top: 5px; }
.haze-filter-toggle { border: 1px solid var(--glass-border); background: var(--wash); width: 45px; height: 45px; display: grid; place-items: center; border-radius: 50%; flex-shrink: 0; }
.haze-filter-toggle span { display: none; }
.haze-filters { background: var(--glass); border: 1px solid var(--glass-border); padding: 12px; border-radius: 22px; margin-bottom: 12px; }
.haze-filters .filter-row { flex-wrap: wrap; }
.haze-refresh { display: flex; align-items: center; gap: 8px; font-size: 11px; min-height: 36px; border: 0; background: transparent; margin-inline-start: auto; }
.haze-split { display: grid; grid-template-columns: 91px minmax(0,1fr); gap: 10px; align-items: stretch; }
.haze-collection { border: 1px solid var(--glass-border); background: var(--wash); border-radius: 29px; padding: 12px 5px 7px; display: flex; flex-direction: column; align-items: stretch; min-height: 550px; box-shadow: 0 10px 30px #5b648409; overflow: hidden; }
.haze-list-label { color: var(--muted); font-size: 9px; text-align: center; margin: 0 0 12px; letter-spacing: .3px; }
.haze-list-label bdi { background: var(--glass); padding: 1px 5px; border-radius: 8px; margin-inline-start: 3px; }
.haze-list-scroll { overflow: auto; max-height: 520px; min-height: 250px; scrollbar-width: none; flex: 1; }
.haze-account { width: 100%; background: none; border: 1px solid transparent; padding: 10px 3px 11px; border-radius: 24px; text-align: center; display: flex; align-items: center; flex-direction: column; gap: 7px; }
.haze-account[aria-pressed="true"] { background: var(--glass); border-color: var(--glass-border); box-shadow: 0 6px 20px #697ea121; }
.haze-account-orb { width: 43px; height: 43px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--glass-border); border-radius: 50%; position: relative; font-size: 15px; color: var(--muted); }
.haze-account[aria-pressed="true"] .haze-account-orb { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 2px 7px #ffffff30, 0 5px 12px #4043771f; }
.haze-account-orb i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--good); right: 0; bottom: 0; border: 2px solid var(--surface); }
.haze-account.warning i { background: var(--warning); }.haze-account.critical i { background: var(--danger); }.haze-account.muted i { background: var(--muted); }
.haze-account strong { font-size: 9px; font-weight: 500; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.haze-account small { font-size: 8px; color: var(--muted); line-height: 1.35; }
.haze-list-add { display: grid; place-items: center; width: 43px; height: 43px; margin: 15px auto 2px; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass); flex-shrink: 0; }
.haze-list-more { border: 0; background: transparent; width: 100%; min-height: 44px; font-size: 10px; display: flex; justify-content: center; align-items: center; gap: 4px; }
.haze-inspector { border-radius: 30px; border: 1px solid var(--glass-border); background: var(--glass); box-shadow: var(--shadow); padding: 17px 15px 8px; overflow: hidden; min-width: 0; backdrop-filter: blur(18px); }
.haze-inspector-heading { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.haze-status { color: var(--good); display: flex; align-items: center; gap: 4px; font-size: 9px; }
.haze-status.warning { color: var(--warning); }.haze-status.critical { color: var(--danger); }.haze-status.muted { color: var(--muted); }
.haze-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.haze-inspector-more { background: none; border: 0; padding: 6px 0; display: flex; align-items: center; gap: 3px; min-height: 34px; font-size: 9px; color: var(--muted); }
.haze-inspector-more .icon { width: 14px; }
.haze-name { font-size: 18px; line-height: 1.5; font-weight: 650; margin-top: 15px; overflow-wrap: anywhere; text-align: start; }
.haze-technical { font-size: 9px; color: var(--muted); overflow-wrap: anywhere; display: block; margin-top: 4px; }
.haze-network { font-size: 10px; color: var(--muted); display: block; margin-top: 5px; }
.haze-data { display: flex; gap: 13px; margin: 32px 0 18px; align-items: center; justify-content: space-between; }
.haze-data-copy { min-width: 0; }
.haze-data-copy > span:first-child { font-size: 10px; color: var(--muted); }
.haze-data-copy strong { display: block; font-size: clamp(33px,11vw,47px); font-weight: 300; line-height: 1.35; letter-spacing: -2.4px; margin-top: 7px; }
.haze-data-unit { font-size: 12px; display: block; }
.haze-data-copy small { font-size: 9px; color: var(--muted); display: block; margin-top: 5px; }
.haze-vessel { width: 27px; height: 151px; border: 1px solid var(--glass-border); background: var(--surface-2); border-radius: 20px; overflow: hidden; position: relative; box-shadow: inset 3px 0 9px #5b648410, 1px 1px 0 var(--glass-border); flex-shrink: 0; }
.haze-fill { position: absolute; bottom: 0; width: 100%; background: linear-gradient(0deg,#7974b6,#b7b1df 70%,#d7dafa); border-top: 2px solid #ffffffb3; border-radius: 13px 13px 0 0; transform-origin: bottom; box-shadow: inset 6px 0 7px #ffffff35; }
.haze-vessel i { position: absolute; left: 9px; right: 9px; height: 1px; background: #ffffffbd; top: 25%; }.haze-vessel i:nth-of-type(2) {top:50%}.haze-vessel i:nth-of-type(3) {top:75%}
.haze-used { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.haze-time { margin: 16px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.haze-time > span { color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 5px; }
.haze-time strong { font-size: 18px; font-weight: 500; }
.haze-state-note { font-size: 10px; color: var(--danger); margin: 10px 0; }
.haze-main-action { display: grid; grid-template-columns: minmax(0,1fr) 43px; gap: 6px; }
.haze-copy, .haze-qr { border: 0; border-radius: 17px; min-height: 50px; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 11px; }
.haze-copy { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 2px #ffffff30; }.haze-qr { background: var(--surface-2); color: var(--accent); }.haze-qr span {display:none}
.haze-utilities { display: flex; flex-direction: column; position: relative; padding-top: 8px; }
.haze-utilities button { border: 0; background: none; display: flex; gap: 6px; align-items: center; min-height: 41px; text-align: start; font-size: 10px; padding: 6px 0; }
.haze-utilities .icon { width: 15px; }
.haze-auto-state { position: absolute; inset-inline-end: 0; bottom: 10px; font-size: 8px; background: var(--surface-2); padding: 2px 6px; border-radius: 9px; }
.haze-all-controls { border: 0; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; width: 100%; min-height: 43px; gap: 7px; font-size: 9px; border-top: 1px solid var(--line); margin-top: 6px; }
.haze-empty { border-radius: 30px; min-height: 450px; background: var(--glass); border: 1px solid var(--glass-border); padding: 20px; display: grid; place-items: center; }
.app-nav { bottom: calc(15px + max(env(safe-area-inset-bottom),var(--host-safe-bottom,0px))); inset-inline: 22px; max-width: 410px; border: 1px solid var(--glass-border); border-radius: 28px; padding: 6px; gap: 3px; background: var(--glass); backdrop-filter: blur(20px); box-shadow: var(--shadow); }
.app-nav button { flex-direction: row; gap: 7px; min-height: 46px; font-size: 11px; border-radius: 23px; }
.app-nav [aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.app-nav .icon { width: 17px; }
.haze-secondary { padding: 8px 5px; }
.page-title h1 { font-size: 25px; }.page-title p { font-size: 12px; }
.wallet-card { background: var(--glass); border: 1px solid var(--glass-border); color: var(--text); border-radius: 30px; box-shadow: var(--shadow); }
.wallet-card .balance {font-weight:400; font-size:36px}.wallet-card .btn {background:var(--accent);color:var(--accent-ink);border-radius:99px}
.wallet-tabs .btn { border-radius: 20px; background: var(--wash); }
.transaction-list { border: 0; }.transaction { background: var(--glass); border: 1px solid var(--glass-border); padding: 15px 11px; border-radius: 20px; margin-bottom: 8px; gap: 8px; grid-template-columns: 33px minmax(0,1fr) auto; }
.tx-icon { width: 31px; height: 31px; border-radius: 50%; }.tx-title {font-size:12px}.tx-amount {font-size:11px}
.category-list {gap:10px}.category-card {background:var(--glass);border-color:var(--glass-border);border-radius:25px;padding:19px 14px;grid-template-columns:40px minmax(0,1fr) 18px;gap:10px;box-shadow:0 5px 20px #52638a0a}.category-symbol {width:40px;height:40px;border-radius:50%}
.category-card h3 { font-size: 14px; }.notice { border-radius: 20px; }

/* A dialog is an entire translucent scene. Header, content and actions float independently. */
dialog.sheet { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; inset: 0; border: 0; border-radius: 0; padding: 0; background: var(--scene); color: var(--text); box-shadow: none; overflow: hidden; }
dialog.sheet::backdrop { background: #72799725; backdrop-filter: blur(22px) saturate(.65); }
.haze-dialog-scene { height: 100%; padding: calc(12px + max(env(safe-area-inset-top),var(--host-safe-top,0px))) 12px calc(12px + max(env(safe-area-inset-bottom),var(--host-safe-bottom,0px))); display: flex; flex-direction: column; gap: 13px; background: radial-gradient(ellipse at 0 20%,color-mix(in srgb,var(--orb-b) 32%, transparent),transparent 50%),radial-gradient(ellipse at 100% 90%,color-mix(in srgb,var(--orb-a) 45%, transparent),transparent 60%); }
.sheet-header { flex: 0 0 auto; width: 100%; max-width: 550px; margin: 0 auto; border: 1px solid var(--glass-border); background: var(--glass); border-radius: 36px; min-height: 78px; padding: 12px 13px 12px 16px; box-shadow: var(--shadow); gap: 8px; backdrop-filter: blur(22px); }
.haze-dialog-heading { display: flex; gap: 7px; align-items: center; min-width: 0; }.haze-dialog-heading > div {min-width:0}
.sheet-header h2 { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.haze-dialog-kicker { font-size: 8px; display: block; color: var(--muted); letter-spacing: 2px; margin-bottom: 3px; }
.sheet-header .icon-btn { border-radius: 50%; background: var(--surface-2); border: 1px solid var(--glass-border); width: 39px; min-width: 39px; height: 39px; }
.haze-dialog-heading > .icon-btn { width: 32px; min-width: 32px; height: 38px; border: 0; background: transparent; }
.sheet-body { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 550px; margin: 0 auto; padding: 7px 2px 10px; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.haze-dialog-panes { display: grid; gap: 13px; padding-inline: 5px; }
.haze-glass-pane { min-width: 0; padding: 20px; border: 1px solid var(--glass-border); border-radius: 28px; background: var(--glass); backdrop-filter: blur(18px); box-shadow: 0 7px 24px #30466b0c; }
.haze-glass-pane:nth-child(3n+2) { margin-inline-start: 12px; }.haze-glass-pane:nth-child(3n+3) { margin-inline-end: 12px; }
.haze-glass-pane > :first-child { margin-top: 0 !important; }.haze-glass-pane > :last-child { margin-bottom: 0 !important; }
.haze-detail-cover { padding: 22px; }.detail-title {font-size:22px;font-weight:500;overflow-wrap:anywhere}.detail-identity {font-size:10px;margin-bottom:0}
.haze-detail-cover .row.between {gap:7px}.detail-usage {background:none;padding:20px 0 0;margin:0}.detail-usage .big {font-size:32px;font-weight:350;margin:10px 0}.detail-usage .progress {height:8px;background:var(--surface-2);border-radius:8px}.progress > span {background:var(--accent)}
.haze-access-pane { padding: 10px; }.haze-access-pane .action-grid {gap:7px}.action-grid .btn {border-radius:20px;background:var(--wash);border-color:var(--glass-border);min-height:59px;flex-direction:column;font-size:11px;gap:4px}.action-grid .primary {background:var(--accent);color:var(--accent-ink)}
.haze-facts { padding: 17px 20px; }.haze-facts summary {display:flex;justify-content:space-between;align-items:center;cursor:pointer;font-size:12px;font-weight:600;min-height:28px;list-style:none}.haze-facts summary::-webkit-details-marker {display:none}
.fact-list > div {font-size:11px;gap:12px}.fact-list dt {flex-shrink:1}.haze-facts[open] .fact-list {margin-top:12px!important}
.sheet-actions { width: 100%; max-width: 530px; margin: 0 auto; flex: 0 0 auto; display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 9px; border: 1px solid var(--glass-border); background: var(--glass); border-radius: 30px; backdrop-filter: blur(20px); box-shadow: var(--shadow); }
.sheet-actions > .btn {flex:1;min-width:100px;width:auto;border-radius:24px;font-size:12px;min-height:47px}.sheet-actions .share-options {width:100%;display:flex;gap:8px}.sheet-actions .share-options .btn {flex:1;border-radius:23px;min-height:48px}.sheet-actions .secondary {background:var(--surface-2)}
.haze-actions-empty { width: auto; padding: 9px 22px; min-height: 35px; }.haze-scene-hint {font-size:10px;color:var(--muted)}
.sheet-error:not(:empty) { background: var(--surface); border: 1px solid var(--danger); padding: 16px; border-radius: 24px; margin: 0 5px 14px; }
.sheet .btn {border-radius:20px}.sheet .notice {background:var(--surface-2);border:0;padding:17px;font-size:12px;line-height:1.9}.sheet .notice.critical {color:var(--danger)}
.sheet .plan-list {gap:11px}.sheet .plan-card {background:var(--wash);border:1px solid var(--glass-border);border-radius:25px;padding:18px;gap:12px}.sheet .plan-card .price {font-size:28px;font-weight:400}.sheet .plan-card .plan-meta {flex-wrap:wrap;gap:14px}.sheet .plan-card .btn {border-radius:30px;min-height:43px;font-size:12px}.sheet .plan-card h3 {font-size:14px}
.sheet .field input,.sheet .field select,.sheet .field textarea {border-radius:18px;background:var(--surface);font-size:12px}.sheet .field {margin-bottom:12px}.sheet .technical-value {border-radius:17px;font-size:11px;background:var(--surface-2)}
.sheet[data-kind="qr"] .haze-glass-pane:first-child {max-width:310px;justify-self:center;width:100%;padding:24px;background:var(--surface);border-radius:35px}.sheet .qr-frame {max-width:240px;margin:0 auto;background:#fff;border-radius:17px;padding:10px}.sheet .qr-frame svg {width:100%;height:auto}.sheet[data-kind="qr"] .haze-glass-pane:nth-child(2) {padding:15px 20px}
.sheet .renew-summary {background:transparent;padding:0}.sheet .summary-amount {font-size:31px;font-weight:400;color:var(--accent)}.sheet[data-kind="confirmation"] .haze-dialog-panes {gap:11px}.sheet[data-kind="confirmation"] .haze-glass-pane {padding:19px}
.sheet .settings-section {margin:0;padding:0;border:0}.sheet .account-options {grid-template-columns:1fr;gap:7px;margin-top:14px}.sheet .account-options .btn {justify-content:flex-start;font-size:12px;padding:12px 15px;border-color:var(--glass-border)}.sheet .concept-options {grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.sheet .concept-options .btn {padding:8px;font-size:10px;min-width:0}.sheet .demo-label {font-size:9px;letter-spacing:0}.sheet .action-row {border:0;padding:0;min-height:48px}.sheet .settings-section .action-row {border-bottom:1px solid var(--line);padding:12px 0}.sheet .settings-section h3 {font-size:15px}.sheet .grid-2 {gap:8px}.sheet .grid-2 .btn {font-size:10px;padding:9px}
.toast {border-radius:24px;background:var(--text);color:var(--bg);bottom:100px}
@supports not (backdrop-filter: blur(1px)) { .haze-inspector,.sheet-header,.haze-glass-pane,.sheet-actions,.app-nav {background:var(--surface)} dialog.sheet {background:var(--bg)} }
@media (min-width:500px) { .haze-split {grid-template-columns:112px minmax(0,1fr);gap:16px}.haze-inspector {padding:24px}.haze-data-copy strong {font-size:62px}.haze-data {margin-top:35px}.haze-account strong {font-size:11px}.haze-collection {padding-inline:10px}.haze-main-action {grid-template-columns:1fr 55px}.haze-dialog-panes {padding-inline:14px} }
@media (max-width:370px) { .app-main {padding-inline:11px}.haze-split {grid-template-columns:82px minmax(0,1fr);gap:8px}.haze-inspector {padding-inline:12px}.haze-name {font-size:16px}.haze-data {gap:7px}.haze-data-copy strong {font-size:37px}.haze-main-action {grid-template-columns:1fr 38px;gap:4px}.haze-copy {font-size:10px}.haze-copy .icon {width:15px}.haze-dialog-scene {padding-inline:10px}.haze-glass-pane {padding:16px}.haze-glass-pane:nth-child(3n+2) {margin-inline-start:7px}.haze-glass-pane:nth-child(3n+3) {margin-inline-end:7px}.sheet-header h2 {font-size:14px}.sheet .concept-options {grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after {animation:none!important;transition:none!important;scroll-behavior:auto!important} }
