/* ─── shared bits (also used by the admin panel) ─────────────────────────── */
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.acc-error { color: #ff9b9b; }
button.text-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
button.text-link:hover { color: var(--text); }
.list { margin: 0; padding: 0; list-style: none; }
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.list li:first-child { border-top: 0; padding-top: 0; }
.list .meta { display: block; color: var(--muted); font-size: 12px; }
.list .amount { white-space: nowrap; }
.list .plus { color: var(--text); }
.history li { font-size: 14px; }
.badge {
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.badge.answered { border-color: var(--text); background: var(--text); color: var(--black); }
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  z-index: 20;
}

/* ─── page ───────────────────────────────────────────────────────────────── */
.acc-body {
  background:
    radial-gradient(1100px 520px at 78% -12%, rgba(255, 255, 255, .07), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
}
.acc { padding-block: 34px 90px; }
.acc-loading { display: flex; gap: 8px; justify-content: center; padding: 120px 0; }
.acc-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.acc-loading span:nth-child(2) { animation-delay: .15s; }
.acc-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* ─── sign-in ────────────────────────────────────────────────────────────── */
.login { display: grid; place-items: center; padding: 40px 0 60px; }
.login-card {
  position: relative;
  width: min(520px, 100%);
  padding: 44px 40px 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .07) 1.2px, transparent 1.7px) 0 0 / 18px 18px,
    linear-gradient(180deg, var(--surface-raised), var(--surface));
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--surface) 62%);
  pointer-events: none;
}
.login-card > * { position: relative; }
.login-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(255, 255, 255, .12);
}
.login-mark img { width: 30px; height: 30px; }
.login h1 { margin: 12px 0 10px; font-size: clamp(32px, 5vw, 44px); font-weight: 500; letter-spacing: -.04em; line-height: 1.05; }
.login-steps { display: grid; gap: 10px; margin: 26px 0 28px; padding: 0; list-style: none; color: var(--soft); font-size: 15px; }
.login-steps li { display: flex; align-items: center; gap: 12px; }
.login-steps b {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text);
  font-size: 12px;
}
.login-btn { width: 100%; cursor: pointer; }
.login-wait { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.login-wait p { margin: 0; }
.login-wait a, .acc-foot a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.spinner { flex: none; width: 22px; height: 22px; border: 2px solid var(--line-strong); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── bento grid ─────────────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card {
  position: relative;
  grid-column: span 4;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--surface-raised), var(--surface) 70%);
  transition: border-color .2s ease;
}
.card:hover { border-color: var(--line-strong); }
.card h2 {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-top h2 { margin: 0; }
.card .button { cursor: pointer; }
.count { color: var(--soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.hint { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.stat { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.stat small { color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0; }

/* hero */
.hero-card {
  grid-column: span 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .075) 1.2px, transparent 1.7px) 0 0 / 20px 20px,
    radial-gradient(600px 300px at 85% 50%, rgba(255, 255, 255, .08), transparent 70%),
    linear-gradient(180deg, var(--surface-raised), var(--surface));
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface) 30%, transparent 75%);
  pointer-events: none;
}
.hero-card > * { position: relative; }
.hero-left { min-width: 0; }
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--black);
  font-size: 18px;
  font-weight: 700;
}
.who-name { margin: 0; font-size: 17px; font-weight: 600; }
.who-sub { margin: 0; color: var(--muted); font-size: 13px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 8, 10, .6);
  color: var(--soft);
  font-size: 12px;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.on { border-color: rgba(255, 255, 255, .35); color: var(--text); }
.status.on i { background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); animation: pulse 2s infinite; }
.status.off i { background: #ff9b9b; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.hero-big { overflow-wrap: break-word; margin: 16px 0 6px; font-size: clamp(42px, 6vw, 64px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.hero-big.long { font-size: clamp(34px, 4.4vw, 52px); }
.hero-note { margin: 0; color: var(--muted); font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-actions .button { border-radius: 999px; }

/* rings */
.ring-wrap { position: relative; flex: none; width: 132px; height: 132px; }
.hero-ring { width: 196px; height: 196px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); }
.ring-dots { fill: none; stroke: var(--line-strong); stroke-linecap: round; }
.ring-value { fill: none; stroke: var(--text); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2, .7, .2, 1); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center strong { font-size: 28px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.hero-ring .ring-center strong { font-size: 44px; }
.ring-center span { margin-top: 4px; color: var(--muted); font-size: 12px; }

/* balance */
.balance-card { grid-column: span 4; display: flex; flex-direction: column; }
.money { margin: 0; font-size: 46px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.money small { margin-left: 4px; color: var(--muted); font-size: 24px; }
.ops { display: grid; gap: 2px; margin: 20px 0 0; padding: 0; list-style: none; }
.ops li { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.ops li:first-child { border-top: 0; }
.op-ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 15px;
}
.op-ico.plus { border-color: transparent; background: var(--text); color: var(--black); }
.op-name { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.op-name small { display: block; color: var(--muted); font-size: 12px; }
.op-sum { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.op-sum.plus { color: var(--text); font-weight: 600; }
.ops .none { display: block; color: var(--muted); font-size: 13px; }

/* traffic */
.traffic { display: flex; align-items: center; gap: 22px; }
.traffic-text { min-width: 0; }

/* devices */
.slots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.slot {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
}
.slot.on { border: 1px solid var(--text); background: var(--text); color: var(--black); box-shadow: 0 0 18px rgba(255, 255, 255, .15); }
.slot svg { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.devices { display: grid; margin: 0; padding: 0; list-style: none; }
.devices li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.devices li:first-child { border-top: 0; }
.dev-name { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.dev-name small { display: block; color: var(--muted); font-size: 12px; }

/* connect */
.key-row { display: flex; gap: 6px; }
.key-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--soft);
  font: 13px ui-monospace, Menlo, monospace;
}
.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover, .icon-btn.on { background: var(--text); color: var(--black); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qr-box { display: grid; justify-items: center; gap: 4px; margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.qr-box img { padding: 8px; border-radius: 12px; background: #fff; image-rendering: pixelated; }
.connect-card > div > .hint { margin-top: 10px; }
.apps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.apps a {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--soft);
  font-size: 12px;
  transition: background .15s ease, color .15s ease;
}
.apps a:hover { background: var(--text); color: var(--black); }
.empty-state { padding: 18px; border: 1px dashed var(--line-strong); border-radius: 16px; }
.empty-state p { margin: 0; }

/* support */
.support-card { grid-column: span 12; }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ticket {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.ticket:hover { border-color: var(--muted); transform: translateY(-1px); }
.ticket-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-title { font-size: 15px; font-weight: 600; }
.ticket-date { color: var(--muted); font-size: 12px; }
.tickets .none { grid-column: 1 / -1; margin: 0; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); font-size: 14px; text-align: center; }

.tk-form { display: grid; gap: 12px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics input { position: absolute; opacity: 0; pointer-events: none; }
.topics span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--soft);
  font-size: 13px;
  cursor: pointer;
}
.topics input:checked + span { border-color: var(--text); background: var(--text); color: var(--black); }
.topics input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.tk-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
}
.tk-form textarea:focus { outline: none; border-color: var(--muted); }
.tk-form .row { display: flex; align-items: center; gap: 18px; }
.tk-form .button { margin: 0; }

.thread-head { margin-bottom: 14px; }
.thread-title { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.thread-title h3 { margin: 0; font-size: 18px; font-weight: 500; }
#chat .chat { border-radius: 16px; overflow: hidden; }

.acc-foot { margin-top: 22px; color: var(--muted); font-size: 13px; }

/* ─── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .balance-card { grid-column: span 6; }
  .card { grid-column: span 6; }
  .connect-card { grid-column: span 6; }
  /* after .card: the hero is a .card too and must keep the full row */
  .card.hero-card { grid-column: span 12; }
}
@media (max-width: 720px) {
  .acc { padding-block: 18px 70px; }
  .bento { gap: 12px; }
  .card, .balance-card, .connect-card { grid-column: span 12; padding: 20px; border-radius: 20px; }
  .hero-card { flex-direction: column-reverse; align-items: stretch; padding: 22px 20px; }
  .hero-card::before { background: linear-gradient(180deg, transparent 20%, var(--surface) 70%); }
  .hero-ring { align-self: center; width: 168px; height: 168px; }
  .hero-ring .ring-center strong { font-size: 38px; }
  .who { margin-bottom: 16px; }
  .hero-big { font-size: 40px; }
  .hero-big.long { font-size: 32px; }
  .hero-actions .button { flex: 1; }
  .login-card { padding: 34px 22px 28px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .status.on i, .spinner, .acc-loading span { animation: none; }
  .ring-value { transition: none; }
}

/* ─── v2: same calm language as the landing — no glows, dots or gradients ─── */
.acc-body { background: var(--bg); }
.login-card { background: var(--surface); border-radius: 18px; }
.login-card::before { display: none; }
.login-mark { width: 52px; height: 52px; border-radius: 14px; box-shadow: none; background: var(--surface-raised); }
.login-mark img { width: 24px; height: 24px; }
.login h1 { font-weight: 600; letter-spacing: -.03em; }
.login-steps b { border-radius: 8px; background: var(--surface-raised); border-color: var(--line); }

.bento { gap: 12px; }
.card { border-radius: 16px; background: var(--surface); }
.card:hover { border-color: var(--line); }
.card h2 { color: var(--soft); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.stat, .money, .hero-big { font-weight: 600; }
.hero-card { background: var(--surface); }
.hero-card::before { display: none; }
.avatar { background: var(--surface-raised); color: var(--text); border: 1px solid var(--line-strong); font-weight: 600; }
.status { background: none; border-color: var(--line); }
.status.on { border-color: #5fd08a44; color: var(--ok); }
.status.on i { background: var(--ok); animation: none; box-shadow: none; }
.hero-actions .button { border-radius: 10px; }
.ring-value { stroke-linecap: butt; }
.slot { border-radius: 8px; }
.slot.on { background: var(--surface-raised); color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.op-ico { border-radius: 8px; }
.op-ico.plus { background: #5fd08a1a; color: var(--ok); }
.op-sum.plus { color: var(--ok); font-weight: 500; }
.badge.answered { border-color: #5fd08a44; background: #5fd08a1a; color: var(--ok); }
.icon-btn, .key-row input { border-radius: 10px; }
.icon-btn:hover, .icon-btn.on { background: var(--surface-raised); color: var(--text); }
.apps a { border-radius: 8px; }
.apps a:hover { background: var(--surface-raised); color: var(--text); }
.ticket { border-radius: 12px; background: var(--surface-raised); }
.ticket:hover { transform: none; border-color: var(--line-strong); }
.topics span { border-radius: 8px; }
.topics input:checked + span { background: var(--surface-raised); color: var(--text); border-color: var(--text); }
.tk-form, .qr-box, .empty-state, .tickets .none { border-radius: 12px; }
.toast { border-radius: 10px; }

/* ─── v3: site palette ─── */
.hero-card { background: radial-gradient(70% 80% at 50% 0%, #3a3f4a 0%, #23262c 45%, transparent 80%), linear-gradient(180deg, #1b1c1f, #141415); border-color: var(--line-strong); }
.stat, .money, .hero-big, .login h1 { font-weight: 500; letter-spacing: -.045em; }
.status.on { border-color: #8fd19e44; color: var(--ok); }
.status.on i { background: var(--ok); }
.ring-value { stroke: var(--text); }
