:root {
  --gm-ui-radius: 10px;
  --main-ui-radius: 10px;
  --main-button-radius: var(--main-ui-radius);
  --brand-start: #6e8efb;
  --brand-end: #a777e3;
  --brand-gradient: linear-gradient(135deg, var(--brand-start) 0%, var(--brand-end) 100%);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-blur: 12px;
  --motion-glide: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.desktop-screen .section-tabs.workspace-tab-indicator-host,
.account-tab-nav.workspace-tab-indicator-host,
.login-screen .password-auth-tab-nav.workspace-tab-indicator-host {
  position: relative;
  isolation: isolate;
}

.workspace-tab-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 240ms var(--motion-glide),
    width 240ms var(--motion-glide),
    height 240ms var(--motion-glide);
}

.has-tab-indicator > .workspace-tab-indicator {
  visibility: visible;
}

.desktop-screen .section-tabs.has-tab-indicator > .section-tab,
.account-tab-nav.has-tab-indicator > .account-tab-button,
.login-screen .password-auth-tab-nav.has-tab-indicator > .password-auth-tab-button {
  position: relative;
  z-index: 1;
}

/* Electron hosted: hide showcase, center login form */
body.electron-hosted .login-showcase {
  display: none !important;
}
body.electron-hosted .login-screen .login-layout {
  grid-template-columns: 1fr !important;
  max-width: 420px !important;
}
body.electron-hosted .login-screen {
  min-height: auto;
}

/* Thin launcher shell: it must never show the full hosted landing/login layout. */
body.launcher-shell .login-showcase {
  display: none !important;
}
body.launcher-shell .login-screen .login-layout {
  grid-template-columns: 1fr !important;
  max-width: 420px !important;
}
body.launcher-shell .login-screen {
  min-height: auto;
}

/* The marketing showcase belongs to the landing page, never to Workspace. */
.login-screen .login-showcase {
  display: none !important;
}
.login-screen .login-layout {
  grid-template-columns: 1fr !important;
  max-width: 420px !important;
}
.desktop-auth-ready {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  text-align: center;
  color: #64708b;
}
.desktop-auth-ready strong {
  color: #182238;
}
.desktop-auth-ready button {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(90deg, #5684f5, #9b69e8);
  font-weight: 700;
  cursor: pointer;
}
.desktop-auth-ready .desktop-auth-retry-btn {
  background: linear-gradient(90deg, #e35b6b, #c33b55);
}
.desktop-auth-ready .desktop-auth-download-btn {
  background: transparent;
  color: #5684f5;
  font-weight: 600;
  padding: 6px 12px;
}
/* Web hosted: same compact login as Electron, without desktop-launcher noise */
body.web-hosted .login-showcase {
  display: none !important;
}
body.web-hosted .login-screen .login-layout {
  grid-template-columns: 1fr !important;
  max-width: 420px !important;
}
body.web-hosted .login-screen {
  min-height: auto;
}
body.web-hosted #status-banner {
  display: none !important;
}
body.web-hosted #telegram-login-panel.hidden {
  display: block !important;
}
body.web-hosted #telegram-login-panel {
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* Web hosted: hide key-login fallback and footnote; auth divider belongs to Layout A. */
body.web-hosted #key-login-details,
body.web-hosted .login-footnote {
  display: none !important;
}

/* Launcher-only controls are meaningless in the web cabinet. */
body.web-hosted #check-updates-btn,
body.web-hosted .update-container,
body.web-hosted #open-download-manager-btn,
body.web-hosted #open-folder-btn {
  display: none !important;
}

/* «Ваш ключ доступа» — десктопный логин-креденшл (Electron). На вебе вход по ключу
   скрыт, поэтому и блок ключа в разделе «Помощь» не нужен. Десктоп — показывает. */
body.web-hosted .account-key-section {
  display: none !important;
}

/* На вебе аккаунт идентифицируется email-шапкой (#account-identity-header), поэтому
   заголовок «Личный кабинет / Аккаунт» и дублирующая строка «Пользователь» в карточке
   тарифа не нужны. Десктоп (нет email-шапки) их показывает. */
body.web-hosted .account-page-header,
body.web-hosted .account-tariff-user-row {
  display: none !important;
}

/* Account-page identity (web): email + telegram under the page title. */
.account-identity-header {
  display: none;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: -4px 0 8px;
  font-size: 14px;
}
body.web-hosted .account-identity-header {
  display: flex;
}
.account-identity-header .account-identity-email {
  font-weight: 600;
  color: #3a3f5c;
  word-break: break-all;
}
.account-identity-header .account-identity-telegram {
  font-weight: 500;
  color: #6e8efb;
}
body.web-hosted .account-identity-header.hidden,
.account-identity-header.hidden {
  display: none;
}

/* Web-hosted login наследует дефолтный фиолетово-голубой gradient
   (body.workspace-app.mode-login ≈ Electron-окно приложения).
   Telegram-button остаётся cyan (Telegram brand) — не перезаписываем. */

/* Web-hosted info banner: «Запуск профилей работает только в приложении».
   Видим только когда user прошёл Telegram-login (body теряет .mode-login). */
.web-hosted-app-banner {
  display: none;
}
body.web-hosted:not(.mode-login) .web-hosted-app-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 20px 4px;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.1) 0%, rgba(167, 119, 227, 0.08) 100%);
  border: 1px solid rgba(110, 142, 251, 0.25);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(110, 142, 251, 0.1);
}
.web-hosted-app-banner-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
}
.web-hosted-app-banner-body {
  flex: 1;
  min-width: 0;
}
.web-hosted-app-banner-title {
  font-weight: 600;
  font-size: 0.98rem;
  color: #2d3748;
  margin-bottom: 4px;
  line-height: 1.3;
}
.web-hosted-app-banner-text {
  font-size: 0.88rem;
  color: #4a5568;
  line-height: 1.45;
}
.web-hosted-app-banner-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(110, 142, 251, 0.3);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}
.web-hosted-app-banner-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(167, 119, 227, 0.4);
}
.web-hosted-app-banner-cta i {
  font-size: 0.95rem;
}
@media (max-width: 720px) {
  body.web-hosted .web-hosted-app-banner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .web-hosted-app-banner-cta {
    width: 100%;
    justify-content: center;
  }
}

/* Install-app hint on empty state — web-hosted only (Electron уже имеет app) */
.web-hosted-install-hint {
  display: none;
}
body.web-hosted .web-hosted-install-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(110, 142, 251, 0.1);
  color: #4a5568;
  font-size: 0.9rem;
  line-height: 1.4;
  flex-wrap: wrap;
  text-align: center;
}
body.web-hosted .web-hosted-install-hint i {
  color: #6e8efb;
  font-size: 1rem;
}
body.web-hosted .web-hosted-install-hint a {
  color: #6e8efb;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(110, 142, 251, 0.4);
  padding-bottom: 1px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
body.web-hosted .web-hosted-install-hint a:hover {
  color: #a777e3;
  border-bottom-color: rgba(167, 119, 227, 0.6);
}

/* Electron verifying: hide login UI while checking session via bridge */
body.electron-verifying .login-container {
  display: none !important;
}
body.electron-verifying .login-showcase {
  display: none !important;
}
body.electron-verifying .electron-verifying-indicator {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}
body.electron-verifying .electron-verifying-indicator .loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.electron-verifying-indicator {
  display: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
  min-height: 100%;
}

body.workspace-app {
  color: #333;
}

body.workspace-app.mode-login {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #5c7df9, #9b6be0, #6e8efb, #c084fc);
  background-size: 300% 300%;
  overflow: auto;
  padding: 0;
  animation: loginBgDrift 10s ease infinite;
}

body.workspace-app.mode-app {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(110, 142, 251, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 100%, rgba(167, 119, 227, 0.06) 0%, transparent 50%),
    linear-gradient(135deg, #f5f7fa, #ebeef5);
  color: #333;
  padding: 22px;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.login-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.login-screen .logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
}

.login-screen .logo-text {
  font-size: 24px;
  font-weight: 600;
  color: #6e8efb;
}

.login-screen .login-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.login-screen .login-store-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #6e8efb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  padding: 0;
}

.login-screen .login-store-btn:hover {
  color: #5a7df5;
}

.login-screen .login-store-btn i {
  font-size: 16px;
}

.login-screen .api-env-panel {
  position: fixed;
  top: 16px;
  right: 32px;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 52px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  text-align: center;
  transition: opacity 0.18s ease;
  z-index: 20;
}

.login-screen .api-env-panel.is-busy {
  opacity: 0.9;
}

.login-screen .api-env-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.login-screen .api-env-labels {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.login-screen .api-env-label {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
  transition:
    color 0.18s ease,
    opacity 0.18s ease;
}

.login-screen .api-env-panel:not(.is-gmaccss) .api-env-label-prod {
  color: rgba(255, 255, 255, 0.98);
}

.login-screen .api-env-panel:not(.is-gmaccss) .api-env-label-gmaccss {
  opacity: 0.7;
}

.login-screen .api-env-panel.is-gmaccss .api-env-label-prod {
  opacity: 0.7;
}

.login-screen .api-env-panel.is-gmaccss .api-env-label-gmaccss {
  color: rgba(255, 255, 255, 0.98);
}

.login-screen .api-env-switch {
  position: relative;
  width: 42px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-screen .api-env-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.login-screen .api-env-slider {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.14);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.login-screen .api-env-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.login-screen .api-env-switch input:checked + .api-env-slider {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(255, 255, 255, 0.78);
}

.login-screen .api-env-switch input:checked + .api-env-slider::before {
  transform: translateX(18px);
}

.login-screen .api-env-switch input:focus-visible + .api-env-slider {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.login-screen .api-env-panel.is-busy .api-env-slider {
  animation: workspaceApiEnvPulse 0.9s ease-in-out infinite;
}

.login-screen .api-env-switch input:disabled {
  cursor: wait;
}

.login-screen .api-env-switch input:disabled + .api-env-slider {
  opacity: 0.72;
}

.login-screen .api-env-hint {
  display: none;
}

@media (max-width: 640px) {
  .login-screen .api-env-panel {
    top: 10px;
    right: 10px;
  }
}

/* ===== Telegram Login (Primary) ===== */

.telegram-login-panel {
  text-align: center;
  margin-bottom: 20px;
}

.telegram-login-panel.hidden {
  display: none;
}

.telegram-login-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0088cc, #229ed9);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.telegram-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.telegram-login-btn:active {
  transform: translateY(0);
}

.telegram-login-btn i {
  font-size: 1.2rem;
}

/* Подсказка под кнопкой «Войти» в окне лаунчера: ключ вводится в браузере. */
.launcher-login-key-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #708198;
  text-align: center;
}

.google-login-btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px 24px;
  border: 1px solid rgba(110, 142, 251, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  color: #3c4043;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.google-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(110, 142, 251, 0.25);
}

.google-login-btn:active {
  transform: translateY(0);
}

.google-login-btn i {
  font-size: 1.2rem;
  color: #4285f4;
}

.telegram-login-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  background: rgba(0, 136, 204, 0.08);
  border-radius: 10px;
  font-size: 0.9rem;
  color: #0088cc;
}

.telegram-login-status.hidden {
  display: none;
}

.telegram-login-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 136, 204, 0.2);
  border-top-color: #0088cc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.telegram-login-cancel {
  margin-top: 10px;
}

.telegram-login-cancel.hidden {
  display: none;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.login-divider.hidden {
  display: none;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.key-login-details {
  margin-bottom: 16px;
}

.key-login-summary {
  cursor: pointer;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  padding: 8px;
  border-radius: 8px;
  transition: color 0.2s;
  list-style: none;
}

.key-login-summary::-webkit-details-marker {
  display: none;
}

.key-login-summary::before {
  content: '🔑 ';
}

.key-login-summary:hover {
  color: #475569;
}

/* ===== Access Key Input (Secondary) ===== */

.login-screen .input-group {
  position: relative;
  margin-bottom: 18px;
}

.login-screen .input-group label {
  text-align: center;
  width: 100%;
}

.login-screen .key-visibility-btn {
  position: absolute;
  left: 8px;
  top: 34px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6e8efb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.login-screen .key-visibility-btn i {
  font-size: 18px;
}

.login-screen .key-visibility-btn,
.login-screen .key-visibility-btn:hover,
.login-screen .key-visibility-btn:active,
.login-screen .key-visibility-btn:focus {
  box-shadow: none !important;
  background: transparent;
  transform: none;
}

.login-screen .key-visibility-btn.active {
  color: #a777e3;
}

.login-screen .login-inline-hint {
  margin: -6px 0 14px;
  font-size: 13px;
  color: #5b6472;
  line-height: 1.4;
  text-align: center;
}

.login-screen .update-required-panel {
  margin: 14px 0 16px;
  padding: 14px 15px 12px 15px;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  background: #f8f9fa;
  text-align: left;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.login-screen .update-required-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
  text-align: center;
}

.login-screen .update-required-title i {
  color: #6e8efb;
  font-size: 16px;
}

.login-screen .update-required-message {
  font-size: 13px;
  line-height: 1.4;
  color: #555;
}

.login-screen .approval-meta,
.login-screen .takeover-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.login-screen #unsupported-browser-panel {
  margin-top: 14px;
}

.login-screen #unsupported-browser-detail {
  display: block;
  white-space: normal;
}

.login-screen .approval-meta-item,
.login-screen .takeover-item {
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(110, 142, 251, 0.12);
  font-size: 13px;
  line-height: 1.35;
  color: #4b5563;
}

.login-screen .telegram-link-btn,
.login-screen .secondary-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  text-decoration: none;
}

.login-screen .secondary-login-btn {
  background: #eef3ff;
  color: #516171;
  box-shadow: none;
}

.login-screen .takeover-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.login-screen label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  text-align: left;
  color: #555;
  font-size: 14px;
}

.login-screen input[type='text'],
.login-screen input[type='email'],
.login-screen input[type='password'] {
  width: 100%;
  padding: 14px 15px 14px 45px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  font-size: 15px;
  background-color: #f8f9fa;
  color: #333;
}

.login-screen input[type='text']:focus,
.login-screen input[type='email']:focus,
.login-screen input[type='password']:focus {
  border-color: #6e8efb;
  box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
  background-color: #fff;
  outline: none;
}

.login-screen input[type='text']:disabled,
.login-screen input[type='email']:disabled,
.login-screen input[type='password']:disabled {
  background-color: #eef1f6;
  color: #8b95a7;
  cursor: not-allowed;
}

.login-screen .key-status {
  position: absolute;
  right: 40px;
  top: 40px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  color: white;
  background-color: #e74c3c;
  display: none;
}

.login-screen button,
.login-screen .telegram-link-btn {
  background: linear-gradient(to right, #6e8efb, #a777e3);
  color: white;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(110, 142, 251, 0.4);
}

.login-screen button:hover,
.login-screen .telegram-link-btn:hover {
  box-shadow: 0 6px 18px rgba(110, 142, 251, 0.5);
  transform: translateY(-2px);
}

.login-screen button:active,
.login-screen .telegram-link-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(110, 142, 251, 0.3);
}

.login-screen button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.login-screen button:hover:disabled {
  transform: none;
  box-shadow: none;
}

.login-screen .error-message {
  margin-top: 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  padding: 8px 10px;
  text-align: left;
}

.login-screen .error-message:empty {
  display: none;
}

.login-screen .error-message.warn,
.login-screen .error-message.danger {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.login-screen .error-message.info {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.24);
}

.login-screen .status-banner {
  display: inline-block;
  font-size: 14px;
  padding: 2px 6px;
  margin: 6px 0 16px 0;
  border-radius: 4px;
  border: 1px solid transparent;
  width: auto;
  max-width: 90%;
}

.login-screen .status-banner.ok {
  color: #0f766e;
  background: rgba(16, 185, 129, 0.08);
  border-color: #10b981;
}

.login-screen .status-banner.warn {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
}

.login-screen .status-banner.err {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.login-screen .wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'><path fill='%23ffffff' fill-opacity='0.3' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'></path></svg>");
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
  animation: waveFloat 6s ease-in-out infinite;
}

@keyframes workspaceApiEnvPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
  }
  50% {
    transform: scale(1.02);
    box-shadow:
      inset 0 1px 2px rgba(15, 23, 42, 0.12),
      0 0 0 4px rgba(59, 130, 246, 0.12);
  }
}

.desktop-screen {
  width: 100%;
}

#guest-screen {
  display: none;
}

body.workspace-app.mode-guest:not(.mode-login) {
  padding: 0;
  min-height: 100vh;
}

body.mode-guest:not(.mode-login) #desktop-screen {
  display: none !important;
}

body.mode-guest:not(.mode-login) #guest-screen {
  display: flex;
  width: 100%;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.guest-card {
  width: min(100%, 440px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 30px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(var(--glass-blur, 12px));
  -webkit-backdrop-filter: blur(var(--glass-blur, 12px));
  box-shadow:
    0 22px 60px rgba(110, 142, 251, 0.18),
    0 8px 22px rgba(45, 55, 72, 0.1);
  text-align: center;
}

.guest-greeting {
  min-height: 18px;
  margin-bottom: 16px;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.35;
  word-break: break-word;
}

.guest-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 12px 28px rgba(110, 142, 251, 0.28);
}

.guest-title {
  margin: 0;
  color: #25314d;
  font-size: 1.85rem;
  line-height: 1.15;
  font-weight: 700;
}

.guest-subtitle {
  margin: 14px 0 0;
  color: #4a5568;
  font-size: 1rem;
  line-height: 1.55;
}

.guest-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 24px;
}

.guest-link-telegram-btn,
.guest-telegram-link-open,
.guest-logout-btn {
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
}

.guest-link-telegram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  padding: 12px 18px;
  background: var(--brand-gradient);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(110, 142, 251, 0.28);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.guest-link-telegram-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(167, 119, 227, 0.32);
}

.guest-link-telegram-btn:disabled {
  opacity: 0.62;
  cursor: default;
}

.guest-telegram-link-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(34, 158, 217, 0.32);
  background: rgba(34, 158, 217, 0.08);
  color: #229ed9;
  text-decoration: none;
}

.guest-telegram-link-open:hover {
  background: rgba(34, 158, 217, 0.14);
}

.guest-telegram-link-status {
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.4;
}

.guest-telegram-link-status.is-warn {
  color: #e8950a;
}

.guest-logout-btn {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 10px 14px;
}

.guest-logout-btn:hover {
  color: #374151;
  background: rgba(110, 142, 251, 0.08);
}

@media (max-width: 520px) {
  body.mode-guest:not(.mode-login) #guest-screen {
    padding: 16px;
  }

  .guest-card {
    max-height: calc(100vh - 32px);
    padding: 24px 20px;
    border-radius: 18px;
  }

  .guest-title {
    font-size: 1.55rem;
  }
}

.desktop-screen .app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.08) 0%, rgba(167, 119, 227, 0.06) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(110, 142, 251, 0.12);
  box-shadow:
    0 4px 16px rgba(110, 142, 251, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.03);
  animation: headerSlideDown 0.55s var(--motion-glide) both;
}

.desktop-screen .logo-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-screen .header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.desktop-screen .app-title {
  font-size: 20px;
  font-weight: 600;
  color: #6e8efb;
  display: flex;
  align-items: center;
  line-height: 1.1;
  margin-bottom: 0;
}

.desktop-screen .store-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6e8efb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 3px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.28s var(--motion-glide),
    box-shadow 0.28s var(--motion-glide),
    color 0.28s ease,
    background-color 0.28s ease;
}

.desktop-screen .store-btn i {
  font-size: 17px;
}

.desktop-screen .store-btn::before,
.desktop-screen .update-btn::before,
.desktop-screen .toggle-key-icon::before,
.desktop-screen .open-folder-btn::before,
.desktop-screen .logout-btn::before,
.desktop-screen .view-btn::before,
.desktop-screen .grid-view .action-btn::before,
.desktop-screen .btn-delete::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    118deg,
    transparent 24%,
    rgba(255, 255, 255, 0.26) 46%,
    transparent 68%
  );
  opacity: 0;
  transform: translateX(-130%) skewX(-16deg);
  transition:
    opacity 0.28s ease,
    transform 0.55s var(--motion-glide);
  pointer-events: none;
}

.desktop-screen .store-btn:hover {
  background: rgba(110, 142, 251, 0.08);
  color: #5a7df5;
  box-shadow:
    0 10px 20px rgba(110, 142, 251, 0.14),
    inset 0 0 0 1px rgba(110, 142, 251, 0.1);
  transform: translateY(-2px);
}

.desktop-screen .store-btn:hover::before {
  opacity: 1;
  transform: translateX(130%) skewX(-16deg);
}

.desktop-screen .update-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  align-self: flex-start;
}

.desktop-screen .update-btn {
  margin-left: 10px;
  width: 36px;
  height: 36px;
  font-size: 14px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: linear-gradient(135deg, #6e8efb, #5b72f2);
  background-size: 150% 150%;
  background-position: 0 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.28s var(--motion-glide),
    box-shadow 0.28s var(--motion-glide),
    background-position 0.35s ease,
    filter 0.28s ease;
  box-shadow:
    0 10px 18px rgba(110, 142, 251, 0.22),
    0 4px 10px rgba(110, 142, 251, 0.16);
}

.desktop-screen .update-btn:hover {
  background-position: 100% 50%;
  box-shadow:
    0 16px 28px rgba(110, 142, 251, 0.24),
    0 8px 14px rgba(110, 142, 251, 0.18);
  transform: translateY(-2px);
  filter: saturate(1.05);
}

.desktop-screen .update-btn:hover::before {
  opacity: 1;
  transform: translateX(130%) skewX(-16deg);
}

.desktop-screen .update-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(110, 142, 251, 0.18);
}

.desktop-screen .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.desktop-screen .open-folder-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: #7b8fa6;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.24s var(--motion-glide),
    box-shadow 0.24s var(--motion-glide),
    color 0.24s ease,
    background-color 0.24s ease;
}

.desktop-screen .open-folder-btn:hover {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  transform: translateY(-1px);
}

.desktop-screen .open-folder-btn:hover::before {
  opacity: 1;
  transform: translateX(130%) skewX(-16deg);
}

.desktop-screen .open-folder-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.desktop-screen .logout-btn {
  background: linear-gradient(to right, #ff7e5f, #feb47b);
  background-size: 140% 140%;
  background-position: 0 50%;
  color: white;
  border: none;
  padding: 9px 11px;
  border-radius: 10px;
  min-width: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  font-size: 13px;
  transition:
    transform 0.28s var(--motion-glide),
    box-shadow 0.28s var(--motion-glide),
    background-position 0.35s ease,
    filter 0.28s ease;
  width: auto;
}

.desktop-screen .logout-btn-label {
  display: none;
}

.desktop-screen .logout-btn i {
  font-size: 18px;
}

.desktop-screen .logout-btn:hover {
  background-position: 100% 50%;
  box-shadow: 0 8px 18px rgba(255, 126, 95, 0.22);
  filter: saturate(1.06);
}

.desktop-screen .logout-btn:hover::before,
.desktop-screen .update-btn:hover::before,
.desktop-screen .open-folder-btn:hover::before,
.desktop-screen .view-btn:hover::before,
.desktop-screen .grid-view .action-btn:hover::before,
.desktop-screen .btn-delete:hover::before {
  opacity: 1;
  transform: translateX(130%) skewX(-16deg);
}

.desktop-screen .store-btn:focus-visible,
.desktop-screen .update-btn:focus-visible,
.desktop-screen .toggle-key-icon:focus-visible,
.desktop-screen .open-folder-btn:focus-visible,
.desktop-screen .logout-btn:focus-visible,
.desktop-screen .view-btn:focus-visible,
.desktop-screen .grid-view .action-btn:focus-visible,
.desktop-screen .btn-delete:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px rgba(110, 142, 251, 0.26);
}

.desktop-screen .expiration-banner {
  margin-top: 0;
  background-color: rgba(255, 247, 229, 0.85);
  color: #e8950a;
  padding: 6px 6px 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(243, 156, 18, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.desktop-screen .expiration-banner i {
  margin-right: 10px;
}

/* Фаза 3: истёкшая подписка — красный вариант предупреждения */
.desktop-screen .expiration-banner.is-expired {
  background-color: rgba(254, 242, 242, 0.9);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.22);
}

.desktop-screen .expiration-renew-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    filter 0.15s,
    box-shadow 0.2s ease;
}

.desktop-screen .expiration-renew-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 10px rgba(110, 142, 251, 0.3);
}

@media (max-width: 760px) {
  .desktop-screen .expiration-banner {
    white-space: normal;
  }
}

.desktop-screen .global-notice {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.45;
}

.desktop-screen .global-notice.info {
  border-left: 4px solid #6e8efb;
}

.desktop-screen .global-notice.warn {
  border-left: 4px solid #f39c12;
}

.desktop-screen .global-notice.danger {
  border-left: 4px solid #e74c3c;
}

.desktop-screen .global-notice.success {
  border-left: 4px solid #10b981;
}

.desktop-screen .section-title {
  font-size: 20px;
  margin-bottom: 0;
  color: #2c3e50;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.desktop-screen .section-title i {
  margin-right: 10px;
  color: #6e8efb;
}

.desktop-screen #profiles-title-text {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.desktop-screen .tier-badges {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.desktop-screen .tier-item {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 17px;
  font-weight: 600;
}

.desktop-screen .tier-icon {
  font-size: 19px;
  line-height: 1;
}

.desktop-screen .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.desktop-screen .view-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-screen .view-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(110, 142, 251, 0.05));
  border: 1px solid rgba(110, 142, 251, 0.1);
  min-width: 38px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #7f8c8d;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.24s var(--motion-glide),
    box-shadow 0.24s var(--motion-glide),
    color 0.24s ease,
    background-color 0.24s ease,
    border-color 0.24s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.desktop-screen .view-btn:hover {
  background: #f8faff;
  color: #333;
  border-color: rgba(110, 142, 251, 0.16);
  box-shadow:
    0 10px 20px rgba(44, 62, 80, 0.08),
    inset 0 0 0 1px rgba(110, 142, 251, 0.05);
  transform: translateY(-2px);
}

.desktop-screen .view-btn.active {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: white;
  border-color: transparent;
  box-shadow:
    0 6px 16px rgba(110, 142, 251, 0.32),
    0 2px 4px rgba(167, 119, 227, 0.18);
}

.desktop-screen .profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* ── Group Tabs ─────────────────────────────────────────────────── */
.desktop-screen .profile-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.desktop-screen .profile-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid rgba(110, 142, 251, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: #555;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.desktop-screen .profile-tab-btn:hover {
  background: #f0f4ff;
  border-color: #6e8efb;
  color: #333;
  transform: translateY(-1px);
}

.desktop-screen .profile-tab-btn.active {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(110, 142, 251, 0.3);
}

.desktop-screen .profile-tab-btn .tab-count {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
}

.desktop-screen .profile-tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Pagination ─────────────────────────────────────────────────── */
.desktop-screen .profiles-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.desktop-screen .pagination-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(110, 142, 251, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  color: #6e8efb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.desktop-screen .pagination-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.1), rgba(167, 119, 227, 0.08));
  border-color: #6e8efb;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(110, 142, 251, 0.18);
}

.desktop-screen .pagination-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.94);
  transition-duration: 0.08s;
}

.desktop-screen .pagination-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.desktop-screen .pagination-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.desktop-screen .pagination-page {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1.5px solid rgba(110, 142, 251, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  color: #555;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.desktop-screen .pagination-page:hover {
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.1), rgba(167, 119, 227, 0.08));
  border-color: #6e8efb;
  color: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(110, 142, 251, 0.18);
}

.desktop-screen .pagination-page:active:not(.active) {
  transform: translateY(0) scale(0.94);
  transition-duration: 0.08s;
}

.desktop-screen .pagination-page.active {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(110, 142, 251, 0.3);
  cursor: default;
}

.desktop-screen .profile-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  position: relative;
  will-change: transform, box-shadow;
  transition:
    transform 0.3s var(--motion-glide),
    box-shadow 0.3s var(--motion-glide),
    border-color 0.3s ease;
  animation: profileCardIn 0.38s var(--motion-glide) both;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Staggered entrance for active profile cards */
.desktop-screen .profile-grid .profile-card:nth-child(1) {
  animation-delay: 0.02s;
}
.desktop-screen .profile-grid .profile-card:nth-child(2) {
  animation-delay: 0.05s;
}
.desktop-screen .profile-grid .profile-card:nth-child(3) {
  animation-delay: 0.08s;
}
.desktop-screen .profile-grid .profile-card:nth-child(4) {
  animation-delay: 0.11s;
}
.desktop-screen .profile-grid .profile-card:nth-child(5) {
  animation-delay: 0.14s;
}
.desktop-screen .profile-grid .profile-card:nth-child(6) {
  animation-delay: 0.17s;
}
.desktop-screen .profile-grid .profile-card:nth-child(7) {
  animation-delay: 0.2s;
}
.desktop-screen .profile-grid .profile-card:nth-child(8) {
  animation-delay: 0.23s;
}
.desktop-screen .profile-grid .profile-card:nth-child(9) {
  animation-delay: 0.26s;
}
.desktop-screen .profile-grid .profile-card:nth-child(10) {
  animation-delay: 0.29s;
}

.desktop-screen .profile-card.is-launching {
  box-shadow:
    0 8px 24px rgba(110, 142, 251, 0.18),
    0 0 0 1px rgba(110, 142, 251, 0.14);
  border-color: rgba(110, 142, 251, 0.2);
}

.desktop-screen .profile-card.is-launching::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.24) 45%,
    rgba(255, 255, 255, 0) 72%
  );
  transform: translateX(-130%);
  animation: profile-card-launch-sheen 1.35s ease-in-out infinite;
}

.desktop-screen .profile-card.is-open {
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  animation: profileOpenPulse 2.6s ease-in-out infinite;
}

.desktop-screen .grid-view .profile-card.is-open:hover,
.desktop-screen .list-view .profile-card.is-open:hover {
  animation-play-state: paused;
}

@keyframes profileOpenPulse {
  0%,
  100% {
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
  }
  50% {
    box-shadow:
      0 6px 22px rgba(16, 185, 129, 0.26),
      0 0 0 1px rgba(16, 185, 129, 0.14);
  }
}

.desktop-screen .drag-handle {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #6e8efb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
  z-index: 2;
}

.desktop-screen .profile-card.has-sort-handle .profile-header {
  padding-left: 52px;
}

.desktop-screen .profile-card.has-sort-handle:hover .drag-handle,
.desktop-screen .profile-card.sortable-chosen .drag-handle {
  opacity: 1;
  pointer-events: auto;
}

.desktop-screen .drag-handle:hover {
  background: rgba(255, 255, 255, 0.96);
  color: #4f72f4;
  transform: scale(1.04);
}

.desktop-screen .drag-handle:active {
  cursor: grabbing;
  transform: scale(0.96);
}

.desktop-screen .profile-card.sortable-chosen {
  transform: scale(1.03);
}

.desktop-screen .profile-card.sortable-ghost {
  opacity: 0.42;
  box-shadow: 0 14px 28px rgba(110, 142, 251, 0.2);
}

.desktop-screen .grid-view .profile-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.1),
    0 6px 14px rgba(110, 142, 251, 0.14);
  border-color: rgba(110, 142, 251, 0.12);
}

.desktop-screen .grid-view .profile-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, #a777e3, #6e8efb);
  color: white;
}

.desktop-screen .grid-view .profile-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.desktop-screen .grid-view .profile-url {
  font-size: 12px;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-screen .grid-view .profile-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.desktop-screen .profile-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.desktop-screen .profile-state-badge {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}

.desktop-screen .profile-state-badge i {
  font-size: 10px;
}

.desktop-screen .profile-state-badge.is-open {
  color: #047857;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(45, 212, 191, 0.1));
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.16);
}

.desktop-screen .profile-state-badge.is-open i {
  animation: badgeOpenBreathe 1.8s ease-in-out infinite;
  transform-origin: center;
  color: #10b981;
}

@keyframes badgeOpenBreathe {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.desktop-screen .profile-state-badge.is-closing {
  color: #9a3412;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.12), rgba(248, 113, 113, 0.12));
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.14);
}

.desktop-screen .grid-view .action-btn {
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.28s var(--motion-glide),
    box-shadow 0.28s var(--motion-glide),
    filter 0.28s ease,
    background-position 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.desktop-screen .grid-view .action-btn i {
  margin-right: 7px;
}

.desktop-screen .btn-open.is-busy {
  cursor: not-allowed;
  opacity: 0.72;
  filter: none;
  background-size: 140% 140%;
  background-position: 0 50%;
  animation: none;
}

.desktop-screen .btn-sync.is-busy {
  cursor: wait;
  filter: saturate(1.05);
}

.desktop-screen .grid-view .btn-open {
  background: linear-gradient(to right, #6e8efb, #a777e3);
  background-size: 140% 140%;
  background-position: 0 50%;
  color: white;
  box-shadow: 0 4px 14px rgba(110, 142, 251, 0.35);
}

.desktop-screen .grid-view .btn-open:hover {
  background-position: 100% 50%;
  box-shadow:
    0 12px 24px rgba(110, 142, 251, 0.22),
    0 6px 12px rgba(110, 142, 251, 0.16);
  transform: translateY(-2px);
  filter: saturate(1.04);
}

.desktop-screen .grid-view .btn-open:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(110, 142, 251, 0.3);
}

.desktop-screen .btn-delete {
  background: linear-gradient(to right, #e74c3c, #c0392b);
  background-size: 140% 140%;
  background-position: 0 50%;
  color: white;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.3);
}

.desktop-screen .btn-delete.is-busy {
  cursor: wait;
  filter: saturate(1.04);
}

.desktop-screen .btn-delete:hover {
  background-position: 100% 50%;
  box-shadow:
    0 12px 24px rgba(231, 76, 60, 0.22),
    0 6px 12px rgba(231, 76, 60, 0.16);
  transform: translateY(-2px);
}

.desktop-screen .grid-view .btn-sync {
  background: linear-gradient(to right, #0f766e, #14b8a6);
  background-size: 140% 140%;
  background-position: 0 50%;
  color: white;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.28);
}

.desktop-screen .grid-view .btn-sync:hover {
  background-position: 100% 50%;
  box-shadow:
    0 12px 24px rgba(20, 184, 166, 0.2),
    0 6px 12px rgba(20, 184, 166, 0.14);
  transform: translateY(-2px);
  filter: saturate(1.04);
}

.desktop-screen .action-loader {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
}

.desktop-screen .action-loader span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  animation: profile-loader-dot 0.9s ease-in-out infinite;
}

.desktop-screen .action-loader span:nth-child(2) {
  animation-delay: 0.14s;
}

.desktop-screen .action-loader span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes profile-loader-dot {
  0%,
  80%,
  100% {
    opacity: 0.45;
    transform: translateY(0) scale(0.9);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
  }
}

@keyframes profile-card-launch-sheen {
  0% {
    transform: translateX(-130%);
  }

  60%,
  100% {
    transform: translateX(130%);
  }
}

@keyframes profileCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-tab-indicator {
    transition: none;
  }

  .desktop-screen .profile-card,
  .desktop-screen .store-btn,
  .desktop-screen .update-btn,
  .desktop-screen .toggle-key-icon,
  .desktop-screen .open-folder-btn,
  .desktop-screen .logout-btn,
  .desktop-screen .view-btn,
  .desktop-screen .grid-view .action-btn {
    transition: none;
  }

  .desktop-screen .store-btn::before,
  .desktop-screen .update-btn::before,
  .desktop-screen .toggle-key-icon::before,
  .desktop-screen .open-folder-btn::before,
  .desktop-screen .logout-btn::before,
  .desktop-screen .view-btn::before,
  .desktop-screen .grid-view .action-btn::before,
  .desktop-screen .btn-delete::before {
    transition: none;
  }

  .desktop-screen .btn-open.is-busy,
  .desktop-screen .btn-delete.is-busy,
  .desktop-screen .action-loader span,
  .desktop-screen .profile-card,
  .desktop-screen .profile-card.is-launching::after,
  .catalog-section,
  .catalog-profile-disabled,
  .catalog-cta-btn {
    animation: none;
  }
}

.desktop-screen .loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  width: 100%;
  grid-column: 1 / -1;
  min-height: clamp(220px, calc(100vh - 260px), 680px);
}

.desktop-screen .loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #6e8efb;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.desktop-screen .empty-state {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  padding: 36px;
  text-align: center;
  margin-top: 18px;
}

.desktop-screen .empty-state > i {
  font-size: 34px;
  color: #fff;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow:
    0 12px 28px rgba(110, 142, 251, 0.28),
    0 4px 10px rgba(167, 119, 227, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
  /* Круг НЕ двигается. Он плавал на 8px за полтора цикла — около 0.09px за
     кадр, и на резкой кромке идеального круга любое квантование позиции
     читается ступеньками: «медленно двигается, но шаги рыхлые» (владелец,
     2026-08-14). Слой композиции проблему не снял — дело не в числе кадров,
     а в том, что чёткая граница показывает субпиксельный шаг. Поэтому
     движение перенесено на мягкий ореол ниже: у размытого градиента резких
     краёв нет, и шаг на нём не читается в принципе. */
  position: relative;
}

/* Дышащий ореол вместо парения: анимируются opacity и масштаб мягкого
   радиального градиента. Чёткой границы у него нет, поэтому субпиксельный шаг
   на нём не виден, а opacity композитор считает без перерисовки. */
.desktop-screen .empty-state > i::after {
  content: '';
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(110, 142, 251, 0.45) 0%,
    rgba(167, 119, 227, 0.22) 55%,
    transparent 72%
  );
  pointer-events: none;
  animation: emptyOrbBreathe 3.4s ease-in-out infinite;
}

@keyframes emptyOrbBreathe {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.09);
  }
}

/* Гаситель обязан стоять НИЖЕ самого правила с animation: специфичность у них
   одинаковая, и блок, объявленный выше, каскад просто перебивает. Поймано
   пробой — первая версия правки лежала выше и не срабатывала вовсе. */
@media (prefers-reduced-motion: reduce) {
  .desktop-screen .empty-state > i::after {
    animation: none;
    opacity: 0.4;
  }
}

.desktop-screen .empty-state h3 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.desktop-screen .empty-state p {
  color: #7f8c8d;
  margin-bottom: 20px;
}

.desktop-screen .empty-state .profiles-empty-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    filter 0.15s,
    transform 0.1s;
}
.desktop-screen .empty-state .profiles-empty-connect-btn:hover {
  filter: brightness(1.06);
}
.desktop-screen .empty-state .profiles-empty-connect-btn:active {
  transform: translateY(1px);
}
.desktop-screen .empty-state .profiles-empty-connect-btn i {
  font-size: 12px;
  color: inherit;
  margin: 0;
}

.desktop-screen .profiles-summary,
.desktop-screen .hidden-search {
  display: none;
}

.desktop-screen .profile-grid.list-view {
  display: block;
  gap: 0;
  margin-bottom: 0;
}

.desktop-screen .list-view .profile-card {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 10px 18px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-left: 6px solid #6e8efb;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  overflow: hidden;
  transition: all 0.2s ease-in-out;
}

.desktop-screen .list-view .profile-card.has-sort-handle .profile-header {
  padding-left: 0;
}

.desktop-screen .list-view .drag-handle {
  display: none;
}

.desktop-screen .list-view .profile-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.08),
    0 4px 10px rgba(110, 142, 251, 0.12);
  border-left-color: #6e8efb;
}

.desktop-screen .list-view .profile-header {
  flex-grow: 1;
  padding: 0;
  background: none;
  color: inherit;
  display: flex;
  align-items: baseline;
  gap: 10px;
  overflow: hidden;
}

.desktop-screen .list-view .profile-name {
  font-size: 15px;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 0;
  flex-shrink: 0;
}

.desktop-screen .list-view .profile-url {
  font-size: 13px;
  color: #7f8c8d;
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-screen .list-view .profile-body {
  padding: 0;
  margin-left: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-screen .list-view .profile-actions {
  flex-direction: row;
  justify-content: flex-end;
  gap: 8px;
}

.desktop-screen .list-view .profile-state-badge {
  width: auto;
  min-height: 0;
  padding: 7px 12px;
  white-space: nowrap;
}

.desktop-screen .list-view .action-btn {
  border: none;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.desktop-screen .list-view .action-btn i {
  margin-right: 7px;
}

.desktop-screen .list-view .btn-open {
  background: linear-gradient(to right, #6e8efb, #a777e3);
  color: white;
  box-shadow: none;
}

.desktop-screen .action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
  filter: none;
}

.desktop-screen .action-btn:hover:disabled {
  transform: none;
  box-shadow: none;
  filter: none;
}

.desktop-screen .list-view .btn-open:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.desktop-screen .list-view .btn-delete {
  background: linear-gradient(to right, #e74c3c, #c0392b);
  color: white;
  box-shadow: none;
}

.desktop-screen .list-view .btn-delete:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.desktop-screen .store-btn,
.desktop-screen .update-btn,
.desktop-screen .toggle-key-icon,
.desktop-screen .open-folder-btn,
.desktop-screen .logout-btn,
.desktop-screen .view-btn,
.desktop-screen .grid-view .action-btn,
.desktop-screen .btn-delete {
  border-radius: var(--main-button-radius);
}

.desktop-screen .global-notice,
.desktop-screen .profile-card,
.desktop-screen .empty-state {
  border-radius: var(--main-ui-radius);
}

.desktop-screen #expiration-banner {
  border-radius: var(--main-ui-radius);
}

.login-screen .login-container,
.login-screen .login-store-btn,
.login-screen .key-visibility-btn,
.login-screen .update-required-panel,
.login-screen input[type='text'],
.login-screen input[type='email'],
.login-screen input[type='password'],
.login-screen button,
.login-screen .telegram-link-btn,
.login-screen .error-message,
.login-screen .status-banner,
.login-screen .key-status {
  border-radius: var(--gm-ui-radius);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  body.workspace-app.mode-app {
    padding: 14px;
  }

  .desktop-screen .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .desktop-screen .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .desktop-screen .header-actions {
    align-items: stretch;
  }
}

/* ============================================================
   COMPREHENSIVE ANIMATION SYSTEM
   ============================================================ */

/* ── Login: background gradient drift ─────────────────────── */
@keyframes loginBgDrift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ── Shared fade-up ───────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Login: logo row ──────────────────────────────────────── */
.login-screen .login-brand-row {
  animation: loginLogoIn 0.5s var(--motion-glide) 0.2s both;
}

@keyframes loginLogoIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Login: status banner ─────────────────────────────────── */
.login-screen .status-banner {
  animation: fadeUp 0.45s var(--motion-glide) 0.3s both;
}

/* ── Login: status banner — warn shimmer ──────────────────── */
.login-screen .status-banner.warn {
  animation:
    fadeUp 0.45s var(--motion-glide) 0.3s both,
    statusWarnPulse 2.6s ease-in-out 0.8s infinite;
}

@keyframes statusWarnPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

/* ── Login: input group ───────────────────────────────────── */
.login-screen .input-group {
  animation: fadeUp 0.48s var(--motion-glide) 0.36s both;
}

/* ── Login: submit button ─────────────────────────────────── */
#login-submit-btn {
  animation: fadeUp 0.48s var(--motion-glide) 0.44s both;
}

/* ── Login: key-status badge pop ─────────────────────────── */
.login-screen .key-status {
  transition:
    opacity 0.25s ease,
    transform 0.25s var(--motion-glide);
}

/* ── Login: panels slide in (approval / takeover / unsupported) */
.login-screen .update-required-panel:not(.hidden) {
  animation: panelDropIn 0.42s var(--motion-glide) both;
}

@keyframes panelDropIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Login: error message shake + fade-in ─────────────────── */
.login-screen .error-message:not(:empty) {
  animation: errorIn 0.32s var(--motion-glide) both;
}

.login-screen .error-message.anim-shake {
  animation: errorShake 0.46s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes errorIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes errorShake {
  0% {
    transform: translateX(0);
  }
  14% {
    transform: translateX(-7px);
  }
  28% {
    transform: translateX(6px);
  }
  42% {
    transform: translateX(-5px);
  }
  56% {
    transform: translateX(4px);
  }
  70% {
    transform: translateX(-3px);
  }
  84% {
    transform: translateX(2px);
  }
  100% {
    transform: translateX(0);
  }
}

/* ── Login: wave float ────────────────────────────────────── */
@keyframes waveFloat {
  0%,
  100% {
    transform: translateY(0) scaleX(1);
  }
  50% {
    transform: translateY(-9px) scaleX(1.02);
  }
}

/* ── Desktop: header slide down ──────────────────────────── */
@keyframes headerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Desktop: expiration banner ──────────────────────────── */
.desktop-screen .expiration-banner:not(.hidden) {
  animation: fadeInRight 0.4s var(--motion-glide) both;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Desktop: global notice ──────────────────────────────── */
.desktop-screen .global-notice:not(.hidden) {
  animation: noticeSlideDown 0.38s var(--motion-glide) both;
}

@keyframes noticeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* ── Desktop: section container ─────────────────────────── */
.desktop-screen .section-container {
  animation: fadeUp 0.6s var(--motion-glide) 0.14s both;
}

/* ── Desktop: section title ──────────────────────────────── */
.desktop-screen .section-title {
  animation: fadeUp 0.5s var(--motion-glide) 0.22s both;
}

/* ── Desktop: empty state ────────────────────────────────── */
.desktop-screen #profiles-empty:not(.hidden) {
  animation: emptyStateIn 0.5s var(--motion-glide) 0.1s both;
}

@keyframes emptyStateIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Desktop: profile cards stagger ─────────────────────── */
.desktop-screen .grid-view .profile-card:nth-child(1) {
  animation-delay: 0s;
}
.desktop-screen .grid-view .profile-card:nth-child(2) {
  animation-delay: 0.04s;
}
.desktop-screen .grid-view .profile-card:nth-child(3) {
  animation-delay: 0.08s;
}
.desktop-screen .grid-view .profile-card:nth-child(4) {
  animation-delay: 0.12s;
}
.desktop-screen .grid-view .profile-card:nth-child(5) {
  animation-delay: 0.16s;
}
.desktop-screen .grid-view .profile-card:nth-child(6) {
  animation-delay: 0.2s;
}
.desktop-screen .grid-view .profile-card:nth-child(7) {
  animation-delay: 0.24s;
}
.desktop-screen .grid-view .profile-card:nth-child(8) {
  animation-delay: 0.28s;
}
.desktop-screen .grid-view .profile-card:nth-child(9) {
  animation-delay: 0.32s;
}
.desktop-screen .grid-view .profile-card:nth-child(10) {
  animation-delay: 0.36s;
}
.desktop-screen .grid-view .profile-card:nth-child(11) {
  animation-delay: 0.4s;
}
.desktop-screen .grid-view .profile-card:nth-child(12) {
  animation-delay: 0.44s;
}
.desktop-screen .grid-view .profile-card:nth-child(13) {
  animation-delay: 0.48s;
}
.desktop-screen .grid-view .profile-card:nth-child(14) {
  animation-delay: 0.5s;
}
.desktop-screen .grid-view .profile-card:nth-child(15) {
  animation-delay: 0.52s;
}
.desktop-screen .grid-view .profile-card:nth-child(16) {
  animation-delay: 0.54s;
}
.desktop-screen .grid-view .profile-card:nth-child(17) {
  animation-delay: 0.56s;
}
.desktop-screen .grid-view .profile-card:nth-child(18) {
  animation-delay: 0.58s;
}
.desktop-screen .grid-view .profile-card:nth-child(19) {
  animation-delay: 0.6s;
}
.desktop-screen .grid-view .profile-card:nth-child(20) {
  animation-delay: 0.62s;
}
.desktop-screen .grid-view .profile-card:nth-child(n + 21) {
  animation-delay: 0.64s;
}

/* ── Desktop: profile card header shimmer on hover ────────── */
.desktop-screen .grid-view .profile-header {
  transition: filter 0.3s ease;
}

.desktop-screen .grid-view .profile-card:hover .profile-header {
  filter: brightness(1.06) saturate(1.1);
}

/* ── Global: action button press feedback ────────────────── */
.desktop-screen .grid-view .action-btn:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

/* ── Global: icon bounce on login brand hover ────────────── */
.login-screen .login-store-btn:hover i,
.desktop-screen .store-btn:hover i {
  animation: iconBounce 0.4s var(--motion-glide);
}

@keyframes iconBounce {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.22) rotate(-6deg);
  }
  70% {
    transform: scale(0.94) rotate(3deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

.desktop-screen .open-folder-btn:hover i {
  animation: folderPop 0.38s var(--motion-glide);
}

@keyframes folderPop {
  0% {
    transform: scale(1) translateY(0);
  }
  40% {
    transform: scale(1.18) translateY(-2px);
  }
  70% {
    transform: scale(0.96) translateY(1px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

/* ── Global: logout icon spin on hover ───────────────────── */
.desktop-screen .logout-btn:hover i {
  animation: logoutSpin 0.5s var(--motion-glide);
}

@keyframes logoutSpin {
  from {
    transform: rotate(0deg) translateX(0);
  }
  50% {
    transform: rotate(-20deg) translateX(2px);
  }
  to {
    transform: rotate(0deg) translateX(0);
  }
}

/* ── Reduced motion overrides ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.workspace-app.mode-login,
  .login-screen .login-container,
  .login-screen .login-brand-row,
  .login-screen .status-banner,
  .login-screen .status-banner.warn,
  .login-screen .input-group,
  #login-submit-btn,
  .login-screen .update-required-panel:not(.hidden),
  .login-screen .error-message:not(:empty),
  .login-screen .error-message.anim-shake,
  .login-screen .wave,
  .desktop-screen .app-header,
  .desktop-screen .expiration-banner:not(.hidden),
  .desktop-screen .global-notice:not(.hidden),
  .desktop-screen .section-container,
  .desktop-screen .section-title,
  .desktop-screen #profiles-empty:not(.hidden),
  .desktop-screen .grid-view .profile-card {
    animation: none !important;
    transition: none !important;
  }
}

/* Legacy visual parity overrides */
body.workspace-app.mode-login {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  background-size: auto;
  animation: none;
}

.login-screen .login-container,
.desktop-screen .app-header,
.desktop-screen .section-container,
.desktop-screen .section-title,
.desktop-screen .global-notice:not(.hidden),
.desktop-screen .profile-card {
  animation: none;
}

.login-screen .wave {
  display: none;
  animation: none;
}

.desktop-screen .store-btn::before,
.desktop-screen .update-btn::before,
.desktop-screen .toggle-key-icon::before,
.desktop-screen .open-folder-btn::before,
.desktop-screen .logout-btn::before,
.desktop-screen .view-btn::before,
.desktop-screen .grid-view .action-btn::before,
.desktop-screen .btn-delete::before {
  display: none;
}

.desktop-screen .store-btn,
.desktop-screen .update-btn,
.desktop-screen .toggle-key-icon,
.desktop-screen .logout-btn,
.desktop-screen .view-btn,
.desktop-screen .grid-view .action-btn,
.desktop-screen .btn-delete {
  transition: all 0.2s ease;
}

.desktop-screen .store-btn:hover,
.desktop-screen .toggle-key-icon:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.desktop-screen .update-btn {
  background: #6e8efb;
  box-shadow: none;
}

.desktop-screen .update-btn:hover {
  background: #5a7df5;
  box-shadow: none;
  transform: none;
  filter: none;
}

.desktop-screen .view-btn:hover {
  background: #f5f5f5;
  box-shadow: none;
  transform: none;
}

.desktop-screen .view-btn.active {
  box-shadow: none;
}

.desktop-screen .grid-view .profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.desktop-screen .grid-view .btn-open:hover {
  background-position: 0 50%;
  box-shadow: 0 6px 18px rgba(110, 142, 251, 0.5);
  transform: translateY(-2px);
  filter: none;
}

.desktop-screen .btn-delete:hover {
  background-position: 0 50%;
  box-shadow: 0 6px 18px rgba(231, 76, 60, 0.5);
  transform: translateY(-2px);
}

/* 2026-04 hosted workspace login refresh */
body.workspace-app.mode-login {
  background:
    radial-gradient(circle at 14% 18%, rgba(56, 189, 248, 0.16), transparent 26%),
    radial-gradient(circle at 82% 14%, rgba(37, 99, 235, 0.18), transparent 26%),
    radial-gradient(circle at 84% 82%, rgba(16, 185, 129, 0.12), transparent 22%),
    linear-gradient(135deg, #08111f 0%, #0f172a 48%, #0f2942 100%);
  color: #0f172a;
}

/* 2026-04-21: web-hosted наследует фиолетово-голубой gradient Electron-окна.
   Перекрывает темный hosted-refresh выше; равная специфичность → выигрывает по
   source-order. */
body.web-hosted.mode-login {
  background: linear-gradient(135deg, #5c7df9, #9b6be0, #6e8efb, #c084fc);
  background-size: 300% 300%;
  animation: loginBgDrift 10s ease infinite;
  color: #333;
}

/* Telegram-button под Electron login.html — solid #0088cc, без cyan-gradient'а.
   По умолчанию .telegram-login-btn выше задан как linear-gradient(#0088cc →
   #229ed9) (workspace.css:472) — для web делаем matching с окном приложения. */
body.web-hosted .telegram-login-btn {
  background: #0088cc;
}
body.web-hosted .telegram-login-btn:hover {
  background: #006daa;
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

/* Web-hosted login-card — выравнивание под Electron login.html:
   - нет подзаголовка «Войдите через Telegram — быстро и безопасно»
   - иконка магазина без rounded background-box (hosted-refresh добавил его),
     цвет #6e8efb из проектной палитры
   - logo-text весом и размером как в Electron
   - no version-string / status-banner (они пустые в web, но prevent'им visual
     margin от hosted-refresh правила). */
body.web-hosted .login-screen .login-intro {
  display: none;
}
/* Web-hosted: магазинная кнопка не нужна — у юзера нет роли admin-switch'а;
   скрываем её и центрируем «GmAccess» в карточке. */
body.web-hosted .login-screen .login-store-btn {
  display: none !important;
}
body.web-hosted .login-screen .login-brand-row {
  justify-content: center;
}
body.web-hosted .login-screen .logo-container {
  align-items: center;
  margin-bottom: 12px;
  text-align: center;
}
body.web-hosted .login-screen .logo-text {
  color: #0f172a;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
body.web-hosted .login-screen #status-banner {
  display: none !important;
}

/* Web-hosted: кнопка «Открыть» у профиля ведёт в download modal, пока launcher
   не найден по loopback. Сохраняем locked-визуал, но оставляем её кликабельной. */
body.web-hosted .btn-open.btn-open-web-locked,
body.web-hosted .btn-open.btn-open-web-locked:hover,
body.web-hosted .btn-open.btn-open-web-locked:focus {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8) !important;
  color: #f8fafc !important;
  cursor: pointer !important;
  opacity: 0.85;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}
body.web-hosted .profile-card.is-web-hosted-locked {
  opacity: 0.9;
}

.login-screen {
  padding: 40px 20px;
}

.login-screen .login-layout {
  width: min(1120px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 32px;
  align-items: stretch;
}

.login-screen .login-showcase {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 34px;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(8, 17, 31, 0.92)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.08));
  box-shadow: 0 28px 64px rgba(2, 6, 23, 0.28);
  color: rgba(255, 255, 255, 0.94);
  overflow: hidden;
  position: relative;
}

.login-screen .login-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent);
  pointer-events: none;
}

.login-screen .login-showcase > * {
  position: relative;
  z-index: 1;
}

.login-screen .login-showcase-badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.login-screen .login-showcase-title {
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  margin-bottom: 18px;
  max-width: 10ch;
}

.login-screen .login-showcase-copy {
  font-size: 16px;
  line-height: 1.8;
  max-width: 56ch;
  color: rgba(255, 255, 255, 0.76);
}

.login-screen .login-showcase-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.login-screen .login-showcase-point {
  min-height: 132px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
}

.login-screen .login-showcase-point-label {
  display: block;
  margin-bottom: 10px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-screen .login-showcase-point strong {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
}

.login-screen .login-showcase-preview {
  margin-top: 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-screen .login-showcase-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-screen .login-showcase-preview-steps {
  display: grid;
  gap: 12px;
}

.login-screen .login-showcase-preview-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.login-screen .login-showcase-preview-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.login-screen .login-showcase-preview-step span {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}

.login-screen .login-container {
  width: 100%;
  max-width: 420px;
  justify-self: end;
  align-self: center;
  padding: 34px 32px 30px;
  border-radius: 28px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
  text-align: left;
  /* position: relative + overflow-x: hidden перенесены из удалённого дубля
     .login-container (стоял выше, перекрывался этим правилом по остальным
     свойствам): контекст позиционирования и горизонтальный клип контента. */
  position: relative;
  overflow-x: hidden;
  /* Вписываем карточку логина в высоту окна: при раскрытой Telegram-QR
     панели (и на низких окнах) контент скроллится ВНУТРИ карточки, а не
     уходит за нижний край экрана — кнопки «Открыть в Telegram» / «Отменить»
     остаются доступны. 48px = вертикальные отступы .login-screen на узких
     вьюпортах (@≤960: 20+28), чтобы не появлялся паразитный скролл страницы.
     box-sizing уже border-box (глобальный reset), поэтому max-height
     ограничивает полную высоту с учётом padding. Приём тот же, что у
     .modal-card оплаты (#407). */
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.login-screen .logo-container {
  align-items: flex-start;
  margin-bottom: 16px;
}

.login-screen .login-brand-row {
  justify-content: flex-start;
  gap: 8px;
}

.login-screen .login-store-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.login-screen .login-store-btn:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.14);
}

.login-screen .logo-text {
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: #0f172a;
}

.login-screen .status-banner {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 8px 0 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-screen .login-intro {
  margin-top: 14px;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
}

.login-screen .api-env-panel {
  top: 20px;
  right: 20px;
}

.login-screen .input-group {
  margin-bottom: 16px;
}

.login-screen .input-group label {
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-screen input[type='text'],
.login-screen input[type='email'],
.login-screen input[type='password'] {
  border: 1px solid #d4ddec;
  border-radius: 11px;
  padding: 14px 14px 14px 46px;
  background: #fff;
  box-shadow: none;
}

.login-screen input[type='text']:focus,
.login-screen input[type='email']:focus,
.login-screen input[type='password']:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-screen #password-auth-panel {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-screen #password-auth-panel.hidden {
  display: none;
}

.login-screen .password-auth-tab-nav {
  display: flex;
  gap: 4px;
  width: 100%;
  margin: 0 0 18px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--brand-start) 18%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, #ffffff 92%, var(--brand-start) 8%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow:
    color-mix(in srgb, var(--brand-start) 14%, transparent) 0 10px 10px -8px,
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  scrollbar-width: none;
}

.login-screen .password-auth-tab-nav::-webkit-scrollbar {
  display: none;
}

.login-screen .password-auth-tab-nav.hidden {
  display: none;
}

.login-screen .password-auth-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 9px 14px;
  border: none;
  border-radius: 16px;
  background: transparent;
  color: #475569;
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.login-screen .password-auth-tab-button:hover {
  background: color-mix(in srgb, var(--brand-start) 11%, #ffffff 89%);
  color: #334155;
  box-shadow: none;
  transform: none;
}

.login-screen .password-auth-tab-button.is-active {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: color-mix(in srgb, var(--brand-start) 34%, transparent) 0 12px 12px -8px;
}

.login-screen .password-auth-tab-nav > .workspace-tab-indicator {
  border-radius: 16px;
  background: var(--brand-gradient);
  box-shadow: color-mix(in srgb, var(--brand-start) 34%, transparent) 0 12px 12px -8px;
}

.login-screen .password-auth-tab-nav.has-tab-indicator > .password-auth-tab-button.is-active {
  background: transparent;
  box-shadow: none;
}

.login-screen .password-auth-tab-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px color-mix(in srgb, var(--brand-start) 26%, transparent);
}

.login-screen .password-auth-tab-panels {
  min-width: 0;
}

.login-screen .password-auth-tab-panel {
  min-width: 0;
}

.login-screen .password-auth-tab-panel.is-hidden,
.login-screen .password-auth-tab-panel[hidden] {
  display: none;
}

.login-screen #password-auth-panel .input-group input {
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-inline: 2px solid transparent;
  border-radius: 18px;
  background: #fff;
  color: #1f2937;
  box-shadow: color-mix(in srgb, var(--brand-start) 22%, transparent) 0 10px 10px -5px;
  transition:
    border-inline-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.login-screen #password-auth-panel .input-group input::placeholder {
  color: #a6adba;
}

.login-screen #password-auth-panel .input-group input:focus {
  border-inline: 2px solid var(--brand-start);
  background: #fff;
  box-shadow:
    color-mix(in srgb, var(--brand-start) 24%, transparent) 0 12px 14px -6px,
    0 0 0 1px color-mix(in srgb, var(--brand-start) 18%, transparent);
  outline: none;
}

.login-screen #password-auth-panel .input-group input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-start) 34%, transparent);
  outline-offset: 2px;
}

.login-screen #password-auth-panel .password-field-group input[type='password'],
.login-screen #password-auth-panel .password-field-group input[type='text'] {
  padding-left: 54px;
}

.login-screen .password-field-group .password-visibility-btn {
  left: 4px;
  top: 34px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 14px;
  color: var(--brand-start);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.login-screen #password-auth-panel .password-visibility-btn:hover {
  background-color: color-mix(in srgb, var(--brand-start) 10%, transparent);
  color: var(--brand-end);
}

.login-screen #password-auth-panel .password-visibility-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand-start) 38%, transparent);
  outline-offset: 2px;
}

.login-screen #password-auth-panel #password-login-submit,
.login-screen #password-auth-panel #password-register-submit {
  background: var(--brand-gradient);
  color: #fff;
  padding-block: 15px;
  border: none;
  border-radius: 20px;
  box-shadow: color-mix(in srgb, var(--brand-start) 40%, transparent) 0 20px 10px -15px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.login-screen #password-auth-panel #password-login-submit:hover:not(:disabled),
.login-screen #password-auth-panel #password-register-submit:hover:not(:disabled) {
  box-shadow: color-mix(in srgb, var(--brand-start) 44%, transparent) 0 23px 10px -20px;
  transform: scale(1.03);
}

.login-screen #password-auth-panel #password-login-submit:active:not(:disabled),
.login-screen #password-auth-panel #password-register-submit:active:not(:disabled) {
  transform: scale(0.96);
  box-shadow: color-mix(in srgb, var(--brand-start) 38%, transparent) 0 15px 10px -10px;
}

.login-screen #password-auth-panel #password-login-submit:focus-visible,
.login-screen #password-auth-panel #password-register-submit:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.94);
  outline-offset: 3px;
  box-shadow:
    color-mix(in srgb, var(--brand-start) 40%, transparent) 0 20px 10px -15px,
    0 0 0 6px color-mix(in srgb, var(--brand-start) 30%, transparent);
}

/* In-flight request: keep the button size, hide the label, show a centered
   spinner (driven by .is-loading via withPasswordBusy). Covers login, register,
   reset and telegram-link buttons inside the auth panel. */
.login-screen #password-auth-panel button.is-loading {
  position: relative;
  color: transparent !important;
  cursor: progress;
  transform: none !important;
}
.login-screen #password-auth-panel button.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, #fff 42%, transparent);
  border-top-color: #fff;
  animation: gm-auth-spin 0.62s linear infinite;
  will-change: transform;
}
@keyframes gm-auth-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .login-screen #password-auth-panel button.is-loading::after {
    animation-duration: 1.4s;
  }
}

/* "Animated gradient" auth skin: a slow aurora glow behind the frosted card +
   a gently shifting brand gradient on the active tab and submit buttons. Subtle
   and premium, not distracting; fully paused under prefers-reduced-motion. */
.login-screen #password-auth-panel {
  position: relative;
}

.login-screen .password-action-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 16px;
}

.login-screen .password-action-row > button {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 15px 20px;
  font-size: 15px;
  white-space: nowrap;
}

.login-screen .login-divider {
  margin: 14px 0 16px;
  color: #a6adba;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-screen .login-divider::before,
.login-screen .login-divider::after {
  background: color-mix(in srgb, var(--brand-start) 18%, transparent);
}

.login-screen .login-social-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 4px;
}

.login-screen .login-social-actions.hidden {
  display: none;
}

.login-screen .login-social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: color-mix(in srgb, var(--brand-start) 34%, transparent) 0 12px 10px -8px;
  font-size: 18px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.login-screen .login-social-icon-btn:hover:not(:disabled) {
  border-color: #fff;
  filter: brightness(1.07);
  box-shadow: color-mix(in srgb, var(--brand-start) 38%, transparent) 0 16px 12px -10px;
  transform: scale(1.12);
}

.login-screen .login-social-icon-btn:active:not(:disabled) {
  box-shadow: color-mix(in srgb, var(--brand-start) 30%, transparent) 0 10px 10px -8px;
  transform: scale(0.92);
}

.login-screen .login-social-icon-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-start) 34%, transparent);
  outline-offset: 3px;
}

.login-screen .login-social-icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.login-screen #google-login-btn.login-social-icon-btn {
  background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
  color: #fff;
}

/* Равноценный вход (2026-07-07): Telegram-вход — полноширинная кнопка под формой
   email/пароль (не мелкая иконка), одного веса с сабмитом формы. Telegram-бренд-синий,
   чтобы отличаться от фиолетового сабмита email. width:100% заполняет flex-центр контейнер. */
.login-screen .login-telegram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 14px 20px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}
.login-screen .login-telegram-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.45);
}
.login-screen .login-telegram-btn:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.96);
  box-shadow: 0 2px 8px rgba(34, 158, 217, 0.3);
}
.login-screen .login-telegram-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.login-screen .login-key-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 100%;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid color-mix(in srgb, var(--brand-start) 26%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, #ffffff 86%, var(--brand-start) 14%);
  color: var(--brand-start);
  box-shadow: color-mix(in srgb, var(--brand-start) 18%, transparent) 0 10px 14px -10px;
  font-size: 14px;
  font-weight: 750;
}

.login-screen .login-key-btn:hover {
  border-color: color-mix(in srgb, var(--brand-start) 42%, transparent);
  background: color-mix(in srgb, #ffffff 78%, var(--brand-start) 22%);
  color: var(--brand-end);
}

.login-screen .key-login-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--brand-start) 18%, transparent);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: color-mix(in srgb, var(--brand-start) 16%, transparent) 0 14px 20px -14px;
}

.login-screen .key-login-panel .input-group {
  margin-bottom: 12px;
}

.login-screen .key-login-panel input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--brand-start) 22%, #d4ddec);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  text-align: center;
  letter-spacing: 0.06em;
}

.login-screen .key-login-panel input:focus {
  border-color: var(--brand-start);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-start) 14%, transparent);
}

.login-screen #key-login-submit {
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 14px;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 800;
}

.login-screen #key-login-submit.is-loading {
  cursor: progress;
  opacity: 0.72;
}

.login-screen #key-login-error {
  margin: 10px 0 0;
}

.login-screen .password-auth-links {
  margin-top: 12px;
  text-align: center;
}

.login-screen .password-auth-links.hidden {
  display: none;
}

.login-screen .login-text-link {
  width: auto;
  min-height: auto;
  margin: 12px auto 0;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--brand-start);
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.login-screen .login-text-link:hover {
  background: transparent;
  color: var(--brand-end);
  box-shadow: none;
  transform: none;
}

.login-screen .login-text-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand-start) 38%, transparent);
  outline-offset: 3px;
}

.login-screen .key-visibility-btn {
  left: 10px;
  top: 38px;
  border-radius: 10px;
  color: #2563eb;
}

.login-screen .key-status {
  top: 46px;
  right: 12px;
  border-radius: 999px;
  padding: 4px 8px;
}

.login-screen button,
.login-screen .telegram-link-btn {
  border-radius: 11px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.22);
  font-weight: 600;
}

.login-screen button:hover,
.login-screen .telegram-link-btn:hover {
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.26);
  transform: none;
}

.login-screen .secondary-login-btn {
  background: #fff;
  color: #1d4ed8;
  box-shadow: none;
  border: 1.5px solid #cdd9ec;
}

.login-screen .secondary-login-btn:hover {
  box-shadow: none;
  background: #f3f7ff;
  border-color: #aebfe0;
  transform: none;
}

.login-screen .update-required-panel {
  margin: 14px 0 16px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.login-screen .update-required-title {
  justify-content: flex-start;
  color: #0f172a;
}

.login-screen .update-required-message,
.login-screen .approval-meta-item,
.login-screen .takeover-item {
  color: #475569;
}

.login-screen .approval-meta-item,
.login-screen .takeover-item {
  border-radius: 12px;
  border-color: rgba(37, 99, 235, 0.12);
}

.login-screen .error-message {
  border-radius: 14px;
}

.login-screen .login-footnote {
  margin-top: 16px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 960px) {
  .login-screen {
    padding: 20px 16px 28px;
  }

  .login-screen .login-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .login-screen .login-showcase {
    padding: 24px 22px;
  }

  .login-screen .login-showcase-title {
    max-width: none;
  }

  .login-screen .login-showcase-points {
    grid-template-columns: 1fr;
  }

  .login-screen .login-container {
    max-width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .login-screen .login-layout {
    width: min(100%, calc(100vw - 20px));
  }

  .login-screen .login-showcase {
    padding: 20px 18px;
    border-radius: 24px;
  }

  .login-screen .login-showcase-title {
    font-size: clamp(28px, 10vw, 38px);
  }

  .login-screen .login-showcase-copy {
    font-size: 14px;
  }

  .login-screen .login-container {
    padding: 24px 20px 22px;
    border-radius: 24px;
  }

  .login-screen .logo-text {
    font-size: 28px;
  }
}

/* Section tabs */
.desktop-screen .section-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.desktop-screen .section-tabs {
  display: flex;
  gap: 4px;
  background: rgba(110, 142, 251, 0.1);
  border-radius: var(--gm-ui-radius, 10px);
  padding: 3px;
}

.desktop-screen .section-tab {
  border: none;
  background: transparent;
  color: #6e8efb;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: calc(var(--gm-ui-radius, 10px) - 2px);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.desktop-screen .section-tab:hover {
  background: rgba(110, 142, 251, 0.1);
}

.desktop-screen .section-tab.active {
  background: #6e8efb;
  color: #fff;
}

.desktop-screen .section-tabs > .workspace-tab-indicator {
  border-radius: calc(var(--gm-ui-radius, 10px) - 2px);
  background: #6e8efb;
}

.desktop-screen .section-tabs.has-tab-indicator > .section-tab.active {
  background: transparent;
}

.desktop-screen .section-tab .tab-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 11px;
  padding: 1px 6px;
  margin-left: 5px;
}

.desktop-screen .section-tab.active .tab-badge {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Catalog section: inline showcase ── */

.catalog-section {
  margin-top: 8px;
  animation: catalogFadeIn 0.6s var(--motion-glide) both;
}

@keyframes catalogFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Divider between active & unavailable — clickable toggle */
.catalog-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 22px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.catalog-divider:hover .catalog-divider-text {
  color: #6e8efb;
}

.catalog-chevron {
  font-size: 10px;
  margin-left: 6px;
  transition: transform 0.3s var(--motion-glide);
}

.catalog-divider[aria-expanded='false'] .catalog-chevron {
  transform: rotate(180deg);
}

/* Collapsible content */
.catalog-collapsible {
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition:
    max-height 0.45s var(--motion-glide),
    opacity 0.3s ease;
}

.catalog-collapsible.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
}

.catalog-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 142, 251, 0.28), transparent);
  transition: background 0.3s ease;
}

.catalog-divider:hover .catalog-divider-line {
  background: linear-gradient(90deg, transparent, rgba(110, 142, 251, 0.5), transparent);
}

.catalog-divider-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b9bb5;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.catalog-divider-text i {
  font-size: 11px;
  opacity: 0.7;
}

/* Catalog cards: frosted glass, not greyed out */
.catalog-profile-disabled {
  position: relative;
  pointer-events: none;
  user-select: none;
  opacity: 1 !important;
  filter: none !important;
}

.catalog-profile-disabled .profile-header {
  background: linear-gradient(135deg, #94a3b8, #b0bec5) !important;
  position: relative;
}

.catalog-profile-disabled .profile-body {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.catalog-profile-disabled::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  pointer-events: none;
  z-index: 1;
}

/* Staggered entrance for catalog cards */
.catalog-profile-disabled:nth-child(1) {
  animation-delay: 0.08s;
}
.catalog-profile-disabled:nth-child(2) {
  animation-delay: 0.14s;
}
.catalog-profile-disabled:nth-child(3) {
  animation-delay: 0.2s;
}
.catalog-profile-disabled:nth-child(4) {
  animation-delay: 0.26s;
}
.catalog-profile-disabled:nth-child(5) {
  animation-delay: 0.32s;
}
.catalog-profile-disabled:nth-child(6) {
  animation-delay: 0.38s;
}
.catalog-profile-disabled:nth-child(7) {
  animation-delay: 0.44s;
}
.catalog-profile-disabled:nth-child(8) {
  animation-delay: 0.5s;
}
.catalog-profile-disabled:nth-child(9) {
  animation-delay: 0.56s;
}
.catalog-profile-disabled:nth-child(10) {
  animation-delay: 0.62s;
}

/* Locked badge instead of action button */
.catalog-locked-label {
  font-size: 12px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.18);
  width: 100%;
  font-weight: 500;
}

.catalog-locked-label i {
  font-size: 11px;
}

/* Group header inside catalog */
.catalog-group-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 2px;
  margin-top: 8px;
}

.catalog-group-header:first-child {
  margin-top: 0;
}

.catalog-group-name {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

.catalog-group-tier {
  font-size: 16px;
  line-height: 1;
}

/* Upgrade CTA: prominent glassmorphism card */
.catalog-cta-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
  pointer-events: auto;
}

.catalog-cta-btn {
  position: relative;
  background: linear-gradient(135deg, #6e8efb 0%, #a777e3 50%, #6e8efb 100%);
  background-size: 200% 200%;
  animation: ctaGradientShift 4s ease infinite;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  box-shadow:
    0 8px 24px rgba(110, 142, 251, 0.3),
    0 2px 8px rgba(167, 119, 227, 0.2);
  transition:
    transform 0.3s var(--motion-glide),
    box-shadow 0.3s var(--motion-glide);
  overflow: hidden;
  isolation: isolate;
}

.catalog-cta-btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(
    118deg,
    transparent 24%,
    rgba(255, 255, 255, 0.28) 46%,
    transparent 68%
  );
  opacity: 0;
  transform: translateX(-130%) skewX(-16deg);
  transition:
    opacity 0.28s ease,
    transform 0.55s var(--motion-glide);
  pointer-events: none;
}

.catalog-cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 16px 36px rgba(110, 142, 251, 0.35),
    0 6px 16px rgba(167, 119, 227, 0.25);
}

.catalog-cta-btn:hover::before {
  opacity: 1;
  transform: translateX(130%) skewX(-16deg);
}

.catalog-cta-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 4px 12px rgba(110, 142, 251, 0.25);
}

@keyframes ctaGradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.catalog-upgrade-btn {
  /* alias — same as cta-btn */
}

.catalog-separator {
  padding: 12px 0 8px;
  font-size: 13px;
  color: var(--text-muted, #708198);
  border-top: 1px solid var(--border-primary, #e5e7eb);
  margin-top: 12px;
  grid-column: 1 / -1;
}

/* Upgrade Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.hidden {
  display: none;
}

body.mode-login #payment-modal {
  display: none;
}

.modal-card {
  background: var(--bg-surface, #fff);
  border-radius: 12px;
  padding: 24px;
  max-width: min(480px, calc(100vw - 24px));
  width: 90%;
  box-sizing: border-box;
  /* Не выходить за высоту окна: высокие модалки (оплата) скроллятся внутри,
     чтобы кнопка действия оставалась доступной без разворота окна. */
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg, 0 24px 56px rgba(0, 0, 0, 0.15));
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
}
.modal-body {
  color: #333;
}
.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.upgrade-currency-buttons {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.upgrade-currency-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-primary, #e5e7eb);
  border-radius: 8px;
  background: var(--bg-elevated, #f9fafb);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s;
}
.upgrade-currency-btn.active {
  border-color: var(--accent, #2563eb);
  background: var(--accent-subtle, #eaf1ff);
  color: var(--accent, #2563eb);
  font-weight: 600;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
  color: var(--text-muted, #708198);
}
.icon-btn:hover {
  color: var(--text-primary, #1f2937);
}

.launcher-download-modal-card {
  max-width: 540px;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.18),
    0 10px 28px rgba(110, 142, 251, 0.16);
}

.launcher-download-modal-card .modal-header {
  margin-bottom: 0;
  padding: 18px 20px 14px;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.1), rgba(167, 119, 227, 0.08));
  border-bottom: 1px solid rgba(110, 142, 251, 0.14);
}

.launcher-download-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 20px 20px;
  color: var(--text-primary, #1f2937);
}

.launcher-download-intro {
  margin: 0;
  color: var(--text-muted, #708198);
  font-size: 14px;
  line-height: 1.55;
}

.launcher-download-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.launcher-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(110, 142, 251, 0.24);
  background: rgba(255, 255, 255, 0.74);
  color: #4c1d95;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-position 0.22s ease;
}

.launcher-download-btn.is-primary {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  border-color: rgba(167, 119, 227, 0.38);
  box-shadow: 0 8px 20px rgba(110, 142, 251, 0.3);
}

.launcher-download-btn--disabled,
.launcher-download-btn--disabled:disabled {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.54);
  color: rgba(76, 29, 149, 0.48);
  border-color: rgba(110, 142, 251, 0.14);
  box-shadow: none;
}

.launcher-download-btn:hover,
.launcher-download-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(167, 119, 227, 0.48);
  box-shadow:
    0 10px 22px rgba(110, 142, 251, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  outline: none;
}

.launcher-download-btn.is-primary:hover,
.launcher-download-btn.is-primary:focus-visible {
  box-shadow: 0 10px 24px rgba(110, 142, 251, 0.36);
}

.launcher-download-btn--disabled:hover,
.launcher-download-btn--disabled:focus-visible {
  transform: none;
  border-color: rgba(110, 142, 251, 0.14);
  box-shadow: none;
}

.launcher-download-btn i {
  font-size: 18px;
}

@media (max-width: 520px) {
  .launcher-download-actions {
    grid-template-columns: 1fr;
  }
}

#upgrade-submit {
  background: var(--accent, #2563eb);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 14px;
}
#upgrade-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
#upgrade-status.success {
  background: var(--success-subtle, #ecfdf5);
  color: var(--success, #059669);
}
#upgrade-status.error {
  background: var(--error-subtle, #fef2f2);
  color: var(--error, #dc2626);
}

/* ===== Storefront Section ===== */

.storefront-section {
  padding: 0 24px 24px;
  animation: fadeUp 0.5s ease-out;
}

.storefront-section.hidden {
  display: none;
}

.storefront-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 16px 0;
}

.storefront-title {
  font-size: 1.3rem;
  font-weight: 600;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.storefront-close-btn {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.storefront-close-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
}

.storefront-currency-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(110, 142, 251, 0.1);
  border: 1px solid rgba(110, 142, 251, 0.14);
  border-radius: var(--gm-ui-radius, 10px);
}

.storefront-currency-switcher.hidden {
  display: none;
}

.storefront-currency-btn {
  min-height: 30px;
  padding: 6px 12px;
  border: 0;
  border-radius: calc(var(--gm-ui-radius, 10px) - 2px);
  background: transparent;
  color: #6e8efb;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}

.storefront-currency-btn:hover {
  background: rgba(110, 142, 251, 0.12);
}

.storefront-currency-btn.is-active {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  box-shadow: 0 4px 12px rgba(110, 142, 251, 0.22);
}

.storefront-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Блок «Дополнительные услуги» рендерится как дочерний элемент сетки тарифов —
   растягиваем его на всю строку, чтобы он шёл ПОД тарифами, а не висел
   соседней колонкой справа. */
.storefront-grid > .storefront-additional {
  grid-column: 1 / -1;
}

/* Tariff Cards */

.tariff-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: cardEntrance 0.5s ease-out backwards;
}

.tariff-card:nth-child(1) {
  animation-delay: 0.05s;
}
.tariff-card:nth-child(2) {
  animation-delay: 0.1s;
}
.tariff-card:nth-child(3) {
  animation-delay: 0.15s;
}

.tariff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(110, 142, 251, 0.15);
}

.tariff-card-header {
  padding: 20px;
  color: #fff;
  text-align: center;
}

.tariff-card--starter .tariff-card-header {
  background: linear-gradient(135deg, #6e8efb, #88a0fc);
}

.tariff-card--pro .tariff-card-header {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
}

.tariff-card--pro {
  box-shadow:
    0 14px 34px rgba(110, 142, 251, 0.18),
    0 4px 12px rgba(167, 119, 227, 0.14),
    inset 0 0 0 1.5px rgba(110, 142, 251, 0.28);
}

.tariff-card--pro:hover {
  box-shadow:
    0 20px 44px rgba(110, 142, 251, 0.26),
    0 6px 18px rgba(167, 119, 227, 0.2),
    inset 0 0 0 1.5px rgba(110, 142, 251, 0.45);
}

.tariff-card--max .tariff-card-header {
  background: linear-gradient(135deg, #a777e3, #c084fc);
}

.tariff-card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.tariff-card-price {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.tariff-card-currency {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.85;
}

.tariff-card-body {
  padding: 20px;
  flex: 1;
}

.tariff-card-limits {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #64748b;
}

.tariff-card-services {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tariff-card-services li {
  padding: 6px 0;
  font-size: 0.85rem;
  color: #475569;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.tariff-card-services li:last-child {
  border-bottom: none;
}

.tariff-card-footer {
  padding: 16px 20px 20px;
}

.tariff-card-buy-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6e8efb, #a777e3, #6e8efb);
  background-size: 180% 180%;
  background-position: 0% 50%;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 6px 16px rgba(110, 142, 251, 0.22);
  transition:
    transform 0.28s var(--motion-glide),
    background-position 0.5s ease,
    box-shadow 0.28s ease,
    filter 0.28s ease;
}

.tariff-card-buy-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 48%,
    transparent 66%
  );
  transform: translateX(-130%) skewX(-16deg);
  transition: transform 0.6s var(--motion-glide);
  z-index: -1;
}

.tariff-card-buy-btn:hover {
  transform: translateY(-1px);
  background-position: 100% 50%;
  box-shadow: 0 10px 24px rgba(110, 142, 251, 0.32);
  filter: saturate(1.05);
}

.tariff-card-buy-btn:hover::before {
  transform: translateX(130%) skewX(-16deg);
}

.tariff-card-buy-btn:active {
  transform: translateY(0);
}

.tariff-card-downgrade-btn {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tariff-card-downgrade-btn:hover {
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(248, 250, 252, 0.5);
}

/* Additional Services */

.storefront-additional {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.storefront-additional.hidden {
  display: none;
}

.storefront-additional-title {
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  margin: 0 0 12px;
}

.storefront-additional-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.additional-service-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(110, 142, 251, 0.22);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.9rem;
  color: #334155;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.additional-service-card:hover {
  border-color: rgba(110, 142, 251, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(110, 142, 251, 0.12);
}

.additional-service-card:not(.additional-service-card--with-image) {
  border-style: dashed;
  text-align: center;
}

.additional-service-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.08), rgba(167, 119, 227, 0.08));
  overflow: hidden;
}

.additional-service-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.additional-service-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 10px;
  flex: 1;
}

.additional-service-card:not(.additional-service-card--with-image) .additional-service-body {
  padding: 12px 10px;
}

.additional-service-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
}

.additional-service-tagline {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.25;
}

.additional-service-description {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.4;
  margin-top: 2px;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.additional-service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.additional-service-card:not(.additional-service-card--with-image) .additional-service-footer {
  justify-content: center;
  flex-direction: column;
}

.additional-service-price {
  font-size: 0.76rem;
  font-weight: 600;
  color: #1e293b;
}

.additional-service-add-btn {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    opacity 0.15s;
  white-space: nowrap;
}

.additional-service-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(110, 142, 251, 0.3);
}

.additional-service-add-btn:active {
  transform: translateY(0);
  opacity: 0.9;
}

/* Storefront loading/error states */

.workspace-skeleton-shimmer {
  background: linear-gradient(
    110deg,
    rgba(110, 142, 251, 0.08) 8%,
    rgba(255, 255, 255, 0.72) 18%,
    rgba(110, 142, 251, 0.08) 33%
  );
  background-size: 220% 100%;
  animation: workspaceSkeletonShimmer 1.4s linear infinite;
}

@keyframes workspaceSkeletonShimmer {
  to {
    background-position: -220% 0;
  }
}

.storefront-skeleton-card {
  display: flex;
  min-height: 324px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
}

.storefront-skeleton-header {
  height: 104px;
}

.storefront-skeleton-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.storefront-skeleton-line,
.storefront-skeleton-button,
.device-skeleton-line {
  display: block;
  height: 12px;
  border-radius: 6px;
}

.storefront-skeleton-line--short {
  width: 58%;
}

.storefront-skeleton-line--medium {
  width: 78%;
}

.storefront-skeleton-footer {
  padding: 16px 20px 20px;
}

.storefront-skeleton-button {
  width: 100%;
  height: 42px;
  border-radius: 10px;
}

.storefront-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #ef4444;
  font-size: 0.9rem;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ===== Payment Modal ===== */

.payment-modal-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-modal-success .payment-money-branch {
  display: none !important;
}

.payment-details-block {
  background: rgba(248, 250, 252, 0.8);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.payment-details-block pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: #334155;
}

.payment-upload-area {
  margin-bottom: 16px;
}

.payment-upload-label {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 8px;
}

.payment-file-input {
  width: 100%;
  padding: 12px;
  border: 2px dashed rgba(110, 142, 251, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.payment-file-input:hover {
  border-color: rgba(110, 142, 251, 0.6);
}

.payment-file-name {
  font-size: 0.8rem;
  color: #6e8efb;
  margin-top: 4px;
}

.payment-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  resize: vertical;
  margin-bottom: 12px;
  font-family: inherit;
}

.payment-submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6e8efb, #a777e3, #6e8efb);
  background-size: 180% 180%;
  background-position: 0% 50%;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 6px 16px rgba(110, 142, 251, 0.22);
  transition:
    transform 0.28s var(--motion-glide),
    background-position 0.5s ease,
    box-shadow 0.28s ease,
    filter 0.28s ease;
}

.payment-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 48%,
    transparent 66%
  );
  transform: translateX(-130%) skewX(-16deg);
  transition: transform 0.6s var(--motion-glide);
  z-index: -1;
}

.payment-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.payment-submit-btn:not(:disabled):hover {
  transform: translateY(-1px);
  background-position: 100% 50%;
  box-shadow: 0 10px 24px rgba(110, 142, 251, 0.32);
  filter: saturate(1.05);
}

.payment-submit-btn:not(:disabled):hover::before {
  transform: translateX(130%) skewX(-16deg);
}

.payment-status {
  text-align: center;
  font-size: 0.85rem;
  min-height: 20px;
}

.payment-status.success {
  color: #10b981;
}

.payment-status.error {
  color: #ef4444;
}

/* Full-success panel rendered by renderApproved() — takes over the modal body. */
.payment-modal-success {
  padding: 32px 28px 28px !important;
  text-align: center;
}

.payment-status.payment-status-full {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 12px 8px;
}

.payment-status-checkmark {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  animation: paymentCheckPop 0.45s cubic-bezier(0.17, 0.86, 0.4, 1.35) both;
}

.payment-status-checkmark-ring {
  stroke-dasharray: 227;
  stroke-dashoffset: 227;
  animation: paymentCheckRingDraw 0.55s ease-out forwards;
}

.payment-status-checkmark-path {
  stroke-dasharray: 52;
  stroke-dashoffset: 52;
  animation: paymentCheckPathDraw 0.42s 0.38s ease-out forwards;
}

@keyframes paymentCheckPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  80% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes paymentCheckRingDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes paymentCheckPathDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.payment-status-headline {
  font-size: 1.15rem;
  font-weight: 700;
  color: #065f46;
}

.payment-status-plan {
  color: #1e293b;
  font-size: 0.98rem;
  font-weight: 650;
}

.payment-status-subline {
  font-size: 0.95rem;
  color: #334155;
  max-width: 360px;
  line-height: 1.45;
}

.payment-status-refresh-warning {
  max-width: 380px;
  padding: 10px 12px;
  border: 1px solid rgba(167, 119, 227, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.09), rgba(167, 119, 227, 0.1));
  color: #6b3fa0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.payment-status-done-btn {
  margin-top: 12px;
  min-width: 140px;
  padding: 10px 20px;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-skeleton-shimmer {
    animation: none;
    background-position: 0 0;
  }

  .payment-status-checkmark,
  .payment-status-checkmark-ring,
  .payment-status-checkmark-path {
    animation: none;
  }

  .payment-status-checkmark-ring,
  .payment-status-checkmark-path {
    stroke-dashoffset: 0;
  }
}

/* Forecast card — shown BEFORE payment details, explains what the user will get. */
.payment-forecast {
  margin: 0 24px 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.08), rgba(167, 119, 227, 0.08));
  border: 1px solid rgba(110, 142, 251, 0.2);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #1f2937;
}

.payment-forecast.hidden {
  display: none;
}

.payment-forecast-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.payment-forecast-title.payment-forecast-warning {
  color: #b45309;
}

.payment-forecast-list {
  margin: 0;
  padding-left: 20px;
  color: #374151;
}

.payment-forecast-list li {
  margin: 4px 0;
}

.payment-forecast-list b {
  color: #111827;
  font-weight: 600;
}

.payment-forecast-list li.payment-forecast-muted {
  color: #6b7280;
  font-size: 12px;
}

.payment-forecast-loading {
  color: #6b7280;
  font-style: italic;
}

/* ===== Shopping Cart ===== */

.cart-section {
  padding: 0 24px 24px;
  animation: fadeUp 0.4s ease-out;
}

.cart-section.hidden {
  display: none;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cart-title {
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 2px 6px rgba(110, 142, 251, 0.32);
  animation: cartBadgePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-badge.hidden {
  display: none;
}

@keyframes cartBadgePop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.25);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.cart-clear-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.cart-clear-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.2s;
}

.cart-item:hover {
  border-color: rgba(110, 142, 251, 0.3);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  font-weight: 600;
}

.cart-item-name {
  font-size: 0.9rem;
  color: #334155;
  font-weight: 500;
}

.cart-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: all 0.2s;
}

.cart-item-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.cart-months {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cart-months-label {
  font-size: 0.85rem;
  color: #64748b;
  white-space: nowrap;
}

.cart-months-select {
  padding: 6px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.6);
  color: #334155;
  cursor: pointer;
}

.cart-months-select:focus {
  outline: none;
  border-color: rgba(110, 142, 251, 0.5);
}

.cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-total {
  font-size: 0.95rem;
  color: #64748b;
}

.cart-total-price {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  margin-left: 6px;
}

.cart-checkout-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6e8efb, #a777e3, #6e8efb);
  background-size: 180% 180%;
  background-position: 0% 50%;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(110, 142, 251, 0.22);
  transition:
    transform 0.28s var(--motion-glide),
    background-position 0.5s ease,
    box-shadow 0.28s ease,
    filter 0.28s ease;
}

.cart-checkout-btn:not(:disabled):hover {
  transform: translateY(-1px);
  background-position: 100% 50%;
  box-shadow: 0 10px 24px rgba(110, 142, 251, 0.3);
  filter: saturate(1.05);
}

.cart-checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.cart-checkout-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(110, 142, 251, 0.35);
}

/* Cart Recommendations */

.cart-recommendations {
  margin-bottom: 16px;
}

.cart-recommendations.hidden {
  display: none;
}

.cart-rec-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 10px;
}

.cart-rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.cart-rec-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  border: 1px dashed rgba(110, 142, 251, 0.3);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: border-color 0.2s;
}

.cart-rec-card:hover {
  border-color: rgba(110, 142, 251, 0.6);
}

.cart-rec-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 4px;
}

.cart-rec-price {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.cart-rec-add-btn {
  background: none;
  border: 1px solid rgba(110, 142, 251, 0.4);
  border-radius: 6px;
  color: #6e8efb;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.cart-rec-add-btn:hover {
  background: rgba(110, 142, 251, 0.1);
  border-color: #6e8efb;
}

/* Payment Cart Summary (inside payment modal) */

.payment-cart-summary {
  margin-bottom: 16px;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 10px;
  padding: 12px 16px;
}

.payment-cart-summary.hidden {
  display: none;
}

.payment-cart-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.payment-cart-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #475569;
}

.payment-cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: #334155;
}

.payment-discount-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 0.8rem;
  color: #64748b;
}

.payment-discount-tiers-label {
  flex-basis: 100%;
  margin-bottom: 2px;
  color: #475569;
}

.payment-discount-tier {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(110, 142, 251, 0.08);
  color: #64748b;
  font-weight: 500;
}

.payment-discount-tier.active {
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.18), rgba(167, 119, 227, 0.18));
  color: #4c1d95;
  font-weight: 600;
}

/* ===== Booster Toggle ===== */

.booster-toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.booster-toggle-container.is-disabled {
  opacity: 0.72;
}

.booster-toggle-container.hidden {
  display: none;
}

.booster-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.booster-switch {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.booster-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.booster-switch input:disabled {
  cursor: not-allowed;
}

.booster-slider {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.booster-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.booster-switch input:checked + .booster-slider {
  background: rgba(16, 185, 129, 0.85);
  border-color: rgba(16, 185, 129, 0.9);
}

.booster-switch input:checked + .booster-slider::before {
  transform: translateX(20px);
}

.booster-switch input:disabled + .booster-slider {
  filter: grayscale(0.35);
  opacity: 0.75;
}

.booster-toggle-container.is-disabled .booster-switcher {
  cursor: not-allowed;
}

.booster-label-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  line-height: 1;
}

/* ===== Workspace Sections (Фаза 1 кабинет-эпика) =====
 * Бывший 2-страничный transform-слайдер (profiles ↔ account) обобщён до
 * секций: активная секция показывается, остальные display:none. Какая
 * секция активна — решает workspace-navigation-runtime (класс .is-active),
 * меню — .workspace-section-nav ниже. */
.workspace-pager {
  position: relative;
  width: 100%;
  /* Центрированная контент-колонка: на широком вебе страницы больше не
     растекаются на всю ширину (nav центрируется отдельно выше). ~1140px даёт
     ровно 3 колонки тарифов в «Магазине» и ~5 карточек профилей. */
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

.workspace-pager-page {
  display: none;
  width: 100%;
  min-width: 0;
}

.workspace-pager-page.is-active {
  display: block;
  animation: accountFadeIn 0.3s var(--motion-glide) both;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-pager-page.is-active {
    animation: none;
  }
}

.workspace-pager-page[data-page='overview'],
.workspace-pager-page[data-page='store'],
.workspace-pager-page[data-page='account'],
.workspace-pager-page[data-page='settings'] {
  padding-bottom: 48px;
}

/* ===== Workspace Section Nav: меню разделов кабинета ===== */
.workspace-section-nav {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 14px auto 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(110, 142, 251, 0.14);
  border-radius: 14px;
  box-shadow:
    0 4px 16px rgba(110, 142, 251, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.03);
  overflow-x: auto;
  scrollbar-width: none;
}

.workspace-section-nav::-webkit-scrollbar {
  display: none;
}

.workspace-section-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.workspace-section-nav-btn i {
  font-size: 13px;
  color: #6e8efb;
}

.workspace-section-nav-btn:hover {
  background: rgba(110, 142, 251, 0.1);
  color: #334155;
}

.workspace-section-nav-btn.is-active {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  box-shadow: 0 6px 14px rgba(110, 142, 251, 0.28);
}

.workspace-section-nav-btn.is-active i {
  color: #fff;
}

@media (max-width: 640px) {
  .workspace-section-nav {
    max-width: calc(100% - 16px);
    margin-top: 10px;
  }

  .workspace-section-nav-btn {
    padding: 8px 12px;
    font-size: 12px;
    gap: 6px;
  }
}

/* Overview section */
.overview-view {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 20px 48px;
}

.overview-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.overview-greeting {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% -30%, rgba(167, 119, 227, 0.22), rgba(167, 119, 227, 0) 58%),
    linear-gradient(135deg, rgba(110, 142, 251, 0.12), rgba(167, 119, 227, 0.08));
  border: 1px solid rgba(110, 142, 251, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 10px 28px rgba(110, 142, 251, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.overview-greeting-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  box-shadow: 0 10px 22px rgba(110, 142, 251, 0.24);
}

.overview-greeting h2 {
  margin: 0;
  color: #1e293b;
  font-size: 30px;
  font-weight: 750;
  line-height: 1.12;
}

.overview-greeting p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 16px;
}

.overview-timeline {
  padding: 16px 18px 18px;
}

.overview-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.overview-timeline-head h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.overview-timeline-head h3 i {
  color: #6e8efb;
  font-size: 14px;
}

.overview-timeline-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.overview-timeline-list::-webkit-scrollbar {
  display: none;
}

.overview-timeline-step {
  position: relative;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  text-align: center;
}

.overview-timeline-step::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
}

.overview-timeline-step:last-child::after {
  display: none;
}

.overview-timeline-step.is-done::after {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
}

.overview-timeline-marker {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.overview-timeline-marker i {
  font-size: 11px;
}

.overview-timeline-step.is-done .overview-timeline-marker {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(110, 142, 251, 0.24);
}

.overview-timeline-step.is-current .overview-timeline-marker {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(110, 142, 251, 0.48);
  color: #6e8efb;
  box-shadow:
    0 0 0 4px rgba(110, 142, 251, 0.12),
    0 8px 18px rgba(110, 142, 251, 0.16);
}

.overview-timeline-step.is-stalled .overview-timeline-marker {
  border-color: rgba(239, 68, 68, 0.38);
  color: #b91c1c;
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, 0.1),
    0 8px 18px rgba(239, 68, 68, 0.1);
}

.overview-timeline-label {
  max-width: 120px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.overview-timeline-step.is-done .overview-timeline-label,
.overview-timeline-step.is-current .overview-timeline-label {
  color: #334155;
}

.overview-timeline-step.is-stalled .overview-timeline-label,
.overview-timeline-hint.is-warn {
  color: #b91c1c;
}

.overview-timeline-hint {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.overview-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.overview-timeline-cta {
  width: max-content;
  min-width: 180px;
  margin-top: 14px;
}

.overview-timeline-actions .overview-timeline-cta {
  margin-top: 0;
}

.overview-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(110, 142, 251, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 8px 22px rgba(15, 23, 42, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.04);
}

.overview-access-card {
  background:
    radial-gradient(circle at 86% -28%, rgba(167, 119, 227, 0.2), rgba(167, 119, 227, 0) 56%),
    radial-gradient(circle at -12% 118%, rgba(110, 142, 251, 0.18), rgba(110, 142, 251, 0) 62%),
    rgba(255, 255, 255, 0.8);
}

.overview-access-card.is-warn {
  border-color: rgba(245, 158, 11, 0.34);
  box-shadow:
    0 8px 22px rgba(245, 158, 11, 0.08),
    0 1px 3px rgba(15, 23, 42, 0.04);
}

.overview-access-card.is-expired {
  border-color: rgba(239, 68, 68, 0.28);
  box-shadow:
    0 8px 22px rgba(239, 68, 68, 0.08),
    0 1px 3px rgba(15, 23, 42, 0.04);
}

.overview-card-header,
.overview-services-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.overview-card-header h3,
.overview-services-header h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.overview-card-header h3 i,
.overview-services-header h3 i {
  color: #6e8efb;
  font-size: 14px;
}

.overview-state-badge {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.overview-access-card.is-warn .overview-state-badge {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: #b45309;
}

.overview-access-card.is-expired .overview-state-badge {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.24);
  color: #b91c1c;
}

.overview-access-title {
  color: #1e293b;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.overview-access-meta {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.overview-access-meta.is-warn {
  color: #b91c1c;
  font-weight: 650;
}

.overview-progress {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.overview-progress-bar {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  transition: width 0.28s ease;
}

.overview-access-card.is-warn .overview-progress-bar {
  background: linear-gradient(135deg, #f59e0b, #e8950a);
}

.overview-access-card.is-expired .overview-progress-bar {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.overview-progress-label {
  margin-top: 6px;
  color: #708198;
  font-size: 12px;
  font-weight: 600;
}

.overview-access-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.overview-access-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(110, 142, 251, 0.1);
  border: 1px solid rgba(110, 142, 251, 0.14);
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.overview-access-stats i {
  color: #6e8efb;
  font-size: 12px;
}

.overview-card-copy {
  min-height: 40px;
  margin: 0 0 16px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.overview-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overview-card-actions-inline {
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 16px;
}

.overview-primary-btn,
.overview-secondary-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.overview-primary-btn {
  padding: 11px 16px;
  border: none;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  box-shadow:
    0 10px 20px rgba(110, 142, 251, 0.22),
    0 4px 10px rgba(167, 119, 227, 0.14);
}

.overview-secondary-btn {
  padding: 10px 15px;
  border: 1px solid rgba(110, 142, 251, 0.28);
  background: rgba(255, 255, 255, 0.64);
  color: #475569;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.overview-primary-btn:hover,
.overview-secondary-btn:hover {
  transform: translateY(-1px);
}

.overview-primary-btn:hover {
  box-shadow:
    0 14px 26px rgba(110, 142, 251, 0.24),
    0 7px 14px rgba(167, 119, 227, 0.16);
}

.overview-secondary-btn:hover {
  background: rgba(110, 142, 251, 0.1);
  border-color: rgba(110, 142, 251, 0.42);
  box-shadow: 0 8px 18px rgba(110, 142, 251, 0.12);
}

.overview-primary-btn:active,
.overview-secondary-btn:active {
  transform: translateY(0);
}

.overview-primary-btn:focus-visible,
.overview-secondary-btn:focus-visible,
.overview-service-tile:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px rgba(110, 142, 251, 0.28);
}

.overview-download-link {
  width: 100%;
}

.overview-recheck-btn {
  width: 100%;
}

.overview-services-section {
  margin-top: 2px;
}

.overview-services-header {
  margin: 0 0 12px;
  padding: 0 2px;
}

.overview-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.overview-service-tile {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid rgba(110, 142, 251, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #334155;
  cursor: pointer;
  text-align: left;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.05),
    0 1px 3px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.24s var(--motion-glide),
    box-shadow 0.24s var(--motion-glide),
    border-color 0.2s ease;
}

.overview-service-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 142, 251, 0.24);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.08),
    0 5px 12px rgba(110, 142, 251, 0.12);
}

.overview-service-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.14), rgba(167, 119, 227, 0.12));
  color: #6e8efb;
}

.overview-service-name {
  min-width: 0;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

@media (max-width: 780px) {
  .overview-view {
    padding: 10px 12px 32px;
  }

  .overview-greeting {
    align-items: flex-start;
    padding: 18px;
  }

  .overview-greeting h2 {
    font-size: 24px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .overview-timeline-list {
    margin-right: -4px;
    padding-bottom: 2px;
  }
}

@media (max-width: 520px) {
  .overview-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-card-actions-inline {
    flex-direction: column;
  }

  .overview-primary-btn,
  .overview-secondary-btn {
    width: 100%;
  }

  .overview-timeline-cta {
    width: 100%;
  }
}

/* ===== Header button: "Аккаунт" ===== */
.desktop-screen .open-account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(110, 142, 251, 0.14);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    box-shadow 0.28s var(--motion-glide),
    color 0.28s ease,
    background-color 0.28s ease,
    border-color 0.28s ease;
}

.desktop-screen .open-account-btn-label {
  display: none;
}

.desktop-screen .open-account-btn i {
  font-size: 18px;
  color: #6e8efb;
}

.desktop-screen .open-account-btn:hover {
  background: rgba(110, 142, 251, 0.1);
  color: #334155;
  border-color: rgba(110, 142, 251, 0.25);
  box-shadow:
    0 10px 20px rgba(110, 142, 251, 0.14),
    inset 0 0 0 1px rgba(110, 142, 251, 0.08);
}

.desktop-screen .open-account-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px rgba(110, 142, 251, 0.26);
}

.desktop-screen .open-account-btn.is-active {
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.14), rgba(167, 119, 227, 0.1));
  color: #6e8efb;
  border-color: rgba(110, 142, 251, 0.3);
}

@media (max-width: 640px) {
  .desktop-screen .open-account-btn,
  .desktop-screen .logout-btn {
    padding: 8px 10px;
  }
}

/* ===== Account view: «Помощь и обратная связь» section ===== */
.account-help-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-help-header {
  display: flex;
  align-items: center;
}

.account-help-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-help-title i {
  color: #6e8efb;
}

.account-help-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-help-actions .account-advanced-link.hidden {
  display: none;
}

.account-help-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.account-help-faq-item {
  border: 1px solid rgba(110, 142, 251, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.account-help-faq-item summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #1f2937;
  font-size: 0.88rem;
  font-weight: 600;
  list-style-position: inside;
}

.account-help-faq-item summary:focus-visible {
  outline: 2px solid rgba(110, 142, 251, 0.55);
  outline-offset: -2px;
}

.account-help-faq-item p {
  margin: 0;
  padding: 0 14px 12px 28px;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ===== Referral invite button ===== */
.desktop-screen .open-referral-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(110, 142, 251, 0.14);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition:
    box-shadow 0.28s var(--motion-glide),
    color 0.28s ease,
    background-color 0.28s ease,
    border-color 0.28s ease;
}

.desktop-screen .open-referral-btn-label {
  display: none;
}

.desktop-screen .open-referral-btn i {
  font-size: 18px;
  color: #6e8efb;
}

.desktop-screen .open-referral-btn:hover {
  background: rgba(110, 142, 251, 0.1);
  color: #334155;
  border-color: rgba(110, 142, 251, 0.25);
  box-shadow:
    0 10px 20px rgba(110, 142, 251, 0.14),
    inset 0 0 0 1px rgba(110, 142, 251, 0.08);
}

.desktop-screen .open-referral-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px rgba(110, 142, 251, 0.26);
}

@media (max-width: 640px) {
  .desktop-screen .open-referral-btn {
    padding: 8px 10px;
  }
}

/* ===== Referral modal ===== */
.referral-modal-card {
  max-width: 520px;
}

.referral-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.referral-intro {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.referral-intro strong {
  color: #4c1d95;
  font-weight: 700;
}

.referral-link-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.referral-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.referral-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.referral-link-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  color: #1e293b;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

.referral-link-input:focus {
  outline: none;
  border-color: rgba(167, 119, 227, 0.55);
  box-shadow: 0 0 0 3px rgba(167, 119, 227, 0.18);
}

.referral-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(167, 119, 227, 0.4);
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.referral-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(167, 119, 227, 0.32);
}

.referral-copy-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.referral-copy-status {
  min-height: 18px;
  font-size: 12px;
  color: #475569;
}

.referral-copy-status-success {
  color: #047857;
}

.referral-copy-status-error {
  color: #b91c1c;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(241, 245, 249, 0.55);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.referral-stat {
  text-align: center;
}

.referral-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #4c1d95;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  line-height: 1.2;
}

.referral-stat-label {
  margin-top: 4px;
  font-size: 11px;
  color: #475569;
  letter-spacing: 0.04em;
}

/* ===== Feedback modal ===== */
.feedback-modal-card {
  max-width: 540px;
}

.feedback-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feedback-intro {
  margin: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.feedback-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-question {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.feedback-rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.feedback-rating-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.18s var(--motion-glide),
    box-shadow 0.22s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.feedback-rating-emoji {
  font-size: 26px;
  line-height: 1;
}

.feedback-rating-caption {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.feedback-rating-btn:hover {
  transform: translateY(-1px);
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.32);
}

.feedback-rating-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 0 0 6px rgba(99, 102, 241, 0.32);
}

.feedback-rating-btn.is-selected {
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.18), rgba(167, 119, 227, 0.16));
  border-color: rgba(99, 102, 241, 0.52);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.18);
}

.feedback-rating-btn.is-selected .feedback-rating-caption {
  color: #1e293b;
  font-weight: 600;
}

.feedback-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.feedback-select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 13px;
  color: #1e293b;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.feedback-select:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.feedback-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 13px;
  color: #1e293b;
  resize: vertical;
  min-height: 64px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.feedback-textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.feedback-status {
  min-height: 18px;
  font-size: 13px;
  color: #475569;
}

.feedback-status-info {
  color: #475569;
}

.feedback-status-success {
  color: #334155;
  font-weight: 500;
}

.feedback-status-error {
  color: #b91c1c;
  font-weight: 600;
}

.feedback-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 16px 12px;
  text-align: center;
}

.feedback-blocked-icon {
  font-size: 36px;
  line-height: 1;
  opacity: 0.85;
}

.feedback-blocked-text {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
  max-width: 360px;
}

.feedback-blocked-text #feedback-blocked-days {
  font-weight: 600;
  color: #1e293b;
}

.feedback-blocked-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid rgba(110, 142, 251, 0.35);
  background: rgba(255, 255, 255, 0.7);
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.22s ease,
    background-color 0.18s ease;
}

.feedback-blocked-close-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(110, 142, 251, 0.2);
}

.feedback-blocked-close-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px rgba(110, 142, 251, 0.4);
}

.feedback-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.feedback-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

.feedback-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(110, 142, 251, 0.32);
}

.feedback-submit-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px rgba(110, 142, 251, 0.4);
}

.feedback-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .feedback-rating {
    gap: 4px;
  }
  .feedback-rating-btn {
    padding: 8px 2px;
  }
  .feedback-rating-emoji {
    font-size: 22px;
  }
  .feedback-rating-caption {
    font-size: 10px;
  }
}

/* ===== Account view (Личный кабинет) ===== */
.account-view {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 18px 24px;
  /* Entrance-анимация живёт на .workspace-pager-page.is-active — здесь её
   * нет, иначе при показе секции стекались бы две accountFadeIn. */
}

.account-page-header {
  margin-bottom: 16px;
}

.account-page-eyebrow {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
  color: #64748b;
}

.account-page-title {
  margin: 0;
  color: #1e293b;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.account-tab-nav {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(110, 142, 251, 0.14);
  border-radius: 14px;
  box-shadow:
    0 4px 16px rgba(110, 142, 251, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.03);
  overflow-x: auto;
  scrollbar-width: none;
}

.account-tab-nav::-webkit-scrollbar {
  display: none;
}

.account-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.account-tab-button:hover {
  background: rgba(110, 142, 251, 0.1);
  color: #334155;
}

.account-tab-button.is-active {
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  box-shadow: 0 6px 14px rgba(110, 142, 251, 0.28);
}

.account-tab-nav > .workspace-tab-indicator {
  border-radius: 10px;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  box-shadow: 0 6px 14px rgba(110, 142, 251, 0.28);
}

.account-tab-nav.has-tab-indicator > .account-tab-button.is-active {
  background: transparent;
  box-shadow: none;
}

.account-tab-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px rgba(110, 142, 251, 0.26);
}

.account-tab-panels {
  min-width: 0;
}

.account-tab-panel {
  min-width: 0;
}

.account-tab-panel.is-hidden,
.account-tab-panel[hidden] {
  display: none;
}

.account-tab-panel > .account-section:first-child,
.account-tab-panel > .purchase-history-section:first-child {
  margin-top: 0;
}

.account-tab-panel > .account-section:last-child {
  margin-bottom: 0;
}

.referral-inline-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.account-tab-empty {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px dashed rgba(110, 142, 251, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #475569;
  box-shadow:
    0 4px 16px rgba(110, 142, 251, 0.05),
    0 1px 3px rgba(15, 23, 42, 0.03);
}

#referral-inline-section.hidden + .account-tab-empty {
  display: flex;
}

.account-tab-panel:not(.is-active) .account-tab-empty {
  display: none;
}

.account-tab-empty-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #6e8efb;
  background: rgba(110, 142, 251, 0.1);
}

.account-tab-empty-title {
  margin: 0;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.account-tab-empty-text {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

@keyframes accountFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.account-section {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(110, 142, 251, 0.1);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow:
    0 4px 16px rgba(110, 142, 251, 0.05),
    0 1px 3px rgba(15, 23, 42, 0.03);
}

.account-tariff-card {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 85% -20%, rgba(167, 119, 227, 0.22), rgba(167, 119, 227, 0) 55%),
    radial-gradient(circle at -10% 120%, rgba(110, 142, 251, 0.2), rgba(110, 142, 251, 0) 60%),
    linear-gradient(135deg, rgba(110, 142, 251, 0.14), rgba(167, 119, 227, 0.1));
  border: 1px solid rgba(110, 142, 251, 0.2);
  font-size: 14px;
  color: #334155;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow:
    0 10px 28px rgba(110, 142, 251, 0.1),
    0 2px 6px rgba(167, 119, 227, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.account-tariff-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 48%,
    transparent 66%
  );
  transform: translateX(-120%);
  animation: accountTariffShine 6s ease-in-out 1.2s infinite;
}

@keyframes accountTariffShine {
  0%,
  60%,
  100% {
    transform: translateX(-120%);
  }
  75%,
  90% {
    transform: translateX(120%);
  }
}

.account-tariff-card .loading-container {
  padding: 4px 0;
}

.account-tariff-summary {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) auto;
  align-items: center;
  column-gap: clamp(28px, 6vw, 76px);
}

.account-tariff-summary-column {
  min-width: 0;
}

.account-tariff-summary--no-date {
  grid-template-columns: minmax(0, 1fr) auto;
}

.account-tariff-summary-label {
  display: block;
  margin-bottom: 7px;
  color: #708198;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-tariff-plan-list,
.account-tariff-date-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-tariff-plan-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.account-tariff-plan-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(110, 142, 251, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 4px 12px rgba(110, 142, 251, 0.08);
  font-size: 16px;
  line-height: 1;
}

.account-tariff-plan-value {
  min-width: 0;
  overflow-wrap: anywhere;
  background: linear-gradient(135deg, #5878e8, #9466d2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #5878e8;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: 0.025em;
}

.account-tariff-date-value {
  display: flex;
  align-items: center;
  min-height: 32px;
  color: #475569;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}

.account-tariff-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  justify-self: end;
}

.account-tariff-status-active {
  color: #15803d;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.28);
}

.account-tariff-status-active i {
  font-size: 13px;
}

.account-tariff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.account-tariff-row-label {
  color: #708198;
}

.account-tariff-row-value {
  color: #334155;
  font-weight: 500;
}

.account-tariff-row-value.is-warn {
  color: #e8950a;
}

.account-tariff-row-value.account-tariff-row-telegram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #229ed9;
  font-weight: 600;
}

.account-tariff-row-value.account-tariff-row-telegram i {
  font-size: 14px;
}

/* Phase 6.2-link: «Привязать Telegram» в кабинете (web-hosted, без telegram-линка) */
.account-tariff-row.account-telegram-link-row {
  flex-wrap: wrap;
  align-items: center;
}

.account-tariff-row-value.account-telegram-link-value {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.account-link-telegram-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(34, 158, 217, 0.35);
  border-radius: 10px;
  background: rgba(34, 158, 217, 0.08);
  color: #229ed9;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.account-link-telegram-btn:hover:not(:disabled) {
  background: rgba(34, 158, 217, 0.16);
  box-shadow: 0 2px 8px rgba(34, 158, 217, 0.18);
}

.account-link-telegram-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.account-telegram-link-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #229ed9;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
}

.account-telegram-link-open.hidden {
  display: none;
}

.account-telegram-link-status {
  flex-basis: 100%;
  text-align: right;
  font-size: 0.8rem;
  color: #475569;
}

.account-telegram-link-status.is-warn {
  color: #e8950a;
}

.account-telegram-link-status.hidden {
  display: none;
}

.account-key-section {
  padding-top: 14px;
  padding-bottom: 14px;
}
.account-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.account-key-label {
  font-size: 13px;
  color: #708198;
  font-weight: 500;
}
.account-key-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.account-key-section #user-name,
.account-key-code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  background: rgba(110, 142, 251, 0.08);
  border: 1px solid rgba(110, 142, 251, 0.16);
  padding: 4px 10px;
  border-radius: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
}
.account-key-section .toggle-key-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(110, 142, 251, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  color: #6e8efb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}
.account-key-section .toggle-key-icon:hover {
  background: #fff;
  border-color: rgba(110, 142, 251, 0.4);
}
.account-key-section .toggle-key-icon.active {
  color: #a777e3;
  border-color: rgba(167, 119, 227, 0.35);
}

.account-tariff-switch {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-tariff-switch.hidden {
  display: none;
}

.account-pending-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #92400e;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-pending-title {
  font-size: 13px;
  font-weight: 600;
  color: #b45309;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-pending-title i {
  color: #d97706;
  font-size: 14px;
}

.account-pending-text {
  font-size: 13px;
  color: #78350f;
  line-height: 1.45;
}

.account-pending-text b {
  color: #6e8efb;
  font-weight: 700;
}

/* Hide the "Доступные профили" section title on the profiles page —
   main screen should be just the profile grid. View-switcher stays aligned. */
.workspace-pager-page-profiles .section-container > .section-header > .section-title {
  display: none;
}

.workspace-pager-page-profiles .section-container > .section-header {
  justify-content: flex-end;
}

.account-tariff-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}
.account-tariff-empty-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #6e8efb;
}
.account-tariff-empty-title i {
  color: #a777e3;
  font-size: 16px;
}
.account-tariff-empty-text {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.account-key-expired-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.account-key-expired-actions > a,
.account-key-expired-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 170px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--brand-start) 24%, transparent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-start);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.account-key-expired-actions > a:first-child {
  border: none;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
}

/* Expiration banner inside account page — card-like, full width, wrapping */
.account-view .expiration-banner,
.account-tariff-section .expiration-banner {
  margin-top: 12px;
  padding: 10px 14px;
  width: 100%;
  white-space: normal;
  font-size: 13px;
  border-radius: 10px;
}

.account-view .expiration-banner:not(.hidden),
.account-tariff-section .expiration-banner:not(.hidden) {
  animation: none;
}

.account-extend-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6e8efb, #a777e3, #6e8efb);
  background-size: 180% 180%;
  background-position: 0% 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 10px 20px rgba(110, 142, 251, 0.22),
    0 4px 10px rgba(167, 119, 227, 0.14);
  transition:
    transform 0.28s var(--motion-glide),
    box-shadow 0.28s var(--motion-glide),
    background-position 0.5s ease,
    filter 0.28s ease;
}

.account-extend-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 48%,
    transparent 66%
  );
  transform: translateX(-130%) skewX(-16deg);
  transition: transform 0.6s var(--motion-glide);
  z-index: -1;
}

.account-extend-btn:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow:
    0 16px 28px rgba(110, 142, 251, 0.24),
    0 8px 14px rgba(167, 119, 227, 0.18);
  filter: saturate(1.06);
}

.account-extend-btn:hover::before {
  transform: translateX(130%) skewX(-16deg);
}

.account-extend-btn:active {
  transform: translateY(0);
}

.account-extend-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 6px rgba(110, 142, 251, 0.32);
}

@media (max-width: 640px) {
  .account-view {
    padding: 8px 12px 20px;
  }
  .account-tab-nav {
    width: 100%;
    flex-wrap: wrap;
  }
  .account-tab-button {
    flex: 1 1 calc(50% - 4px);
    padding: 8px 12px;
    font-size: 12px;
  }
  .account-tab-empty {
    align-items: flex-start;
  }
  .account-section {
    padding: 14px 14px;
  }
  .account-tariff-card {
    padding: 17px 18px;
  }
  .account-tariff-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 12px;
  }
  .account-tariff-plan-column {
    grid-column: 1 / -1;
  }
  .account-tariff-validity-column {
    grid-column: 1;
  }
  .account-tariff-summary > .account-tariff-status {
    grid-column: 2;
    justify-self: end;
  }
}

/* ===== Devices Section (Фаза 4 кабинет-эпика) ===== */
.devices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.devices-empty {
  font-size: 13px;
  color: #708198;
  padding: 8px 0;
}

#devices-status.is-warn {
  color: #b91c1c;
}

.device-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(110, 142, 251, 0.18);
  border-radius: 10px;
}

.device-card--skeleton {
  min-height: 62px;
  pointer-events: none;
}

.device-skeleton-main {
  display: flex;
  width: min(72%, 420px);
  flex-direction: column;
  gap: 8px;
}

.device-skeleton-line {
  width: 68%;
}

.device-skeleton-line--meta {
  width: 100%;
  height: 10px;
}

.device-skeleton-action {
  width: 76px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.device-card.is-blocked {
  opacity: 0.65;
  border-color: rgba(239, 68, 68, 0.25);
}

.device-card-host {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.device-card-host i {
  color: #6e8efb;
  margin-right: 6px;
}

.device-card-blocked-badge {
  font-size: 11px;
  font-weight: 600;
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
}

.device-card-meta {
  font-size: 12px;
  color: #708198;
  margin-top: 2px;
}

.device-unbind-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.75);
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.device-unbind-btn:hover:not(:disabled) {
  background: rgba(254, 242, 242, 0.9);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.device-unbind-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* «Разрешить» в запросах на вход — действие созидательное, и нейтрально-серая
   кнопка с красным ховером от «Отвязать» читалась бы как отказ. */
.device-approve-btn {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: linear-gradient(90deg, #6e8efb, #a777e3);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.15s;
}

.device-approve-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}

.device-approve-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-history-header {
  justify-content: space-between;
  gap: 12px;
}

.login-history-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(110, 142, 251, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  color: #5b6f8c;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}

.login-history-toggle:hover {
  color: #5878e8;
  border-color: rgba(110, 142, 251, 0.38);
  background: rgba(255, 255, 255, 0.9);
}

.login-history-toggle:focus-visible,
.login-history-pagination button:focus-visible {
  outline: 2px solid rgba(110, 142, 251, 0.5);
  outline-offset: 2px;
}

.login-history-toggle i {
  font-size: 10px;
  transition: transform 0.18s ease;
}

.login-history-toggle[aria-expanded='true'] i {
  transform: rotate(180deg);
}

.login-history-panel {
  margin-top: 12px;
}

.login-history-panel.hidden {
  display: none;
}

.login-history-viewport {
  max-height: clamp(280px, 44vh, 430px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.login-history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(110, 142, 251, 0.12);
  color: #708198;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.login-history-pagination.hidden {
  display: none;
}

.login-history-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(110, 142, 251, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #5878e8;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.login-history-pagination button:disabled {
  opacity: 0.45;
  cursor: default;
}

.login-history-row {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(110, 142, 251, 0.1);
  border-radius: 8px;
}

.login-history-main {
  font-size: 13px;
  color: #1f2937;
}

.login-history-meta {
  font-size: 12px;
  color: #708198;
  margin-top: 2px;
}

/* ===== Purchase History Section ===== */
.purchase-history-section {
  margin-top: 16px;
}
.purchase-history-section.hidden {
  display: none;
}
.purchase-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.purchase-history-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.purchase-history-title i {
  color: #6e8efb;
}
.purchase-history-refresh-btn {
  background: transparent;
  border: 1px solid rgba(110, 142, 251, 0.25);
  border-radius: 8px;
  padding: 6px 10px;
  color: #6e8efb;
  cursor: pointer;
  font-size: 13px;
  transition:
    background 0.15s,
    color 0.15s;
}
.purchase-history-refresh-btn:hover {
  background: rgba(110, 142, 251, 0.1);
}
.purchase-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.purchase-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(200, 200, 200, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  transition:
    border-color 0.2s,
    transform 0.1s;
}
.purchase-history-item:hover {
  border-color: rgba(110, 142, 251, 0.35);
}
.purchase-history-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.purchase-history-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.purchase-history-item-meta {
  font-size: 0.78rem;
  color: #94a3b8;
}
.purchase-history-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.purchase-history-item-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
}
.purchase-status {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}
.purchase-status--approved {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.purchase-status--rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}
.purchase-status--pending {
  background: rgba(234, 179, 8, 0.15);
  color: #b45309;
}
.purchase-history-empty,
.purchase-history-error,
.purchase-history-loading {
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}
.purchase-history-error {
  color: #dc2626;
}
.purchase-history-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ===== Workspace live pages (phase 4) ===== */
/* Hash-router body-class overlay для catalog / cart — режимов profiles-секции.
 * Глобальный `.hidden { display: none !important; }` побеждает любой обычный
 * селектор, поэтому переопределения для body-class включают !important —
 * это единственный способ показать секцию, закрытую классом .hidden.
 * history с Фазы 1 кабинет-эпика — полноценная секция (.workspace-pager-page),
 * ей body-class overlay больше не нужен. */
body:not(.mode-page-catalog) #catalog-section {
  display: none;
}

body.mode-page-catalog #catalog-section {
  display: block !important;
}

body.mode-page-cart #cart-section {
  display: block !important;
}

/* ── browser-unsupported: full-screen блок «Откройте в Chrome» ──────────
   Когда detectBrowserGate() возвращает supported:false (любой не-Chrome
   desktop, включая Safari и mobile Chrome iOS), workspace.js делает
   early return и НЕ привязывает event handler'ы. Без этих стилей юзер
   видит обычный login-экран с кнопкой «Войти через Telegram», тапает
   её — ничего не происходит. Скрываем все login-widgets и делаем
   #unsupported-browser-panel главным элементом с крупной Chrome-CTA.
   Добавлено 2026-04-23 после episode'а в mobile Safari.
*/
body.browser-unsupported .login-showcase,
body.browser-unsupported .login-intro,
body.browser-unsupported #status-banner,
body.browser-unsupported #telegram-login-panel,
body.browser-unsupported #login-divider,
body.browser-unsupported #key-login-details,
body.browser-unsupported #api-env-panel,
body.browser-unsupported #login-panel,
body.browser-unsupported #login-submit-btn,
body.browser-unsupported #approval-panel,
body.browser-unsupported #takeover-panel,
body.browser-unsupported #login-store-button {
  display: none !important;
}

body.browser-unsupported .login-screen .login-layout {
  grid-template-columns: 1fr !important;
  max-width: 480px !important;
  margin: 0 auto !important;
}

body.browser-unsupported .login-container {
  padding: 28px 24px !important;
  text-align: center;
}

body.browser-unsupported .login-brand-row {
  justify-content: center;
  margin-bottom: 8px;
}

body.browser-unsupported .logo-text {
  font-size: 22px;
  font-weight: 700;
}

body.browser-unsupported #unsupported-browser-panel {
  display: block !important;
  margin: 18px 0 0 !important;
  padding: 24px 20px 22px !important;
  background: linear-gradient(135deg, #ffffff 0%, #f4f7ff 100%);
  border: 1px solid #c8d6ff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(66, 133, 244, 0.14);
  text-align: center;
}

body.browser-unsupported #unsupported-browser-panel .update-required-title {
  font-size: 19px;
  font-weight: 700;
  color: #1f2937;
  gap: 10px;
  margin-bottom: 12px;
}

body.browser-unsupported #unsupported-browser-panel .update-required-title i {
  font-size: 26px;
  color: #4285f4;
}

body.browser-unsupported #unsupported-browser-panel .update-required-message {
  font-size: 14.5px;
  line-height: 1.55;
  color: #374151;
  margin: 0 auto 14px;
  max-width: 360px;
}

body.browser-unsupported #unsupported-browser-panel #unsupported-browser-detail {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 14px;
}

body.browser-unsupported #unsupported-browser-install-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #4285f4 0%, #6e8efb 60%, #a777e3 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(66, 133, 244, 0.28);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

body.browser-unsupported #unsupported-browser-install-link:hover,
body.browser-unsupported #unsupported-browser-install-link:active {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(66, 133, 244, 0.34);
}

body.browser-unsupported #unsupported-browser-install-link i {
  font-size: 18px;
}

@media (max-width: 640px) {
  body.browser-unsupported .login-container {
    padding: 20px 16px !important;
  }
  body.browser-unsupported #unsupported-browser-panel {
    padding: 20px 16px 18px !important;
  }
  body.browser-unsupported #unsupported-browser-panel .update-required-title {
    font-size: 17px;
  }
  body.browser-unsupported #unsupported-browser-install-link {
    width: 100%;
    padding: 14px 18px;
  }
}

/* ===== Account: deep-link кнопки → Telegram-бот =====
 * С Фазы 1 кабинет-эпика живут в секциях «Устройства» и «Помощь». */
.account-advanced-hint {
  margin: 8px 0 12px;
  font-size: 0.8rem;
  color: #708198;
  line-height: 1.4;
}

.account-advanced-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-advanced-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(110, 142, 251, 0.18);
  border-radius: 10px;
  color: #1f2937;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.1s;
}

.account-advanced-link:hover {
  border-color: rgba(110, 142, 251, 0.4);
  background: rgba(255, 255, 255, 0.95);
}

.account-advanced-link:active {
  transform: translateY(1px);
}

.account-advanced-link:focus-visible {
  outline: 2px solid rgba(110, 142, 251, 0.6);
  outline-offset: 2px;
}

.account-advanced-link > i:first-child {
  color: #6e8efb;
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.account-advanced-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.account-advanced-link-title {
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
}

.account-advanced-link-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.2;
}

.account-advanced-link-icon {
  color: #94a3b8;
  font-size: 12px;
  flex-shrink: 0;
}

.account-advanced-link:hover .account-advanced-link-icon {
  color: #6e8efb;
}

/* ===== Phase 7-8: Payment quote banner + watermark + dedup error ===== */

.payment-quote-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(110, 142, 251, 0.12), rgba(167, 119, 227, 0.1));
  border: 1px solid rgba(110, 142, 251, 0.25);
  font-size: 13px;
  color: #1f2937;
}

.payment-quote-banner.hidden {
  display: none;
}

.payment-quote-banner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-quote-banner-label {
  font-weight: 500;
  color: #475569;
}

.payment-quote-banner-code {
  font-family: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1f2937;
  user-select: all;
}

.payment-quote-banner-copy {
  margin-left: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(110, 142, 251, 0.4);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: #6e8efb;
  transition: background 0.2s;
}

.payment-quote-banner-copy:hover {
  background: rgba(110, 142, 251, 0.12);
}

.payment-quote-banner-timer {
  margin-left: auto;
  font-family: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 14px;
  color: #475569;
  min-width: 56px;
  text-align: right;
}

.payment-quote-banner-timer-warning {
  color: #ef4444;
  font-weight: 600;
}

.payment-quote-banner-expired-msg {
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
  font-size: 12px;
  color: #b91c1c;
  border-radius: 4px;
}

.payment-quote-banner-expired-msg.hidden {
  display: none;
}

.payment-quote-banner.payment-quote-banner-expired {
  opacity: 0.6;
}

.payment-quote-banner.payment-quote-banner-expired .payment-quote-banner-code {
  text-decoration: line-through;
}

/* Watermark overlay поверх блока реквизитов */

.payment-details-wrapper {
  position: relative;
  overflow: hidden;
}

.payment-details-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: 14px 0;
  transform: rotate(-15deg);
  transform-origin: center;
  font-family: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
  font-size: 12px;
  font-weight: 600;
  color: rgba(110, 142, 251, 0.85);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.7);
  opacity: 0.32;
  z-index: 1;
}

.payment-details-watermark.hidden {
  display: none;
}

.payment-details-watermark > span {
  display: block;
  white-space: nowrap;
  text-align: center;
  letter-spacing: 0.04em;
}

/* Dedup красная плашка (на .payment-status) */

.payment-status.payment-receipt-error {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  padding: 10px 12px;
  color: #b91c1c;
  font-weight: 500;
}

/* ===== Уведомления, состояния отправки и вход контента =====
   Общий с админ-панелью компонент тостов (gm-toast.js): поведение в JS,
   здесь только glass-скин кабинета. Движение — на существующих токенах
   --motion-spring / --motion-glide, всё выключается ниже по reduced-motion. */

.gm-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.gm-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-left: 3px solid var(--brand-start, #6e8efb);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 16px 42px rgba(31, 36, 64, 0.16),
    0 4px 14px rgba(15, 23, 42, 0.08);
  color: #1f2440;
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition:
    opacity 0.34s var(--motion-glide),
    transform 0.34s var(--motion-spring);
}

.gm-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gm-toast.is-leaving {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.24s var(--motion-glide),
    transform 0.24s var(--motion-glide);
}

.gm-toast--success {
  border-left-color: #10b981;
}

.gm-toast--error {
  border-left-color: #ef4444;
}

.gm-toast--warning {
  border-left-color: #f59e0b;
}

.gm-toast-message {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
  white-space: pre-line;
  /* Длинное название тарифа/услуги не должно распирать тост. */
  overflow-wrap: anywhere;
}

.gm-toast-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(110, 142, 251, 0.34);
  border-radius: 999px;
  background: rgba(110, 142, 251, 0.1);
  color: #4457c9;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.18s var(--motion-spring);
}

.gm-toast-action:hover {
  background: rgba(110, 142, 251, 0.18);
  transform: translateY(-1px);
}

.gm-toast-action:active {
  transform: translateY(0) scale(0.97);
}

.gm-toast-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.gm-toast-close:hover {
  background: rgba(15, 23, 42, 0.07);
  color: #1f2440;
}

.gm-toast-action:focus-visible,
.gm-toast-close:focus-visible {
  outline: 2px solid var(--brand-start, #6e8efb);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .gm-toast-stack {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }
}

/* Тач-цели крупнее на сенсорных экранах. */
@media (pointer: coarse) {
  .gm-toast-action,
  .gm-toast-close {
    min-height: 44px;
  }

  .gm-toast-close {
    width: 44px;
    height: 44px;
  }
}

/* Состояния кнопки отправки квитанции: между кликом и галочкой успеха */

.payment-submit-btn.is-loading {
  position: relative;
  padding-right: 38px;
  cursor: progress;
}

.payment-submit-btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 14px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Кнопка «Копировать»: подтверждение пружиной вместо немой подмены текста */

.gm-copy-btn.is-copied {
  animation: gmCopyPop 0.42s var(--motion-spring);
}

@keyframes gmCopyPop {
  35% {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

/* Вход контента после скелетона: ставится один раз на первый рендер
   после загрузки, повторные перерисовки списка не анимируются заново. */

.workspace-stagger > * {
  animation: cardEntrance 0.42s var(--motion-glide) backwards;
}

.workspace-stagger > *:nth-child(1) {
  animation-delay: 0.02s;
}
.workspace-stagger > *:nth-child(2) {
  animation-delay: 0.05s;
}
.workspace-stagger > *:nth-child(3) {
  animation-delay: 0.08s;
}
.workspace-stagger > *:nth-child(4) {
  animation-delay: 0.11s;
}
.workspace-stagger > *:nth-child(5) {
  animation-delay: 0.14s;
}
.workspace-stagger > *:nth-child(6) {
  animation-delay: 0.17s;
}
.workspace-stagger > *:nth-child(7) {
  animation-delay: 0.2s;
}
.workspace-stagger > *:nth-child(n + 8) {
  animation-delay: 0.23s;
}

@media (prefers-reduced-motion: reduce) {
  .gm-toast {
    transition: none;
    transform: none;
  }

  .gm-toast.is-visible,
  .gm-toast.is-leaving {
    transform: none;
  }

  .gm-toast-action:hover,
  .gm-toast-action:active {
    transform: none;
  }

  .payment-submit-btn.is-loading::after,
  .gm-copy-btn.is-copied,
  .workspace-stagger > * {
    animation: none;
  }
}

/* ===== Вход только с компьютера =====
   Кабинет рассчитан на большой экран, поэтому на тач-устройствах без мыши
   форма входа скрывается, а вместо неё показывается заглушка. Детект — по
   ТИПУ устройства, а не по ширине окна: узкое окно браузера на ПК не должно
   отрезать человеку вход. Аварийная кнопка снимает ограничение классом
   на body (workspace-login-bootstrap-runtime.js). */

.login-mobile-block {
  display: none;
}

@media (pointer: coarse) and (hover: none) {
  body:not(.login-mobile-override) .login-screen .login-layout {
    display: none;
  }

  body:not(.login-mobile-override) .login-mobile-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
  }
}

.login-mobile-card {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 16px 42px rgba(31, 36, 64, 0.18),
    0 4px 14px rgba(15, 23, 42, 0.1);
  text-align: center;
  color: #1f2440;
}

.login-mobile-icon {
  font-size: 2rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-mobile-title {
  margin: 14px 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
}

.login-mobile-text {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #4a5568;
}

.login-screen .login-mobile-continue {
  width: auto;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
  font-family: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
}

.login-screen .login-mobile-continue:hover {
  color: #1f2440;
}

.login-screen .login-mobile-continue:focus-visible {
  outline: 2px solid var(--brand-start);
  outline-offset: 2px;
}

/* Панели десктоп-входа фокус получают программно, чтобы скринридер озвучил
   смену состояния (workspace-session-runtime.js: panel.focus()). Человек туда
   не переходил, но браузер рисует фокусную рамку — тот самый синий контур
   вокруг блока. Гасим её только у этих контейнеров: они вне tab-порядка, попасть
   в них с клавиатуры нельзя, так что видимый фокус тут ничего не сообщает.
   ВАЖНО: не расширять правило на все [tabindex='-1'] — этот же атрибут стоит на
   табах с roving-фокусом (.password-auth-tab-button), там рамка обязана быть. */

.workspace-app .desktop-auth-ready:focus {
  outline: none;
}

/* Коммерческий режим браузера (body.commerce-only, ставится в bootstrap для
   сессии без приложения). Витрина, оплата и «Мои покупки» здесь работают —
   каталог намеренно выведен из-под гейта «только в приложении». А вот
   «Устройства» и «Рефералы» бьют в /v1/my/devices и /v1/referrals, которые для
   браузерной сессии закрыты (403 launcher_required): вкладки остались бы
   кнопками, показывающими ошибку. Убираем их вместе с панелями — display:none
   заодно выводит их из порядка табуляции и из дерева доступности. Активной по
   умолчанию остаётся «Подписка», поэтому пустой карточки не будет. */
body.commerce-only #account-tab-button-devices,
body.commerce-only #account-tab-devices,
body.commerce-only #account-tab-button-referrals,
body.commerce-only #account-tab-referrals {
  display: none !important;
}

/* ─── Двухшаговый вход: сначала выбор способа, потом одна форма ────────────
   Карточка входа показывала все способы разом (почта + Telegram + ключ), и при
   включённой регистрации это читалось как нагромождение, хотя человек ходит
   одним способом. Теперь шаг 1 — выбор, шаг 2 — только выбранная форма.
   Класс body.login-stepped ставит JS и ТОЛЬКО когда способов больше одного:
   при единственном способе разметка и вид остаются прежними, без лишнего клика.

   Движение — приближение пружины из kinetics (spring stiffness/damping):
   лёгкий перелёт и возврат вместо линейного ease. Одна кривая на все шаги,
   чтобы выбор и форма ощущались одним жестом. */
.login-method-chooser {
  display: grid;
  gap: 10px;
}

.login-method-chooser.hidden {
  display: none;
}

.login-method-chooser-title {
  margin: 0 0 2px;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
}

.login-screen .login-method-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--brand-start) 20%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, #ffffff 88%, var(--brand-start) 12%);
  color: #1f2937;
  text-align: left;
  cursor: pointer;
  box-shadow: color-mix(in srgb, var(--brand-start) 16%, transparent) 0 10px 16px -12px;
  transition:
    transform 0.22s var(--motion-spring),
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.login-method-tile.hidden {
  display: none;
}

.login-screen .login-method-tile:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand-start) 42%, transparent);
  background: color-mix(in srgb, #ffffff 80%, var(--brand-start) 20%);
  box-shadow: color-mix(in srgb, var(--brand-start) 26%, transparent) 0 14px 22px -12px;
}

/* Нажатие «проседает» — тактильный отклик, тот же приём, что у остальных
   кнопок карточки. */
.login-screen .login-method-tile:active {
  transform: translateY(0) scale(0.985);
}

.login-screen .login-method-tile:focus-visible {
  outline: 2px solid var(--brand-start);
  outline-offset: 2px;
}

.login-method-tile-icon {
  flex: 0 0 auto;
  width: 22px;
  color: var(--brand-start);
  font-size: 18px;
  text-align: center;
}

.login-method-tile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.login-method-tile-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.login-method-tile-hint {
  /* #64748b на светлой плитке даёт 3.96:1 — ниже порога 4.5 (поймал axe в
     ui-audit). #475569 уже в ходу по файлу и даёт ~6.3:1. */
  color: #475569;
  font-size: 12px;
  line-height: 1.25;
}

.login-method-tile-chevron {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--brand-start) 55%, transparent);
  font-size: 13px;
  transition: transform 0.22s var(--motion-spring);
}

.login-screen .login-method-tile:hover .login-method-tile-chevron {
  transform: translateX(3px);
}

/* Возврат к выбору. Намеренно негромкий: это навигация, а не действие входа. */
.login-screen .login-step-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 40px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--motion-spring);
}

.login-step-back.hidden {
  display: none;
}

.login-screen .login-step-back:hover {
  color: var(--brand-start);
  background: color-mix(in srgb, var(--brand-start) 8%, transparent);
  transform: translateX(-2px);
}

.login-screen .login-step-back:focus-visible {
  outline: 2px solid var(--brand-start);
  outline-offset: 2px;
}

/* Вход шага. Анимация висит на самих блоках, поэтому снятие .hidden
   (display:none → block) перезапускает её без участия JS. Ограничено
   body.login-stepped: одностайловый вход остаётся ровно таким, каким был. */
@keyframes loginStepIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.login-stepped .login-method-chooser:not(.hidden),
body.login-stepped #password-auth-panel:not(.hidden),
body.login-stepped #key-login-panel:not(.hidden),
body.login-stepped #login-social-actions:not(.hidden) {
  animation: loginStepIn 300ms var(--motion-spring) both;
}

/* Плитки въезжают лесенкой — взгляд читает список сверху вниз, а не разом. */
body.login-stepped .login-method-chooser:not(.hidden) .login-method-tile {
  animation: loginStepIn 320ms var(--motion-spring) both;
}
body.login-stepped .login-method-chooser:not(.hidden) .login-method-tile:nth-child(2) {
  animation-delay: 40ms;
}
body.login-stepped .login-method-chooser:not(.hidden) .login-method-tile:nth-child(3) {
  animation-delay: 80ms;
}
body.login-stepped .login-method-chooser:not(.hidden) .login-method-tile:nth-child(4) {
  animation-delay: 120ms;
}
body.login-stepped .login-method-chooser:not(.hidden) .login-method-tile:nth-child(5) {
  animation-delay: 160ms;
}

@media (prefers-reduced-motion: reduce) {
  body.login-stepped .login-method-chooser:not(.hidden),
  body.login-stepped .login-method-chooser:not(.hidden) .login-method-tile,
  body.login-stepped #password-auth-panel:not(.hidden),
  body.login-stepped #key-login-panel:not(.hidden),
  body.login-stepped #login-social-actions:not(.hidden) {
    animation: none;
  }
  .login-screen .login-method-tile,
  .login-screen .login-method-tile:hover,
  .login-screen .login-step-back:hover,
  .login-screen .login-method-tile:hover .login-method-tile-chevron {
    transform: none;
    transition: none;
  }
}

/* ─── Магазин: витрина и корзина как два вида одной страницы ───────────────
   Корзина была узкой полосой над всеми страницами: после «В корзину» на экране
   оставалось всё разом — и что лежит в корзине, и сетка тарифов, из которой
   это выбрали. Теперь корзина живёт внутри «Магазина» и заменяет собой
   витрину: выбираешь — видишь витрину, оформляешь — видишь корзину.
   Состояние одно, класс на body. */
body.store-view-cart #storefront-grid,
body.store-view-cart .storefront-currency-switcher {
  display: none;
}

/* Корзина показывается ТОЛЬКО в своём виде. Класс .hidden рантаймa (пустая
   корзина) остаётся сверху и продолжает работать как раньше. */
body:not(.store-view-cart) #cart-section {
  display: none;
}

.workspace-pager-page-store .cart-section {
  /* Корзина внутри магазина — такая же glass-поверхность, как карточки
     тарифов (.tariff-card): иначе она читается не как часть магазина, а как
     служебная полоса на фоне страницы. Внешние отступы section-container уже
     дал, свои снимаем и заменяем внутренними. */
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow: var(--shadow-card, 0 16px 42px rgba(31, 36, 64, 0.14));
  animation: cartViewIn 320ms var(--motion-spring) both;
}

@keyframes cartViewIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Шапка корзины теперь несёт три элемента: возврат, заголовок, очистка. */
.workspace-pager-page-store .cart-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.cart-back-to-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--motion-spring);
}

.cart-back-to-store:hover {
  color: var(--brand-start);
  background: color-mix(in srgb, var(--brand-start) 8%, transparent);
  transform: translateX(-2px);
}

.cart-back-to-store:focus-visible {
  outline: 2px solid var(--brand-start);
  outline-offset: 2px;
}

/* Возврат в корзину с витрины: без него, уйдя назад, попасть в корзину можно
   было бы только добавив ещё товар. */
.store-cart-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--brand-start) 26%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, #ffffff 86%, var(--brand-start) 14%);
  color: var(--brand-start);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition:
    transform 0.2s var(--motion-spring),
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.store-cart-open.hidden {
  display: none;
}

.store-cart-open:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, #ffffff 78%, var(--brand-start) 22%);
  box-shadow: color-mix(in srgb, var(--brand-start) 24%, transparent) 0 10px 18px -10px;
}

.store-cart-open:focus-visible {
  outline: 2px solid var(--brand-start);
  outline-offset: 2px;
}

.store-cart-open-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Подсказка о скидке рядом с выбором периода: скидка должна быть видна ДО
   того, как человек переключит период, иначе он не узнает, что она есть. */
.cart-discount-hint {
  color: #047857;
  font-size: 12px;
  font-weight: 650;
}

.cart-discount-hint.hidden {
  display: none;
}

@media (max-width: 640px) {
  .workspace-pager-page-store .cart-header {
    grid-template-columns: auto auto;
    row-gap: 8px;
  }
  .workspace-pager-page-store .cart-header .cart-title {
    grid-column: 1 / -1;
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-pager-page-store .cart-section {
    animation: none;
  }
  .cart-back-to-store,
  .cart-back-to-store:hover,
  .store-cart-open,
  .store-cart-open:hover {
    transform: none;
    transition: none;
  }
}

/* ═══ Kinetics: физика вместо линейных переходов ══════════════════════════
   Набор из kinetics.colorion.co, адаптированный под НАШЕ светлое стекло —
   у них значения рассчитаны на тёмные поверхности, где белый блик читается
   сам собой. У нас фон уже светлый, поэтому блик мягче, а «прогиб» сильнее:
   на светлом стекле именно масштаб, а не яркость, читается как нажатие.

   Разделение ролей, чтобы эффекты не спорили друг с другом:
   стеклянные поверхности → блик + прогиб; сплошные кнопки → squish. */

/* ─── Liquid Glass Press ──────────────────────────────────────────────────
   Блик проходит по лицу карточки при наведении, поверхность слегка проседает
   при нажатии. Требует position:relative + overflow:hidden — у карточек
   тарифов и профилей они уже есть, поэтому чужой вёрстки не трогаем. */
.tariff-card,
.desktop-screen .profile-card,
.login-screen .login-method-tile,
.workspace-pager-page-store .cart-section {
  position: relative;
  overflow: hidden;
}

.tariff-card::after,
.desktop-screen .profile-card::after,
.login-screen .login-method-tile::after,
.workspace-pager-page-store .cart-section::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Блик идёт ПОВЕРХ содержимого — в этом и смысл «specular streak across the
     face». Под содержимым его почти не видно: дочерние блоки закрывают почти
     всю карточку. Клики он не перехватывает: pointer-events:none выводит его
     из hit-testing целиком (проверено elementFromPoint по центру кнопки). */
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.tariff-card:hover::after,
.desktop-screen .profile-card:hover::after,
.login-screen .login-method-tile:hover::after,
.workspace-pager-page-store .cart-section:hover::after {
  transform: translateX(120%);
}

/* Внутренняя подсветка по верхней кромке — то, что делает стекло стеклом,
   а не просто полупрозрачным прямоугольником. */
.tariff-card,
.desktop-screen .profile-card,
.workspace-pager-page-store .cart-section {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    var(--shadow-card, 0 16px 42px rgba(31, 36, 64, 0.14));
}

.login-screen .login-method-tile:active,
.tariff-card:active {
  transform: scale(0.985);
}

/* Содержимое поднимаем над фоном карточки, но НИЖЕ блика: он должен по нему
   пройти. Клик при этом остаётся у содержимого — блик не участвует в
   hit-testing. */
.tariff-card > *,
.desktop-screen .profile-card > *,
.login-screen .login-method-tile > *,
.workspace-pager-page-store .cart-section > * {
  position: relative;
  z-index: 2;
}

/* ─── Squish: тактильный отклик сплошных кнопок ──────────────────────────
   Кнопка чуть сплющивается по вертикали и сужается — палец «продавил»
   поверхность. На стекле этого не делаем: там своя физика (выше). */
.tariff-card-buy-btn:active,
.cart-checkout-btn:not(:disabled):active,
.additional-service-add-btn:active,
.profiles-empty-connect-btn:active,
.store-cart-open:active,
.login-screen .login-telegram-btn:active,
.login-screen #password-login-submit:active,
.login-screen #key-login-submit:active {
  transform: scale(0.96, 0.92);
  transition: transform 0.09s ease-out;
}

/* ─── Pulse Badge: одиночная вспышка на изменении счётчика ────────────────
   У kinetics кольца пульсируют бесконечно — в кабинете это превратилось бы
   в мигающий раздражитель. Нам нужен ровно один импульс в момент, когда
   счётчик изменился: два кольца со сдвигом, и тишина. */
.store-cart-open-count {
  position: relative;
}

.store-cart-open-count.is-pulsing::before,
.store-cart-open-count.is-pulsing::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 2px solid var(--brand-start);
  pointer-events: none;
  animation: cartCountPulse 900ms ease-out 1 both;
}

.store-cart-open-count.is-pulsing::after {
  animation-delay: 260ms;
}

@keyframes cartCountPulse {
  from {
    transform: scale(1);
    opacity: 0.65;
  }
  to {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ─── Magnetic Button ────────────────────────────────────────────────────
   Смещение считает JS (workspace-kinetics-runtime.js), здесь только отклик.
   Коэффициент притяжения намеренно вдвое меньше исходного 0.35: аудитория
   не техническая, кнопка не должна убегать из-под курсора. */
[data-magnetic] {
  transition: transform 0.15s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .tariff-card::after,
  .desktop-screen .profile-card::after,
  .login-screen .login-method-tile::after,
  .workspace-pager-page-store .cart-section::after {
    display: none;
  }
  .tariff-card:active,
  .login-screen .login-method-tile:active,
  .tariff-card-buy-btn:active,
  .cart-checkout-btn:not(:disabled):active,
  .additional-service-add-btn:active,
  .profiles-empty-connect-btn:active,
  .store-cart-open:active,
  .login-screen .login-telegram-btn:active,
  .login-screen #password-login-submit:active,
  .login-screen #key-login-submit:active {
    transform: none;
  }
  .store-cart-open-count.is-pulsing::before,
  .store-cart-open-count.is-pulsing::after {
    animation: none;
  }
  [data-magnetic] {
    transition: none;
  }
}

/* ─── Браузер: страница профилей — это объяснение, а не пустой список ──────
   В коммерческом режиме профилей не будет никогда (их отдаёт только
   приложение), но страница продолжала выглядеть как список: заголовок
   «Доступные профили», вкладки, переключатели сетка/список, поиск, каталог.
   Человек видел органы управления списком, которого не бывает, и делал
   вывод, что список сломался. Оставляем только карточку с объяснением. */
body.commerce-only .desktop-screen #tab-profiles,
body.commerce-only .desktop-screen #tab-catalog,
body.commerce-only .desktop-screen #grid-view-btn,
body.commerce-only .desktop-screen #list-view-btn,
body.commerce-only .desktop-screen #open-download-manager-btn,
body.commerce-only .desktop-screen #profiles-summary,
body.commerce-only .desktop-screen #profile-search-input,
body.commerce-only .desktop-screen #profile-group-tabs,
body.commerce-only .desktop-screen #profiles-pagination,
body.commerce-only .desktop-screen #catalog-section {
  display: none !important;
}
