@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Instrument+Sans:wght@400..700&family=JetBrains+Mono:wght@500;600&display=swap");

/* ---------- base ---------- */
body { margin: 0; font-family: var(--font-sans); font-size: 15px; line-height: 22px; background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; }
.wz-stage { padding: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.wz-stage-col { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); max-width: 420px; }
.wz-stage-grid { padding: var(--space-4); display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.wz-num { font-variant-numeric: tabular-nums; }
.wz-icon { display: inline-block; flex: none; vertical-align: middle; }
.wz-focus:focus-visible, .wz-btn:focus-visible, .wz-input:focus-visible, .wz-seg-btn:focus-visible, .wz-plan:focus-visible, .wz-row:focus-visible, .wz-nav-btn:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }

/* ---------- Button ---------- */
.wz-btn { font: inherit; font-weight: 600; font-size: 15px; line-height: 20px; height: 44px; padding: 0 var(--space-5); border-radius: var(--radius-md); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .08s ease; white-space: nowrap; }
.wz-btn:active { transform: translateY(1px); }
.wz-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.wz-btn-lg { height: 52px; font-size: 16px; padding: 0 var(--space-6); }
.wz-btn-sm { height: 36px; font-size: 14px; padding: 0 var(--space-4); }
.wz-btn-block { display: flex; width: 100%; }
.wz-btn-primary { background: var(--zone); color: var(--on-zone); }
.wz-btn-primary:hover:not([disabled]) { background: var(--zone-strong); }
.wz-btn-secondary { background: var(--surface-raised); color: var(--ink); border-color: var(--line-strong); }
.wz-btn-secondary:hover:not([disabled]) { background: var(--surface-sunken); }
.wz-btn-ghost { background: transparent; color: var(--zone); }
.wz-btn-ghost:hover:not([disabled]) { background: var(--zone-soft); }
.wz-btn-danger { background: var(--surface-raised); color: var(--danger); border-color: var(--danger); }
.wz-btn-danger:hover:not([disabled]) { background: var(--danger-soft); }

/* ---------- Badge ---------- */
.wz-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-full); font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.wz-badge-dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: currentColor; flex: none; }
.wz-badge-neutral { background: var(--surface-sunken); color: var(--ink-muted); }
.wz-badge-zone { background: var(--zone-soft); color: var(--zone); }
.wz-badge-ticket { background: var(--ticket); color: var(--on-ticket); }
.wz-badge-warning { background: var(--ticket-soft); color: var(--ticket-ink); }
.wz-badge-danger { background: var(--danger-soft); color: var(--danger); }
.wz-badge-info { background: var(--info-soft); color: var(--info); }

/* ---------- TextField ---------- */
.wz-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wz-field-label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.wz-input-wrap { display: flex; align-items: center; height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); padding: 0 var(--space-3); gap: var(--space-2); transition: border-color .15s ease, box-shadow .15s ease; }
.wz-input-wrap:focus-within { border-color: var(--zone); box-shadow: 0 0 0 1px var(--zone); }
.wz-input-wrap.is-error { border-color: var(--danger); }
.wz-input-wrap.is-error:focus-within { box-shadow: 0 0 0 1px var(--danger); }
.wz-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); height: 100%; }
.wz-input::placeholder { color: var(--ink-subtle); }
.wz-affix { color: var(--ink-muted); font-weight: 600; font-size: 15px; }
.wz-field-hint { font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.wz-field-error { font-size: 13px; line-height: 18px; color: var(--danger); display: flex; gap: 6px; align-items: center; font-weight: 500; }

/* ---------- Tabs (segmented) ---------- */
.wz-seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-sunken); border-radius: var(--radius-md); }
.wz-seg-btn { font: inherit; font-size: 14px; font-weight: 600; height: 36px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wz-seg-btn.is-active { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.wz-seg-count { font-size: 12px; font-weight: 600; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.wz-seg-btn.is-active .wz-seg-count { color: var(--zone); }

/* ---------- StatCard ---------- */
.wz-stat { background: var(--surface-raised); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.wz-stat-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.wz-stat-label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.wz-stat-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--zone-soft); color: var(--zone); display: grid; place-items: center; }
.wz-stat-value { font-family: var(--font-display); font-size: 32px; line-height: 36px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.wz-stat-unit { font-size: 18px; font-weight: 600; color: var(--ink-muted); margin-left: 4px; letter-spacing: 0; }
.wz-stat-foot { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.wz-delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wz-delta-up { color: var(--zone); }
.wz-delta-down { color: var(--danger); }
.wz-stat-night { background: var(--night); box-shadow: var(--shadow-lg); }
.wz-stat-night .wz-stat-label, .wz-stat-night .wz-stat-foot, .wz-stat-night .wz-stat-unit { color: var(--on-night-muted); }
.wz-stat-night .wz-stat-value { color: var(--on-night); }
.wz-stat-night .wz-stat-icon { background: transparent; color: var(--zone-glow); border: 1px solid var(--zone-glow); }
.wz-stat-night .wz-delta-up { color: var(--zone-glow); }

/* ---------- TicketCard ---------- */
.wz-ticket { --wz-notch: var(--surface); position: relative; width: 280px; background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; color: var(--ink); }
.wz-ticket-head { background: var(--night); color: var(--on-night); padding: var(--space-4) var(--space-5) var(--space-5); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.wz-ticket-vendor { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 22px; }
.wz-ticket-ssid { font-size: 12px; line-height: 16px; color: var(--on-night-muted); margin-top: 2px; }
.wz-ticket-price { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 28px; color: var(--zone-glow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wz-ticket-perf { position: relative; height: 0; border-top: 2px dashed var(--line); margin: 0 18px; }
.wz-ticket-perf::before, .wz-ticket-perf::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--wz-notch); }
.wz-ticket-perf::before { left: -31px; }
.wz-ticket-perf::after { right: -31px; }
.wz-ticket-body { padding: var(--space-4) var(--space-5) var(--space-5); display: grid; grid-template-columns: 1fr auto; gap: var(--space-3) var(--space-4); align-items: end; }
.wz-ticket-plan { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.wz-ticket-code { font-family: var(--font-mono); font-weight: 600; font-size: 20px; line-height: 28px; letter-spacing: .12em; color: var(--ink); white-space: nowrap; }
.wz-ticket-meta { font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--ink-subtle); grid-column: 1 / -1; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: var(--space-2); }
.wz-qr { width: 72px; height: 72px; display: grid; grid-template-columns: repeat(13, 1fr); gap: 0; padding: 5px; background: #ffffff; border-radius: var(--radius-xs); box-sizing: border-box; }
.wz-qr i { background: #0e1a15; }
.wz-qr i.o { background: transparent; }

/* ---------- PlanCard ---------- */
.wz-plan { font: inherit; text-align: left; position: relative; width: 100%; background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); cursor: pointer; color: var(--ink); transition: border-color .15s ease, background-color .15s ease; }
.wz-plan:hover { border-color: var(--zone); }
.wz-plan.is-selected { border: 2px solid var(--zone); padding: calc(var(--space-4) - 1px); background: var(--zone-soft); }
.wz-plan-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.wz-plan-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 26px; }
.wz-plan-price { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 32px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wz-plan-facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.wz-plan-facts span { display: inline-flex; align-items: center; gap: 6px; }
.wz-plan-check { position: absolute; top: var(--space-4); right: var(--space-4); width: 24px; height: 24px; border-radius: var(--radius-full); background: var(--zone); color: var(--on-zone); display: grid; place-items: center; }

/* ---------- RouterRow ---------- */
.wz-row { font: inherit; text-align: left; width: 100%; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface-raised); border: 0; border-radius: var(--radius-md); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm); }
.wz-row:hover { background: var(--surface-sunken); }
.wz-row-ico { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none; background: var(--surface-sunken); color: var(--ink-muted); }
.wz-row-ico.is-online { background: var(--zone-soft); color: var(--zone); }
.wz-row-ico.is-offline { background: var(--danger-soft); color: var(--danger); }
.wz-row-ico.is-warning { background: var(--ticket-soft); color: var(--ticket-ink); }
.wz-row-main { flex: 1; min-width: 0; }
.wz-row-name { font-weight: 600; font-size: 15px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-row-sub { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.wz-row-clients { font-size: 13px; line-height: 18px; color: var(--ink-muted); display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.wz-row-chev { color: var(--ink-subtle); flex: none; }

/* ---------- Alert ---------- */
.wz-alert { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); align-items: flex-start; }
.wz-alert-ico { flex: none; margin-top: 1px; }
.wz-alert-body { flex: 1; min-width: 0; font-size: 14px; line-height: 20px; color: var(--ink); }
.wz-alert-title { font-weight: 700; display: block; margin-bottom: 2px; }
.wz-alert-action { margin-top: var(--space-2); }
.wz-alert-info { background: var(--info-soft); } .wz-alert-info .wz-alert-ico, .wz-alert-info .wz-alert-title { color: var(--info); }
.wz-alert-success { background: var(--zone-soft); } .wz-alert-success .wz-alert-ico, .wz-alert-success .wz-alert-title { color: var(--zone); }
.wz-alert-warning { background: var(--ticket-soft); } .wz-alert-warning .wz-alert-ico, .wz-alert-warning .wz-alert-title { color: var(--ticket-ink); }
.wz-alert-danger { background: var(--danger-soft); } .wz-alert-danger .wz-alert-ico, .wz-alert-danger .wz-alert-title { color: var(--danger); }

/* ---------- BottomNav ---------- */
.wz-nav { display: flex; align-items: stretch; background: var(--surface-raised); border-top: 1px solid var(--line); padding: 6px var(--space-2) 8px; box-shadow: var(--shadow-lg); }
.wz-nav-btn { font: inherit; flex: 1; border: 0; background: transparent; color: var(--ink-muted); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; line-height: 14px; font-weight: 600; cursor: pointer; padding: 6px 0; border-radius: var(--radius-md); }
.wz-nav-pill { width: 56px; height: 30px; border-radius: var(--radius-full); display: grid; place-items: center; transition: background-color .15s ease; }
.wz-nav-btn.is-active { color: var(--ink); }
.wz-nav-btn.is-active .wz-nav-pill { background: var(--zone-soft); color: var(--zone); }
.wz-nav-fab .wz-nav-pill { background: var(--zone); color: var(--on-zone); width: 48px; height: 48px; margin-top: -18px; box-shadow: var(--shadow-lg); }

/* ---------- Icon set preview ---------- */
.wz-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: var(--space-2); padding: var(--space-4); }
.wz-icon-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--space-3) var(--space-1); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); }
.wz-icon-cell span { font-family: var(--font-mono); font-size: 11px; line-height: 14px; color: var(--ink-subtle); }
