/* PM-API — Material-flavoured design system, written from scratch */
:root {
  --blue: #1a73e8; --blue-d: #1557b0; --blue-l: #e8f0fe; --blue-t: #d2e3fc;
  --red: #d93025; --red-l: #fce8e6; --yellow: #f9ab00; --yellow-l: #fef7e0;
  --green: #188038; --green-l: #e6f4ea; --purple: #9334e6; --purple-l: #f3e8fd;
  --bg: #f8fafd; --surface: #ffffff; --surface-2: #f1f4f9; --surface-3: #e9eef6;
  --text: #1f1f1f; --text-2: #444746; --text-3: #747775; --line: #dde3ea; --line-2: #c4c7c5;
  --shadow-1: 0 1px 2px rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15);
  --shadow-2: 0 1px 2px rgba(60,64,67,.30), 0 2px 6px 2px rgba(60,64,67,.15);
  --shadow-3: 0 4px 8px 3px rgba(60,64,67,.15), 0 1px 3px rgba(60,64,67,.30);
  --radius: 16px; --radius-s: 10px; --radius-l: 28px;
  --ease: cubic-bezier(.2,0,0,1); --ease-out: cubic-bezier(.05,.7,.1,1); --ease-in: cubic-bezier(.3,0,.8,.15);
  --font: "Google Sans", "Google Sans Text", "Product Sans", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Google Sans Mono", "JetBrains Mono", "Roboto Mono", Consolas, Menlo, monospace;
  --nav-w: 272px; --bar-h: 64px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --blue: #a8c7fa; --blue-d: #d3e3fd; --blue-l: #0842a0; --blue-t: #062e6f;
  --red: #f2b8b5; --red-l: #601410; --yellow: #fdd663; --yellow-l: #4a3800;
  --green: #6dd58c; --green-l: #0f5223; --purple: #d7aefb; --purple-l: #4a0072;
  --bg: #131314; --surface: #1e1f20; --surface-2: #28292a; --surface-3: #333537;
  --text: #e3e3e3; --text-2: #c4c7c5; --text-3: #8e918f; --line: #3c4043; --line-2: #5f6368;
  --shadow-1: 0 1px 3px rgba(0,0,0,.5); --shadow-2: 0 2px 8px rgba(0,0,0,.5); --shadow-3: 0 8px 24px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background .3s var(--ease), color .3s var(--ease); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); }
::selection { background: var(--blue-t); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-3); }
svg.i { width: 20px; height: 20px; fill: currentColor; flex: none; display: inline-block; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───────── boot splash ───────── */
#splash { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 9999; transition: opacity .4s var(--ease), visibility .4s; }
#splash.gone { opacity: 0; visibility: hidden; }
#splash .dots { display: flex; gap: 10px; }
#splash .dots i { width: 12px; height: 12px; border-radius: 50%; animation: bounce 1.2s infinite var(--ease); }
#splash .dots i:nth-child(1) { background: #4285f4; } #splash .dots i:nth-child(2) { background: #ea4335; animation-delay: .1s; }
#splash .dots i:nth-child(3) { background: #fbbc04; animation-delay: .2s; } #splash .dots i:nth-child(4) { background: #34a853; animation-delay: .3s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-14px); } }

/* ───────── buttons ───────── */
.btn { --c: var(--blue); position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 24px; border-radius: 999px; border: none; font: 500 14px/1 var(--font); letter-spacing: .1px; cursor: pointer; user-select: none; white-space: nowrap; transition: box-shadow .2s var(--ease), background .2s var(--ease), color .2s, transform .15s var(--ease); background: var(--c); color: #fff; }
html[data-theme="dark"] .btn:not(.text):not(.outline):not(.tonal) { color: #062e6f; }
.btn:hover { box-shadow: var(--shadow-1); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn .i { width: 18px; height: 18px; margin-left: -6px; }
.btn.tonal { background: var(--blue-l); color: var(--blue-d); }
html[data-theme="dark"] .btn.tonal { color: var(--blue-d); }
.btn.outline { background: transparent; color: var(--blue); border: 1px solid var(--line-2); }
.btn.outline:hover { background: color-mix(in srgb, var(--blue) 8%, transparent); box-shadow: none; }
.btn.text { background: transparent; color: var(--blue); padding: 0 12px; }
.btn.text:hover { background: color-mix(in srgb, var(--blue) 8%, transparent); box-shadow: none; }
.btn.danger { --c: var(--red); }
.btn.danger.text, .btn.danger.outline { color: var(--red); }
.btn.sm { height: 32px; padding: 0 16px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 32px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2.5px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.tonal.loading::after, .btn.outline.loading::after, .btn.text.loading::after { border-color: var(--blue) var(--blue) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { position: relative; overflow: hidden; width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; flex: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.icon-btn.sm { width: 32px; height: 32px; } .icon-btn.sm .i { width: 18px; height: 18px; }
.icon-btn.danger:hover { color: var(--red); background: var(--red-l); }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .22; pointer-events: none; animation: ripple .6s var(--ease-out); }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
.fab { position: fixed; right: 28px; bottom: 28px; height: 56px; padding: 0 20px; border-radius: 16px; background: var(--blue-l); color: var(--blue-d); box-shadow: var(--shadow-3); z-index: 30; }

/* ───────── form fields (outlined) ───────── */
.field { position: relative; margin: 0 0 20px; }
.field > input, .field > select, .field > textarea { width: 100%; height: 56px; padding: 18px 16px 6px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent; color: var(--text); font: 16px var(--font); outline: none; transition: border-color .2s, box-shadow .2s; appearance: none; }
.field > textarea { height: auto; min-height: 120px; padding-top: 26px; resize: vertical; font-size: 14px; line-height: 1.55; }
.field > textarea.mono { font-family: var(--mono); font-size: 13px; }
.field > select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23747775'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 40px; }
.field > select option { background: var(--surface); color: var(--text); }
.field > label { position: absolute; left: 12px; top: 18px; padding: 0 4px; color: var(--text-3); font-size: 16px; pointer-events: none; transition: all .18s var(--ease); background: var(--surface); border-radius: 4px; max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field > input:focus, .field > select:focus, .field > textarea:focus { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.field > input:focus + label, .field > input:not(:placeholder-shown) + label, .field > select + label, .field > textarea + label, .field.filled > label { top: -9px; font-size: 12px; color: var(--text-2); }
.field > input:focus + label, .field > textarea:focus + label, .field > select:focus + label { color: var(--blue); }
.card.flat .field > label { background: var(--surface-2); }
.field .hint { font-size: 12px; color: var(--text-3); margin: 4px 16px 0; }
.field .suffix { position: absolute; right: 6px; top: 8px; }
.field.dense > input, .field.dense > select { height: 44px; padding: 10px 14px 4px; font-size: 14px; }
.field.dense > label { top: 12px; font-size: 14px; }
.field.dense > input:focus + label, .field.dense > input:not(:placeholder-shown) + label, .field.dense > select + label { top: -9px; font-size: 12px; }
.field.dense .suffix { top: 2px; }
.field.err > input { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* search pill */
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 16px; background: var(--surface-2); border-radius: 999px; transition: background .2s, box-shadow .2s; min-width: 240px; }
.search:focus-within { background: var(--surface); box-shadow: var(--shadow-1); }
.search input { flex: 1; border: none; outline: none; background: transparent; font: 15px var(--font); color: var(--text); min-width: 0; }
.search .i { color: var(--text-3); }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 52px; height: 32px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface-3); position: relative; transition: all .25s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: all .3s var(--ease-out); }
.switch input:checked + .track { background: var(--blue); border-color: var(--blue); }
.switch input:checked + .track::after { left: 22px; top: 2px; width: 24px; height: 24px; background: #fff; }
html[data-theme="dark"] .switch input:checked + .track::after { background: #062e6f; }
.switch:active .track::after { transform: scale(1.15); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent; color: var(--text-2); font: 500 13px var(--font); cursor: pointer; transition: all .2s var(--ease); position: relative; overflow: hidden; white-space: nowrap; }
.chip:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.chip.on { background: var(--blue-l); border-color: transparent; color: var(--blue-d); }
.chip.on::before { content: ""; width: 14px; height: 14px; margin-left: -4px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; animation: pop .25s var(--ease-out); }
@keyframes pop { from { transform: scale(0); } }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag.blue { background: var(--blue-l); color: var(--blue-d); }
.tag.green { background: var(--green-l); color: var(--green); }
.tag.red { background: var(--red-l); color: var(--red); }
.tag.yellow { background: var(--yellow-l); color: #b06000; }
html[data-theme="dark"] .tag.yellow { color: var(--yellow); }
.tag.purple { background: var(--purple-l); color: var(--purple); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--text-3); }
.dot.green { background: #34a853; box-shadow: 0 0 0 3px color-mix(in srgb, #34a853 25%, transparent); }
.dot.red { background: #ea4335; } .dot.yellow { background: #fbbc04; }
.dot.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, #34a853 50%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

/* ───────── cards ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: box-shadow .25s var(--ease), border-color .25s, transform .25s var(--ease); }
.card.hover:hover { box-shadow: var(--shadow-2); border-color: transparent; }
.card.flat { border: none; background: var(--surface-2); }
.card h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; }
.card .sub { color: var(--text-3); font-size: 13px; margin: 0 0 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 16px; }
.stat { position: relative; overflow: hidden; }
.stat .label { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .label .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.stat .value { font-size: 30px; font-weight: 400; margin: 14px 0 2px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .foot { color: var(--text-3); font-size: 12px; }
.stat .spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 56px; opacity: .9; }
.ic.blue { background: var(--blue-l); color: var(--blue); } .ic.red { background: var(--red-l); color: var(--red); }
.ic.yellow { background: var(--yellow-l); color: #e37400; } .ic.green { background: var(--green-l); color: var(--green); }
.ic.purple { background: var(--purple-l); color: var(--purple); }
.row { display: flex; gap: 16px; align-items: center; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 16px; }
.layout-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.layout-11 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .layout-2, .layout-11 { grid-template-columns: 1fr; } }
.muted { color: var(--text-3); } .small { font-size: 12px; } .grow { flex: 1; min-width: 0; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: none; }

/* ───────── table ───────── */
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 500; color: var(--text-2); padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px; position: sticky; top: 0; background: var(--surface); }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr { transition: background .15s; animation: rowin .4s var(--ease-out) both; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t tbody tr.sel { background: var(--blue-l); }
table.t tbody tr:last-child td { border-bottom: none; }
table.t .act { white-space: nowrap; text-align: right; }
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } }
table.t input[type=checkbox], .cb { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 16px; color: var(--text-2); font-size: 13px; flex-wrap: wrap; }
.pager .info { margin-right: 12px; }
.pager select { border: none; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.empty { text-align: center; padding: 56px 16px; color: var(--text-3); }
.empty svg.art { width: 160px; height: 120px; margin-bottom: 12px; }
.empty .t1 { font-size: 16px; color: var(--text-2); margin-bottom: 4px; }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ───────── app shell ───────── */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--bar-h); display: flex; align-items: center; gap: 8px; padding: 0 16px 0 8px; background: var(--bg); z-index: 40; transition: box-shadow .25s, background .3s; }
.topbar.scrolled { box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--text); font-size: 22px; font-weight: 400; letter-spacing: -.3px; text-decoration: none !important; user-select: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow-1); transition: transform .4s var(--ease-out); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand b { font-weight: 500; }
.brand .pm { background: linear-gradient(90deg, #4285f4, #ea4335 35%, #fbbc04 65%, #34a853); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.topbar .spacer { flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 500; font-size: 15px; cursor: pointer; border: none; flex: none; transition: box-shadow .2s; }
.avatar:hover { box-shadow: 0 0 0 4px var(--surface-3); }
.balance-pill { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: background .2s; font-variant-numeric: tabular-nums; }
.balance-pill:hover { background: var(--surface-3); }
.nav { position: fixed; top: var(--bar-h); left: 0; bottom: 0; width: var(--nav-w); padding: 8px 12px 24px; overflow-y: auto; background: var(--bg); z-index: 35; transition: transform .3s var(--ease), background .3s; }
.nav .sec { font-size: 12px; font-weight: 500; color: var(--text-3); padding: 18px 16px 8px; letter-spacing: .4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: 14px; text-decoration: none !important; transition: background .2s, color .2s; overflow: hidden; margin-bottom: 2px; }
.nav a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.nav a.on { color: var(--blue-d); }
.nav a .pill { position: absolute; inset: 0; border-radius: 999px; background: var(--blue-t); z-index: -1; transform: scaleX(.3); opacity: 0; transition: transform .35s var(--ease-out), opacity .2s; }
html[data-theme="dark"] .nav a .pill { background: var(--blue-l); }
.nav a.on .pill { transform: scaleX(1); opacity: 1; }
.nav a .i { width: 22px; height: 22px; }
.nav .ver { padding: 24px 16px 0; color: var(--text-3); font-size: 12px; }
.main { margin-left: var(--nav-w); padding: calc(var(--bar-h) + 8px) 24px 48px 8px; min-height: 100vh; }
.main > .view { background: var(--surface); border-radius: var(--radius-l); min-height: calc(100vh - var(--bar-h) - 32px); padding: 28px 32px 40px; }
html[data-theme="dark"] .main > .view { background: var(--surface); }
.view-in { animation: viewin .45s var(--ease-out) both; }
@keyframes viewin { from { opacity: 0; transform: translateY(12px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 400; letter-spacing: -.3px; }
.page-head p { margin: 6px 0 0; color: var(--text-3); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 34; opacity: 0; pointer-events: none; transition: opacity .3s; }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .menu-btn { display: inline-grid; }
  .nav { transform: translateX(-100%); background: var(--surface); box-shadow: var(--shadow-3); border-radius: 0 16px 16px 0; top: 0; padding-top: 16px; z-index: 50; }
  body.nav-open .nav { transform: none; } body.nav-open .scrim { opacity: 1; pointer-events: auto; z-index: 45; }
  .main { margin-left: 0; padding: calc(var(--bar-h) + 4px) 8px 32px; }
  .main > .view { padding: 20px 16px 32px; border-radius: 20px; }
  .balance-pill span.lbl, .hide-m { display: none !important; }
  .brand { font-size: 18px; white-space: nowrap; } .brand img { width: 32px; height: 32px; }
  .page-head h1 { font-size: 24px; }
  .cards { grid-template-columns: 1fr 1fr !important; gap: 10px; } .card { padding: 18px; }
  .stat .value { font-size: 22px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
}

/* dropdown menu */
.menu { position: fixed; min-width: 220px; background: var(--surface-2); border-radius: 12px; box-shadow: var(--shadow-3); padding: 8px 0; z-index: 200; transform-origin: top right; animation: menuin .22s var(--ease-out); }
html[data-theme="dark"] .menu { background: var(--surface-3); }
.menu .mi { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; cursor: pointer; color: var(--text); font-size: 14px; transition: background .15s; }
.menu .mi:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.menu .mi.danger { color: var(--red); }
.menu .mh { padding: 12px 16px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
@keyframes menuin { from { opacity: 0; transform: scale(.85) translateY(-8px); } }

/* dialog */
.dlg-wrap { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.36); animation: fadein .25s var(--ease); overflow-y: auto; }
.dlg-wrap.out { animation: fadeout .2s var(--ease) forwards; }
.dlg { background: var(--surface); border-radius: var(--radius-l); width: 100%; max-width: 560px; box-shadow: var(--shadow-3); padding: 24px; animation: dlgin .4s var(--ease-out); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
html[data-theme="dark"] .dlg { background: var(--surface-2); }
html[data-theme="dark"] .dlg .field > label { background: var(--surface-2); }
.dlg.wide { max-width: 820px; }
.dlg-wrap.out .dlg { animation: dlgout .2s var(--ease-in) forwards; }
.dlg .dh { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dlg .dh h2 { margin: 0; font-size: 22px; font-weight: 400; flex: 1; }
.dlg .db { overflow-y: auto; margin: 0 -24px; padding: 10px 24px 4px; flex: 1; }
.dlg .df { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }
.dlg .dicon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; }
@keyframes fadein { from { opacity: 0; } } @keyframes fadeout { to { opacity: 0; } }
@keyframes dlgin { from { opacity: 0; transform: scale(.92) translateY(20px); } }
@keyframes dlgout { to { opacity: 0; transform: scale(.96); } }

/* snackbar */
#snacks { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 500; align-items: center; pointer-events: none; }
.snack { pointer-events: auto; min-width: 280px; max-width: 560px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 8px; background: #313033; color: #f4eff4; box-shadow: var(--shadow-3); font-size: 14px; animation: snackin .35s var(--ease-out); }
html[data-theme="dark"] .snack { background: #e6e1e5; color: #313033; }
.snack.out { animation: snackout .25s var(--ease-in) forwards; }
.snack .i { width: 20px; height: 20px; }
.snack.ok .i { color: #6dd58c; } .snack.err .i { color: #f2b8b5; }
html[data-theme="dark"] .snack.ok .i { color: #188038; } html[data-theme="dark"] .snack.err .i { color: #d93025; }
@keyframes snackin { from { opacity: 0; transform: translateY(20px) scale(.95); } }
@keyframes snackout { to { opacity: 0; transform: translateY(10px); } }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; position: relative; overflow-x: auto; }
.tabs button { position: relative; height: 48px; padding: 0 20px; border: none; background: transparent; color: var(--text-2); font: 500 14px var(--font); cursor: pointer; transition: color .2s; white-space: nowrap; overflow: hidden; }
.tabs button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 4%, transparent); }
.tabs button.on { color: var(--blue); }
.tabs .ink { position: absolute; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue); transition: left .35s var(--ease-out), width .35s var(--ease-out); }

/* progress */
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--blue); transition: width 1s var(--ease-out); }
.lin { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 600; overflow: hidden; opacity: 0; transition: opacity .2s; }
.lin.on { opacity: 1; }
.lin::before { content: ""; position: absolute; height: 100%; width: 40%; background: linear-gradient(90deg, #4285f4, #ea4335, #fbbc04, #34a853); animation: lin 1.1s infinite var(--ease); }
@keyframes lin { from { left: -40%; } to { left: 100%; } }

/* charts */
.chart { width: 100%; height: 260px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .axis text { fill: var(--text-3); font-size: 11px; }
.chart .grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { opacity: .16; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s var(--ease-out) forwards; }
.chart .grow-up { transform-origin: bottom; transform-box: fill-box; animation: growup .8s var(--ease-out) both; }
.chart .fade { animation: fadein 1s .4s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes growup { from { transform: scaleY(0); } }
.chart .tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); border-radius: 10px; padding: 8px 12px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); transition: opacity .15s, left .1s, top .1s; opacity: 0; z-index: 2; }
.chart .hover-line { stroke: var(--line-2); stroke-width: 1; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
.donut-wrap .donut { align-self: center; }
.donut { width: 160px; height: 160px; flex: none; }
.donut circle { fill: none; stroke-width: 22; transition: stroke-width .2s; }
.donut circle.seg { animation: donut 1.2s var(--ease-out) both; }
.donut circle.seg:hover { stroke-width: 28; }
@keyframes donut { from { stroke-dasharray: 0 999; } }
.rank { display: flex; flex-direction: column; gap: 14px; }
.rank .r { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.rank .r .bar { grid-column: 1 / -1; }

/* ───────── auth pages ───────── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px; background: var(--bg); position: relative; overflow: hidden; }
.auth .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: float 22s infinite ease-in-out alternate; pointer-events: none; }
.auth .b1 { width: 520px; height: 520px; background: #7aa5f8; left: -140px; top: -160px; }
.auth .b2 { width: 420px; height: 420px; background: #f5b942; right: -110px; top: -90px; animation-delay: -7s; opacity: .38; }
.auth .b3 { width: 460px; height: 460px; background: #63d6b6; right: 10%; bottom: -210px; animation-delay: -13s; opacity: .32; }
html[data-theme="dark"] .auth .blob { opacity: .15; }
html[data-theme="dark"] .auth .b2 { opacity: .11; }
html[data-theme="dark"] .auth .b3 { opacity: .13; }
.auth-wrap { position: relative; width: 100%; max-width: 408px; display: flex; flex-direction: column; animation: dlgin .55s var(--ease-out); }
.auth-card { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border: 1px solid var(--line); border-radius: 24px; padding: 40px 36px 32px; box-shadow: 0 24px 60px rgba(15,23,42,.14), 0 2px 8px rgba(15,23,42,.05); }
html[data-theme="dark"] .auth-card { box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.3); }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head img { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 8px 20px rgba(15,23,42,.18); margin-bottom: 18px; }
.auth-head h1 { font-size: 25px; font-weight: 650; margin: 0 0 8px; letter-spacing: -.3px; color: var(--text); }
.auth-head p { color: var(--text-2); font-size: 14px; margin: 0; }
.auth-card .acts { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.auth .field > input, .auth .field > select { height: 52px; border-radius: 12px; }
.auth form .btn[type="submit"], .auth .acts .btn { min-height: 44px; border-radius: 12px; padding: 0 22px; }
.auth #ldBtn { width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 13px; background: #ffffff; color: #16181d; border: 1px solid var(--line-2); font-size: 15px; font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.10); transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background .15s; cursor: pointer; }
.auth #ldBtn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,23,42,.14); background: #fdfdfd; }
html[data-theme="dark"] .auth #ldBtn { background: #26272b; color: #f2f2f2; border-color: #45474c; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
html[data-theme="dark"] .auth #ldBtn:hover { background: #2d2e33; }
.auth #ldBtn .ld-ic { display: inline-flex; width: 21px; height: 21px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.auth #ldBtn .ld-ic svg { width: 100%; height: 100%; display: block; }
.auth #admTg { font-size: 12.5px; color: var(--text-3); text-decoration: none; }
.auth #admTg:hover { color: var(--text); }
.auth-foot { display: flex; justify-content: space-between; margin-top: 18px; font-size: 12.5px; color: var(--text-3); padding: 0 10px; }
.auth-foot a { color: var(--text-2); text-decoration: none; }
.auth-foot a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 480px) { .auth-card { padding: 32px 24px 26px; border-radius: 20px; } }
.otp { display: flex; gap: 10px; justify-content: center; margin: 8px 0 24px; }
.otp input { width: 48px; height: 56px; text-align: center; font-size: 22px; border: 1px solid var(--line-2); border-radius: 10px; background: transparent; color: var(--text); outline: none; transition: all .2s; font-family: var(--mono); }
.otp input:focus { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); transform: translateY(-2px); }

/* ───────── landing ───────── */
.land-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; height: 68px; padding: 0 32px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); transition: box-shadow .3s; }
.land-bar.scrolled { box-shadow: 0 1px 0 var(--line); }
.land-bar nav { display: flex; gap: 4px; margin-left: 24px; }
.land-bar nav a { padding: 8px 16px; border-radius: 999px; color: var(--text-2); font-weight: 500; text-decoration: none; transition: background .2s; }
.land-bar nav a:hover { background: var(--surface-2); }
.hero { position: relative; text-align: center; padding: 96px 24px 64px; overflow: hidden; }
.hero .glow { position: absolute; inset: -20% -10% auto; height: 640px; background: radial-gradient(closest-side, color-mix(in srgb, #4285f4 22%, transparent), transparent), radial-gradient(closest-side at 70% 40%, color-mix(in srgb, #ea4335 12%, transparent), transparent), radial-gradient(closest-side at 30% 60%, color-mix(in srgb, #34a853 12%, transparent), transparent); filter: blur(30px); z-index: -1; animation: breathe 9s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.12) translateY(20px); opacity: .8; } }
.hero .logo-big { width: 96px; height: 96px; border-radius: 28px; box-shadow: var(--shadow-3); margin-bottom: 28px; animation: logoin 1s var(--ease-out) both; }
@keyframes logoin { from { opacity: 0; transform: scale(.6) rotate(-12deg); } }
.hero h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 400; letter-spacing: -2px; line-height: 1.05; margin: 0 0 20px; animation: rise .9s .1s var(--ease-out) both; }
.hero h1 .grad { background: linear-gradient(90deg, #4285f4, #9b72cb, #d96570, #fbbc04, #34a853, #4285f4); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradmove 8s linear infinite; }
@keyframes gradmove { to { background-position: 300% 0; } }
.hero p.lead { font-size: clamp(16px, 2vw, 20px); color: var(--text-2); max-width: 720px; margin: 0 auto 36px; animation: rise .9s .2s var(--ease-out) both; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; animation: rise .9s .3s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.endpoint { display: inline-flex; align-items: center; gap: 12px; margin-top: 40px; padding: 8px 8px 8px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-family: var(--mono); font-size: 14px; animation: rise .9s .4s var(--ease-out) both; box-shadow: var(--shadow-1); }
.section { max-width: 1180px; margin: 0 auto; padding: 64px 24px; }
.section h2 { font-size: 36px; font-weight: 400; text-align: center; margin: 0 0 12px; letter-spacing: -.5px; }
.section > p.c { text-align: center; color: var(--text-2); margin: 0 auto 48px; max-width: 640px; font-size: 16px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feat { padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); transition: transform .35s var(--ease-out), box-shadow .35s; }
.feat:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.feat .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; }
.feat h4 { margin: 0 0 8px; font-size: 18px; font-weight: 500; }
.feat p { margin: 0; color: var(--text-2); }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); margin: 24px 0; }
.marquee .track { display: flex; gap: 12px; width: max-content; animation: marquee 40s linear infinite; }
.marquee.rev .track { animation-direction: reverse; }
.marquee .tag { height: 40px; padding: 0 20px; font-size: 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
@keyframes marquee { to { transform: translateX(-50%); } }
.code { background: #1e1f20; color: #e3e3e3; border-radius: 16px; padding: 20px 24px; font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow-x: auto; position: relative; white-space: pre; }
.code .k { color: #a8c7fa; } .code .s { color: #6dd58c; } .code .c { color: #8e918f; } .code .n { color: #fdd663; }
.code .copy { position: absolute; top: 10px; right: 10px; color: #c4c7c5; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; counter-reset: step; }
.steps > div { position: relative; padding-left: 56px; }
.steps > div::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--blue-l); color: var(--blue-d); display: grid; place-items: center; font-weight: 500; font-size: 16px; }
.steps h4 { margin: 6px 0 6px; font-weight: 500; font-size: 16px; }
.steps p { margin: 0; color: var(--text-2); }
.land-foot { border-top: 1px solid var(--line); padding: 32px; display: flex; justify-content: space-between; color: var(--text-3); font-size: 13px; flex-wrap: wrap; gap: 12px; }
.counter { font-variant-numeric: tabular-nums; }

/* pricing cards */
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.price-card { padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s; cursor: pointer; animation: rowin .5s var(--ease-out) both; }
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: transparent; }
.price-card .nm { font-family: var(--mono); font-size: 14px; font-weight: 500; word-break: break-all; margin: 10px 0 14px; }
.price-card .pp { display: flex; gap: 20px; }
.price-card .pp div { flex: 1; }
.price-card .pp b { display: block; font-size: 20px; font-weight: 400; font-variant-numeric: tabular-nums; }
.price-card .pp span { font-size: 12px; color: var(--text-3); }
.vendor-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; flex: none; }

/* playground */
.pg { display: grid; grid-template-columns: 1fr 300px; gap: 16px; height: calc(100vh - var(--bar-h) - 120px); min-height: 520px; }
.pg-chat { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 24px; overflow: hidden; }
.pg-msgs { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.msg { display: flex; gap: 12px; max-width: 88%; animation: rise .35s var(--ease-out) both; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .av { width: 32px; height: 32px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; color: #fff; font-size: 13px; }
.msg .av img { width: 100%; height: 100%; object-fit: cover; }
.msg .bubble { padding: 12px 16px; border-radius: 20px; background: var(--surface); line-height: 1.65; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; }
.msg.user .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
html[data-theme="dark"] .msg.user .bubble { color: #062e6f; }
.msg.ai .bubble { border-bottom-left-radius: 6px; }
.msg .meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.msg .bubble pre { background: #1e1f20; color: #e3e3e3; padding: 12px; border-radius: 10px; overflow-x: auto; white-space: pre; font-size: 12.5px; }
.msg .bubble code { font-size: 13px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.msg .bubble pre code { background: none; padding: 0; }
.msg .think { font-size: 12.5px; color: var(--text-3); border-left: 3px solid var(--line-2); padding-left: 10px; margin-bottom: 8px; white-space: pre-wrap; }
.cursor::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--blue); margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.pg-input { margin: 0 16px 16px; display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border-radius: 28px; padding: 8px 8px 8px 20px; box-shadow: var(--shadow-1); transition: box-shadow .2s; }
.pg-input:focus-within { box-shadow: var(--shadow-2); }
.pg-input textarea { flex: 1; border: none; outline: none; resize: none; background: transparent; color: var(--text); font: 15px/1.5 var(--font); max-height: 200px; padding: 8px 0; }
.pg-side .field { margin-bottom: 16px; }
.range { width: 100%; accent-color: var(--blue); }
@media (max-width: 960px) { .pg { grid-template-columns: 1fr; height: auto; } .pg-chat { height: 70vh; } }

/* wallet */
.balance-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 28px 32px; color: #fff; background: linear-gradient(135deg, #1a73e8, #6142d4 60%, #a142f4); margin-bottom: 16px; }
.balance-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.1); animation: float 14s infinite alternate; }
.balance-hero::before { content: ""; position: absolute; right: 120px; bottom: -100px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08); animation: float 11s infinite alternate-reverse; }
.balance-hero .amt { font-size: 48px; font-weight: 400; letter-spacing: -1px; margin: 6px 0 16px; font-variant-numeric: tabular-nums; }
.balance-hero .meta { display: flex; gap: 32px; opacity: .9; flex-wrap: wrap; position: relative; z-index: 1; }
.balance-hero .meta b { display: block; font-size: 18px; font-weight: 500; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal div { height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; color: var(--text-3); background: var(--surface-2); transition: transform .2s; }
.cal div.done { background: var(--green-l); color: var(--green); font-weight: 600; }
.cal div.today { outline: 2px solid var(--blue); outline-offset: -2px; color: var(--blue); }
.cal div.h { background: none; height: 20px; }
.amount-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-bottom: 20px; }
.amount-grid button { height: 64px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 500 18px var(--font); cursor: pointer; transition: all .2s var(--ease); }
.amount-grid button:hover { border-color: var(--blue); }
.amount-grid button.on { background: var(--blue-l); border-color: var(--blue); color: var(--blue-d); }
.key-box { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; background: var(--surface-2); border-radius: 12px; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.confetti { position: fixed; pointer-events: none; z-index: 700; width: 10px; height: 10px; border-radius: 2px; }

/* docs */
.doc h2 { font-weight: 400; font-size: 22px; margin: 32px 0 12px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--text-2); line-height: 1.75; }
.ep { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; font-family: var(--mono); font-size: 13px; transition: background .2s; }
.ep:hover { background: var(--surface-2); }
.ep .m { font-weight: 600; font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--green-l); color: var(--green); }
.ep .m.get { background: var(--blue-l); color: var(--blue); }
.ep .d { margin-left: auto; font-family: var(--font); color: var(--text-3); font-size: 12.5px; }
.notice-bar { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 16px; background: var(--blue-l); color: var(--blue-d); margin-bottom: 16px; animation: rise .5s var(--ease-out); }
.notice-bar .i { margin-top: 1px; }
.qr svg { width: 180px; height: 180px; border-radius: 12px; background: #fff; padding: 8px; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 480px) { .topbar .brand span { display: none; } .balance-pill { padding: 0 10px; } .land-bar { padding: 0 12px; } }

/* ───────── polish pass ───────── */
.dlg-wrap { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vendor-ic { transition: transform .25s var(--ease-out), box-shadow .25s; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 1px 3px rgba(15,23,42,.12); }
.price-card:hover .vendor-ic { transform: scale(1.09) rotate(-3deg); }
.price-card .nm { transition: color .2s; }
.price-card:hover .nm { color: var(--blue-d); }
.btn:not(.text):not(.outline) { position: relative; }
.btn:not(.text):not(.outline)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s var(--ease-out); pointer-events: none; }
.btn:not(.text):not(.outline):hover::before { transform: translateX(120%); }
.cards > * { animation: rowin .5s var(--ease-out) both; }
.cards > *:nth-child(2) { animation-delay: .05s; } .cards > *:nth-child(3) { animation-delay: .1s; }
.cards > *:nth-child(4) { animation-delay: .15s; } .cards > *:nth-child(5) { animation-delay: .2s; }
.cards > *:nth-child(6) { animation-delay: .25s; } .cards > *:nth-child(n+7) { animation-delay: .3s; }
.stat .ic { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent); }
.nav a .i { transition: transform .25s var(--ease-out); }
.nav a.on .i { transform: scale(1.14); }
.nav::-webkit-scrollbar, .dlg .db::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .pg-msgs::-webkit-scrollbar { width: 6px; height: 6px; }
.nav::-webkit-scrollbar-thumb, .dlg .db::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .pg-msgs::-webkit-scrollbar-thumb { border: none; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .nav a:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.spin { animation: spin .8s linear infinite; }
.chip, .tag, .menu .mi, .ep, .amount-grid button { transition: all .2s var(--ease); }
table.t thead th { box-shadow: 0 1px 0 var(--line); }

/* ── multi-select dropdown (channel groups) ── */
.msel { position: relative; }
.msel-head { width: 100%; height: 56px; padding: 18px 40px 6px 16px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23747775'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--text); font: 16px var(--font); text-align: left; cursor: pointer; outline: none; transition: border-color .2s, box-shadow .2s; display: flex; align-items: center; }
.msel-head .msel-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel.open .msel-head { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.msel-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgb(0 0 0 / .22); padding: 6px; max-height: 232px; overflow: auto; display: none; }
.msel.open .msel-pop { display: block; animation: fadeSlide .16s var(--ease); }
.msel-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.msel-item:hover { background: var(--hover); }
.msel-item input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; flex: none; }

/* ── channel test dialog (New-API style) ── */
.tt-lab { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.tt-help { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.tt-sel { width: 100%; height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23747775'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--text); font: 14px var(--font); appearance: none; cursor: pointer; outline: none; transition: border-color .2s, box-shadow .2s; }
.tt-sel:focus { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.t-pill { border-radius: 999px; padding: 0 18px; height: 34px; background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.t-pill:hover:not(:disabled) { filter: brightness(1.07); background: var(--blue); }
.t-pill:disabled { opacity: .55; }
table.t.tt td { padding: 13px 12px; }
table.t.tt th { font-size: 13px; color: var(--text-3); font-weight: 500; padding: 10px 12px; }
table.t.tt th.sortable { cursor: pointer; user-select: none; }
.rcx { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); background-color: transparent; cursor: pointer; vertical-align: middle; transition: border-color .15s, background-color .15s; }
.rcx:hover { border-color: var(--blue); }
.rcx:checked { background-color: var(--blue); border-color: var(--blue); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E"); background-size: 11px; background-position: center; background-repeat: no-repeat; }
.pgn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; font: 13px var(--font); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.pgn:hover:not(:disabled) { background: var(--hover); }
.pgn.on { background: var(--blue); color: #fff; font-weight: 600; }
.pgn:disabled { opacity: .38; cursor: default; }

/* ───────── interface refresh pass ───────── */
.ph-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; align-self: center; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 12%, transparent); animation: pop .35s var(--ease-out); }
.ph-ic .i { width: 24px; height: 24px; }
.qbar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 6px; max-width: 130px; }
.qbar > i { display: block; height: 100%; border-radius: 3px; transition: width .8s var(--ease-out); }
.vic-sm { display: inline-grid; vertical-align: middle; }
.vic-sm .vendor-ic { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; box-shadow: none; }
.vic-sm .vendor-ic svg { width: 14px !important; height: 14px !important; }
.cards .stat { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease), border-color .25s; }
.cards .stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: transparent; }
