@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1f1f35;
  --accent: #e50914;
  --accent-glow: rgba(229, 9, 20, 0.3);
  --accent-hover: #ff1a26;
  --gold: #f5c518;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --border: #2a2a3e;
  --success: #2ecc71;
  --toggle-off: #3a3a50;
  --toggle-on: var(--accent);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  touch-action: pan-y;
}

a { color: var(--text-secondary); }
code { font-family: 'SFMono-Regular', Menlo, Consolas, monospace; background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 6px; font-size: 12px; }

.hero-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(229, 9, 20, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(245, 197, 24, 0.05) 0%, transparent 50%),
    var(--bg-primary);
  z-index: -1;
}

.container { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; position: relative; }
.container.narrow { max-width: 460px; }

.header { text-align: center; padding: 24px 0 20px; }
.header.cabinet-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  min-height: 56px;
}
.cabinet-header .header-actions {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.logo {
  display: block;
  max-width: 180px;
  height: auto;
  margin: 0 auto;
}
.cabinet-logo {
  margin: 0;
  max-width: 138px;
}
.login-logo {
  max-width: 176px;
  margin: 0 auto 8px;
}
.brand-title {
  font-size: 24px; font-weight: 800; letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* Card */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; margin-bottom: 16px;
  transition: border-color 0.3s;
}
.card:hover { border-color: rgba(229, 9, 20, 0.3); }
.card-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.card-title .icon { font-size: 18px; }
.card-title .icon.icon-gem {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f5c518, #e50914);
  box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.16);
}
.card-title .icon[class*="icon-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  position: relative;
}
.card-title .icon[class*="icon-"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,255,255,0.45));
}
.card-title .icon.icon-gem::before { content: none; }
.card-title .icon.icon-film::before {
  width: 10px;
  height: 7px;
  border-radius: 1px;
}
.card-title .icon.icon-settings::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.85);
}
.card-title .icon.icon-card::before {
  width: 10px;
  height: 6px;
  border-radius: 1px;
}
.card-title .icon.icon-device::before {
  width: 7px;
  height: 10px;
  border-radius: 2px;
}
.card-title .icon.icon-screen::before {
  width: 10px;
  height: 7px;
  border-radius: 1px;
}
.card-title .icon.icon-shield::before {
  width: 8px;
  height: 9px;
  border-radius: 999px 999px 4px 4px;
}
.card-title .icon.icon-broadcast::before {
  width: 10px;
  height: 7px;
  border-radius: 2px;
}
.card-title .icon.icon-proxy::before {
  width: 8px;
  height: 9px;
  border-radius: 999px 999px 4px 4px;
  transform: rotate(-8deg);
}
.card-title .icon.icon-help::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  box-shadow:
    -4px 0 0 rgba(255,255,255,0.9),
    4px 0 0 rgba(255,255,255,0.9);
}
.card-title .icon.icon-bell::before {
  width: 10px;
  height: 10px;
  border-radius: 999px 999px 6px 6px;
}

.muted { color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.card .muted { margin-bottom: 12px; }
.muted .link { color: var(--accent); text-decoration: none; font-weight: 500; }

/* Login form */
.login-form { display: flex; gap: 8px; margin-top: 16px; }
.login-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.method-btn {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.method-btn.active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(229, 9, 20, 0.16);
}
.login-panel { display: none; }
.login-panel.active { display: block; }
.login-form-email {
  margin-top: 10px;
}
.login-panel#loginEmailPanel .muted {
  margin-bottom: 8px;
}
.login-form-email .code-input {
  padding: 11px 12px;
  font-size: 15px;
  border-radius: 10px;
}
.login-form-email .code-input.small {
  font-size: 15px;
  letter-spacing: 3px;
}
.login-form-email .btn-primary {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
}
.code-input {
  flex: 1; padding: 14px 16px; border-radius: 12px; background: var(--bg-secondary);
  border: 2px solid var(--border); color: var(--text-primary); font-size: 18px;
  font-weight: 600; letter-spacing: 2px; text-transform: uppercase; text-align: center;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  transition: border-color 0.2s;
}
.code-input:focus { outline: none; border-color: var(--accent); }
.code-input.small { font-size: 16px; letter-spacing: 4px; padding: 12px; }
.code-input.email-input {
  text-transform: none;
  letter-spacing: 0;
  font-family: inherit;
  font-size: 16px;
}

.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: stretch;
}
.inline-form .code-input {
  min-width: 0;
}
.inline-form .btn-primary {
  flex-shrink: 0;
}

.btn-primary {
  padding: 14px 20px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #c31a24, #a9151e);
  color: #fff; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
  box-shadow: 0 6px 14px rgba(169, 21, 30, 0.2);
}
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  padding: 10px 16px; border-radius: 10px; background: transparent;
  border: 1px solid var(--border); color: var(--text-secondary);
  font-weight: 500; font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text-primary); }
.logout-btn {
  padding-left: 12px;
  padding-right: 12px;
}
.profile-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-btn-icon {
  position: relative;
  width: 16px;
  height: 16px;
}
.profile-btn-icon::before,
.profile-btn-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1.7px solid currentColor;
}
.profile-btn-icon::before {
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.profile-btn-icon::after {
  bottom: 0;
  width: 12px;
  height: 7px;
  border-top: 0;
  border-radius: 10px 10px 8px 8px;
}

.notif-bell-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.notif-bell-btn:hover {
  border-color: var(--accent);
  background: rgba(229, 9, 20, 0.1);
}
.notif-bell-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.45));
}

.btn-link {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  color: var(--text-primary); text-decoration: none; background: var(--bg-secondary);
  font-size: 13px; font-weight: 500; text-align: center; transition: border-color 0.2s;
}
.btn-link:hover { border-color: var(--accent); }

.status-box {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(46, 204, 113, 0.08); border: 1px solid rgba(46, 204, 113, 0.25);
  color: var(--success); font-size: 13px;
}
.error-box {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: rgba(229, 9, 20, 0.1); border: 1px solid rgba(229, 9, 20, 0.3);
  color: #ff8080; font-size: 13px;
}

.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-inline {
  width: 16px; height: 16px; border: 2px solid var(--border);
  border-top-color: currentColor; border-radius: 50%;
  animation: spin 0.8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tabs / section menu */
.tabs-shell {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.07), rgba(245, 197, 24, 0.03));
}
.tabs-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.tab {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.25s;
}
.tab.tab-wide {
  grid-column: 1 / -1;
}
.tab-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  position: relative;
}
.tab-icon::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.35));
}
.tab-icon-pro::before {
  border-radius: 3px;
  transform: rotate(45deg);
}
.tab-icon-devices::before {
  border-radius: 2px;
  width: 10px;
  height: 14px;
}
.tab-icon-vpn::before {
  border-radius: 999px 999px 8px 8px;
  width: 12px;
  height: 12px;
}
.tab-icon-iptv::before {
  width: 13px;
  height: 9px;
  border-radius: 2px;
}
.tab-icon-more::before {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  box-shadow:
    -5px 0 0 rgba(255, 255, 255, 0.9),
    5px 0 0 rgba(255, 255, 255, 0.9);
}
.tab-icon-proxy::before {
  width: 12px;
  height: 12px;
  border-radius: 999px 999px 8px 8px;
  transform: rotate(-8deg);
}
.tab-icon-help::before {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9);
}
.tab-icon-settings::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.85);
}
.tab-icon-bell::before {
  width: 12px;
  height: 12px;
  border-radius: 999px 999px 8px 8px;
}
.tab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  padding: 0 4px;
  box-shadow: 0 4px 10px rgba(229, 9, 20, 0.4);
}
.tab-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tab-main {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.tab-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}
.tab-next {
  font-size: 22px;
  line-height: 1;
  color: rgba(255,255,255,0.3);
  margin-left: 4px;
}
.tab:hover { border-color: var(--accent); color: var(--text-primary); }
.tab.active {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.26), rgba(245, 197, 24, 0.12));
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(229, 9, 20, 0.2);
}
.tab.active .tab-sub { color: rgba(255,255,255,0.82); }
.tab.active .tab-next { color: rgba(255,255,255,0.9); transform: translateX(1px); }
.tab.active .tab-icon {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
}
.tab.active .tab-main {
  animation: tabPulse 0.36s ease;
}

.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content.active,
.tab-content.tab-content-enter,
.tab-content.tab-content-leave {
  will-change: opacity, transform, filter;
}
.tab-content.tab-content-enter {
  animation: tabContentEnter 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tab-content.tab-content-leave {
  animation: tabContentLeave 0.15s ease both;
  pointer-events: none;
}

@keyframes tabContentEnter {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.988);
    filter: blur(5px);
  }
  70% {
    opacity: 1;
    transform: translateY(-1px) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes tabContentLeave {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-6px) scale(0.994);
    filter: blur(2px);
  }
}

@keyframes tabPulse {
  0% { transform: scale(0.98); }
  55% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Subscription widget */
.sub-status-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sub-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.sub-state-ok {
  border-color: rgba(46, 204, 113, 0.35);
  background: rgba(46, 204, 113, 0.08);
}
.sub-state-off {
  border-color: rgba(229, 9, 20, 0.35);
  background: rgba(229, 9, 20, 0.08);
}
.sub-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.sub-state-ok .sub-dot { background: #2ecc71; }
.sub-state-off .sub-dot { background: #e50914; }
.sub-state-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.sub-state-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.sub-state-meta-date {
  font-size: 11px;
  color: var(--text-muted);
}
.sub-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.sub-feature {
  font-size: 11.5px;
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-feature-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sub-feature-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.sub-feature-meta {
  font-size: 11px;
  color: var(--text-secondary);
}
.sub-feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

/* PRO configurator (shared with pay page) */
.period-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.period-btn {
  position: relative; padding: 14px 8px; border-radius: 12px;
  border: 2px solid var(--border); background: var(--bg-secondary);
  color: var(--text-primary); cursor: pointer; transition: all 0.3s;
  text-align: center; font-family: inherit;
}
.period-btn:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.period-btn.active {
  border-color: var(--accent); background: rgba(229, 9, 20, 0.1);
  box-shadow: 0 0 20px var(--accent-glow);
}
.period-btn .months { font-size: 22px; font-weight: 800; line-height: 1; }
.period-btn .label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

.option-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid rgba(42, 42, 62, 0.5);
}
.option-row:last-child { border-bottom: none; }
.option-info { display: flex; align-items: center; gap: 10px; }
.option-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.option-icon::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.45));
}
.option-icon-iptv::before {
  width: 14px;
  height: 10px;
  border-radius: 2px;
}
.option-icon-vpn::before {
  width: 12px;
  height: 13px;
  border-radius: 999px 999px 5px 5px;
}
.option-icon-device::before {
  width: 9px;
  height: 14px;
  border-radius: 2px;
}
.option-name { font-size: 14px; font-weight: 600; }
.option-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 12px;
  background: var(--toggle-off); cursor: pointer; transition: all 0.3s;
}
.toggle-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform 0.3s;
}
.toggle input:checked + .toggle-slider {
  background: var(--toggle-on); box-shadow: 0 0 10px var(--accent-glow);
}
.toggle input:checked + .toggle-slider::after { transform: translateX(20px); }
.toggle input:disabled + .toggle-slider { opacity: 0.6; cursor: not-allowed; }

.locked-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-muted); background: rgba(255,255,255,0.05);
  padding: 2px 8px; border-radius: 6px; margin-left: 6px; white-space: nowrap;
}

.devices-control { display: flex; align-items: center; gap: 12px; }
.dev-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-secondary); color: var(--text-primary); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-family: inherit;
}
.dev-btn:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.dev-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.dev-count { font-size: 15px; font-weight: 700; min-width: 20px; text-align: center; }

.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-secondary);
  color: var(--text-primary); cursor: pointer; transition: all 0.3s;
  font-family: inherit; font-size: 14px; font-weight: 500; width: 100%; text-align: left;
}
.pay-btn:hover { border-color: var(--accent); background: var(--bg-card-hover); transform: translateY(-1px); }
.pay-btn .pay-icon-wrap {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  padding: 0 4px;
  overflow: hidden;
}
.pay-icon-sbp { background: linear-gradient(135deg, #00b956, #009ee0); }
.pay-icon-card { background: linear-gradient(135deg, #4158d0, #c850c0); }
.pay-icon-globe { background: linear-gradient(135deg, #0052cc, #00b4d8); }
.pay-icon-stream { background: linear-gradient(135deg, #ff6b35, #f7c948); }
.pay-btn .pay-name { font-weight: 600; font-size: 14px; }
.pay-btn .pay-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pay-btn .pay-price {
  margin-left: auto; font-size: 15px; font-weight: 700;
  color: var(--gold); white-space: nowrap;
}

.summary {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.08), rgba(245, 197, 24, 0.05));
  border: 1px solid rgba(229, 9, 20, 0.2); border-radius: 16px; padding: 20px; margin-bottom: 16px;
}
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--text-secondary); }
.summary-row.total {
  padding-top: 12px; margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 18px; font-weight: 800; color: var(--text-primary);
}
.summary-val { font-weight: 600; color: var(--text-primary); }

/* Devices list */
.devices-list { display: flex; flex-direction: column; gap: 10px; }
.device-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 10px;
  gap: 10px;
}
.device-row > div:first-child {
  min-width: 0;
  flex: 1;
}
.device-row .dev-name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.device-row .dev-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.device-row .dev-meta-text {
  min-width: 0;
}
.device-row .dev-actions { display: flex; gap: 8px; flex-shrink: 0; }
.device-row .dev-actions .btn-ghost { min-width: 0; }
.dev-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dev-icon-btn::before {
  content: none;
}
.dev-icon-glyph {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
}
.dev-icon-btn-delete .dev-icon-glyph {
  font-size: 15px;
}
.chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.chip.ok { background: rgba(46,204,113,0.12); color: var(--success); }
.chip.off { background: rgba(229,9,20,0.12); color: var(--accent); }

/* VPN / IPTV link */
.copy-box {
  display: flex; gap: 8px; align-items: center;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin-top: 10px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12px;
  overflow-x: auto; word-break: break-all;
}
.copy-box code { background: transparent; padding: 0; }
.copy-btn {
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary); font-size: 11px;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.copy-btn:hover { border-color: var(--accent); color: var(--text-primary); }

.iptv-erotic-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  min-height: 58px;
}
.iptv-erotic-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.iptv-erotic-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.iptv-erotic-state {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.iptv-erotic-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-width: 110px;
}
.iptv-erotic-btn:hover {
  border-color: var(--accent);
  background: rgba(229, 9, 20, 0.12);
}
.iptv-erotic-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}
.iptv-erotic-btn.is-loading {
  background: rgba(255, 255, 255, 0.09);
}

.link-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px; margin-top: 14px;
}

.list-plain { list-style: none; padding: 0; margin-top: 10px; font-size: 13px; color: var(--text-secondary); }
.list-plain li { padding: 4px 0; }

.setup-card {
  margin-bottom: 18px;
  border-color: rgba(245, 197, 24, 0.25);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.07), rgba(229, 9, 20, 0.05));
}
.setup-list {
  margin-top: 4px;
  margin-bottom: 12px;
}
.setup-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.setup-device-grid .setup-device-wide {
  grid-column: 1 / -1;
}
.setup-warning {
  margin-top: 4px;
  margin-bottom: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 197, 24, 0.45);
  background: rgba(245, 197, 24, 0.12);
  color: #ffd978;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.proxy-card .action-btn {
  border: 1px solid rgba(46, 151, 255, 0.32);
}
.support-card {
  border-color: rgba(229, 9, 20, 0.28);
}
.support-card .action-btn {
  border: 1px solid rgba(229, 9, 20, 0.35);
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.2);
}

.kb-card {
  border-color: rgba(245, 197, 24, 0.24);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.06), rgba(229, 9, 20, 0.04));
}
.kb-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  overflow: hidden;
}
.kb-item summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.kb-item summary::-webkit-details-marker {
  display: none;
}
.kb-item summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
}
.kb-item[open] summary::after {
  content: "−";
}
.kb-answer {
  padding: 0 12px 12px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.notif-panel {
  position: absolute;
  top: 72px;
  left: 12px;
  right: auto;
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(18, 18, 26, 0.98));
  border-radius: 14px;
  padding: 12px;
  z-index: 1100;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transform-origin: top right;
}
.notif-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  left: var(--notif-arrow-left, 16px);
  width: 12px;
  height: 12px;
  background: rgba(24, 24, 34, 0.98);
  border-left: 1px solid rgba(255,255,255,0.14);
  border-top: 1px solid rgba(255,255,255,0.14);
  transform: rotate(45deg);
}
.notif-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: notifPanelIn 180ms ease-out forwards;
  pointer-events: auto;
}
.notif-panel.is-closing {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  animation: notifPanelOut 140ms ease-in forwards;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.notif-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: hidden;
  padding-right: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.notifications-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.notifications-list.is-ready {
  overflow-y: auto;
}
.notifications-list.is-loading {
  overflow: hidden;
}
.notif-loading {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.notif-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  animation: notifDotsPulse 0.9s ease-in-out infinite;
}
.notif-loading-dot:nth-child(2) {
  animation-delay: 0.12s;
}
.notif-loading-dot:nth-child(3) {
  animation-delay: 0.24s;
}
.notif-item {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  transition: border-color 0.2s, background 0.2s;
  animation: notifItemIn 240ms ease-out both;
}
.notif-item:nth-child(2) { animation-delay: 20ms; }
.notif-item:nth-child(3) { animation-delay: 40ms; }
.notif-item:nth-child(4) { animation-delay: 60ms; }
.notif-item:hover {
  border-color: rgba(229, 9, 20, 0.35);
  background: rgba(229, 9, 20, 0.08);
}
.notif-item.is-unread {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-color: rgba(229, 9, 20, 0.4);
  background: rgba(229, 9, 20, 0.08);
}
.notif-preview {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(10, 10, 15, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.notif-modal-card {
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(18, 18, 26, 0.98));
  padding: 18px 16px 14px;
  position: relative;
}
#notifModal .notif-modal-card {
  width: min(720px, 100%);
  max-height: 90vh;
  padding: 20px 18px 16px;
}
#notifModal .notif-modal-card {
  transform: translateY(8px) scale(0.985);
}
#notifModal.is-open {
  animation: notifModalFadeIn 180ms ease-out forwards;
}
#notifModal.is-open .notif-modal-card {
  animation: notifModalCardIn 220ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#notifModal.is-closing {
  animation: notifModalFadeOut 140ms ease-in forwards;
}
#notifModal.is-closing .notif-modal-card {
  animation: notifModalCardOut 140ms ease-in forwards;
}
#profileModal .profile-modal-card,
#deviceRenameModal .device-rename-modal-card {
  transform: translateY(8px) scale(0.985);
}
#profileModal.is-open,
#deviceRenameModal.is-open {
  animation: notifModalFadeIn 180ms ease-out forwards;
}
#profileModal.is-open .profile-modal-card,
#deviceRenameModal.is-open .device-rename-modal-card {
  animation: notifModalCardIn 220ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#profileModal.is-closing,
#deviceRenameModal.is-closing {
  animation: notifModalFadeOut 140ms ease-in forwards;
}
#profileModal.is-closing .profile-modal-card,
#deviceRenameModal.is-closing .device-rename-modal-card {
  animation: notifModalCardOut 140ms ease-in forwards;
}
.notif-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.notif-modal-time {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.notif-modal-text {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}
.notif-modal-text .notif-inline-link {
  color: #8bb6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.notif-modal-image-wrap {
  margin-top: 12px;
}
.notif-modal-image {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 10px;
  border: none;
}
.device-rename-modal-card {
  width: min(520px, 100%);
}
.device-rename-form {
  margin-top: 12px;
}

@keyframes notifPanelIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes notifPanelOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.98); }
}
@keyframes notifItemIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes notifDotsPulse {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-1px); }
}
@keyframes notifModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes notifModalFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes notifModalCardIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes notifModalCardOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(0.985); }
}
.profile-modal-card .card-title {
  margin-bottom: 10px;
}
#profileModal .profile-modal-card {
  max-height: none;
  overflow: visible;
}
.setup-locked-card .action-btn {
  margin-top: 10px;
}
.profile-linked-box {
  border: 1px solid rgba(46, 204, 113, 0.38);
  background: rgba(46, 204, 113, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.profile-linked-label {
  font-size: 12px;
  color: #c7f9d8;
  opacity: 0.95;
}
.profile-linked-value {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
}
.profile-form {
  margin-top: 10px;
}
.profile-status {
  margin-top: 10px;
  color: var(--text-primary);
}
.profile-status.is-error {
  background: rgba(229, 9, 20, 0.1);
  border: 1px solid rgba(229, 9, 20, 0.3);
  color: #ff9d9d;
}
.profile-status.is-ok {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #bfffd8;
}
.profile-history {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}
.profile-history-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.profile-history-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 164, 178, 0.7) transparent;
  padding-right: 4px;
}
.profile-history-list::-webkit-scrollbar {
  width: 8px;
}
.profile-history-list::-webkit-scrollbar-track {
  background: transparent;
}
.profile-history-list::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(170, 178, 192, 0.78),
    rgba(136, 145, 160, 0.72)
  );
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.profile-history-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(188, 196, 210, 0.9),
    rgba(148, 157, 172, 0.86)
  );
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.profile-history-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
}
.profile-history-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.profile-history-type {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}
.profile-history-date {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}
.profile-history-meta {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s step-end;
}
.loading-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0s linear;
}
.loading-text { color: var(--text-secondary); font-size: 14px; }

/* Smooth initial reveal of cabinet content */
body.cabinet-preloading .container {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
body.cabinet-ready .container {
  animation: cabinetPageEnter 0.28s ease-out both;
}
@keyframes cabinetPageEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error toast */
.error-toast {
  display: none; position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(229, 9, 20, 0.9); color: #fff; padding: 12px 24px;
  border-radius: 12px; font-size: 13px; font-weight: 500; z-index: 1001;
  backdrop-filter: blur(10px); max-width: 90%;
}
.error-toast.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  background: radial-gradient(circle at 50% 42%, rgba(255, 221, 87, 0.12), rgba(8, 11, 18, 0));
}
.celebration-overlay.is-visible { opacity: 1; }
.celebration-overlay.is-closing { opacity: 0; }
.celebration-card {
  max-width: min(92vw, 560px);
  text-align: center;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.22);
  background: linear-gradient(165deg, rgba(42, 30, 6, 0.86), rgba(13, 17, 28, 0.88));
  box-shadow: 0 20px 44px rgba(0,0,0,.36), 0 0 0 1px rgba(255, 215, 64, 0.12) inset;
  backdrop-filter: blur(5px);
  transform: translateY(8px) scale(.98);
  opacity: 0;
  animation: celebrationCardIn .35s cubic-bezier(.22,1,.36,1) .04s forwards;
}
.celebration-title {
  color: #fff7de;
  font-weight: 700;
  font-size: clamp(18px, 3vw, 24px);
  letter-spacing: .2px;
}
.celebration-subtitle {
  margin-top: 8px;
  color: rgba(255, 248, 228, .88);
  font-size: clamp(13px, 2vw, 15px);
}
.celebration-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.celebration-piece {
  --left: 50%;
  --delay: 0s;
  --dur: 2s;
  --drift: 0px;
  --rot: 0deg;
  --hue: 320;
  position: absolute;
  top: -20px;
  left: var(--left);
  width: 8px;
  height: 14px;
  border-radius: 3px;
  background: hsl(var(--hue) 95% 62%);
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(0deg);
  animation: celebrationFall var(--dur) ease-in var(--delay) forwards;
}
@keyframes celebrationCardIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes celebrationFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -10px, 0) rotate(0deg);
  }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), calc(100vh + 50px), 0) rotate(var(--rot));
  }
}

@media (prefers-reduced-motion: reduce) {
  .celebration-overlay,
  .celebration-card,
  .celebration-piece {
    animation: none !important;
    transition: none !important;
  }
  .celebration-overlay.is-visible {
    opacity: 1;
  }
  .celebration-card {
    opacity: 1;
    transform: none;
  }
}

.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(4px);
}
.promo-modal-card {
  position: relative;
  width: min(560px, calc(100vw - 28px));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(170deg, rgba(19, 25, 41, 0.95), rgba(10, 13, 22, 0.98));
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45);
  padding: 18px 16px 16px;
  animation: promoCardIn 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.promo-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 214, 107, 0.45);
  background: rgba(255, 214, 107, 0.12);
  color: #ffe8a7;
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 10px;
}
.email-bonus-illustration {
  width: 100%;
  margin-top: 12px;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}
.promo-title {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}
.promo-subtitle {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}
.promo-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.promo-actions .btn-primary,
.promo-actions .btn-ghost {
  flex: 1 1 220px;
}
@keyframes promoCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.footer { text-align: center; padding: 20px; color: var(--text-muted); font-size: 11px; }
.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--accent); }

@media (max-width: 620px) {
  .sub-features {
    grid-template-columns: 1fr;
  }
  .notif-modal {
    align-items: flex-start;
    padding: max(10px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }
  #notifModal .notif-modal-card {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)) - 12px);
    overflow-y: auto;
    margin: 4px auto 8px;
  }
  .tabs {
    grid-template-columns: 1fr;
  }
  .tab.tab-wide {
    grid-column: auto;
  }
  #profileModal .profile-modal-card {
    max-height: 86vh;
    overflow-y: auto;
  }
  .promo-title {
    font-size: 18px;
  }
  .inline-form {
    flex-direction: column;
  }
  .inline-form .btn-primary {
    width: 100%;
  }
  .login-form {
    flex-direction: column;
  }
  .login-form .btn-primary {
    width: 100%;
  }
  .iptv-erotic-row {
    flex-direction: column;
    align-items: stretch;
  }
  .iptv-erotic-btn {
    width: 100%;
  }
  .cabinet-header .header-actions {
    position: static;
    transform: none;
    margin-left: auto;
  }
  .header.cabinet-header { justify-content: space-between; }
  .cabinet-logo {
    margin: 0;
    max-width: 118px;
  }
  .notif-wrap .notif-panel {
    width: min(420px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }
  .setup-device-grid .setup-device-mobile-half {
    grid-column: auto;
  }
  .device-row {
    flex-direction: row;
    align-items: flex-start;
    padding: 14px 14px;
    gap: 12px;
  }
  .device-row .dev-actions {
    width: auto;
    gap: 6px;
    justify-content: flex-end;
    flex-direction: row;
    margin-left: auto;
    flex-shrink: 0;
  }
  .device-row .dev-meta {
    row-gap: 4px;
  }
  .device-row .dev-actions .btn-ghost {
    width: 36px;
    min-width: 0;
  }
  #tab-iptv .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #tab-iptv .link-grid .btn-link:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tab.tab-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tab.tab-wide {
    grid-column: 1 / -1;
  }
}
