.account-page {
  --page: #141619;
  --surface: #1b1e23;
  --field: #16181c;
  --line: #343942;
  --text: #f0f2f5;
  --muted: #acb2bd;
  --accent: #c7d8fa;
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  color-scheme: dark;
  font: 15px/1.5 "Segoe UI", system-ui, sans-serif;
}
.account-page *, .account-page *::before, .account-page *::after { box-sizing: border-box; }
.account-page [hidden] { display: none !important; }
.account-page a { color: inherit; text-decoration: none; }
.account-page :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.account-header { border-bottom: 1px solid var(--line); }
.account-bar,.account-dashboard { width: min(920px, calc(100% - 32px)); margin-inline: auto; }
.account-bar { min-height: 60px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.account-bar nav { display: flex; align-items: center; gap: clamp(10px,3vw,20px); }
.wordmark { display: inline-flex; gap: 9px; align-items: center; font-weight: 750; letter-spacing: .09em; }
.about-link { font-size: 14px; color: var(--muted) !important; }
.about-link:hover { color: var(--text) !important; }
.account-dashboard { padding: clamp(24px,5vw,49px) 0 48px; }
.account-intro { margin: 0 0 20px; }
.account-intro h1 { margin: 0; font-size: clamp(30px,5vw,43px); line-height: 1.12; letter-spacing: -.045em; font-weight: 740; }
.account-dashboard h2 { margin: 0; font-size: 20px; letter-spacing: -.024em; line-height: 1.25; }
.account-dashboard h3 { margin: 0; font-size: 16px; }
.account-dashboard p { color: var(--muted); margin: 4px 0 0; }
.account-intro p:empty,.dashboard-status:empty { display: none; }
.dashboard-status { margin: 0 0 12px !important; color: var(--text) !important; }
.dashboard-card { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; gap: 6px; padding: 8px 11px; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; line-height: 1.2; }
.account-page .primary { color: #172742; background: var(--accent); }
.account-page .primary:hover { background: #dce7ff; }
.secondary { color: var(--text); background: transparent; border-color: var(--line); }
.secondary:hover { background: #282c33; }
.text-button { color: var(--muted); background: transparent; padding-inline: 3px; }
.text-button:hover { color: var(--text); }
.button:disabled { opacity: .55; cursor: default; }
.login-card { display: grid; width: min(100%,380px); gap: 7px; }
.login-card button { justify-self: start; margin-top: 5px; }
.login-card input + label { margin-top: 5px; }
.account-page input { width: 100%; min-width: 0; padding: 8px 10px; min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: var(--field); color: var(--text); font: inherit; }
.account-page label { font-size: 13px; color: var(--muted); font-weight: 650; }
.account-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.account-nav button { padding: 8px 14px 10px; margin-bottom: -1px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font: inherit; font-weight: 650; cursor: pointer; }
.account-nav button[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.account-nav button:hover { color: var(--text); }
#account-overview { display: grid; gap: 14px; }
.profile-heading { display: flex; align-items: center; gap: 10px; }
.account-shortcut { padding-top: 14px; border-top: 1px solid var(--line); }
.summary-heading,.account-shortcut,.telegram-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
#account-vpn-panel { display: grid; gap: 10px; }
.subscription-card { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); padding: 0; }
.subscription-card:not(:has(#account-active:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.subscription-summary,.connection-card,.checkout-card { min-width: 0; padding: clamp(15px,3vw,23px); }
.subscription-summary .summary-heading { align-items: flex-start; }
.pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 7px; border-radius: 6px; background: #292d34; color: #d4d8e1; font-size: 12px; font-weight: 650; }
.pill.plan-live,.pill.status-paid { color: #b7dec3; background: #24362c; }
.pill.plan-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.status-canceled { color: #f0c7c7; background: #422f32; }
.dashboard-metrics { margin-top: 13px; }
.dashboard-metrics > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dashboard-metrics > div:last-child { border-bottom: 0; }
.dashboard-metrics span { color: var(--muted); }
.dashboard-metrics strong { text-align: right; }
.dashboard-metrics progress { flex-basis: 100%; max-width: 100%; }
.connection-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 11px; border-left: 1px solid var(--line); }
.connection-actions { display: flex; flex-wrap: wrap; gap: 3px 9px; margin-top: 9px; }
.account-qr-tile { padding: 4px; background: #fff; border-radius: 6px; width: clamp(156px,20vw,182px); }
.account-qr-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.share-link { grid-column: 1/-1; }
.share-link > div { display: flex; gap: 6px; margin-top: 4px; }
.share-link input { color: #dce5f5; }
.checkout-card { grid-column: 1/-1; grid-row: 1; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 8px 12px; border-bottom: 1px solid var(--line); }
.checkout-card label,.checkout-card #payment-form,#checkout-status { grid-column: 1/-1; }
.checkout-card label { display: grid; gap: 5px; max-width: 360px; }
.checkout-card button { justify-self: start; }
.checkout-price { font-size: 22px; white-space: nowrap; }
.telegram-card h2,.vpn-devices h2,.payment-history h2 { font-size: 17px; }
.vpn-device-list { margin: 8px 0 0; padding: 0; list-style: none; }
.vpn-device-list:empty { display: none; }
.vpn-device-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.vpn-device-list li:last-child { padding-bottom: 0; }
#account-device-offer { margin-top: 12px; }
#account-device-expiry { margin-top: 6px; }
.payment-table { overflow: auto; margin-top: 8px; }
.payment-table table { width: 100%; text-align: left; border-collapse: collapse; }
.payment-table th,.payment-table td { border-bottom: 1px solid var(--line); padding: 8px 6px; font-size: 14px; }
.payment-table th { color: var(--muted); font-size: 12px; }
.payment-table td:nth-child(3) { white-space: nowrap; }
@media (max-width: 680px) {
  .subscription-card { grid-template-columns: minmax(0,1fr); }
  .connection-card { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 355px) {
  .connection-card { grid-template-columns: minmax(0,1fr); }
  .account-qr-tile { width: 180px; max-width: 100%; }
}
.login-actions { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 14px; }
