:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: rgba(16, 22, 34, 0.78);
  --panel-strong: #111827;
  --text: #f6f8ff;
  --muted: #99a4b8;
  --line: rgba(255, 255, 255, 0.12);
  --primary: #3df1c8;
  --primary-2: #7c5cff;
  --accent: #ffcc66;
  --danger: #ff6b8b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

:root.light {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --text: #101525;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.12);
  --shadow: 0 20px 60px rgba(16, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(61, 241, 200, 0.16), transparent 26%),
    radial-gradient(circle at 88% 0%, rgba(124, 92, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #080b12 0%, #111827 48%, #08111c 100%);
  color: var(--text);
}

:root.light body {
  background:
    radial-gradient(circle at 15% 8%, rgba(61, 241, 200, 0.22), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(124, 92, 255, 0.16), transparent 30%),
    linear-gradient(135deg, #f5f7fb 0%, #eef3ff 52%, #f8fafc 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.account-full .site-shell {
  width: 100%;
  max-width: none;
  padding: 0 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  margin: 0 0 28px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 18, 0.78);
  backdrop-filter: blur(18px);
}

.language-menu {
  position: relative;
  width: max-content;
  min-width: 116px;
  z-index: 30;
}

.language-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: var(--text);
  padding: 0 9px 0 10px;
  outline: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.language-trigger:hover,
.language-trigger:focus {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.language-trigger svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.language-options {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  display: none;
  width: max-content;
  min-width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 36, 45, 0.96);
  box-shadow: var(--shadow);
}

.language-menu.open .language-options {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.language-options button {
  min-height: 34px;
  width: 100%;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.language-options button:hover,
.language-options button:focus,
.language-options button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

:root.light .language-trigger {
  background: rgba(255, 255, 255, 0.72);
}

:root.light .language-trigger:hover,
:root.light .language-trigger:focus {
  background: rgba(255, 255, 255, 0.09);
}

:root.light .language-options {
  background: rgba(255, 255, 255, 0.96);
}

:root.light .language-options button:hover,
:root.light .language-options button:focus,
:root.light .language-options button[aria-selected="true"] {
  background: rgba(16, 24, 40, 0.09);
  color: var(--text);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 260px));
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.42);
  box-shadow: var(--shadow);
  margin: 0 auto;
}

.legal-page {
  min-height: calc(100vh - 260px);
}

.legal-content {
  display: grid;
  gap: 20px;
  max-width: 880px;
  padding: 44px 0 64px;
}

.legal-content .account-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links span {
  color: var(--text);
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-tools {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer-theme-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: 34px;
  min-width: 88px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.footer-theme-toggle:empty::before {
  content: attr(data-label);
}

.footer-theme-toggle .theme-toggle-text {
  display: inline;
}

.site-footer > p {
  margin: 0;
  text-align: center;
}

:root.light .topbar {
  background: rgba(255, 255, 255, 0.72);
}

:root.light .topbar-inner {
  background: rgba(255, 255, 255, 0.58);
}

.brand,
.desktop-nav,
.top-actions,
.hero-actions,
.action-row,
.extension-top,
.device-row,
.capability-list div,
.admin-header,
.table-toolbar {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark,
.app-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #061016;
  font-weight: 900;
}

.desktop-nav {
  gap: 4px;
  color: var(--muted);
  font-size: 16px;
}

.nav-item {
  position: relative;
}

.desktop-nav a,
.mobile-nav a,
.nav-login-button {
  padding: 10px 12px;
  border-radius: 8px;
}

.desktop-nav a.active,
.desktop-nav a:hover,
.mobile-nav a.active,
.mobile-nav a:hover,
.nav-login-button.active,
.nav-login-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.92);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  backdrop-filter: blur(18px);
}

:root.light .sub-menu {
  background: rgba(255, 255, 255, 0.94);
}

.sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.has-menu:hover .sub-menu,
.has-menu:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.sub-menu .nav-item {
  width: 100%;
}

.sub-menu .sub-menu {
  top: 0;
  left: calc(100% + 10px);
}

.top-actions {
  gap: 8px;
}

.member-menu {
  position: relative;
  width: 148px;
}

.nav-login-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

#navMemberLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  width: 148px;
  min-width: 148px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 18, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

:root.light .member-dropdown {
  background: rgba(255, 255, 255, 0.96);
}

.member-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.member-menu.signed-in:hover .member-dropdown,
.member-menu.signed-in:focus-within .member-dropdown {
  display: grid;
  gap: 0;
}

.dropdown-item,
.dropdown-logout {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 42px;
  width: 100%;
  white-space: nowrap;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.dropdown-item + .dropdown-logout {
  border-top: 1px solid var(--line);
}

.dropdown-item:hover,
.dropdown-logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auth-form.signed-in {
  display: none;
}

.auth-layout.account-mode {
  grid-template-columns: minmax(0, 760px);
  align-items: start;
  min-height: auto;
}

.icon-button,
.menu-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.menu-button {
  display: none;
}

.mobile-nav {
  display: none;
  margin: -12px 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.page {
  display: none;
  padding: 12px 0 72px;
}

.page.active {
  display: block;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  align-items: center;
  gap: 44px;
  min-height: clamp(560px, calc(100vh - 130px), 760px);
  max-height: 760px;
  padding: 48px 0;
  overflow: visible;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(61, 241, 200, 0.12), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(124, 92, 255, 0.14), transparent 36%),
    linear-gradient(135deg, rgba(8, 11, 18, 0.48), rgba(17, 24, 39, 0.2) 58%, transparent);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 78%, transparent 100%);
  pointer-events: none;
}

#signalCanvas {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  opacity: 0.56;
  pointer-events: none;
  z-index: 1;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 82%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
}

.hero-content,
.product-frame {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(56px, 8vw, 110px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.hero-copy,
.lead {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-copy {
  max-width: 620px;
}

.hero-actions,
.action-row {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.action-row.slim {
  margin-top: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #061016;
  font-weight: 800;
}

.button.ghost,
.button.secondary {
  background: var(--panel);
}

.button.danger {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.13);
  color: #ffb4b4;
}

.service-price {
  display: grid;
  gap: 8px;
}

.service-price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.service-price-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.service-price-item.muted,
.service-is-free .service-price-item {
  opacity: 0.52;
  filter: grayscale(1);
}

.service-is-free [data-buy-service] {
  opacity: 0.5;
  cursor: not-allowed;
}

.button.wide {
  width: 100%;
}

.hud-window,
.extension-panel,
.phone-shell,
.auth-form,
.session-card,
.admin-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hud-window {
  padding: 18px;
  transform: perspective(1000px) rotateY(-8deg) rotateX(3deg);
}

.window-head {
  display: grid;
  grid-template-columns: repeat(3, 10px) 1fr;
  align-items: center;
  gap: 8px;
  padding-bottom: 18px;
  color: var(--muted);
}

.window-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.window-head span:nth-child(2) {
  background: var(--accent);
}

.window-head span:nth-child(3) {
  background: var(--primary);
}

.hud-grid,
.feature-grid,
.admin-grid {
  display: grid;
  gap: 16px;
}

.hud-grid {
  grid-template-columns: repeat(3, 1fr);
}

.hud-grid div,
.feature-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 18px;
}

.hud-grid small,
.metric-card small {
  display: block;
  color: var(--muted);
}

.hud-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-top: 18px;
  height: 120px;
  align-items: end;
}

.signal-strip i {
  display: block;
  min-height: 28px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--primary), rgba(124, 92, 255, 0.1));
  animation: pulseBar 1.8s ease-in-out infinite;
}

.signal-strip i:nth-child(2n) {
  min-height: 76px;
  animation-delay: 0.2s;
}

.signal-strip i:nth-child(3n) {
  min-height: 105px;
  animation-delay: 0.35s;
}

@keyframes pulseBar {
  50% {
    transform: scaleY(0.72);
    opacity: 0.65;
  }
}

.section-band {
  padding: 56px 0 0;
}

.section-head {
  max-width: 720px;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-icon,
.metric-card svg {
  color: var(--primary);
}

.icon-fallback {
  display: inline-grid;
  place-items: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.7;
}

.split-layout,
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  align-items: start;
  gap: 56px;
  min-height: calc(100vh - 160px);
  padding-top: clamp(28px, 8vh, 96px);
}

.account-layout {
  display: grid;
  gap: 28px;
  width: 100%;
  margin: 0;
  min-height: calc(100vh - 160px);
  align-content: start;
  padding-top: 44px;
}

.account-full #accountPage {
  padding-top: 0;
}

.account-full .account-layout {
  gap: 24px;
  min-height: calc(100vh - 128px);
  padding-top: 24px;
}

.account-workspace {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-height: 430px;
}

.account-full .account-workspace {
  grid-template-columns: 180px minmax(0, 1fr);
}

.account-content {
  order: 2;
  min-width: 0;
  min-height: 430px;
}

.account-section {
  display: none;
}

.account-section.active {
  display: grid;
}

.account-sidebar {
  position: sticky;
  top: 112px;
  order: 1;
  display: grid;
  gap: 8px;
  width: max-content;
  min-height: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.account-full .account-sidebar {
  top: 92px;
  width: 180px;
}

.account-full .account-side-button {
  width: 100%;
}

.service-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-tab {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.service-tab.active,
.service-tab:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #061016;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.service-card h4,
.service-card p {
  margin: 0;
}

.service-card p {
  color: var(--muted);
  line-height: 1.6;
}

.service-price {
  color: var(--primary);
}

.order-history {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.order-history h4,
.ticket-history h4 {
  margin: 0;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.order-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.order-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-row em,
.ticket-row em {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 204, 102, 0.14);
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
}

.ticket-history {
  display: grid;
  gap: 10px;
}

.ticket-table {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.ticket-table-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(96px, 0.8fr) minmax(180px, 1.4fr) minmax(76px, 0.7fr) minmax(64px, 0.5fr);
  min-width: 820px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.ticket-table-row:last-child {
  border-bottom: 0;
}

.ticket-table-head {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ticket-table-row span,
.ticket-table-row strong {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-table-row strong {
  color: var(--text);
}

.ticket-table-row .ticket-problem {
  color: var(--text);
}

.ticket-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 204, 102, 0.14);
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
}

.table-action {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.table-action:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #061016;
}

.restore-action {
  margin-right: 8px;
}

.ticket-status-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
}

.ticket-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}

.ticket-images img {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.ticket-dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 8, 14, 0.7);
  backdrop-filter: blur(12px);
}

.ticket-dialog[hidden] {
  display: none;
}

.ticket-dialog-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  width: min(1120px, 100%);
  max-height: min(900px, calc(100vh - 32px));
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.ticket-dialog-head,
.ticket-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-detail,
.ticket-reply-form {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.ticket-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.ticket-detail-grid div,
.ticket-detail-block,
.ticket-reply-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.ticket-detail-grid dt,
.ticket-reply-item span {
  color: var(--muted);
  font-size: 13px;
}

.ticket-detail-grid dd,
.ticket-detail-block p,
.ticket-reply-item p {
  margin: 0;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.ticket-problem-block {
  min-height: 96px;
}

.ticket-replies-block {
  min-height: 0;
}

.ticket-reply-list {
  display: grid;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.ticket-reply-form label {
  color: var(--muted);
  font-size: 14px;
}

.ticket-reply-form textarea {
  width: 100%;
  min-height: 112px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  resize: vertical;
  outline: none;
}

.ticket-reply-form textarea:focus {
  border-color: var(--primary);
}

.forgot-password-panel {
  grid-template-rows: auto auto;
  width: min(520px, 100%);
}

.forgot-password-form {
  display: grid;
  gap: 14px;
}

.forgot-step {
  display: none;
  gap: 10px;
}

.forgot-step.active {
  display: grid;
}

.forgot-password-form label {
  color: var(--muted);
  font-size: 14px;
}

.forgot-password-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.forgot-password-form input:focus {
  border-color: var(--primary);
}

.forgot-code-tip {
  min-height: 22px;
  margin: 0;
  color: var(--primary);
  font-size: 14px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.account-side-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-width: 142px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.account-side-button.active,
.account-side-button:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #061016;
}

.account-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.account-section:not(.active) {
  display: none;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-head h3 {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px 16px;
  align-items: center;
}

.auth-layout.compact {
  min-height: calc(100vh - 190px);
}

.reverse {
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
}

.extension-panel {
  padding: 20px;
}

.product-status {
  min-height: 320px;
}

.extension-top {
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.extension-top em {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 204, 102, 0.14);
  color: var(--accent);
  font-style: normal;
  font-size: 13px;
}

.extension-body {
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.extension-body label {
  color: var(--muted);
  font-size: 13px;
}

code {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--primary);
}

.device-row,
.capability-list div {
  gap: 10px;
  color: var(--muted);
}

.phone-shell {
  position: relative;
  width: min(100%, 330px);
  margin: 0 auto;
  padding: 14px;
  border-radius: 36px;
  background: #0b0f18;
}

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 118px;
  height: 26px;
  border-radius: 999px;
  background: #020409;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-screen {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-height: 620px;
  padding: 78px 26px 28px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(61, 241, 200, 0.22), transparent 42%),
    linear-gradient(145deg, #111827, #111f34);
}

.phone-screen p {
  color: var(--muted);
}

.ios-metric {
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.ios-metric span {
  color: var(--muted);
}

.ios-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 64px;
}

.phone-screen button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #101525;
  font-weight: 800;
}

.capability-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.auth-form {
  display: grid;
  gap: 12px;
  align-self: start;
  min-height: 438px;
  padding: 24px;
}

.member-auth-fields {
  display: grid;
  gap: 12px;
}

.password-field {
  position: relative;
}

.confirm-password-field {
  display: grid;
  gap: 12px;
}

.confirm-password-field[hidden] {
  display: none;
}

.password-field input {
  padding-right: 108px;
}

.forgot-password-link {
  position: absolute;
  top: 50%;
  right: 12px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}

.forgot-password-link:hover {
  background: rgba(61, 241, 200, 0.12);
}

.member-action-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.member-action-tabs .button {
  min-height: 70px;
}

.auth-form label {
  color: var(--muted);
  font-size: 14px;
}

.auth-form input,
.auth-form select,
.account-panel input,
.account-panel select,
.account-panel textarea,
.table-toolbar input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.account-panel textarea {
  min-height: 132px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.6;
}

.ticket-form-grid {
  align-items: start;
}

.ticket-form-grid label {
  padding-top: 12px;
}

.auth-form input:focus,
.auth-form select:focus,
.account-panel input:focus,
.account-panel select:focus,
.account-panel textarea:focus,
.table-toolbar input:focus {
  border-color: var(--primary);
}

.auth-form select option,
.account-panel select option {
  background: var(--panel-strong);
}

.form-error {
  min-height: 24px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.form-success {
  min-height: 24px;
  margin: 0;
  color: var(--primary);
  font-size: 14px;
}

.session-card {
  margin-top: 26px;
  padding: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.account-card {
  margin-top: 0;
}

.session-card strong {
  color: var(--text);
}

.admin-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
}

.admin-table-wrap {
  overflow: hidden;
}

.table-toolbar {
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar h3 {
  margin: 0;
}

.table-toolbar input {
  max-width: 260px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(61, 241, 200, 0.14);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .topbar-inner {
    width: min(1180px, calc(100% - 32px));
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .mobile-nav.open {
    display: grid;
    gap: 4px;
  }

  .hero,
  .split-layout,
  .auth-layout,
  .reverse {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 24px;
  }

  .hero {
    padding-top: 24px;
    max-height: none;
  }

  .hero-copy,
  .lead {
    font-size: 17px;
    line-height: 1.65;
  }

  .hud-window {
    transform: none;
  }

  .feature-grid,
  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .account-workspace {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: static;
    order: -1;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar {
    padding: 10px 0;
  }

  .language-menu {
    width: 124px;
  }

  .topbar-inner {
    width: 100%;
    min-height: 58px;
    padding: 9px 10px;
    gap: 10px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 40px 40px;
    gap: 6px;
    flex: 0 0 auto;
  }

  .member-menu,
  .icon-button,
  .menu-button {
    width: 40px;
    height: 40px;
  }

  .member-menu {
    min-width: 40px;
  }

  .language-trigger span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-footer {
    align-items: flex-start;
  }

  .footer-tools {
    width: 100%;
    justify-content: center;
  }

  .footer-tools .language-menu {
    flex: 0 0 auto;
    width: max-content;
    max-width: none;
  }

  .footer-tools .language-trigger {
    height: 40px;
  }

  .footer-theme-toggle {
    height: 40px;
  }

  .brand {
    flex: 1 1 auto;
    font-size: 15px;
    min-width: 0;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-login-button {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  h1 {
    font-size: 42px;
    line-height: 1;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 34px;
  }

  .hud-grid,
  .feature-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .button,
  .action-row .button,
  .member-action-tabs {
    width: 100%;
  }

  .member-action-tabs {
    grid-template-columns: 1fr;
  }

  .phone-screen {
    min-height: 460px;
  }

  .hero {
    gap: 24px;
    padding: 16px 0 36px;
  }

  .hero-copy,
  .lead {
    font-size: 16px;
  }

  .hud-window,
  .account-panel,
  .metric-card,
  .feature-card,
  .service-card {
    min-width: 0;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ticket-dialog-actions {
    align-items: center;
    flex-direction: row;
  }

  .account-sidebar {
    grid-template-columns: 1fr;
  }

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

  .ticket-detail-grid {
    grid-template-columns: 1fr;
  }

  .ticket-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar input {
    max-width: none;
  }

  .admin-table-wrap {
    overflow-x: auto;
  }

  th,
  td {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .site-shell {
    width: min(100% - 16px, 1180px);
  }

  .brand-mark,
  .app-icon {
    width: 32px;
    height: 32px;
  }

  .topbar-inner {
    gap: 8px;
  }

  .language-menu {
    width: auto;
  }

  .top-actions {
    grid-template-columns: 38px 38px;
    gap: 5px;
  }

  .member-menu,
  .icon-button,
  .menu-button,
  .nav-login-button {
    width: 38px;
    height: 38px;
  }

  .member-menu {
    min-width: 38px;
  }


  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 30px;
  }

  .button {
    min-height: 44px;
    padding: 0 14px;
  }

  .order-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
