/* ToolRent Storefront + Customer Dashboard — light, Apple-inspired */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "IBM Plex Mono", Menlo, monospace;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.06);
  --label: #1d1d1f;
  --label-2: #6e6e73;
  --label-3: #8e8e93;
  --sep: rgba(60, 60, 67, 0.1);
  --sep-strong: rgba(60, 60, 67, 0.18);

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --green: #248a3d;
  --green-fill: #34c759;
  --green-soft: rgba(52, 199, 89, 0.12);
  --orange: #b25000;
  --orange-soft: rgba(255, 149, 0, 0.13);
  --red: #d70015;
  --red-soft: rgba(255, 59, 48, 0.08);

  --radius: 14px;
  --radius-l: 18px;
  --line: 0 0 0 1px var(--sep);
  --ring: 0 0 0 4px rgba(0, 113, 227, 0.18);

  --primary: var(--accent);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body.public-body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--label);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
code, pre { font-family: var(--mono); letter-spacing: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.muted { color: var(--label-2); }
.is-good { color: var(--green); }
.is-warn { color: var(--orange); }

.site-shell { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ── Nav ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sep);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--label); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  color: #fff; font-size: 0.95rem;
  background: linear-gradient(150deg, #3a8dff 0%, #0058c7 100%);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.brand-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.03em; }
.nav-toggle {
  display: none; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: transparent; color: var(--label); font-size: 1rem; cursor: pointer;
}
.nav-toggle:hover { background: var(--fill-2); }
.site-nav { display: flex; align-items: center; gap: 0.25rem; font-size: 0.92rem; }
.site-nav a:not(.btn) {
  color: var(--label-2);
  padding: 0.5rem 0.9rem;
  border-radius: 980px;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:not(.btn):hover { color: var(--label); text-decoration: none; background: var(--fill-2); }
.site-nav a.is-active { color: var(--label); font-weight: 500; }
.site-nav .nav-admin-link { color: var(--accent); }
.site-nav .nav-balance { color: var(--label); font-weight: 500; font-variant-numeric: tabular-nums; background: var(--fill-2); }
.site-nav .nav-balance i { color: var(--green); margin-right: 0.15rem; }
.site-nav .btn { margin-left: 0.5rem; min-height: 38px; padding: 0.5rem 1.15rem; font-size: 0.9rem; }

.site-main { flex: 1; padding-bottom: 64px; }
.site-main.site-main--narrow { max-width: 560px; padding-top: 40px; }

/* ── Hero (light) ────────────────────────────────────────── */
.store-hero { padding: 56px 0 28px; max-width: 640px; }
.store-hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.store-hero p { margin: 0.7rem 0 0; font-size: 1.05rem; color: var(--label-2); max-width: 32rem; }
.store-hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.25rem; font-size: 0.82rem; color: var(--label-2); }
.store-hero-meta i { color: var(--accent); margin-right: 0.3rem; }

/* ── Catalog: App Store style rows ───────────────────────── */
.store-catalog { scroll-margin-top: 80px; }
.store-catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0 2px 0.75rem; }
.store-catalog-head h2 { margin: 0; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; }
.store-catalog-head p { margin: 0; color: var(--label-2); font-size: 0.85rem; }
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.store-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--line);
  color: var(--label);
  transition: box-shadow 0.2s, transform 0.2s;
}
.store-item:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--sep-strong), 0 6px 20px rgba(0, 0, 0, 0.05); }
.store-item:active { transform: scale(0.99); }
.store-item-logo {
  width: 52px; height: 52px; flex-shrink: 0; object-fit: contain;
  border-radius: 12px; background: #fff; padding: 4px;
  box-shadow: 0 0 0 1px var(--sep);
}
.store-item-body { flex: 1; min-width: 0; }
.store-item-body h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.store-item-body p { margin: 0.2rem 0 0; font-size: 0.78rem; color: var(--label-2); display: flex; align-items: center; gap: 0.3rem; white-space: nowrap; overflow: hidden; }
.store-sep { color: var(--label-3); }
.stock-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.stock-dot.is-in { background: var(--green-fill); }
.stock-dot.is-out { background: #ff9500; }
.store-item-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex-shrink: 0; }
.store-price { font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.store-get {
  display: inline-block;
  padding: 0.22rem 0.9rem;
  border-radius: 980px;
  background: var(--fill);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}
.store-item:hover .store-get { background: var(--accent); color: #fff; }
.store-empty { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--label-2); background: var(--surface); border-radius: var(--radius); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 36px; padding: 0.45rem 1.05rem;
  border-radius: 980px; border: 0;
  font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.12s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 30px; padding: 0.3rem 0.85rem; font-size: 0.8rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary, .btn-outline { background: var(--fill); color: var(--label); }
.btn-secondary:hover, .btn-outline:hover { background: rgba(118, 118, 128, 0.18); color: var(--label); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-block { width: 100%; }
.btn-danger-soft { background: var(--red-soft); color: var(--red); }
.btn-danger-soft:hover { background: rgba(255, 59, 48, 0.14); }

/* ── Auth ────────────────────────────────────────────────── */
.auth-shell { display: flex; justify-content: center; padding: 48px 0 16px; }
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: var(--line);
  padding: 32px 28px 26px;
  text-align: center;
}
.auth-icon {
  width: 48px; height: 48px; margin: 0 auto 0.9rem;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 1.15rem; color: var(--accent); background: var(--accent-soft);
}
.auth-card h1 { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; }
.auth-lead { margin: 0.4rem 0 1.4rem; color: var(--label-2); font-size: 0.875rem; }
.auth-card form { text-align: left; }
.auth-card .btn-block { min-height: 44px; font-size: 0.95rem; margin-top: 0.35rem; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 0.9rem; }
.form-group label { display: block; margin: 0 0 0.35rem 0.1rem; font-size: 0.78rem; font-weight: 500; color: var(--label-2); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--label);
  background: var(--surface);
  border: 1px solid var(--sep-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group select {
  -webkit-appearance: none; appearance: none; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236e6e73' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='m4 6 4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 14px;
}
.form-group input::placeholder { color: var(--label-3); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.otp-input { text-align: center; font-family: var(--mono) !important; font-size: 1.5rem !important; letter-spacing: 0.35em; min-height: 54px !important; }
.otp-input--sm { font-size: 1.1rem !important; min-height: 44px !important; letter-spacing: 0.25em; }
.password-field { position: relative; }
.password-field input { padding-right: 2.8rem; }
.password-toggle {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--label-3); cursor: pointer; display: grid; place-items: center;
}
.password-toggle:hover { background: var(--fill-2); color: var(--label); }
.form-hint { margin: 1.2rem 0 0; font-size: 0.82rem; color: var(--label-2); text-align: center; }
.form-narrow { max-width: 380px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; }
.form-row-wide { grid-column: 1 / -1; }

/* ── Notices ─────────────────────────────────────────────── */
.notice {
  display: flex; align-items: flex-start; gap: 0.55rem;
  padding: 0.7rem 0.95rem; border-radius: 12px;
  font-size: 0.85rem; line-height: 1.4; text-align: left; margin-bottom: 1rem;
}
.notice i { margin-top: 0.15rem; }
.notice-error { background: var(--red-soft); color: var(--red); }
.notice-success { background: var(--green-soft); color: #1b6b30; }

/* ── Order sheet ─────────────────────────────────────────── */
.order-sheet { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--line); overflow: hidden; }
.order-sheet-head { text-align: center; padding: 32px 28px 20px; }
.order-sheet-logo {
  width: 72px; height: 72px; object-fit: contain; border-radius: 16px;
  background: #fff; padding: 6px; box-shadow: 0 0 0 1px var(--sep); margin-bottom: 0.9rem;
}
.order-sheet-head h1 { margin: 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -0.025em; }
.order-sheet-head p { margin: 0.3rem 0 0; color: var(--label-2); font-size: 0.875rem; }
.order-sheet-body { padding: 0 28px 28px; }
.spec-list { list-style: none; margin: 0 0 1.25rem; padding: 0; background: var(--fill-2); border-radius: 12px; }
.spec-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; font-size: 0.9rem; }
.spec-list li + li { border-top: 1px solid var(--sep); }
.spec-label { color: var(--label-2); }
.spec-value { font-weight: 500; font-variant-numeric: tabular-nums; }
.spec-price { font-size: 1.15rem; font-weight: 600; }
.spec-warn { color: var(--orange); }
.order-cta .btn-block { min-height: 46px; font-size: 0.95rem; }
.order-signin { text-align: center; padding: 1.25rem 1rem; background: var(--fill-2); border-radius: 12px; }
.order-signin p { margin: 0 0 0.9rem; color: var(--label-2); font-size: 0.9rem; }
.order-success-icon {
  width: 56px; height: 56px; margin: 0 auto 0.9rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: var(--green-fill);
}
.order-success-id { display: inline-block; margin-top: 0.6rem; font-family: var(--mono); font-size: 0.75rem; color: var(--label-2); background: var(--fill-2); padding: 0.2rem 0.6rem; border-radius: 980px; }
.cred-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; }
.cred-row + .cred-row { border-top: 1px solid var(--sep); }
.cred-row-label { display: block; font-size: 0.72rem; color: var(--label-2); margin-bottom: 0.1rem; }
.cred-row code { font-size: 0.98rem; font-weight: 500; word-break: break-all; color: var(--label); }
code.is-secret { color: var(--accent); }
.order-back { text-align: center; margin: 1.25rem 0 0; font-size: 0.875rem; }

/* ── Dashboard ───────────────────────────────────────────── */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 36px 0 16px; }
.dash-hello { margin: 0; font-size: 0.85rem; color: var(--label-2); }
.dash-head h1 { margin: 0.1rem 0 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; }
.dash-tabs {
  display: flex; gap: 2px; padding: 3px; margin-bottom: 1.25rem;
  background: rgba(118, 118, 128, 0.12); border-radius: 10px;
  overflow-x: auto; scrollbar-width: none; width: fit-content; max-width: 100%;
}
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tabs a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.38rem 0.95rem; border-radius: 8px;
  color: var(--label); font-size: 0.82rem; font-weight: 500; white-space: nowrap;
}
.dash-tabs a i { color: var(--label-2); font-size: 0.78rem; }
.dash-tabs a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.5); }
.dash-tabs a.is-active { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); font-weight: 600; }
.dash-tabs a.is-active i { color: var(--accent); }

.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 1rem; }
.dash-stat {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 1rem 1.1rem; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--line); color: var(--label);
}
a.dash-stat:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--sep-strong); }
.dash-stat span { font-size: 0.78rem; color: var(--label-2); }
.dash-stat strong { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dash-stat small { font-size: 0.75rem; color: var(--label-3); }
.dash-stat--accent small { color: var(--accent); }

.dash-card { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--line); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.dash-card--flush { padding: 0; overflow: hidden; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.dash-card-head--pad { padding: 1.1rem 1.3rem 0; margin-bottom: 0.4rem; }
.dash-card-head h2 { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: -0.015em; }
.dash-card-head h2 i { color: var(--orange); margin-right: 0.2rem; }
.dash-card-head a { font-size: 0.82rem; }
.dash-lead { margin: -0.2rem 0 1rem; color: var(--label-2); font-size: 0.875rem; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; align-items: start; }
.dash-grid--inner { gap: 1rem; }
.dash-empty { text-align: center; padding: 2.25rem 1rem; color: var(--label-2); font-size: 0.9rem; }
.dash-empty i { font-size: 1.6rem; color: var(--label-3); margin-bottom: 0.4rem; }
.dash-empty p { margin: 0; }

.pill { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.6rem; border-radius: 980px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-orange { background: var(--orange-soft); color: var(--orange); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-gray { background: var(--fill); color: var(--label-2); }

.copy-btn {
  width: 28px; height: 28px; border: 0; border-radius: 50%; flex-shrink: 0;
  background: transparent; color: var(--label-3); cursor: pointer; display: inline-grid; place-items: center;
  font-size: 0.82rem; transition: background 0.2s, color 0.2s;
}
.copy-btn:hover { background: var(--fill-2); color: var(--label); }
.copy-btn.is-copied, .btn.is-copied { color: var(--green); }

.rental-list { list-style: none; margin: 0; padding: 0; }
.rental { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0; }
.rental + .rental { border-top: 1px solid var(--sep); }
.rental > img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; box-shadow: 0 0 0 1px var(--sep); background: #fff; padding: 3px; flex-shrink: 0; }
.rental-main { flex: 1; min-width: 0; }
.rental-main strong { font-size: 0.9rem; font-weight: 600; }
.rental-creds { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.25rem; margin-top: 0.15rem; font-size: 0.82rem; }
.rental-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; font-size: 0.8rem; flex-shrink: 0; }

.table-scroll { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.dash-table th { text-align: left; font-size: 0.74rem; font-weight: 500; color: var(--label-2); padding: 0.85rem 1rem 0.55rem; border-bottom: 1px solid var(--sep); white-space: nowrap; }
.dash-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--sep); white-space: nowrap; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table code { font-size: 0.8rem; }
.cell-tool { display: flex; align-items: center; gap: 0.6rem; }
.cell-tool img { width: 28px; height: 28px; object-fit: contain; border-radius: 7px; box-shadow: 0 0 0 1px var(--sep); background: #fff; padding: 2px; }
.cell-tool strong { font-weight: 500; }

.wallet-card { display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; background: linear-gradient(150deg, #ffffff 0%, #f0f6ff 100%); }
.wallet-label { font-size: 0.82rem; color: var(--label-2); }
.wallet-amount { font-size: 2.5rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wallet-sub { font-size: 0.8rem; color: var(--label-3); max-width: 22rem; }
.wallet-card .pill { align-self: flex-start; }
.steps { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--label-2); font-size: 0.85rem; line-height: 1.7; }
.pay-info { background: var(--fill-2); border-radius: 10px; padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.pay-info p { margin: 0; flex-basis: 100%; }
.tx-list { list-style: none; margin: 0; padding: 0 0 0.3rem; }
.tx { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1.3rem; }
.tx + .tx { border-top: 1px solid var(--sep); }
.tx-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; flex-shrink: 0; }
.tx-icon.is-in { background: var(--green-soft); color: var(--green); }
.tx-icon.is-out { background: var(--fill); color: var(--label-2); }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-main strong { font-size: 0.875rem; font-weight: 500; }
.tx-main span { font-size: 0.76rem; color: var(--label-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-end { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.tx-end strong { font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.kv { margin: 0; background: var(--fill-2); border-radius: 12px; }
.kv > div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 1rem; padding: 0.6rem 0.9rem; }
.kv > div + div { border-top: 1px solid var(--sep); }
.kv dt { font-size: 0.8rem; color: var(--label-2); }
.kv dd { margin: 0; display: flex; align-items: center; gap: 0.2rem; min-width: 0; }
.kv code { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.api-key.is-masked { color: transparent; text-shadow: 0 0 6px rgba(0, 0, 0, 0.45); user-select: none; }
.code-block { margin: 0 0 1rem; padding: 0.9rem 1rem; background: #1d1d1f; color: #f5f5f7; border-radius: 12px; font-size: 0.78rem; line-height: 1.6; overflow-x: auto; }
.api-actions { list-style: none; margin: 0; padding: 0; font-size: 0.82rem; color: var(--label-2); }
.api-actions li { padding: 0.25rem 0; }
.api-actions code { color: var(--label); background: var(--fill-2); padding: 0.1rem 0.35rem; border-radius: 5px; margin-right: 0.35rem; font-size: 0.78rem; }

.twofa-setup { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
.twofa-qr { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; padding: 1rem; background: var(--fill-2); border-radius: 14px; text-align: center; }
.twofa-qr img { width: 180px; height: 180px; border-radius: 10px; background: #fff; padding: 6px; }
.twofa-qr > span { font-size: 0.75rem; color: var(--label-2); }
.secret-line { display: flex; align-items: center; gap: 0.2rem; }
.secret-line code { font-size: 0.8rem; font-weight: 500; }
.twofa-form { max-width: 340px; }
.inset { background: var(--fill-2); border-radius: 14px; padding: 1rem 1.1rem; }
.inset h3 { margin: 0 0 0.75rem; font-size: 0.9rem; font-weight: 600; }
.recovery-card { box-shadow: 0 0 0 1px rgba(255, 149, 0, 0.35); background: #fffaf2; }
.code-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.code-grid code { text-align: center; padding: 0.5rem; background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--sep); font-size: 0.85rem; font-weight: 500; }

.tab-badge { font-style: normal; min-width: 1.2rem; padding: 0 0.35rem; border-radius: 980px; background: #ff3b30; color: #fff; font-size: 0.68rem; font-weight: 700; text-align: center; }
.announce-card { background: #fffaf2; box-shadow: 0 0 0 1px rgba(255, 149, 0, 0.3); }
.announce-card h2 i { color: #ff9500; }
.announce-list { list-style: none; margin: 0; padding: 0; }
.announce-list li + li { border-top: 1px solid var(--sep); }
.announce-list li { padding: 0.6rem 0; }
.announce-list p { margin: 0; font-size: 0.9rem; }
.announce-list small { color: var(--label-3); font-size: 0.75rem; }
.chat-card { display: flex; flex-direction: column; }
.chat-thread { min-height: 220px; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.25rem 0 1rem; }
.bubble { max-width: 75%; padding: 0.55rem 0.85rem; border-radius: 18px; font-size: 0.9rem; line-height: 1.4; }
.bubble p { margin: 0; word-wrap: break-word; }
.bubble small { display: block; margin-top: 0.2rem; font-size: 0.68rem; opacity: 0.72; }
.bubble--me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bubble--them { align-self: flex-start; background: rgba(118, 118, 128, 0.13); border-bottom-left-radius: 6px; }
.chat-compose { display: flex; gap: 0.5rem; align-items: flex-end; border-top: 1px solid var(--sep); padding-top: 0.9rem; }
.chat-compose textarea {
  flex: 1; resize: vertical; min-height: 44px; padding: 0.6rem 0.9rem; font: inherit; font-size: 0.92rem;
  border: 1px solid var(--sep-strong); border-radius: 20px; outline: none;
}
.chat-compose textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.chat-compose .btn { width: 44px; height: 44px; padding: 0; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--sep); color: var(--label-3); font-size: 0.75rem; }
.site-footer-inner { padding: 1.1rem 20px 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer-links { display: flex; flex-wrap: wrap; }
.site-footer-links a { color: var(--label-2); padding: 0 0.6rem; }
.site-footer-links a + a { border-left: 1px solid var(--sep-strong); }

/* ── Small screens ───────────────────────────────────────── */
@media (max-width: 820px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .twofa-setup { grid-template-columns: 1fr; }
  .code-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .site-shell { padding: 0 16px; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 0; }
  .header-bar { min-height: 60px; }
  .nav-toggle { display: inline-grid; place-items: center; }
  #siteNav { display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 0.25rem 0 0.9rem; font-size: 0.95rem; }
  body.nav-open #siteNav { display: flex; }
  #siteNav a:not(.btn) { padding: 0.75rem 0.2rem; border-radius: 0; border-bottom: 1px solid var(--sep); background: transparent; }
  #siteNav .btn { margin: 0.8rem 0 0; min-height: 42px; }
  .store-hero { padding: 36px 0 20px; }
  .store-grid { grid-template-columns: 1fr; gap: 10px; }
  .auth-shell { padding-top: 24px; }
  .auth-card { padding: 28px 20px 22px; }
  .order-sheet-head { padding: 28px 18px 18px; }
  .order-sheet-body { padding: 0 18px 22px; }
  .dash-head { padding-top: 24px; }
  .dash-head h1 { font-size: 1.45rem; }
  .form-row { grid-template-columns: 1fr; }
  .kv > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .rental { flex-wrap: wrap; }
  .rental-end { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; padding-left: 52px; }
  .site-footer-inner { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
