/* Личный кабинет DatoVPN — дополнение к style.css */
[hidden] { display: none !important; }
.cab-tag { color: var(--muted); font-size: 14px; font-weight: 500; padding-left: 14px; border-left: 1px solid var(--border); white-space: nowrap; }
@media (max-width: 600px) { .cab-tag { display: none; } }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 14px; font-weight: 500; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1020px) { .who { display: none; } }
@media (max-width: 480px) { .hide-xs { display: none; } }
.muted { color: var(--dim); }
.small { font-size: 13px; }
.gold { color: var(--gold); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.linkish { color: var(--dim); font-size: 14px; margin-top: 16px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #3a3a3a; }
.linkish:hover { color: var(--text); }

/* boot */
.boot { min-height: 60vh; display: grid; place-items: center; }
.spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,196,31,.25); border-top-color: var(--gold); animation: spin .8s linear infinite; vertical-align: -2px; }
.spinner.big { width: 34px; height: 34px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* login */
.login { min-height: calc(100vh - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
.login-card { width: 100%; max-width: 420px; padding: 32px 28px 26px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.login-card > div { width: 100%; display: flex; flex-direction: column; align-items: center; }
.login-hand { width: 110px; height: 110px; mix-blend-mode: lighten; margin: -6px 0 6px;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%); mask-image: radial-gradient(circle, #000 55%, transparent 72%); }
.login h1 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 8px; }
.login-sub { color: var(--dim); font-size: 15px; margin-bottom: 22px; }
.key-form { width: 100%; display: grid; gap: 10px; margin-top: 16px; text-align: left; }
.key-form small { color: var(--muted); font-size: 12px; }
.login-err { color: var(--danger); font-size: 14px; margin-top: 14px; min-height: 0; }
.login-err:empty { display: none; }
.login-foot { color: var(--muted); font-size: 14px; margin-top: 18px; text-align: center; }
.login-foot a { color: var(--gold); }
.pin {
  width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; margin: 4px 0 22px;
  font-size: 54px; font-weight: 800; letter-spacing: .02em; color: var(--gold);
  background: #121212; border: 1.5px solid rgba(255,196,31,.6); box-shadow: 0 0 60px -10px rgba(255,184,0,.45);
  font-variant-numeric: tabular-nums;
}
.wait-line { color: var(--dim); font-size: 14px; margin-top: 16px; display: flex; gap: 8px; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }

/* cabinet */
.cab { padding: 36px 0 40px; }
.cab-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.cab-title { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.03em; font-weight: 800; line-height: 1.1; }
.cab-sub { color: var(--dim); margin-top: 6px; font-size: 15px; }
.cab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cab-grid > * { min-width: 0; }
.st-main { min-width: 0; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 900px) { .cab-grid { grid-template-columns: 1fr; } }
.c-pad { padding: 24px; }
@media (max-width: 480px) { .c-pad { padding: 18px; } }
.c-h { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
.c-h svg { width: 20px; height: 20px; color: var(--gold); }

/* status */
.c-status { padding: 26px; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; position: relative; overflow: hidden; }
.c-status::before { content: ""; position: absolute; width: 420px; height: 420px; left: -120px; top: 50%; transform: translateY(-50%);
  background: radial-gradient(circle, rgba(255,184,0,.18), transparent 62%); pointer-events: none; opacity: 0; transition: opacity .5s; }
.c-status.on::before { opacity: 1; }
.ring-wrap { position: relative; width: 132px; height: 132px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: #222; }
.ring-fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1s ease; }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-text b { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.ring-text span { color: var(--dim); font-size: 13px; margin-top: 4px; }
.st-main h2 { font-size: 24px; letter-spacing: -.02em; margin: 10px 0 4px; }
.st-main p { margin-bottom: 18px; }
.st-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.05); border: 1px solid #262626; color: var(--dim); }
.st-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st-badge.ok { color: var(--green); border-color: rgba(61,220,132,.3); background: rgba(61,220,132,.08); }
.st-badge.ok::before { background: var(--green); box-shadow: 0 0 0 4px rgba(61,220,132,.18); }
.st-badge.bad { color: var(--danger); border-color: rgba(240,112,112,.3); background: rgba(240,112,112,.08); }
.st-badge.bad::before { background: var(--danger); }
.st-stats { display: grid; gap: 10px; min-width: 190px; }
.st-stats div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid #222; font-size: 14px; }
.st-stats span { color: var(--dim); }
.st-stats b { font-weight: 700; white-space: nowrap; }
@media (max-width: 900px) {
  .c-status { grid-template-columns: auto 1fr; }
  .st-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); min-width: 0; }
  .st-stats div { flex-direction: column; gap: 2px; }
}
@media (max-width: 560px) {
  .c-status { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 18px; padding: 22px 18px; }
  .st-main .btn-row { justify-content: center; }
  .st-main .btn { flex: 1 1 100%; }
  .st-stats { width: 100%; }
}

/* copy rows */
.copy-row { display: flex; align-items: center; gap: 8px; background: #0F0F0F; border: 1px solid #262626; border-radius: 12px; padding: 6px 6px 6px 14px; margin: 14px 0; min-width: 0; }
.copy-row code { flex: 1; min-width: 0; font-size: 13px; color: #CFCFCF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--dim); background: rgba(255,255,255,.04); border: 1px solid #262626; transition: color .2s, border-color .2s; }
.icon-btn:hover { color: var(--gold); border-color: rgba(255,196,31,.5); }
.icon-btn svg { width: 17px; height: 17px; }
.key-item + .key-item { margin-top: 4px; }
.key-name { font-size: 13px; color: var(--dim); font-weight: 600; margin-top: 10px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #1C1C1C; font-size: 14px; }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--dim); }
.kv b { font-weight: 600; text-align: right; }
.empty { color: var(--muted); font-size: 14px; padding: 18px; text-align: center; border: 1px dashed #2A2A2A; border-radius: 12px; }
.danger { color: var(--danger) !important; }
.danger:hover { border-color: rgba(240,112,112,.5) !important; }

/* invite */
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-stats div { padding: 12px 8px; text-align: center; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid #222; }
.mini-stats b { display: block; font-size: 20px; font-weight: 800; }
.mini-stats span { color: var(--muted); font-size: 12px; }
@media (max-width: 480px) { .mini-stats { grid-template-columns: 1fr 1fr; } }
.ref-list { list-style: none; margin-top: 12px; display: grid; gap: 2px; max-height: 260px; overflow: auto; }
.ref-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 2px; font-size: 14px; border-bottom: 1px solid #1A1A1A; }
.ref-list li span:last-child { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ref-list li.paid span:last-child { color: var(--green); }

/* orders */
.orders { list-style: none; display: grid; gap: 8px; max-height: 440px; overflow: auto; }
.orders li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid #222; }
.orders .o-title { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders .o-sum { font-weight: 700; text-align: right; white-space: nowrap; }
.orders .o-meta { color: var(--muted); font-size: 12px; }
.o-st { font-size: 12px; font-weight: 600; justify-self: end; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.05); color: var(--dim); white-space: nowrap; }
.o-st.paid, .o-st.balance_paid { color: var(--green); background: rgba(61,220,132,.1); }
.o-st.pending { color: var(--gold); background: rgba(255,196,31,.1); }
.o-st.refunded, .o-st.refund_pending { color: var(--danger); background: rgba(240,112,112,.1); }
.orders .o-pay { grid-column: 1 / -1; margin-top: 6px; }

/* plans in cabinet */
.plan-opt.link { cursor: pointer; width: 100%; text-align: left; font: inherit; color: inherit; }
.plan-opt.link:disabled { opacity: .6; cursor: wait; }
.plan-opt .po-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.plan-opt .po-go { color: var(--gold); font-size: 13px; font-weight: 600; margin-left: 12px; white-space: nowrap; }
@media (max-width: 480px) { .plan-opt .po-go { display: none; } }
#plansNote { margin-top: 12px; }
#plansNote a { color: var(--gold); }

/* offers */
.offer { padding: 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid #222; font-size: 14px; }
.offer + .offer { margin-top: 8px; }
.offer b { display: block; font-size: 15px; margin-bottom: 2px; }
.offer .ok { color: var(--green); }
.offer .no { color: var(--muted); }

.sync-note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 18px; }

/* toast & modal */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100;
  background: #1A1A1A; border: 1px solid rgba(255,196,31,.4); color: var(--text); padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  transition: opacity .25s, transform .25s; box-shadow: 0 20px 40px -10px rgba(0,0,0,.8); max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal-card { padding: 22px; width: 100%; max-width: 340px; text-align: center; display: grid; gap: 14px; }
.qr-box { background: #fff; border-radius: 14px; padding: 14px; display: grid; place-items: center; aspect-ratio: 1; }
.qr-box img, .qr-box svg { width: 100%; height: auto; image-rendering: pixelated; }
