@font-face {
  font-family: Manrope;
  src: url('/assets/manrope.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #080e16;
  --top: #0b121d;
  --surface: #111c29;
  --panel: #142030;
  --raised: #182737;
  --line: #25364a;
  --text: #f2f5fb;
  --muted: #aab8cb;
  --accent: #88e2b7;
  --action: #16734f;
  --action-end: #115e44;
  --green: #7ee6ae;
  --warning: #ffca83;
  --danger: #feb3b3;
  --shadow: 0 14px 28px #0003;
  --r: 1.375rem;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  font-family: Manrope, 'Segoe UI', system-ui, sans-serif;
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #edf3f6;
  --top: #f5f9fa;
  --surface: #fff;
  --panel: #f4f8fa;
  --raised: #edf3f6;
  --line: #d3dfe7;
  --text: #132233;
  --muted: #4f6275;
  --accent: #075c45;
  --green: #0a6a43;
  --warning: #8a4200;
  --danger: #a42a43;
  --shadow: 0 12px 24px #1b39401a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: linear-gradient(145deg,var(--bg) 55%,var(--top)); font-size: .9375rem; line-height: 1.55; font-variant-numeric: tabular-nums; }
h1,h2,h3,p,ul { margin: 0; }
h1,h2,h3 { line-height: 1.22; letter-spacing: -.025em; }
h1 { font-size: 1.25rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: 1.05rem; }
a { color: inherit; text-decoration: none; }
button,input,select,textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { z-index: 30; position: fixed; transform: translateY(-150%); left: 1rem; top: .75rem; padding: .5rem .9rem; border-radius: .5rem; background: var(--text); color: var(--bg); }
.skip:focus { transform: none; }
.app { display: grid; grid-template-columns: 17.5rem minmax(0,1fr); min-height: 100svh; }
.sidebar { z-index: 5; position: sticky; top: 1rem; align-self: start; height: calc(100svh - 2rem); min-height: 31rem; margin: 1rem 0 1rem 1rem; padding: 1rem .9rem; display: flex; flex-direction: column; overflow-y: auto; border-radius: 1.75rem; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.brand { display: flex; gap: .625rem; align-items: center; padding: .25rem; width: fit-content; }
.brand strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -.055em; }
.brand small,.side-user small { display: block; margin-top: .02rem; font-size: .75rem; color: var(--muted); }
.brand-mark { display: block; width: 2.75rem; height: 2.75rem; object-fit: contain; flex: 0 0 auto; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: #9fe7c8; color: #103629; font-size: .9375rem; font-weight: 740; }
.line-icon { display: inline-block; width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.side-nav { margin-block: 1.25rem; }
.side-nav p { padding: .5rem .75rem; color: var(--muted); font-size: .75rem; font-weight: 700; }
.side-nav p:not(:first-child) { margin-top: .75rem; }
.side-nav a { display: flex; align-items: center; gap: .625rem; min-height: 2.5rem; padding: .375rem .75rem; margin-bottom: .125rem; border: 1px solid transparent; border-radius: .75rem; color: var(--muted); font-size: .875rem; font-weight: 650; }
.side-nav a:hover,.side-nav a[aria-current] { background: var(--raised); border-color: var(--line); color: var(--accent); }
.side-bottom { margin-top: auto; }
.side-help { padding: .8rem; border-radius: 1.05rem; border: 1px solid var(--line); background: var(--panel); font-size: .84rem; }
.side-help p { color: var(--muted); margin: .24rem 0 .65rem; }
.side-help a { width: 100%; }
.side-user { margin-top: .75rem; display: flex; align-items: center; gap: .65rem; font-size: .84rem; }
.side-user > .line-icon { margin-left: auto; color: var(--muted); }
.top { min-height: 4.5rem; display: flex; align-items: center; gap: .75rem; justify-content: space-between; padding: .75rem clamp(1rem,3vw,2rem); border-bottom: 1px solid var(--line); background: var(--top); }
.crumb { margin-bottom: .16rem; color: var(--muted); font-size: .76rem; }
.top-tools { display: flex; align-items: center; gap: .65rem; }
.balance-chip,.group { border-radius: 2rem; border: 1px solid var(--line); background: var(--panel); padding: .22rem; display: inline-flex; align-items: center; gap: .18rem; }
.balance-chip { gap: .6rem; padding-left: .8rem; color: var(--muted); font-size: .84rem; }
.balance-chip strong { color: var(--text); white-space: nowrap; }
.balance-chip span { border-radius: 2rem; padding: .3rem .65rem; color: #fff; background: var(--action); }
.icon { display: inline-grid; place-items: center; width: 2.55rem; height: 2.55rem; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 1.1rem; }
.mobile-menu { display: none; }
.view { width: min(calc(100% - 3rem), 87.5rem); margin-inline: auto; padding: 1rem 0 3rem; }
.view[aria-busy='true'] { opacity: .75; }
.view-head,.split-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1rem; margin-bottom: 1rem; }
.view-head p,.split-head p { color: var(--muted); margin-top: .25rem; font-size: .9rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.primary,.quiet,.group button { display: inline-flex; min-height: 2.5rem; padding: .5rem .875rem; gap: .5rem; justify-content: center; align-items: center; border: 1px solid var(--line); border-radius: .75rem; background: var(--raised); color: var(--text); font-size: .875rem; font-weight: 700; }
.primary { border-color: #42b49777; background: linear-gradient(#207e5d,var(--action-end)); color: #fff; box-shadow: inset 0 1px 0 #ffffff2d,0 2px 0 #08422f,0 7px 16px #09271945; }
.primary:hover { background: #207e5d; }
.primary:active { transform: translateY(1px); box-shadow: inset 0 1px 0 #ffffff2d,0 1px 0 #08422f; }
.quiet:hover,.icon:hover { border-color: #77af9c; }
.group button { background: none; border-color: transparent; min-height: 2rem; border-radius: 2rem; color: var(--muted); white-space: nowrap; padding: .25rem .68rem; }
.group button[aria-pressed='true'] { color: #fff; background: var(--action); }
.banner { margin-bottom: 1rem; padding: .65rem 1rem; border-radius: 1rem; background: var(--surface); border: 1px solid var(--line); display: flex; gap: .5rem 1rem; justify-content: space-between; align-items: center; }
.banner p { color: var(--warning); font-size: .87rem; }
.box,.metric { border-radius: var(--r); background: linear-gradient(var(--panel),var(--surface)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 #ffffff0e, var(--shadow); padding: 1.25rem; min-width: 0; }
.grid-four,.grid-two,.dash-grid,.stack,.record-grid { display: grid; gap: 1rem; }
.grid-four { grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 1rem; }
.grid-two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.dash-grid { grid-template-columns: minmax(0,2fr) minmax(0,1fr); align-items: start; }
.metric strong { display: block; font-size: clamp(1.35rem,2.5vw,1.78rem); letter-spacing: -.045em; }
.metric span,.metric small { color: var(--muted); font-size: .82rem; }
.metric-highlight { background: linear-gradient(145deg,#0f493e,#176650); color: white; }
.metric-highlight span,.metric-highlight small { color: #d3f5ed; }
.metric-highlight a { text-decoration: underline; }
.large { display: block; font-size: 2rem; font-weight: 780; }
.empty { display: grid; place-items: center; min-height: 8rem; padding: 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: .9rem; background: var(--panel); }
.chart { display: flex; gap: max(.08rem,.45%); align-items: end; min-height: 13.7rem; padding: .75rem; background: var(--panel); border: 1px dashed var(--line); border-radius: .9rem; overflow: hidden; }
.chart svg { display: block; width: 100%; height: 12rem; overflow: visible; }
.chart rect { fill: #579882; transform-box: fill-box; transform-origin: center bottom; }
.chart rect:last-of-type { fill: var(--accent); }
.chart + p { margin-top: .45rem; }
.collection { min-height: 13.7rem; }
.data-pair { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.data-pair:last-child { border-bottom: 0; }
.data-pair span { color: var(--muted); }
.badge { display: inline-block; width: fit-content; border: 1px solid var(--line); border-radius: 2rem; padding: .14rem .55rem; background: var(--raised); color: var(--muted); font-size: .75rem; font-weight: 740; white-space: nowrap; }
.badge.paid,.badge.ready,.badge.matched,.badge.active { color: var(--green); }
.badge.pending,.badge.collecting,.badge.review,.badge.sandbox,.badge.limited { color: var(--warning); }
.badge.cancelled,.badge.expired,.badge.offline,.badge.failed { color: var(--danger); }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th,td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); font-size: .87rem; }
th { color: var(--muted); font-size: .77rem; }
tbody tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: .75rem; }
.field { display: grid; gap: .28rem; min-width: 0; }
input,select,textarea { width: 100%; min-height: 2.65rem; background: var(--bg); border: 1px solid var(--line); border-radius: .62rem; padding: .45rem .65rem; }
textarea { min-height: 6rem; resize: vertical; }
.filters select { width: auto; max-width: 100%; }
.record-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.record { display: grid; gap: .75rem; }
.record:hover { border-color: var(--accent); }
.record p { color: var(--muted); font-size: .88rem; }
.shop-record { gap: 1rem; padding: 1.25rem; border-color: color-mix(in srgb,var(--accent) 35%,var(--line)); box-shadow: inset 0 1px 0 #ffffff12,0 2px 0 #080e162b,0 14px 24px #040d2226; }
.shop-record-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: .625rem; align-items: center; }
.shop-record-head h3 { overflow-wrap: anywhere; }
.shop-record-head small { display: block; color: var(--muted); font-size: .78rem; }
.shop-avatar,.shop-plus { display: inline-grid; place-items: center; width: 3rem; height: 3rem; flex: 0 0 auto; background: linear-gradient(#279169,#165e49); border: 1px solid #89e7bc4f; border-radius: 1rem; color: #fff; font-size: 1.15rem; font-weight: 800; box-shadow: inset 0 1px 0 #ffffff55,0 3px 0 #0d4537,0 9px 16px #122d4a30; }
.shop-record-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .625rem; }
.shop-record-stats > div { display: grid; gap: .15rem; padding: .75rem; border: 1px solid var(--line); background: var(--raised); border-radius: .875rem; }
.shop-record-stats span,.shop-progress { color: var(--muted); font-size: .79rem; }
.shop-record-stats strong { overflow-wrap: anywhere; font-weight: 750; }
.shop-progress { display: grid; gap: .35rem; }
.shop-progress > div { display: flex; justify-content: space-between; }
.shop-progress progress { width: 100%; height: .5rem; border: 0; border-radius: 1rem; overflow: hidden; accent-color: #60ae94; background: var(--raised); }
.shop-progress progress::-webkit-progress-bar { background: var(--raised); }
.shop-progress progress::-webkit-progress-value { background: #60ae94; }
.shop-tags { display: flex; flex-wrap: wrap; gap: .375rem; }
.shop-tags > span { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .5rem; color: var(--muted); border: 1px solid var(--line); border-radius: .65rem; font-size: .74rem; }
.shop-tags .line-icon { width: .85rem; height: .85rem; }
.shop-create-tile { display: grid; place-content: center; justify-items: center; gap: .85rem; min-height: 16.5rem; background: var(--surface); border-style: dashed; color: var(--muted); font-weight: 700; }
.shop-create-tile:hover { color: var(--accent); border-color: var(--accent); background: var(--panel); }
.shop-create-tile:active .shop-plus { transform: translateY(2px); box-shadow: inset 0 1px 0 #ffffff40,0 1px 0 #0d4537; }
.shop-plus { border-radius: 50%; }
.tabs { display: flex; align-items: center; overflow-x: auto; gap: .3rem; margin: .9rem 0 1rem; }
.tabs button { flex: 0 0 auto; }
.tabs button[aria-pressed='true'] { border-color: var(--accent); color: var(--accent); }
.form { display: grid; gap: .95rem; }
.form .actions { margin-top: .2rem; }
.form label, .login label { display: grid; gap: .34rem; font-weight: 650; }
.form .check { display: flex; align-items: center; gap: .5rem; }
.form-error { color: var(--danger); }
.check input { width: 1.1rem; min-height: 1.1rem; }
.note { color: var(--muted); font-size: .87rem; }
pre,code { font-family: Consolas,monospace; overflow-wrap: anywhere; }
pre { max-width: 100%; padding: .75rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--bg); overflow-x: auto; }
.plan ul { padding-left: 1.15rem; color: var(--muted); }
.plan p,.plan ul { margin-top: .55rem; }
.tariff-card { display: flex; flex-direction: column; gap: .65rem; }
.tariff-card .split-head,.tariff-dialog-title { margin-bottom: 0; }
.tariff-card .tariff-price { margin-top: 0; }
.tariff-price strong { font-size: 1.35rem; letter-spacing: -.035em; }
.tariff-card ul { margin: 0 0 .4rem; }
.tariff-card button { margin-top: auto; align-self: start; }
.tariff-summary { margin-top: 1rem; }
.tariff-transfer { padding: .4rem .875rem; border-radius: .9rem; border: 1px solid var(--line); background: var(--raised); }
.tariff-transfer code { white-space: nowrap; }
.login { min-height: 100svh; display: grid; place-items: center; padding: 1.25rem; }
.login form { display: grid; gap: 1.15rem; width: min(100%,25rem); }
dialog { width: min(calc(100% - 1.5rem),31rem); max-height: 90svh; color: var(--text); background: linear-gradient(155deg,var(--panel),var(--surface) 72%); border: 1px solid var(--line); border-radius: 1.5rem; padding: clamp(1rem,3vw,1.5rem); box-shadow: inset 0 1px 0 #ffffff14,0 3px 0 #07101a4a,0 28px 70px #02091470; }
dialog::backdrop { background: #050a13b8; backdrop-filter: blur(3px); }
.modal-head { display: flex; gap: .625rem; align-items: center; margin-bottom: 1.25rem; }
.modal-head h2 { font-size: 1.25rem; }
.modal-head form { margin-left: auto; }
.modal-head button { width: 2.5rem; height: 2.5rem; background: transparent; border-color: transparent; }
.modal-kind,.shop-info > span { display: grid; place-items: center; width: 2.125rem; height: 2.125rem; border-radius: .75rem; background: var(--raised); border: 1px solid var(--line); color: var(--accent); flex: 0 0 auto; }
.modal-kind { border-radius: 50%; }
.shop-form label { gap: .5rem; color: var(--text); }
.shop-form input { min-height: 3rem; background: var(--raised); border-radius: .875rem; padding-inline: .9rem; }
.shop-form input:focus { outline: 2px solid #75bba8; outline-offset: 1px; }
.shop-form input::placeholder { opacity: 1; color: var(--muted); }
.shop-name-detail { margin-top: -.6rem; }
.shop-info { display: flex; align-items: center; gap: .75rem; padding: .875rem; background: var(--panel); border: 1px solid var(--line); border-radius: .875rem; color: var(--muted); font-size: .875rem; }
.shop-info strong { color: var(--text); }
.shop-form .modal-actions { justify-content: flex-end; margin-top: .5rem; }
.modal-actions .primary,.modal-actions .quiet { min-height: 2.75rem; }
.notice { z-index: 30; position: fixed; bottom: .8rem; right: .8rem; max-width: min(32rem,calc(100% - 1.6rem)); padding: .8rem 1rem; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--raised); color: var(--text); border-radius: .9rem; }
.notice.error { color: var(--danger); }
@media (max-width: 75rem) {
  .app { grid-template-columns: 14rem minmax(0,1fr); }
  .view { width: calc(100% - 2rem); }
  .grid-four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .record-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 53rem) {
  .app { display: block; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(17.5rem,82vw); margin: 0; height: 100dvh; min-height: 0; border-radius: 0 1.5rem 1.5rem 0; visibility: hidden; transform: translateX(-105%); transition: transform .22s var(--ease-out),visibility .22s; }
  .sidebar.open { visibility: visible; transform: none; }
  .mobile-menu { display: inline-grid; }
  .top > div:first-of-type { margin-right: auto; }
  body.menu-open .work::before { content: ''; position: fixed; z-index: 4; inset: 0; background: #0009; pointer-events: none; }
}
@media (max-width: 38rem) {
  .top { padding: .5rem .75rem; min-height: 4rem; }
  .top h1 { font-size: 1.05rem; }
  .crumb,.balance-chip { display: none; }
  .view { width: calc(100% - 1.5rem); }
  .view-head,.split-head,.banner { align-items: flex-start; flex-wrap: wrap; }
  .grid-two,.dash-grid,.record-grid { grid-template-columns: minmax(0,1fr); }
  .box,.metric { padding: .875rem; }
  .tabs { margin-inline: -.1rem; }
}
@media (max-width: 22rem) {
  .shop-record { padding: .875rem; }
  .shop-record-head { gap: .5rem; }
  .shop-avatar { width: 2.5rem; height: 2.5rem; }
  .shop-form .modal-actions > button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .side-nav a,.primary,.quiet,.icon,.group button { transition: background-color .16s var(--ease-out),border-color .16s var(--ease-out),color .16s var(--ease-out),transform .16s var(--ease-out); }
  .view-entry > .view-head,.view-entry > .banner,.view-entry > .box,.view-entry > .tabs,.view-entry > .grid-two,.view-entry > .dash-grid,.view-entry > .stack,.view-entry .metric { animation: dashboard-enter .36s var(--ease-out) both; }
  .view-entry .metric:nth-child(2) { animation-delay: .05s; }
  .view-entry .metric:nth-child(3) { animation-delay: .10s; }
  .view-entry .metric:nth-child(4) { animation-delay: .15s; }
  .chart rect { animation: chart-rise .48s var(--ease-out) both; }
  dialog[open] { animation: dashboard-enter .3s var(--ease-out); }
}
@keyframes dashboard-enter { from { opacity: .52; transform: translateY(.55rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes chart-rise { from { transform: scaleY(.05); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { transition: none !important; animation: none !important; }
}
