/* Шрифт из оригинального проекта */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  --bg-shell: #05030a;
  --bg-panel: #0b0818;
  --bg-card: #120d25;
  --bg-card-soft: #17102f;
  --line: rgba(184, 130, 255, 0.24);
  --line-soft: rgba(184, 130, 255, 0.14);
  --text-main: #f5efff;
  --text-muted: #b8a7d8;
  --accent: #ae42ff;
  --accent-strong: #7e1fff;
  --accent-soft: rgba(174, 66, 255, 0.2);
  --danger: #ff5ca6;
  --warn: #c58fff;
  --ok: #56e3b0;
  margin: 0;
  min-height: 100%;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  background: #050309;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-height: 100dvh;
  color: var(--text-main);
}

/* Чекбоксы — стили и анимации как в оригинале */
input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  border-radius: 6px;
  border: 1px solid rgba(208, 96, 255, 0.48);
  background: linear-gradient(152deg, rgba(56, 20, 90, 0.92), rgba(18, 8, 31, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 4px 10px rgba(7, 3, 18, 0.45);
  display: inline-grid;
  place-items: center;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 9px 9px;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    background-size 0.18s ease,
    transform 0.18s ease;
}

input[type='checkbox']:hover {
  border-color: rgba(224, 96, 240, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(192, 80, 240, 0.14);
}

input[type='checkbox']:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 4px rgba(224, 96, 240, 0.2);
}

input[type='checkbox']:checked {
  border-color: rgba(236, 136, 255, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 3px rgba(192, 80, 240, 0.2);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4L7 11.3L12 5.8' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(138deg, rgba(186, 72, 232, 0.96), rgba(111, 43, 191, 0.96));
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: 9px 9px, 100% 100%;
}

input[type='checkbox']:active {
  transform: translateY(1px);
}

input[type='checkbox']:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

/* Плавное появление страниц */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-page {
  animation: pageFadeIn 0.4s ease-out;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 8%, rgba(126, 30, 255, 0.24), transparent 35%),
    radial-gradient(circle at 92% 94%, rgba(198, 116, 255, 0.16), transparent 45%),
    linear-gradient(165deg, #04020a 0%, #090713 45%, #110826 100%);
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.panel-page {
  animation: pageFadeIn 0.35s ease-out;
}

.bg-glow {
  position: absolute;
  pointer-events: none;
  filter: blur(80px);
}

.bg-glow-top {
  width: 420px;
  height: 420px;
  top: -150px;
  right: -100px;
  background: rgba(130, 44, 255, 0.32);
}

.bg-glow-bottom {
  width: 460px;
  height: 460px;
  left: -190px;
  bottom: -190px;
  background: rgba(198, 117, 255, 0.2);
}

.auth-shell {
  width: min(100%, 1080px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(11, 8, 24, 0.8);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.55);
}

.brand-panel {
  padding: clamp(28px, 5vw, 54px);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.brand-logo {
  width: min(280px, 90%);
  height: auto;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(130, 44, 255, 0.45));
  display: block;
}

.brand-panel h1 {
  margin: 0;
  font-size: clamp(1.85rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.auth-panel {
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form {
  width: 100%;
  max-width: 380px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.auth-form label {
  font-size: 0.92rem;
  font-weight: 500;
  color: #e8dcff;
  display: block;
  margin-bottom: 4px;
}

/* Обёртка .field для совместимости с public/login.js */
.auth-form .field {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-form .field input {
  width: 100%;
  box-sizing: border-box;
}

.auth-form .field .error {
  font-size: 0.8rem;
  color: var(--danger);
  margin: 0;
  min-height: 1.2em;
}

.auth-form input {
  border: 1px solid rgba(210, 182, 255, 0.24);
  border-radius: 13px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.95);
  color: #140f24;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input::placeholder {
  color: #6b5b8a;
}

.auth-form input:focus {
  border-color: rgba(174, 66, 255, 0.9);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.submit-btn,
.btn {
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn,
.btn,
.sidebar-nav button,
.signout-btn,
.pagination-box button,
.inline-retry,
.build-mode-tabs button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.24s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease,
    filter 0.2s ease;
}

.submit-btn::before,
.btn::before,
.sidebar-nav button::before,
.signout-btn::before,
.pagination-box button::before,
.inline-retry::before,
.build-mode-tabs button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-115%);
  transition: opacity 0.22s ease, transform 0.32s ease;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(118deg, transparent 22%, rgba(255, 255, 255, 0.2) 50%, transparent 78%);
}

.submit-btn:hover:not(:disabled),
.btn:hover:not(:disabled),
.sidebar-nav button:hover:not(:disabled),
.signout-btn:hover:not(:disabled),
.pagination-box button:hover:not(:disabled),
.inline-retry:hover:not(:disabled),
.build-mode-tabs button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(9, 4, 20, 0.45);
  filter: saturate(1.08) brightness(1.04);
}

.submit-btn:hover:not(:disabled)::before,
.btn:hover:not(:disabled)::before,
.sidebar-nav button:hover:not(:disabled)::before,
.signout-btn:hover:not(:disabled)::before,
.pagination-box button:hover:not(:disabled)::before,
.inline-retry:hover:not(:disabled)::before,
.build-mode-tabs button:hover:not(:disabled)::before {
  opacity: 0.9;
  transform: translateX(0);
}

.submit-btn:active:not(:disabled),
.btn:active:not(:disabled),
.sidebar-nav button:active:not(:disabled),
.signout-btn:active:not(:disabled),
.pagination-box button:active:not(:disabled),
.inline-retry:active:not(:disabled),
.build-mode-tabs button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(9, 4, 20, 0.35);
}

.submit-btn {
  margin-top: 8px;
  padding: 14px 20px;
  width: 100%;
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 14px 28px rgba(126, 31, 255, 0.35);
}

.panel-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 8% 10%, rgba(224, 96, 240, 0.22), transparent 34%),
    radial-gradient(circle at 88% 14%, rgba(112, 48, 192, 0.2), transparent 38%),
    radial-gradient(circle at 56% 88%, rgba(208, 96, 255, 0.15), transparent 42%),
    repeating-linear-gradient(
      104deg,
      rgba(192, 80, 240, 0.055) 0,
      rgba(192, 80, 240, 0.055) 1px,
      transparent 1px,
      transparent 56px
    ),
    linear-gradient(157deg, #06020f 0%, #0c041c 44%, #170831 100%);
  display: grid;
  grid-template-columns: 250px 1fr;
  justify-items: stretch;
  align-items: start;
  gap: 18px;
  padding: 18px;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-width: 0;
}

.panel-page > * {
  min-width: 0;
}

.panel-card {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(18, 13, 37, 0.96), rgba(11, 8, 24, 0.95));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 100%;
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  min-height: calc(100dvh - 36px);
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 6%, rgba(224, 96, 240, 0.2), transparent 38%),
    linear-gradient(185deg, rgba(30, 12, 54, 0.96), rgba(11, 8, 24, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 214, 255, 0.08),
    0 22px 40px rgba(6, 2, 15, 0.52);
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 14px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(224, 96, 240, 0.46), rgba(112, 48, 192, 0));
  pointer-events: none;
}

.sidebar::after {
  content: '';
  position: absolute;
  width: 170px;
  height: 170px;
  right: 10px;
  bottom: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 96, 240, 0.16), transparent 72%);
  pointer-events: none;
}

.sidebar-brand {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(208, 96, 255, 0.28);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(132deg, rgba(56, 16, 97, 0.54), rgba(21, 11, 39, 0.78));
  box-shadow: inset 0 1px 0 rgba(253, 220, 255, 0.07);
}

.sidebar-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(178, 66, 236, 0.45));
}

.sidebar-brand h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.sidebar-nav a,
.sidebar-nav-link {
  text-decoration: none;
  display: block;
}

.sidebar-nav a,
.sidebar-nav-link,
.sidebar-nav button,
.signout-btn {
  width: 100%;
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 12px;
  padding: 11px 12px;
  background: linear-gradient(140deg, rgba(33, 14, 56, 0.75), rgba(15, 10, 29, 0.84));
  color: #d8bdee;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.2;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 232, 255, 0.05);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-nav-link:hover,
.sidebar-nav a:hover,
.sidebar-nav button:hover,
.signout-btn:hover {
  color: #fff4ff;
  border-color: rgba(224, 96, 240, 0.48);
  box-shadow: 0 12px 24px rgba(73, 22, 120, 0.34);
}

.sidebar-nav a.active,
.sidebar-nav button.active {
  color: #fff8ff;
  border-color: rgba(224, 96, 240, 0.62);
  background:
    linear-gradient(135deg, rgba(192, 80, 240, 0.58), rgba(112, 48, 192, 0.62));
  box-shadow:
    inset 0 0 0 1px rgba(250, 214, 255, 0.08),
    0 12px 24px rgba(65, 17, 108, 0.34);
}

.signout-btn {
  position: relative;
  z-index: 1;
  margin-top: auto;
  border-color: rgba(230, 116, 198, 0.32);
  background: linear-gradient(140deg, rgba(70, 18, 74, 0.64), rgba(26, 11, 38, 0.88));
  color: #f8d8ee;
}

.signout-btn:hover {
  border-color: rgba(241, 132, 214, 0.46);
  box-shadow: 0 12px 24px rgba(74, 20, 76, 0.34);
}

.workspace {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-width: 0;
  justify-self: stretch;
}

.workspace > * {
  min-width: 0;
}

.workspace-head {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.workspace-head h1 {
  margin: 0;
  font-size: 1.7rem;
}

.workspace-head p {
  margin: 2px 0 0;
  color: var(--text-muted);
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.country-card,
.stats-card,
.country-map-card,
.logs-card,
.build-card {
  padding: 16px;
  min-width: 0;
}

.country-card {
  padding: 0;
  overflow: hidden;
  display: grid;
  background:
    radial-gradient(circle at 4% 0%, rgba(224, 96, 240, 0.2), transparent 36%),
    linear-gradient(170deg, rgba(20, 8, 38, 0.97), rgba(10, 6, 22, 0.97));
}

.country-card-head {
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.24);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  background: linear-gradient(140deg, rgba(52, 16, 90, 0.58), rgba(24, 12, 46, 0.42));
}

.country-card-head h3,
.stats-head h3,
.country-map-head h3,
.logs-head h3,
.build-card-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
}

.country-card-head p {
  margin: 4px 0 0;
  color: #d2b1f2;
  font-size: 0.8rem;
}

.country-head-badge {
  border: 1px solid rgba(224, 96, 240, 0.48);
  border-radius: 999px;
  padding: 4px 10px;
  color: #ffd2ff;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(192, 80, 240, 0.2);
  white-space: nowrap;
}

button.country-head-badge {
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

button.country-head-badge:hover {
  background: rgba(224, 96, 240, 0.32);
  border-color: rgba(224, 96, 240, 0.65);
}

.country-table-wrap {
  overflow: auto;
  padding: 8px 12px 14px;
}

.country-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 620px;
}

.country-table th,
.country-table td {
  padding: 11px 12px;
  border: 0;
  text-align: left;
  font-size: 0.86rem;
}

.country-table th {
  color: #d2a9f8;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px 4px;
}

.country-table td {
  background: linear-gradient(138deg, rgba(42, 16, 70, 0.74), rgba(20, 10, 36, 0.7));
}

.country-table tbody tr td:first-child {
  border-radius: 12px 0 0 12px;
}

.country-table tbody tr td:last-child {
  border-radius: 0 12px 12px 0;
}

.country-table tbody tr:hover td {
  background: linear-gradient(138deg, rgba(66, 28, 108, 0.82), rgba(35, 16, 59, 0.78));
}

.country-rank {
  color: #f3b8ff;
  font-weight: 600;
  white-space: nowrap;
}

.country-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  border: 1px solid rgba(224, 96, 240, 0.54);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffe8ff;
  background: linear-gradient(135deg, rgba(192, 80, 240, 0.52), rgba(96, 16, 144, 0.56));
}

.country-volume {
  width: 42%;
  min-width: 210px;
}

.country-volume-track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(160, 88, 218, 0.28);
  overflow: hidden;
}

.country-volume-fill {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: inherit;
  background: linear-gradient(90deg, #9030d0, #c050f0 52%, #e060f0 100%);
  box-shadow: 0 0 14px rgba(198, 80, 240, 0.48);
}

.country-logs {
  text-align: right;
  font-weight: 700;
  color: #f8f2ff;
}

.table-meta {
  text-align: center;
  color: var(--text-muted);
  padding-block: 18px;
}

.table-meta.error {
  color: #ff99c7;
}

.inline-retry {
  margin-left: 10px;
  border: 1px solid rgba(255, 153, 199, 0.36);
  border-radius: 8px;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.76rem;
  color: #ffd0e6;
  background: rgba(255, 92, 166, 0.14);
  cursor: pointer;
}

.inline-retry:hover {
  border-color: rgba(255, 153, 199, 0.5);
  box-shadow: 0 10px 18px rgba(84, 26, 60, 0.35);
}

.country-table-footer {
  border-top: 1px solid rgba(208, 96, 255, 0.2);
  padding: 12px 14px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(34, 11, 58, 0.4), rgba(12, 8, 28, 0.84));
}

.entries-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.entries-box select,
.pagination-box button {
  border: 1px solid rgba(171, 129, 246, 0.28);
  border-radius: 7px;
  padding: 5px 10px;
  background: rgba(20, 14, 37, 0.9);
  color: #e4caff;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.entries-box select {
  min-width: 58px;
  appearance: none;
}

.pagination-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagination-box button:disabled,
.entries-box select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pagination-box button.active {
  background: linear-gradient(140deg, #bf86ff, #8f4ff4);
  border-color: rgba(191, 134, 255, 0.65);
  color: #f8f1ff;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(95, 45, 171, 0.35);
}

.country-table-footer .entries-box {
  color: #d9b9f5;
}

.country-table-footer .entries-box select,
.country-table-footer .pagination-box button {
  border-color: rgba(208, 96, 255, 0.36);
  background: rgba(34, 13, 54, 0.9);
  color: #f2d8ff;
}

.country-table-footer .pagination-box button.active {
  background: linear-gradient(138deg, #9030d0, #e060f0);
  border-color: rgba(224, 96, 240, 0.62);
  color: #fff5ff;
  box-shadow: 0 10px 20px rgba(96, 16, 144, 0.42);
}

.country-total-pill {
  border: 1px solid rgba(224, 96, 240, 0.4);
  border-radius: 999px;
  padding: 3px 9px;
  color: #ffd2ff;
  font-size: 0.7rem;
  background: rgba(192, 80, 240, 0.18);
}

.stats-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 8%, rgba(224, 96, 240, 0.24), transparent 34%),
    radial-gradient(circle at 88% 94%, rgba(112, 48, 192, 0.24), transparent 40%),
    linear-gradient(160deg, rgba(30, 12, 52, 0.95), rgba(18, 10, 34, 0.97));
}

.stats-card::after {
  content: '';
  position: absolute;
  inset: auto -90px -140px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(224, 96, 240, 0.2), transparent 70%);
}

.stats-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.stats-head-chip {
  border: 1px solid rgba(224, 96, 240, 0.5);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd9ff;
  background: rgba(192, 80, 240, 0.2);
  white-space: nowrap;
}

.stats-head p,
.country-map-head p,
.logs-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.stats-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-row {
  border: 1px solid rgba(208, 96, 255, 0.26);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(44, 16, 74, 0.82), rgba(20, 10, 36, 0.88));
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 128px;
  position: relative;
  overflow: hidden;
}

.stats-row::after {
  content: '';
  position: absolute;
  width: 95px;
  height: 95px;
  top: -28px;
  right: -36px;
  border-radius: 50%;
  background: rgba(224, 96, 240, 0.2);
  pointer-events: none;
}

.stats-row:nth-child(2)::after {
  background: rgba(208, 96, 255, 0.2);
}

.stats-row:nth-child(3)::after {
  background: rgba(144, 48, 208, 0.24);
}

.stats-row:nth-child(4)::after {
  background: rgba(192, 80, 240, 0.22);
}

.stats-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stats-row-top strong {
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #f0c9ff;
  font-weight: 600;
}

.stats-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(224, 96, 240, 0.52);
  background: rgba(160, 50, 220, 0.22);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.stats-icon svg {
  width: 18px;
  height: 18px;
  fill: #ffdfff;
}

.stats-row b {
  font-size: 1.44rem;
  font-weight: 700;
  color: #f5efff;
  line-height: 1;
}

.stats-row small {
  color: #d6b4f0;
  font-size: 0.76rem;
}

.country-map-card {
  margin-top: 0;
  padding: 18px;
  background:
    radial-gradient(circle at 6% 10%, rgba(224, 96, 240, 0.2), transparent 36%),
    radial-gradient(circle at 92% 88%, rgba(112, 48, 192, 0.2), transparent 42%),
    linear-gradient(160deg, rgba(30, 12, 54, 0.95), rgba(12, 8, 25, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 214, 255, 0.08),
    0 20px 36px rgba(5, 2, 13, 0.44);
}

.country-map-head {
  margin-bottom: 14px;
}

.country-map-head p {
  color: #d4b0f4;
}

.country-map-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(208, 96, 255, 0.28);
  border-radius: 16px;
  min-height: 320px;
  user-select: none;
  touch-action: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 228, 255, 0.04),
    inset 0 -30px 70px rgba(10, 6, 24, 0.7);
  background:
    radial-gradient(circle at 20% 15%, rgba(224, 96, 240, 0.16), transparent 44%),
    radial-gradient(circle at 82% 80%, rgba(112, 48, 192, 0.22), transparent 42%),
    linear-gradient(165deg, rgba(22, 12, 42, 0.95), rgba(8, 6, 19, 0.99));
}

.country-map-viewport {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0.66;
  filter: saturate(0.5) brightness(1.85) contrast(1.03) hue-rotate(-10deg);
}

.map-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(48, 22, 76, 0.05), rgba(10, 7, 24, 0.24)),
    repeating-linear-gradient(
      0deg,
      rgba(186, 106, 242, 0.08) 0,
      rgba(186, 106, 242, 0.08) 1px,
      transparent 1px,
      transparent 42px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(186, 106, 242, 0.12) 0,
      rgba(186, 106, 242, 0.12) 1px,
      transparent 1px,
      transparent 44px
    );
}

#map-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#map-dots .map-dot {
  pointer-events: auto;
}

.map-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(250, 208, 255, 0.88);
  background: radial-gradient(circle, rgba(224, 96, 240, 0.86), rgba(112, 48, 192, 0.36));
  box-shadow:
    0 0 0 4px rgba(192, 80, 240, 0.2),
    0 0 12px rgba(208, 96, 255, 0.64);
  display: grid;
  place-items: center;
  animation: map-pulse 2.8s ease-in-out infinite;
}

.map-dot span {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 5px rgba(37, 8, 58, 0.7);
}

@keyframes map-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 4px rgba(192, 80, 240, 0.15),
      0 0 10px rgba(208, 96, 255, 0.56);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(224, 96, 240, 0.22),
      0 0 16px rgba(224, 96, 240, 0.76);
  }
}

.map-tooltip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(224, 96, 240, 0.56);
  border-radius: 10px;
  background: rgba(34, 14, 59, 0.94);
  box-shadow: 0 12px 26px rgba(10, 4, 21, 0.52);
  color: #feefff;
  padding: 6px 9px;
  display: grid;
  gap: 2px;
  min-width: 120px;
}

.map-tooltip strong {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.map-tooltip span {
  font-size: 0.74rem;
  color: #ebc8ff;
}

.logs-shell {
  display: grid;
  gap: 16px;
}

.logs-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.46fr) minmax(330px, 0.84fr);
  gap: 14px;
  align-items: start;
}

.logs-search-card {
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 7% 8%, rgba(224, 96, 240, 0.2), transparent 38%),
    linear-gradient(160deg, rgba(30, 12, 54, 0.95), rgba(11, 8, 24, 0.98));
}

.logs-search-head {
  display: grid;
  gap: 6px;
}

.logs-search-head h3 {
  margin: 0;
  font-size: 1.04rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.logs-search-head p {
  margin: 0;
  color: #d8b8f3;
  font-size: 0.82rem;
}

.logs-search-head::after {
  content: '';
  width: 40px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e060f0, #9030d0);
}

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

.logs-input-wide {
  grid-column: 1 / -1;
}

.logs-metric-card {
  border: 1px solid rgba(208, 96, 255, 0.26);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(46, 17, 76, 0.82), rgba(19, 10, 35, 0.92));
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 98px;
  position: relative;
  overflow: hidden;
}

.logs-metric-card::after {
  content: '';
  position: absolute;
  width: 98px;
  height: 98px;
  top: -36px;
  right: -34px;
  border-radius: 50%;
  background: rgba(192, 80, 240, 0.22);
  pointer-events: none;
}

.logs-metric-card:nth-child(2)::after {
  background: rgba(144, 48, 208, 0.26);
}

.logs-metric-card:nth-child(3)::after {
  background: rgba(224, 96, 240, 0.24);
}

.logs-metric-card:nth-child(4)::after {
  background: rgba(112, 48, 192, 0.26);
}

.logs-metric-card span {
  color: #d7b8f2;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.logs-metric-card strong {
  font-size: 1.86rem;
  line-height: 1;
  color: #f3d6ff;
}

.logs-search-grid input,
.build-form input:not([type='checkbox']),
.build-form select,
.build-form textarea,
.clickfix-add-form input,
.restore-cookies-form input,
.restore-cookies-form textarea,
.seeds-toolbar input,
.profile-pane input,
.profile-pane textarea {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 12px;
  background: rgba(26, 11, 46, 0.88);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.logs-search-grid input:focus,
.build-form input:not([type='checkbox']):focus,
.build-form select:focus,
.build-form textarea:focus,
.clickfix-add-form input:focus,
.restore-cookies-form input:focus,
.restore-cookies-form textarea:focus,
.seeds-toolbar input:focus,
.profile-pane input:focus,
.profile-pane textarea:focus {
  border-color: rgba(224, 96, 240, 0.72);
  box-shadow: 0 0 0 4px rgba(192, 80, 240, 0.18);
}

.logs-filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(208, 96, 255, 0.18);
}

.logs-filter-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e3ccf7;
  font-size: 0.84rem;
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(56, 20, 90, 0.5), rgba(22, 10, 38, 0.78));
  padding: 8px 10px;
}

.select-all-item,
.check-row,
.build-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e3ccf7;
  font-size: 0.86rem;
}

.logs-filter-row input,
.select-all-item input,
.check-col input,
.check-row input,
.build-check input {
  margin: 0;
  flex: 0 0 auto;
}

.logs-bulk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(208, 96, 255, 0.18);
}

.logs-main-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(208, 96, 255, 0.18);
}

.logs-inline-notice {
  margin: 0;
  border: 1px solid rgba(224, 96, 240, 0.32);
  border-radius: 10px;
  background: rgba(80, 24, 105, 0.34);
  color: #f4d6ff;
  padding: 9px 10px;
  font-size: 0.8rem;
}

.logs-side-stack {
  display: grid;
  gap: 14px;
}

.logs-metrics-panel {
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 90% 12%, rgba(224, 96, 240, 0.2), transparent 36%),
    linear-gradient(162deg, rgba(28, 11, 49, 0.94), rgba(12, 8, 24, 0.97));
}

.logs-metrics-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.logs-metrics-head h3 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logs-metrics-head span {
  border: 1px solid rgba(224, 96, 240, 0.44);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #ffd7ff;
  background: rgba(192, 80, 240, 0.2);
}

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

.logs-bulk-card {
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 6% 10%, rgba(112, 48, 192, 0.24), transparent 34%),
    linear-gradient(160deg, rgba(25, 10, 44, 0.95), rgba(11, 8, 23, 0.97));
}

.logs-bulk-head h4 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logs-bulk-head p {
  margin: 4px 0 0;
  color: #cfafea;
  font-size: 0.8rem;
}

.logs-bulk-row .select-all-item {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 42px;
  background: linear-gradient(140deg, rgba(52, 18, 86, 0.46), rgba(20, 10, 36, 0.78));
}

.logs-data-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background: linear-gradient(160deg, rgba(24, 10, 42, 0.96), rgba(9, 7, 19, 0.99));
}

.logs-data-head {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
  background: linear-gradient(145deg, rgba(58, 18, 97, 0.48), rgba(17, 10, 31, 0.76));
}

.logs-data-head .entries-box {
  color: #e4c8f7;
}

.logs-data-head .entries-box select,
.logs-data-head .pagination-box button {
  border-color: rgba(208, 96, 255, 0.34);
  background: rgba(33, 13, 52, 0.9);
  color: #f3ddff;
}

.logs-data-head .pagination-box button.active {
  background: linear-gradient(138deg, #9030d0, #e060f0);
  border-color: rgba(224, 96, 240, 0.62);
  color: #fff6ff;
  box-shadow: 0 10px 20px rgba(96, 16, 144, 0.42);
}

.logs-bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logs-bulk-actions .btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  letter-spacing: 0.02em;
}
.logs-bulk-actions .btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.logs-bulk-actions .btn:not(:disabled):active {
  transform: translateY(0);
}
.logs-bulk-actions .btn-download {
  background: linear-gradient(135deg, #5b4fc9 0%, #7a6fff 50%, #6b5ce7 100%);
  border-color: rgba(122, 111, 255, 0.4);
  color: #fff;
  box-shadow: 0 2px 8px rgba(91, 79, 201, 0.35);
}
.logs-bulk-actions .btn-download:hover:not(:disabled) {
  background: linear-gradient(135deg, #6b5ce7 0%, #8b7fff 50%, #7a6fff 100%);
  border-color: rgba(139, 127, 255, 0.5);
  box-shadow: 0 4px 16px rgba(91, 79, 201, 0.45);
}
.logs-bulk-actions .btn-delete {
  background: linear-gradient(135deg, #c92a4a 0%, #e04a7a 50%, #d63d6a 100%);
  border-color: rgba(224, 74, 122, 0.4);
  color: #fff;
  box-shadow: 0 2px 8px rgba(201, 42, 74, 0.35);
}
.logs-bulk-actions .btn-delete:hover:not(:disabled) {
  background: linear-gradient(135deg, #d63d6a 0%, #e85a88 50%, #e04a7a 100%);
  border-color: rgba(232, 90, 136, 0.5);
  box-shadow: 0 4px 16px rgba(201, 42, 74, 0.45);
}
.logs-bulk-actions .btn-download::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 6px;
  vertical-align: -0.2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4'/%3E%3C/svg%3E") center/contain no-repeat;
}
.logs-bulk-actions .btn-delete::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 6px;
  vertical-align: -0.2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'/%3E%3C/svg%3E") center/contain no-repeat;
}
.logs-bulk-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: saturate(0.6);
}
.logs-bulk-actions .btn:disabled::before {
  opacity: 0.8;
}

.logs-data-foot {
  padding: 12px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid rgba(208, 96, 255, 0.2);
  background: linear-gradient(145deg, rgba(58, 18, 97, 0.48), rgba(17, 10, 31, 0.76));
}

.logs-data-foot .pagination-box button {
  border-color: rgba(208, 96, 255, 0.34);
  background: rgba(33, 13, 52, 0.9);
  color: #f3ddff;
}

.logs-data-foot .pagination-box button.active {
  background: linear-gradient(138deg, #9030d0, #e060f0);
  border-color: rgba(224, 96, 240, 0.62);
  color: #fff6ff;
  box-shadow: 0 10px 20px rgba(96, 16, 144, 0.42);
}

.logs-data-card .table-wrap {
  border: none;
  border-radius: 0;
}

.btn.violet {
  color: #efe4ff;
  border: 1px solid rgba(174, 66, 255, 0.3);
  background: linear-gradient(135deg, rgba(126, 31, 255, 0.45), rgba(174, 66, 255, 0.38));
}

.btn.danger {
  color: #ffd4e7;
  border: 1px solid rgba(255, 92, 166, 0.34);
  background: linear-gradient(135deg, rgba(255, 92, 166, 0.34), rgba(255, 92, 166, 0.2));
}

.logs-search-btn {
  color: #fff;
  background: linear-gradient(135deg, #c58fff, #8d44f7);
  box-shadow: 0 10px 20px rgba(126, 31, 255, 0.28);
}

.logs-shell .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.ghost {
  background: rgba(20, 14, 37, 0.95);
  border: 1px solid var(--line-soft);
  color: var(--text-main);
}

.btn.accent {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 10px 22px rgba(126, 31, 255, 0.32);
}

.btn.tiny {
  padding: 8px 10px;
  font-size: 0.8rem;
  border: 1px solid var(--line-soft);
  background: rgba(24, 17, 41, 0.95);
  color: #e6d2ff;
}

.table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: auto;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

.logs-table th,
.logs-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 10px;
  text-align: left;
  font-size: 0.86rem;
}

.logs-table-modern th {
  background: rgba(13, 9, 28, 0.9);
}

.logs-table-modern th,
.logs-table-modern td {
  vertical-align: middle;
}

.logs-table-modern th {
  white-space: nowrap;
}

.logs-table-modern td {
  height: 56px;
}

.logs-table th {
  color: var(--text-muted);
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.logs-table-modern tbody tr:nth-child(even) {
  background: rgba(23, 16, 47, 0.35);
}

.logs-table-modern tbody tr:hover {
  background: rgba(174, 66, 255, 0.1);
}

.logs-table-modern .check-col {
  width: 44px;
  text-align: center !important;
  padding-inline: 8px;
}

.logs-table-modern .check-col input {
  display: block;
  margin-inline: auto;
}

.logs-table-modern .col-date {
  width: 190px;
}

.logs-table-modern .col-ip {
  width: 180px;
}

.logs-table-modern .col-country {
  width: 150px;
}

.logs-table-modern .col-build {
  width: 120px;
}

.logs-table-modern .col-pass,
.logs-table-modern .col-cookies,
.logs-table-modern .col-wallets {
  width: 110px;
  text-align: center;
}

.logs-table-modern .col-services {
  min-width: 190px;
}

.logs-table-modern .col-actions {
  width: 120px;
  text-align: center;
}

.country-cell,
.country-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.country-flag,
.logs-table .country-cell img.flag,
.logs-table .country-info img.flag {
  width: 18px;
  height: 13px;
  border-radius: 3px;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.logs-table .country-cell .flag-emoji,
.logs-table .country-info .flag-emoji {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
}

.country-code {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logs-table-modern .col-actions .btn.tiny {
  min-width: 82px;
}

/* Бейджи и ячейки таблицы логов (совместимость с public/logs.js) */
.logs-table .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.logs-table .badge-red {
  background: linear-gradient(135deg, rgba(255, 92, 166, 0.35), rgba(200, 50, 120, 0.4));
  border: 1px solid rgba(255, 92, 166, 0.5);
  color: #ffcce0;
}

.logs-table .badge-green {
  background: linear-gradient(135deg, rgba(86, 227, 176, 0.3), rgba(50, 180, 140, 0.35));
  border: 1px solid rgba(86, 227, 176, 0.5);
  color: #b8f5e0;
}

.logs-table .filter-indicator {
  display: inline-block;
  position: relative;
}

.logs-table .wallet-status,
.logs-table .wallet-status-yes,
.logs-table .wallet-status-no {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
}

.logs-table .wallet-status-no {
  background: rgba(255, 92, 166, 0.18);
  color: var(--danger);
  border-color: rgba(255, 92, 166, 0.35);
}

.logs-table .wallet-status-yes {
  background: rgba(86, 227, 176, 0.2);
  color: var(--ok);
  border-color: rgba(86, 227, 176, 0.35);
}

.logs-table .build-tag {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(174, 66, 255, 0.2);
  color: #e8c4ff;
  font-size: 0.8rem;
}

.logs-table .no-data {
  color: var(--text-muted);
}

.logs-table .ip-link {
  color: #7eb8ff;
  text-decoration: none;
}

.logs-table .ip-link:hover {
  text-decoration: underline;
}

/* Блок сервисов в таблице логов — фиксированный размер иконок, без «разъехавшейся» ячейки */
.logs-table .services-cell {
  vertical-align: middle;
  max-width: 220px;
}

.logs-table .services-block {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.logs-table .services-grid {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 6px;
  background: rgba(23, 16, 47, 0.5);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  max-width: 100%;
  overflow: hidden;
  align-items: center;
}

.logs-table .service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  max-width: 22px;
  max-height: 22px;
  border-radius: 4px;
  background: rgba(40, 28, 70, 0.6);
  border: 1px solid rgba(184, 130, 255, 0.2);
  padding: 2px;
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.logs-table .service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 2px;
  background: rgba(30, 20, 50, 0.5);
}

/* Сломанная иконка не растягивает ячейку */
.logs-table .service-icon img[src=""],
.logs-table .service-icon img:not([src]) {
  visibility: hidden;
}

.logs-table .service-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  flex-shrink: 0;
  border-radius: 4px;
  background: rgba(40, 28, 70, 0.6);
  border: 1px dashed rgba(184, 130, 255, 0.3);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
}

/* Тултипы в ячейках — по умолчанию скрыты, показываются скриптом в body как попап */
.logs-table .services-tooltip,
.logs-table .filter-tooltip,
.logs-table .wallet-tooltip {
  display: none !important;
}

/* Внешний вид попапа «Найденные сервисы» (и других тултипов) при показе в body */
.services-tooltip,
.filter-tooltip,
.wallet-tooltip {
  min-width: 180px;
  max-width: 320px;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(184, 130, 255, 0.08);
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.services-tooltip-content,
.filter-tooltip-content,
.wallet-tooltip-content {
  padding: 10px 12px;
}

.services-tooltip-title,
.filter-tooltip-title,
.wallet-tooltip-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.services-tooltip-list,
.filter-tooltip-list,
.wallet-tooltip-list {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-main);
  word-break: break-word;
}

.services-tooltip-list .service-name,
.filter-tooltip-list .wallet-name {
  margin-right: 2px;
}

/* Список паролей/куки в тултипе — каждый пункт отдельной строкой, без «текста на тексте» */
.filter-tooltip-list {
  max-width: 340px;
  max-height: 320px;
  overflow-y: auto;
}

.filter-tooltip-list .filter-group {
  margin-bottom: 12px;
}

.filter-tooltip-list .filter-group:last-child {
  margin-bottom: 0;
}

.filter-tooltip-list .filter-service-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(179, 102, 255, 0.9);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.15);
}

.filter-tooltip-list .filter-item-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: rgba(208, 96, 255, 0.06);
  border-radius: 6px;
  border-left: 3px solid rgba(179, 102, 255, 0.4);
  font-size: 0.8rem;
  line-height: 1.35;
}

.filter-tooltip-list .filter-item-line:last-child {
  margin-bottom: 0;
}

.filter-tooltip-list .filter-item-domain {
  color: #e6d5ff;
  font-weight: 500;
  word-break: break-all;
}

.filter-tooltip-list .filter-item-login {
  color: var(--text-muted);
  font-size: 0.75rem;
  word-break: break-all;
}

.filter-tooltip-list .filter-more {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.filter-tooltip-list .filter-show-all {
  margin-top: 12px;
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid rgba(208, 96, 255, 0.15);
}

.filter-tooltip-list .btn-show-all {
  background: rgba(179, 102, 255, 0.35);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s;
}

.filter-tooltip-list .btn-show-all:hover {
  background: rgba(179, 102, 255, 0.55);
}

/* ------ Кнопки и выпадающее меню в колонке ACTIONS ------ */
.logs-table .action-menu-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.logs-table .action-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  background: rgba(40, 28, 70, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.logs-table .action-menu-btn:hover {
  background: rgba(184, 130, 255, 0.15);
  border-color: rgba(184, 130, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(184, 130, 255, 0.12);
}

.logs-table .action-menu-icon {
  font-size: 1rem;
  line-height: 1;
}

.logs-table .action-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: auto;
  right: 0;
  margin-top: 4px;
  min-width: 160px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.logs-table .action-menu-dropdown.open-up {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 4px;
}

.logs-table .action-menu-dropdown.action-menu-dropdown-fixed.open-up {
  margin-bottom: 0;
}

.logs-table .action-menu-dropdown.active {
  display: block;
}

.logs-table .action-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.logs-table .action-menu-item:hover {
  background: rgba(184, 130, 255, 0.12);
}

.logs-table .action-menu-item .action-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.logs-table .action-menu-item-danger:hover {
  background: rgba(255, 92, 166, 0.15);
  color: var(--danger);
}

/* Стили для выпадающего меню, когда оно перенесено в body (не внутри .logs-table) */
.action-menu-dropdown-fixed.active {
  display: block;
  position: fixed;
  min-width: 160px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.action-menu-dropdown-fixed .action-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.action-menu-dropdown-fixed .action-menu-item:hover {
  background: rgba(184, 130, 255, 0.12);
}

.action-menu-dropdown-fixed .action-menu-item .action-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.action-menu-dropdown-fixed .action-menu-item-danger:hover {
  background: rgba(255, 92, 166, 0.15);
  color: var(--danger);
}

.build-pill {
  border: 1px solid rgba(193, 144, 255, 0.35);
  border-radius: 999px;
  background: rgba(171, 129, 246, 0.2);
  color: #e5caff;
  padding: 3px 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.table-chip {
  border-radius: 8px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chip-passwords {
  border: 1px solid rgba(255, 92, 166, 0.34);
  background: rgba(255, 92, 166, 0.2);
  color: #ffabd0;
}

.chip-cookies {
  border: 1px solid rgba(86, 227, 176, 0.34);
  background: rgba(86, 227, 176, 0.2);
  color: #94f1d0;
}

.wallet-pill {
  border-radius: 8px;
  border: 1px solid rgba(86, 227, 176, 0.34);
  background: linear-gradient(135deg, rgba(86, 227, 176, 0.32), rgba(49, 179, 133, 0.28));
  color: #a4f4d7;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 600;
}

.wallet-pill.off {
  border-color: rgba(171, 129, 246, 0.34);
  background: rgba(171, 129, 246, 0.16);
  color: #cbb8ed;
}

.logs-hover-popover {
  position: fixed;
  z-index: 9999;
  display: none;
  min-width: 220px;
  max-width: 420px;
  max-height: 70vh;
  overflow: auto;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(208, 96, 255, 0.35);
  background: linear-gradient(165deg, rgba(28, 14, 48, 0.98), rgba(14, 8, 28, 0.99));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 228, 255, 0.06);
  pointer-events: none;
  font-size: 0.8rem;
}

.logs-hover-popover.visible {
  display: block;
}

.logs-hover-popover h4 {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(224, 180, 255, 0.95);
}

.logs-hover-popover .popover-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.logs-hover-popover .popover-item {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(208, 96, 255, 0.28);
  background: rgba(60, 30, 90, 0.5);
  color: #e5d4f7;
  font-weight: 500;
}

.logs-hover-popover .popover-section {
  margin-bottom: 12px;
}

.logs-hover-popover .popover-section:last-child {
  margin-bottom: 0;
}

.logs-hover-popover .popover-section-title {
  margin: 8px 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 180, 220, 0.9);
}

.logs-hover-popover .popover-section-title:first-child {
  margin-top: 0;
}

.logs-services-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.logs-service-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(208, 96, 255, 0.3);
  background: rgba(40, 20, 60, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #e5caff;
  flex-shrink: 0;
}

.logs-service-more {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(224, 180, 255, 0.85);
  padding: 0 4px;
}

.logs-cell-hover {
  cursor: default;
  position: relative;
}

.empty-row {
  text-align: center;
  color: var(--text-muted);
}

.build-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 6% 8%, rgba(224, 96, 240, 0.18), transparent 34%),
    linear-gradient(162deg, rgba(28, 11, 49, 0.95), rgba(9, 6, 20, 0.99));
}

.build-card-head {
  padding: 18px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(145deg, rgba(66, 22, 108, 0.42), rgba(22, 10, 38, 0.64));
}

.build-card-head p {
  margin: 4px 0 0;
  color: #d8b9f3;
  font-size: 0.82rem;
}

.build-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.build-mode-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 198px;
}

.build-mode-tabs button {
  border: 1px solid rgba(208, 96, 255, 0.28);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(40, 15, 66, 0.66), rgba(18, 10, 31, 0.88));
  color: #d8bdee;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.24s ease, color 0.24s ease, background 0.24s ease;
}

.build-mode-tabs button:hover {
  color: #fdefff;
  border-color: rgba(224, 96, 240, 0.5);
}

.build-mode-tabs button.active {
  color: #fff8ff;
  border-color: rgba(224, 96, 240, 0.62);
  background: linear-gradient(135deg, rgba(192, 80, 240, 0.58), rgba(112, 48, 192, 0.62));
  box-shadow:
    inset 0 0 0 1px rgba(250, 214, 255, 0.08),
    0 12px 24px rgba(65, 17, 108, 0.34);
}

.build-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.88fr);
  gap: 14px;
  padding: 14px;
}

.dmg-studio-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 1fr);
}

.build-editor-card,
.build-side-card {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 16px;
  overflow: hidden;
}

.build-editor-card {
  background:
    radial-gradient(circle at 8% 10%, rgba(224, 96, 240, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(29, 11, 50, 0.95), rgba(12, 8, 25, 0.97));
}

.build-side-card {
  background:
    radial-gradient(circle at 90% 12%, rgba(192, 80, 240, 0.18), transparent 36%),
    linear-gradient(162deg, rgba(24, 10, 42, 0.95), rgba(11, 8, 22, 0.98));
}

.build-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.build-form h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #f3deff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.build-form label {
  display: grid;
  gap: 7px;
  font-size: 0.82rem;
  color: #e5cff8;
}

.build-form textarea {
  resize: vertical;
  min-height: 82px;
}

.field-note {
  color: #ba9cd9;
  font-size: 0.72rem;
  line-height: 1.35;
}

.builder-select-field {
  gap: 8px;
}

.builder-select {
  position: relative;
}

.builder-select-trigger {
  width: 100%;
  border: 1px solid rgba(208, 96, 255, 0.26);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(38, 15, 64, 0.84), rgba(19, 10, 35, 0.92));
  color: #f4dcff;
  font: inherit;
  font-size: 0.9rem;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.builder-select-trigger svg {
  width: 16px;
  height: 16px;
  color: #f2c8ff;
  transition: transform 0.22s ease;
}

.builder-select-trigger path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.builder-select.open .builder-select-trigger {
  border-color: rgba(224, 96, 240, 0.58);
  box-shadow: 0 0 0 4px rgba(192, 80, 240, 0.17);
  background: linear-gradient(140deg, rgba(54, 20, 90, 0.82), rgba(24, 11, 42, 0.94));
}

.builder-select.open .builder-select-trigger svg {
  transform: rotate(180deg);
}

.builder-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 12;
  border: 1px solid rgba(224, 96, 240, 0.42);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(44, 16, 73, 0.97), rgba(17, 10, 31, 0.98));
  box-shadow: 0 18px 30px rgba(6, 2, 15, 0.48);
  padding: 7px;
  display: grid;
  gap: 6px;
  max-height: 248px;
  overflow: auto;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.builder-select.open .builder-select-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.builder-select-option {
  border: 1px solid rgba(208, 96, 255, 0.26);
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(56, 20, 90, 0.5), rgba(22, 10, 38, 0.78));
  color: #f0d5ff;
  font: inherit;
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.16s ease;
}

.builder-select-option span {
  font-size: 0.84rem;
  font-weight: 600;
}

.builder-select-option small {
  font-size: 0.72rem;
  color: #cfafea;
}

.builder-select-option:hover {
  border-color: rgba(224, 96, 240, 0.5);
  background: linear-gradient(140deg, rgba(85, 28, 135, 0.62), rgba(33, 13, 52, 0.86));
  transform: translateY(-1px);
}

.builder-select-option.active {
  border-color: rgba(224, 96, 240, 0.66);
  background: linear-gradient(136deg, rgba(192, 80, 240, 0.44), rgba(112, 48, 192, 0.52));
}

.builder-select.open .builder-select-option {
  animation: builder-option-in 0.22s ease both;
}

.builder-select.open .builder-select-option:nth-child(2) {
  animation-delay: 0.02s;
}

.builder-select.open .builder-select-option:nth-child(3) {
  animation-delay: 0.04s;
}

.builder-select.open .builder-select-option:nth-child(4) {
  animation-delay: 0.06s;
}

.builder-select.open .builder-select-option:nth-child(5) {
  animation-delay: 0.08s;
}

@keyframes builder-option-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.build-form label.build-check {
  padding: 9px 10px;
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 11px;
  background: linear-gradient(140deg, rgba(56, 20, 90, 0.48), rgba(22, 10, 38, 0.78));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: #e3ccf7;
  font-size: 0.86rem;
}

.build-form label.build-check input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}

.build-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid rgba(208, 96, 255, 0.2);
}

.create-build-btn {
  min-width: 136px;
}

.build-side-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.build-side-head h4 {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.build-side-head span {
  border: 1px solid rgba(224, 96, 240, 0.46);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd8ff;
  background: rgba(192, 80, 240, 0.2);
}

.build-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.build-side-grid > div {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(56, 20, 90, 0.48), rgba(22, 10, 38, 0.78));
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.build-side-grid span {
  color: #cdb0e8;
  font-size: 0.72rem;
}

.build-side-grid strong {
  color: #f6e6ff;
  font-size: 0.8rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.build-status-row {
  padding: 0 12px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.build-status-chip {
  border: 1px solid rgba(208, 96, 255, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  color: #ceb0e9;
  background: rgba(69, 24, 111, 0.32);
}

.build-status-chip.on {
  border-color: rgba(224, 96, 240, 0.56);
  color: #f9dcff;
  background: linear-gradient(138deg, rgba(192, 80, 240, 0.46), rgba(112, 48, 192, 0.54));
}

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

.dmg-upload-field {
  gap: 8px;
}

.dmg-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dmg-upload-box {
  border: 1px dashed rgba(224, 96, 240, 0.4);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(45, 16, 72, 0.62), rgba(21, 11, 39, 0.8));
  min-height: 74px;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  padding: 10px 12px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.18s ease;
}

.dmg-upload-field:hover .dmg-upload-box {
  border-color: rgba(224, 96, 240, 0.58);
  background: linear-gradient(145deg, rgba(68, 24, 109, 0.72), rgba(30, 12, 54, 0.86));
  transform: translateY(-1px);
}

.dmg-upload-box strong {
  font-size: 0.84rem;
  font-weight: 500;
  color: #efd8ff;
}

.dmg-existing-card {
  margin: 0 14px 14px;
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(26, 10, 44, 0.9), rgba(10, 8, 21, 0.94));
  overflow: hidden;
}

.dmg-existing-card header {
  padding: 12px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
}

.dmg-existing-card h4 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dmg-builds-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Строка билда (Existing Unix/DMG Builds): имя и дата слева, кнопки справа в одну линию */
.dmg-builds-list .build-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(171, 129, 246, 0.16);
}

.dmg-builds-list .build-item:last-child {
  border-bottom: 0;
}

.dmg-builds-list .build-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dmg-builds-list .build-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f5efff;
}

.dmg-builds-list .build-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dmg-builds-list .build-actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.dmg-builds-list .btn-download,
.dmg-builds-list .btn-delete {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s;
}

.dmg-builds-list .btn-download {
  background: rgba(179, 102, 255, 0.5);
  color: #fff;
}

.dmg-builds-list .btn-download:hover {
  background: rgba(179, 102, 255, 0.75);
}

.dmg-builds-list .btn-delete {
  background: rgba(220, 53, 69, 0.6);
  color: #fff;
}

.dmg-builds-list .btn-delete:hover {
  background: rgba(220, 53, 69, 0.85);
}

.dmg-build-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(171, 129, 246, 0.16);
}

.dmg-build-row:last-child {
  border-bottom: 0;
}

.dmg-build-row > div {
  display: grid;
  gap: 4px;
}

.dmg-build-row span {
  font-size: 0.88rem;
  color: #f5efff;
}

.dmg-build-row small {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.dmg-build-row b {
  color: #d4beff;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.dmg-empty-state {
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* DMG Preview */
.dmg-preview-section {
  position: sticky;
  top: 20px;
  display: block !important;
  visibility: visible !important;
  width: 100%;
  box-sizing: border-box;
}

.dmg-preview-container {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
}

.dmg-preview-container h4 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.dmg-window {
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 16px;
}

.dmg-window-content {
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 600;
  max-height: 450px;
  overflow: hidden;
  background: #f5f5f5;
  min-height: 200px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.dmg-background {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: url('/img/icon/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.dmg-app-icon-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  cursor: move;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  box-sizing: border-box;
  transform-origin: top left;
}

.dmg-app-icon {
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  margin: 0 auto;
  flex-shrink: 0;
}

.dmg-app-icon img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  display: block;
  margin: 0;
  padding: 0;
}

.dmg-app-name {
  font-size: 12px;
  color: #333;
  text-align: center;
  width: 128px;
  word-wrap: break-word;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  margin: 0 auto;
  padding: 0;
  line-height: 1.2;
  flex-shrink: 0;
}

.dmg-preview-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.dmg-preview-info .info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.dmg-preview-info .info-label {
  color: var(--muted);
}

.dmg-preview-info .info-value {
  color: var(--text);
  font-weight: 500;
}

.build-notice {
  border: 1px solid rgba(86, 227, 176, 0.34);
  border-radius: 10px;
  background: rgba(86, 227, 176, 0.16);
  color: #8cf2cb;
  padding: 10px 12px;
  margin: 0 16px 16px;
  font-size: 0.84rem;
}

.clickfix-shell {
  display: grid;
  gap: 14px;
}

.clickfix-add-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 6% 10%, rgba(224, 96, 240, 0.18), transparent 36%),
    linear-gradient(162deg, rgba(29, 11, 50, 0.95), rgba(10, 7, 23, 0.98));
}

.clickfix-add-head {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(145deg, rgba(62, 20, 103, 0.45), rgba(19, 9, 35, 0.74));
}

.clickfix-add-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.clickfix-add-head p {
  margin: 4px 0 0;
  color: #d4b3f1;
  font-size: 0.8rem;
}

.clickfix-head-badge {
  border: 1px solid rgba(224, 96, 240, 0.52);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd9ff;
  background: rgba(192, 80, 240, 0.2);
  white-space: nowrap;
}

.clickfix-add-form {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid rgba(208, 96, 255, 0.18);
}

.clickfix-add-form label {
  display: grid;
  gap: 7px;
  font-size: 0.82rem;
  color: #e5cff8;
  min-width: 0;
}

.clickfix-add-form label input {
  min-width: 0;
  width: 100%;
}

.clickfix-add-actions {
  display: flex;
  align-items: flex-end;
}

.clickfix-add-actions .btn {
  min-width: 132px;
  min-height: 44px;
}

.clickfix-summary-grid {
  padding: 12px 14px 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.clickfix-summary-grid article {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(56, 20, 90, 0.52), rgba(20, 10, 36, 0.8));
  padding: 10px;
  display: grid;
  gap: 7px;
}

.clickfix-summary-grid span {
  color: #d0afe9;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.clickfix-summary-grid strong {
  font-size: 1.2rem;
  line-height: 1;
  color: #f7e9ff;
}

.clickfix-state-card {
  padding: 18px;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background: linear-gradient(160deg, rgba(25, 11, 44, 0.95), rgba(10, 7, 21, 0.98));
}

.clickfix-state-card p {
  margin: 0;
  color: #e4c9f8;
  font-size: 0.86rem;
}

.clickfix-state-card.error {
  border-color: rgba(255, 153, 199, 0.44);
  background: linear-gradient(160deg, rgba(58, 14, 48, 0.58), rgba(17, 8, 22, 0.94));
}

.clickfix-server-list {
  display: grid;
  gap: 12px;
}

.clickfix-server-list .empty-message {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border: 1px dashed rgba(208, 96, 255, 0.3);
  border-radius: 12px;
  background: rgba(26, 11, 46, 0.4);
}

.clickfix-server-list .server-card {
  list-style: none;
}

.clickfix-status-pill.checking {
  border-color: rgba(255, 212, 116, 0.52);
  background: rgba(255, 212, 116, 0.16);
  color: #ffe4a4;
}

.clickfix-server-actions .btn-small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.clickfix-server-actions .btn-success {
  background: rgba(86, 227, 176, 0.25);
  color: var(--ok);
  border: 1px solid rgba(86, 227, 176, 0.4);
}

.clickfix-server-actions .btn-success:hover {
  background: rgba(86, 227, 176, 0.35);
  border-color: rgba(86, 227, 176, 0.55);
}

.clickfix-server-actions .btn-danger {
  background: rgba(255, 92, 166, 0.2);
  color: var(--danger);
  border: 1px solid rgba(255, 92, 166, 0.4);
}

.clickfix-server-actions .btn-danger:hover {
  background: rgba(255, 92, 166, 0.3);
  border-color: rgba(255, 92, 166, 0.55);
}

/* Блок команды на сервере — в стиле панели, без серого */
.clickfix-command-block {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background: linear-gradient(145deg, rgba(40, 16, 66, 0.6), rgba(17, 10, 32, 0.9));
}

.clickfix-command-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.clickfix-command-block-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clickfix-command-block-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clickfix-cmd-badge {
  font-size: 0.68rem;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: 600;
}

.clickfix-cmd-badge-ok {
  background: rgba(86, 227, 176, 0.25);
  color: var(--ok);
  border: 1px solid rgba(86, 227, 176, 0.4);
}

.clickfix-cmd-badge-error {
  background: rgba(255, 92, 166, 0.2);
  color: var(--danger);
  border: 1px solid rgba(255, 92, 166, 0.4);
}

.clickfix-cmd-badge-installing {
  background: rgba(255, 212, 116, 0.2);
  color: var(--warn);
  border: 1px solid rgba(255, 212, 116, 0.4);
}

.clickfix-cmd-badge-pending {
  background: rgba(184, 130, 255, 0.2);
  color: var(--text-muted);
  border: 1px solid rgba(184, 130, 255, 0.35);
}

.clickfix-log-block {
  margin-bottom: 10px;
}

.clickfix-log-pre {
  max-height: 150px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(208, 96, 255, 0.18);
  background: rgba(10, 8, 20, 0.88);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text-main);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.clickfix-cmd-fields {
  margin-bottom: 10px;
}

.clickfix-cmd-fields:last-child {
  margin-bottom: 0;
}

.clickfix-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clickfix-field-hint {
  font-weight: normal;
  font-size: 0.7rem;
  opacity: 0.85;
  margin-left: 4px;
}

.clickfix-command-block .clickfix-input,
.clickfix-command-block .clickfix-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 8px;
  background: rgba(26, 11, 46, 0.88);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: inherit;
}

.clickfix-command-block .clickfix-textarea {
  font-family: ui-monospace, monospace;
  min-height: 56px;
  resize: vertical;
}

.clickfix-textarea-wrap {
  position: relative;
  display: grid;
  gap: 6px;
}

.clickfix-textarea-wrap .btn-tiny {
  justify-self: end;
}

.clickfix-server-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 92% 16%, rgba(224, 96, 240, 0.14), transparent 34%),
    linear-gradient(162deg, rgba(24, 10, 42, 0.96), rgba(9, 7, 19, 0.99));
}

.clickfix-server-head {
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.18);
  background: linear-gradient(145deg, rgba(53, 18, 89, 0.44), rgba(16, 10, 31, 0.72));
}

.clickfix-server-head h4 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.clickfix-server-head p {
  margin: 4px 0 0;
  color: #d1b0eb;
  font-size: 0.78rem;
}

.clickfix-server-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.clickfix-status-pill {
  border: 1px solid rgba(224, 96, 240, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #f5dcff;
  background: rgba(192, 80, 240, 0.18);
  white-space: nowrap;
}

.clickfix-status-pill.online {
  border-color: rgba(86, 227, 176, 0.46);
  background: rgba(86, 227, 176, 0.18);
  color: #b4f9de;
}

.clickfix-status-pill.installing {
  border-color: rgba(255, 212, 116, 0.52);
  background: rgba(255, 212, 116, 0.16);
  color: #ffe4a4;
}

.clickfix-status-pill.degraded {
  border-color: rgba(255, 156, 116, 0.52);
  background: rgba(255, 156, 116, 0.16);
  color: #ffd0b6;
}

.clickfix-status-pill.offline {
  border-color: rgba(255, 106, 152, 0.52);
  background: rgba(255, 92, 166, 0.14);
  color: #ffc0da;
}

.clickfix-stat-grid {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.clickfix-stat-grid > div {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(56, 20, 90, 0.48), rgba(22, 10, 38, 0.78));
  padding: 9px 10px;
  display: grid;
  gap: 4px;
}

.clickfix-stat-grid span {
  color: #cfafea;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clickfix-stat-grid strong {
  color: #f5e7ff;
  font-size: 0.86rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.clickfix-server-actions {
  border-top: 1px solid rgba(208, 96, 255, 0.18);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clickfix-server-actions .btn {
  min-height: 38px;
}

.clickfix-command-panel {
  border-top: 1px solid rgba(208, 96, 255, 0.18);
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
  background:
    radial-gradient(circle at 8% 6%, rgba(112, 48, 192, 0.2), transparent 34%),
    linear-gradient(160deg, rgba(15, 9, 28, 0.92), rgba(9, 6, 20, 0.98));
}

.clickfix-command-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.clickfix-command-panel > header strong {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0d4ff;
}

.clickfix-command-panel > header span {
  color: #c9aadf;
  font-size: 0.74rem;
}

.clickfix-command-row {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(40, 16, 66, 0.62), rgba(17, 10, 32, 0.86));
  padding: 10px;
  display: grid;
  gap: 8px;
}

.clickfix-command-row span {
  color: #d6b7f0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.clickfix-command-row code {
  display: block;
  border: 1px solid rgba(208, 96, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 8, 20, 0.88);
  color: #f8e8ff;
  font-size: 0.75rem;
  line-height: 1.45;
  padding: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.clickfix-command-row .btn.tiny {
  justify-self: end;
}

.clickfix-notice {
  margin: 0;
  border: 1px solid rgba(224, 96, 240, 0.34);
  border-radius: 10px;
  background: rgba(160, 50, 220, 0.16);
  color: #f7d9ff;
  padding: 10px 12px;
  font-size: 0.84rem;
}

.restore-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.86fr);
  gap: 14px;
  align-items: start;
}

.restore-main-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 8% 10%, rgba(224, 96, 240, 0.18), transparent 36%),
    linear-gradient(162deg, rgba(28, 11, 49, 0.95), rgba(9, 7, 20, 0.99));
}

.restore-main-head {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(145deg, rgba(63, 21, 104, 0.45), rgba(19, 10, 35, 0.74));
}

.restore-main-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.restore-main-head p {
  margin: 4px 0 0;
  color: #d4b3f1;
  font-size: 0.8rem;
}

.restore-main-badge {
  border: 1px solid rgba(224, 96, 240, 0.52);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd9ff;
  background: rgba(192, 80, 240, 0.2);
  white-space: nowrap;
}

.restore-cookies-form {
  padding: 14px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.18);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.restore-cookies-form label {
  display: grid;
  gap: 7px;
  font-size: 0.82rem;
  color: #e5cff8;
}

.restore-field-wide {
  grid-column: 1 / -1;
}

.restore-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.restore-actions .btn {
  min-width: 132px;
}

.restore-result-panel {
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
}

.restore-result-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.restore-result-panel h4 {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0d4ff;
}

.restore-result-panel textarea {
  resize: vertical;
  min-height: 220px;
  border: 1px solid rgba(208, 96, 255, 0.26);
  border-radius: 12px;
  background: linear-gradient(156deg, rgba(18, 10, 34, 0.96), rgba(8, 6, 18, 0.98));
  color: #f3e2ff;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.77rem;
  line-height: 1.42;
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 255, 0.05),
    inset 0 -24px 44px rgba(6, 3, 14, 0.45);
}

.restore-result-panel textarea:focus {
  border-color: rgba(224, 96, 240, 0.62);
  box-shadow:
    0 0 0 4px rgba(192, 80, 240, 0.16),
    inset 0 1px 0 rgba(255, 226, 255, 0.05),
    inset 0 -24px 44px rgba(6, 3, 14, 0.45);
}

.restore-result-panel textarea::selection {
  background: rgba(192, 80, 240, 0.34);
  color: #fff2ff;
}

.restore-side-card {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 12%, rgba(192, 80, 240, 0.16), transparent 36%),
    linear-gradient(162deg, rgba(22, 10, 40, 0.95), rgba(11, 8, 22, 0.99));
}

.restore-side-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.restore-side-head h4 {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.restore-side-head span {
  border: 1px solid rgba(224, 96, 240, 0.46);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd8ff;
  background: rgba(192, 80, 240, 0.2);
}

.restore-side-stats {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.restore-side-stats article {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(56, 20, 90, 0.48), rgba(22, 10, 38, 0.78));
  padding: 9px 10px;
  display: grid;
  gap: 5px;
}

.restore-side-stats span {
  color: #cfafea;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.restore-side-stats strong {
  color: #f5e7ff;
  font-size: 1rem;
  font-weight: 700;
}

.restore-side-state {
  margin: 0;
  padding: 0 12px 12px;
  color: #e2c7f7;
  font-size: 0.82rem;
}

.restore-side-state.error {
  color: #ffc8df;
}

.restore-history-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
  max-height: 382px;
  overflow: auto;
}

.restore-history-item {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(142deg, rgba(44, 17, 73, 0.6), rgba(16, 10, 31, 0.86));
  padding: 9px 10px;
  display: grid;
  gap: 6px;
}

.restore-history-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.restore-history-item header strong {
  font-size: 0.74rem;
  color: #e8d4ff;
}

.restore-history-item p {
  margin: 0;
  color: #d6b8ee;
  font-size: 0.76rem;
  line-height: 1.35;
}

.restore-history-item small {
  color: #c7a8e1;
  font-size: 0.7rem;
}

.restore-status-pill {
  border: 1px solid rgba(224, 96, 240, 0.4);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #f5dcff;
  background: rgba(192, 80, 240, 0.18);
  white-space: nowrap;
}

.restore-status-pill.success {
  border-color: rgba(86, 227, 176, 0.46);
  background: rgba(86, 227, 176, 0.18);
  color: #b4f9de;
}

.restore-status-pill.warning {
  border-color: rgba(255, 212, 116, 0.52);
  background: rgba(255, 212, 116, 0.16);
  color: #ffe4a4;
}

.restore-status-pill.error {
  border-color: rgba(255, 106, 152, 0.52);
  background: rgba(255, 92, 166, 0.14);
  color: #ffc0da;
}

.restore-notice {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid rgba(224, 96, 240, 0.34);
  border-radius: 10px;
  background: rgba(160, 50, 220, 0.16);
  color: #f7d9ff;
  padding: 10px 12px;
  font-size: 0.84rem;
}

.seeds-shell {
  display: grid;
}

.seeds-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 6% 10%, rgba(224, 96, 240, 0.16), transparent 36%),
    linear-gradient(162deg, rgba(26, 11, 46, 0.95), rgba(10, 7, 22, 0.99));
}

.seeds-head {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(145deg, rgba(58, 19, 98, 0.44), rgba(18, 10, 34, 0.72));
}

.seeds-head h3 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.seeds-head p {
  margin: 4px 0 0;
  color: #d2b2ed;
  font-size: 0.8rem;
}

.seeds-head-badge {
  border: 1px solid rgba(224, 96, 240, 0.48);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ffd8ff;
  background: rgba(192, 80, 240, 0.2);
  white-space: nowrap;
}

.seeds-toolbar {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.18);
}

.seeds-table-wrap {
  overflow: auto;
  padding: 8px 12px 12px;
}

.seeds-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 760px;
}

.seeds-table th,
.seeds-table td {
  border: 0;
  padding: 11px 12px;
  text-align: left;
  font-size: 0.84rem;
}

.seeds-table th {
  color: #d4adf6;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0 12px 4px;
}

.seeds-table td {
  background: linear-gradient(138deg, rgba(42, 16, 70, 0.72), rgba(18, 10, 33, 0.72));
}

.seeds-table tbody tr td:first-child {
  border-radius: 12px 0 0 12px;
}

.seeds-table tbody tr td:last-child {
  border-radius: 0 12px 12px 0;
}

.seeds-table tbody tr:hover td {
  background: linear-gradient(138deg, rgba(66, 28, 108, 0.82), rgba(35, 16, 59, 0.78));
}

.seeds-table .col-module {
  width: 130px;
}

.seeds-table .col-device {
  min-width: 470px;
  color: #f2e0ff;
  line-height: 1.38;
}

.seeds-table .col-geo {
  width: 70px;
  color: #fcefff;
  font-weight: 600;
}

.seeds-table .col-seed {
  min-width: 200px;
  max-width: 320px;
  color: #f2e0ff;
  font-size: 0.85rem;
  line-height: 1.35;
  word-break: break-all;
}

.seeds-table .seed-value {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}

.seeds-table .seed-value:hover {
  background: rgba(208, 96, 255, 0.2);
  color: #ffe8ff;
}

.seeds-table .seed-value.copied {
  background: rgba(67, 160, 71, 0.35);
  color: #b8f0bc;
}

.seeds-table .col-date {
  width: 160px;
  color: #d4adf6;
  font-size: 0.82rem;
}

.seeds-table .col-actions {
  width: 100px;
  text-align: center;
}

.seeds-table .delete-btn {
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 92, 166, 0.45);
  color: #ffd4e7;
  background: linear-gradient(135deg, rgba(255, 92, 166, 0.38), rgba(200, 60, 120, 0.28));
  box-shadow: 0 2px 8px rgba(255, 92, 166, 0.2);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.seeds-table .delete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(255, 92, 166, 0.5), rgba(220, 70, 130, 0.38));
  box-shadow: 0 4px 12px rgba(255, 92, 166, 0.35);
}

.seeds-table .delete-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.seeds-table .delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.seeds-table .no-seeds {
  color: #b0a0c0;
  font-style: italic;
  padding: 24px 16px;
  text-align: center;
}

.seed-module-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  border: 1px solid rgba(224, 96, 240, 0.54);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffe8ff;
  background: linear-gradient(135deg, rgba(192, 80, 240, 0.54), rgba(96, 16, 144, 0.56));
}

.seeds-footer {
  border-top: 1px solid rgba(208, 96, 255, 0.2);
  padding: 12px 14px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(34, 11, 58, 0.4), rgba(12, 8, 28, 0.84));
}

.seeds-footer .entries-box {
  color: #d9b9f5;
}

.seeds-footer .entries-box select,
.seeds-footer .pagination-box button {
  border-color: rgba(208, 96, 255, 0.36);
  background: rgba(34, 13, 54, 0.9);
  color: #f2d8ff;
}

.seeds-footer .pagination-box button.active {
  background: linear-gradient(138deg, #9030d0, #e060f0);
  border-color: rgba(224, 96, 240, 0.62);
  color: #fff5ff;
  box-shadow: 0 10px 20px rgba(96, 16, 144, 0.42);
}

.profile-shell {
  display: grid;
}

.profile-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(208, 96, 255, 0.24);
  background:
    radial-gradient(circle at 8% 8%, rgba(224, 96, 240, 0.16), transparent 36%),
    linear-gradient(162deg, rgba(24, 10, 42, 0.96), rgba(9, 7, 20, 0.99));
}

.profile-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
  display: grid;
  gap: 12px;
  background: linear-gradient(145deg, rgba(58, 19, 98, 0.44), rgba(18, 10, 34, 0.72));
}

.profile-head h3 {
  margin: 0;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
}

.profile-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-tab-btn {
  border: 1px solid rgba(208, 96, 255, 0.26);
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(35, 14, 59, 0.74), rgba(15, 10, 29, 0.86));
  color: #d8bdee;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.profile-tab-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: 0.92;
}

.profile-tab-btn.active {
  color: #fff8ff;
  border-color: rgba(224, 96, 240, 0.62);
  background: linear-gradient(135deg, rgba(192, 80, 240, 0.58), rgba(112, 48, 192, 0.62));
  box-shadow:
    inset 0 0 0 1px rgba(250, 214, 255, 0.08),
    0 12px 24px rgba(65, 17, 108, 0.34);
}

.profile-state-row {
  padding: 16px 18px;
  color: #e2c7f7;
  font-size: 0.84rem;
}

.profile-state-row.error {
  color: #ffc8df;
}

.profile-pane {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.profile-block {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(40, 16, 66, 0.62), rgba(17, 10, 32, 0.86));
  padding: 12px;
  display: grid;
  gap: 10px;
}

.profile-block header {
  display: grid;
  gap: 4px;
}

.profile-block h4 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.profile-block p {
  margin: 0;
  color: #d0afe9;
  font-size: 0.78rem;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-form-grid label {
  display: grid;
  gap: 7px;
  font-size: 0.8rem;
  color: #e5cff8;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-form-grid .profile-actions {
  grid-column: 1 / -1;
}

.profile-form-grid .profile-actions .btn.accent {
  min-width: 170px;
}

.profile-actions.left {
  justify-content: flex-start;
}

.profile-api-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.profile-api-row input[readonly] {
  background: linear-gradient(156deg, rgba(18, 10, 34, 0.96), rgba(8, 6, 18, 0.98));
  color: #f1deff;
}

.profile-doc-note {
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(142deg, rgba(55, 22, 83, 0.56), rgba(17, 10, 30, 0.86));
  padding: 9px 10px;
  display: grid;
  gap: 5px;
}

.profile-doc-note strong {
  font-size: 0.76rem;
  color: #b4f8cc;
}

.profile-doc-note span {
  font-size: 0.74rem;
  color: #d4b2ec;
}

.profile-template-label {
  display: grid;
  gap: 7px;
  font-size: 0.8rem;
  color: #e5cff8;
}

.profile-template-label textarea {
  resize: vertical;
  min-height: 160px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.4;
}

.profile-vars-list {
  border: 1px solid rgba(208, 96, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-vars-table {
  border: 1px solid rgba(208, 96, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(40, 16, 66, 0.4), rgba(17, 10, 32, 0.62));
}

.profile-vars-table .profile-var-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.14);
}

.profile-vars-table .profile-var-row:last-child {
  border-bottom: 0;
}

.profile-vars-table .profile-var-row code,
.profile-vars-table .profile-var-row .profile-var-chip {
  border: 1px solid rgba(86, 227, 176, 0.34);
  border-radius: 7px;
  background: rgba(86, 227, 176, 0.16);
  color: #9cf4d5;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-family: monospace;
}

.profile-vars-table .profile-var-row span {
  color: #d9bbed;
  font-size: 0.78rem;
}

.profile-notif-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-notif-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  border: 1px solid transparent;
}

.profile-notif-row:hover {
  background: rgba(208, 96, 255, 0.08);
}

.profile-notif-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(208, 96, 255, 0.2);
  flex-shrink: 0;
}

.profile-notif-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-notif-text strong {
  font-size: 0.84rem;
  color: #f2ddff;
}

.profile-notif-text em {
  font-size: 0.76rem;
  color: #d0afe9;
  font-style: normal;
}

.profile-notif-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.profile-build-tag-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-build-tag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(208, 96, 255, 0.22);
  border-radius: 10px;
  background: rgba(40, 16, 66, 0.35);
}

.profile-btn-add-build-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-notif-footer {
  margin-top: 8px;
}

.profile-var-chip {
  display: inline-block;
  border: 1px solid rgba(86, 227, 176, 0.34);
  border-radius: 7px;
  background: rgba(86, 227, 176, 0.16);
  color: #9cf4d5;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-family: monospace;
}

.profile-var-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.14);
  background: linear-gradient(145deg, rgba(40, 16, 66, 0.4), rgba(17, 10, 32, 0.62));
}

.profile-var-row:last-child {
  border-bottom: 0;
}

.profile-var-row code {
  border: 1px solid rgba(86, 227, 176, 0.34);
  border-radius: 7px;
  background: rgba(86, 227, 176, 0.16);
  color: #9cf4d5;
  padding: 3px 7px;
  font-size: 0.72rem;
}

.profile-var-row span {
  color: #d9bbed;
  font-size: 0.78rem;
}

.profile-empty-state {
  margin: 0;
  color: #d0afe9;
  font-size: 0.82rem;
}

.profile-proxy-list {
  display: grid;
  gap: 8px;
}

.profile-proxy-item {
  border: 1px solid rgba(208, 96, 255, 0.22);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(52, 19, 81, 0.52), rgba(18, 10, 32, 0.82));
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.profile-proxy-name {
  font-weight: 600;
  color: #f2ddff;
}

.profile-proxy-ip {
  color: #c8a8e2;
  font-size: 0.88rem;
}

.profile-proxy-badge {
  margin-left: auto;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.7rem;
  background: rgba(160, 50, 220, 0.18);
  color: #e6cdff;
  border: 1px solid rgba(208, 96, 255, 0.34);
}

.profile-proxy-badge.active {
  border-color: rgba(255, 212, 116, 0.52);
  background: rgba(255, 212, 116, 0.16);
  color: #ffe4a4;
}

.profile-proxy-item > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.profile-proxy-item > header strong {
  font-size: 0.84rem;
}

.profile-proxy-tags {
  display: inline-flex;
  gap: 6px;
}

.profile-proxy-tag {
  border: 1px solid rgba(208, 96, 255, 0.34);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.66rem;
  color: #e6cdff;
  background: rgba(160, 50, 220, 0.18);
}

.profile-proxy-tag.personal {
  border-color: rgba(86, 227, 176, 0.44);
  background: rgba(86, 227, 176, 0.16);
  color: #b4f9de;
}

.profile-proxy-tag.active {
  border-color: rgba(255, 212, 116, 0.52);
  background: rgba(255, 212, 116, 0.16);
  color: #ffe4a4;
}

.profile-proxy-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  font-size: 0.78rem;
}

.profile-proxy-grid span {
  color: #c8a8e2;
}

.profile-proxy-grid b {
  color: #f2ddff;
  font-weight: 600;
}

.profile-notice {
  margin: 0 14px 14px;
  border: 1px solid rgba(224, 96, 240, 0.34);
  border-radius: 10px;
  background: rgba(160, 50, 220, 0.16);
  color: #f7d9ff;
  padding: 10px 12px;
  font-size: 0.84rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 9, 0.75);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: 30;
}

.modal-card {
  width: min(100%, 640px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, #120d25, #090613);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.modal-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.modal-card h3 {
  margin: 0;
}

.modal-card p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(208, 96, 255, 0.15);
  color: #e6cdff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  background: rgba(208, 96, 255, 0.28);
  color: #f7d9ff;
}

.modal-build-tag {
  width: min(100%, 440px);
  gap: 18px;
}

.modal-build-tag-head {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.22);
}

.modal-build-tag-head h3 {
  font-size: 1.02rem;
  color: #f2ddff;
  letter-spacing: 0.02em;
}

.modal-build-tag-form {
  display: grid;
  gap: 14px;
}

.modal-build-tag-form label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: #d0afe9;
}

.modal-build-tag-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(208, 96, 255, 0.3);
  border-radius: 10px;
  background: rgba(24, 17, 41, 0.9);
  color: #f2ddff;
  font-size: 0.88rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-build-tag-form input::placeholder {
  color: rgba(210, 175, 233, 0.5);
}

.modal-build-tag-form input:focus {
  outline: none;
  border-color: rgba(208, 96, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(208, 96, 255, 0.2);
}

.modal-build-tag-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(208, 96, 255, 0.18);
}

/* ---------- ClickFix modals ---------- */
.clickfix-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 9, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 10000;
}

.clickfix-modal-card {
  width: min(100%, 500px);
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 16px;
  background: linear-gradient(160deg, #120d25, #090613);
  padding: 24px;
  display: grid;
  gap: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.clickfix-modal-card h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #f2ddff;
  letter-spacing: 0.02em;
}

.clickfix-modal-card .clickfix-modal-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #d0afe9;
  line-height: 1.4;
}

.clickfix-modal-card .clickfix-modal-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clickfix-modal-card .clickfix-modal-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #e6cdff;
  font-size: 0.9rem;
}

.clickfix-modal-card .clickfix-modal-options input[type="radio"] {
  accent-color: #b366ff;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.clickfix-modal-card .clickfix-modal-field {
  margin-bottom: 4px;
}

.clickfix-modal-card .clickfix-modal-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: #d0afe9;
}

.clickfix-modal-card .clickfix-modal-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(208, 96, 255, 0.3);
  border-radius: 10px;
  background: rgba(24, 17, 41, 0.9);
  color: #f2ddff;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.clickfix-modal-card .clickfix-modal-field select:focus {
  outline: none;
  border-color: rgba(208, 96, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(208, 96, 255, 0.2);
}

.clickfix-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid rgba(208, 96, 255, 0.18);
}

.clickfix-modal-actions .btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.clickfix-modal-actions .btn-ghost {
  background: rgba(208, 96, 255, 0.12);
  border: 1px solid rgba(208, 96, 255, 0.28);
  color: #e6cdff;
}

.clickfix-modal-actions .btn-ghost:hover {
  background: rgba(208, 96, 255, 0.22);
  border-color: rgba(208, 96, 255, 0.4);
  color: #f7d9ff;
}

.clickfix-modal-actions .btn-accent {
  background: linear-gradient(135deg, #b366ff, #8d44f7);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(126, 31, 255, 0.35);
}

.clickfix-modal-actions .btn-accent:hover {
  background: linear-gradient(135deg, #c58fff, #9d54ff);
  box-shadow: 0 6px 18px rgba(126, 31, 255, 0.45);
}

/* ClickFix Instructions modal */
.clickfix-modal-card.clickfix-modal-instructions {
  max-width: 640px;
}

.clickfix-modal-card .clickfix-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(208, 96, 255, 0.15);
  color: #e6cdff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.clickfix-modal-card .clickfix-modal-close:hover {
  background: rgba(208, 96, 255, 0.28);
  color: #f7d9ff;
}

.clickfix-modal-card .clickfix-modal-body {
  line-height: 1.6;
  font-size: 0.9rem;
  color: #e6cdff;
}

.clickfix-modal-card .clickfix-modal-body h3 {
  margin: 1.2em 0 0.5em;
  font-size: 1rem;
  color: #f2ddff;
}

.clickfix-modal-card .clickfix-modal-body h3:first-child {
  margin-top: 0;
}

.clickfix-modal-card .clickfix-modal-body p,
.clickfix-modal-card .clickfix-modal-body li {
  margin: 0 0 0.5em;
  color: rgba(230, 205, 255, 0.9);
}

.clickfix-modal-card .clickfix-modal-body ul {
  margin: 0.5em 0;
  padding-left: 1.4em;
}

.clickfix-modal-card .clickfix-modal-body .clickfix-modal-block {
  background: rgba(208, 96, 255, 0.1);
  border: 1px solid rgba(208, 96, 255, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin: 10px 0;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.modal-grid > div {
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(24, 17, 41, 0.84);
  padding: 9px;
  display: grid;
  gap: 4px;
}

.modal-grid span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.summary-list {
  margin: 0;
  padding-left: 18px;
  color: #e5d3ff;
  display: grid;
  gap: 6px;
}

/* ---------- Admin Panel (admin-workspace) ---------- */
.admin-workspace {
  padding: 0;
}

.admin-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(208, 96, 255, 0.22);
}

.admin-tabbar .tab {
  padding: 10px 16px;
  border: 1px solid rgba(208, 96, 255, 0.28);
  border-radius: 10px;
  background: rgba(24, 17, 41, 0.6);
  color: #d0afe9;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.admin-tabbar .tab:hover {
  background: rgba(208, 96, 255, 0.12);
  border-color: rgba(208, 96, 255, 0.4);
  color: #e6cdff;
}

.admin-tabbar .tab.active {
  background: linear-gradient(135deg, rgba(179, 102, 255, 0.35), rgba(141, 68, 247, 0.3));
  border-color: rgba(208, 96, 255, 0.5);
  color: #fff;
}

.admin-workspace .panel {
  display: block;
  margin-bottom: 24px;
}

.admin-workspace .panel.hidden {
  display: none !important;
}

.admin-workspace .section-caption {
  font-size: 1.1rem;
  color: #f2ddff;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
}

.admin-workspace .card {
  background: linear-gradient(145deg, rgba(42, 24, 70, 0.6), rgba(18, 10, 33, 0.7));
  border: 1px solid rgba(208, 96, 255, 0.22);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.admin-workspace .card h3 {
  margin: 0 0 16px 0;
  font-size: 1rem;
  color: #e6cdff;
}

.admin-workspace .field,
.admin-workspace .form-group {
  margin-bottom: 14px;
}

.admin-workspace .field-label,
.admin-workspace .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: #d0afe9;
}

.admin-workspace .input,
.admin-workspace .form-input {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(208, 96, 255, 0.3);
  border-radius: 10px;
  background: rgba(24, 17, 41, 0.9);
  color: #f2ddff;
  font-size: 0.9rem;
}

.admin-workspace .input:focus,
.admin-workspace .form-input:focus {
  outline: none;
  border-color: rgba(208, 96, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(208, 96, 255, 0.15);
}

.admin-workspace .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.admin-workspace .btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(208, 96, 255, 0.35);
  background: linear-gradient(135deg, rgba(179, 102, 255, 0.35), rgba(141, 68, 247, 0.28));
  color: #f2ddff;
}

.admin-workspace .btn:hover {
  background: linear-gradient(135deg, rgba(179, 102, 255, 0.5), rgba(141, 68, 247, 0.4));
  border-color: rgba(208, 96, 255, 0.5);
}

.admin-workspace .btn-secondary {
  background: rgba(40, 25, 65, 0.8);
  border-color: rgba(208, 96, 255, 0.25);
}

.admin-workspace .btn-primary {
  background: linear-gradient(135deg, #b366ff, #8d44f7);
  border-color: rgba(208, 96, 255, 0.5);
  color: #fff;
}

.admin-workspace .btn-danger {
  background: linear-gradient(135deg, rgba(255, 92, 166, 0.4), rgba(200, 60, 120, 0.3));
  border-color: rgba(255, 92, 166, 0.45);
  color: #ffd4e7;
}

.admin-workspace .users-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-workspace .users-table th,
.admin-workspace .users-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(208, 96, 255, 0.15);
}

.admin-workspace .users-table th {
  color: #d4adf6;
  font-weight: 600;
  background: rgba(208, 96, 255, 0.08);
}

.admin-workspace .users-table td {
  color: #e6cdff;
}

.admin-workspace .users-table tbody tr:hover td {
  background: rgba(208, 96, 255, 0.06);
}

.admin-workspace .logs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.admin-workspace .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-workspace .filter-group label {
  color: #d0afe9;
  font-size: 0.85rem;
}

.admin-workspace .logs-table-container {
  overflow-x: auto;
  margin-bottom: 16px;
}

.admin-workspace .logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-workspace .logs-table th,
.admin-workspace .logs-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(208, 96, 255, 0.15);
}

.admin-workspace .logs-table th {
  color: #d4adf6;
  font-weight: 600;
  background: rgba(208, 96, 255, 0.08);
}

.admin-workspace .logs-table td {
  color: #e6cdff;
}

.admin-workspace .logs-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-workspace .logs-pagination .btn {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.admin-workspace .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.admin-workspace .stat-card {
  background: linear-gradient(145deg, rgba(42, 24, 70, 0.6), rgba(18, 10, 33, 0.7));
  border: 1px solid rgba(208, 96, 255, 0.22);
  border-radius: 14px;
  padding: 20px;
}

.admin-workspace .stat-card h3 {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: #d0afe9;
}

.admin-workspace .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f2ddff;
}

.admin-workspace .btn-small {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(208, 96, 255, 0.3);
  background: rgba(208, 96, 255, 0.12);
  color: #e6cdff;
  cursor: pointer;
}

.admin-workspace .btn-small:hover {
  background: rgba(208, 96, 255, 0.25);
  border-color: rgba(208, 96, 255, 0.45);
}

/* Admin edit modal (backdrop) */
#editUserModal.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 9, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
}

#editUserModal .modal-content {
  width: min(100%, 520px);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #120d25, #090613);
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 16px;
  padding: 24px;
}

#editUserModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
}

#editUserModal .modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #f2ddff;
}

#editUserModal .modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(208, 96, 255, 0.15);
  color: #e6cdff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

#editUserModal .modal-body {
  margin-bottom: 20px;
}

#editUserModal .modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(208, 96, 255, 0.18);
}

/* Edit User modal: form fields */
#editUserModal .form-group {
  margin-bottom: 16px;
}
#editUserModal .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #d0afe9;
}
#editUserModal .form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(208, 96, 255, 0.3);
  border-radius: 10px;
  background: rgba(24, 17, 41, 0.9);
  color: #f2ddff;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#editUserModal .form-input::placeholder {
  color: rgba(210, 175, 233, 0.5);
}
#editUserModal .form-input:focus {
  outline: none;
  border-color: rgba(208, 96, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(208, 96, 255, 0.15);
}
#editUserModal .form-input:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  background: rgba(24, 17, 41, 0.6);
}
#editUserModal select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23d0afe9' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
#editUserModal .form-group h3 {
  color: #e6cdff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px 0;
}
/* Modules checkboxes row */
#editUserModal .form-group label[style*="display: flex"] {
  color: #e6cdff;
  font-size: 0.9rem;
}
#editUserModal .form-group input[type="checkbox"] {
  margin-right: 8px;
}
/* 2FA section divider */
#editUserModal .form-group .edit-2fa-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(208, 96, 255, 0.2);
}
/* Note box (примечание) */
#editUserModal .edit-note-box {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(24, 17, 41, 0.8);
  border-radius: 10px;
  border-left: 3px solid var(--ok, #56e3b0);
  color: #b8a7d8;
  font-size: 12px;
  line-height: 1.5;
}
#editUserModal .edit-note-box strong {
  color: #56e3b0;
}
/* Sub summary above footer */
#editUserModal .edit-sub-summary {
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(208, 96, 255, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(208, 96, 255, 0.2);
  font-size: 0.9rem;
  color: #e6cdff;
}
#editUserModal .edit-sub-summary strong {
  color: #d0afe9;
  margin-right: 6px;
}
/* Buttons in modal */
#editUserModal .modal-footer .btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
#editUserModal .modal-footer .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(208, 96, 255, 0.25);
  color: #e6cdff;
}
#editUserModal .modal-footer .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(208, 96, 255, 0.35);
}
#editUserModal .modal-footer .btn-primary {
  background: linear-gradient(135deg, rgba(179, 102, 255, 0.5), rgba(141, 68, 247, 0.4));
  border: 1px solid rgba(208, 96, 255, 0.4);
  color: #fff;
}
#editUserModal .modal-footer .btn-primary:hover {
  background: linear-gradient(135deg, rgba(179, 102, 255, 0.65), rgba(141, 68, 247, 0.55));
  border-color: rgba(208, 96, 255, 0.55);
}

/* Sidebar: subscription block above Sign Out */
.sidebar-sub-info {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(208, 96, 255, 0.12);
  border: 1px solid rgba(208, 96, 255, 0.25);
  border-radius: 12px;
  font-size: 0.85rem;
  color: #e6cdff;
  text-align: center;
  line-height: 1.4;
}
.sidebar-sub-info strong {
  color: #d0afe9;
  margin-right: 4px;
}

/* Общие модалки админки (User Info, Server Info, Execute Command) */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 9, 0.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
}

.modal[style*="display: block"],
.modal[style*="display:flex"] {
  display: flex !important;
}

.modal .modal-content {
  width: min(100%, 520px);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #120d25, #090613);
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 16px;
  padding: 24px;
}

.modal .modal-content-large {
  width: min(100%, 900px);
}

.modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
}

.modal .modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #f2ddff;
}

.modal .modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(208, 96, 255, 0.15);
  color: #e6cdff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.modal .modal-close:hover {
  background: rgba(208, 96, 255, 0.28);
  color: #f7d9ff;
}

.modal .modal-body {
  margin-bottom: 20px;
  color: #e6cdff;
  font-size: 0.9rem;
}

.modal .modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(208, 96, 255, 0.18);
}

/* Log Details modal (admin-logs.js: modal-overlay + modal-dialog) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 9, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
}

.modal-overlay .modal-dialog {
  width: min(100%, 640px);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #120d25, #090613);
  border: 1px solid rgba(208, 96, 255, 0.24);
  border-radius: 16px;
  padding: 24px;
}

.modal-overlay .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: 16px;
  padding: 0 24px 12px 24px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
}

.modal-overlay .modal-header h2,
.modal-overlay .modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #f2ddff;
}

/* Поля модалки «Generate Statistics» — единая сетка и выравнивание */
.modal-overlay .modal-statistics-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-overlay .modal-statistics-fields .stat-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-overlay .modal-statistics-fields .stat-field label {
  display: block;
  font-size: 0.9rem;
  color: #d4adf6;
  font-weight: 500;
}

.modal-overlay .modal-statistics-fields .stat-field input[type="date"],
.modal-overlay .modal-statistics-fields .stat-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(208, 96, 255, 0.26);
  background: linear-gradient(140deg, rgba(38, 15, 64, 0.5), rgba(19, 10, 35, 0.7));
  color: #f4dcff;
  min-height: 2.5rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.modal-overlay .modal-statistics-fields .stat-field input[type="date"]:hover,
.modal-overlay .modal-statistics-fields .stat-field select:hover {
  border-color: rgba(208, 96, 255, 0.4);
}

.modal-overlay .modal-statistics-fields .stat-field input[type="date"]:focus,
.modal-overlay .modal-statistics-fields .stat-field select:focus {
  border-color: rgba(208, 96, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(208, 96, 255, 0.15);
}

.modal-overlay .modal-statistics-fields .stat-field-tags select[multiple] {
  min-height: 5rem;
  padding: 8px;
}

.modal-overlay .modal-statistics-fields .stat-field-tags .field-note {
  margin-top: 2px;
  display: block;
}

.modal-overlay .modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.modal-overlay .form-error {
  color: #ff8a8a;
  margin-bottom: 10px;
}

.modal-overlay .form-success {
  color: #8aff9e;
  margin-bottom: 10px;
}

/* Блок со ссылкой всегда виден в модалке (перебиваем inline display: none) */
.modal-overlay #statisticsLinkBox {
  margin-top: 14px;
  display: block !important;
  visibility: visible !important;
}

.modal-overlay #statisticsLinkBox label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #d4adf6;
  font-weight: 500;
}

.modal-overlay #statisticsLinkBox input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(208, 96, 255, 0.26);
  background: linear-gradient(140deg, rgba(38, 15, 64, 0.5), rgba(19, 10, 35, 0.7));
  color: #f4dcff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.modal-overlay #statisticsLinkBox input:hover {
  border-color: rgba(208, 96, 255, 0.4);
}

.modal-overlay #statisticsLinkBox input:focus {
  border-color: rgba(208, 96, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(208, 96, 255, 0.15);
}

.modal-overlay .modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(208, 96, 255, 0.15);
  color: #e6cdff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}

.modal-overlay .modal-close:hover {
  background: rgba(208, 96, 255, 0.28);
  color: #f7d9ff;
}

.modal-overlay .modal-body {
  color: #e6cdff;
  font-size: 0.9rem;
}

.log-details {
  display: grid;
  gap: 10px;
}

.log-details h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #e6cdff;
}

.log-details .detail-row {
  padding: 8px 12px;
  background: rgba(208, 96, 255, 0.06);
  border-radius: 8px;
  border-left: 3px solid rgba(179, 102, 255, 0.4);
  color: #e6cdff;
  font-size: 0.88rem;
}

.log-details .detail-row strong {
  color: #d4adf6;
  margin-right: 8px;
}

.log-details .detail-row pre {
  margin: 8px 0 0 0;
  padding: 10px;
  background: rgba(12, 6, 25, 0.8);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  color: #d0afe9;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-details .detail-row small {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #d0afe9;
  word-break: break-word;
}

.log-details .detail-row.error {
  border-left-color: rgba(255, 107, 107, 0.6);
  background: rgba(80, 20, 30, 0.3);
}

.log-details .detail-row.error strong {
  color: #ff9f9f;
}

/* Admin info-section (User Info modal) в едином стиле */
.modal .info-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(208, 96, 255, 0.2);
}

.modal .info-section:last-child {
  border-bottom: none;
}

.modal .info-section h3 {
  margin-bottom: 10px;
  color: #e6cdff;
  font-size: 0.95rem;
}

.modal .info-grid div {
  padding: 10px 12px;
  background: rgba(208, 96, 255, 0.08);
  border-radius: 8px;
  color: #e6cdff;
  border: 1px solid rgba(208, 96, 255, 0.18);
}

.modal .info-grid div strong {
  color: #b8a0e0;
}

.modal .ip-item,
.modal .history-item,
.modal .activity-item {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(208, 96, 255, 0.06);
  border-radius: 8px;
  border-left: 3px solid rgba(179, 102, 255, 0.4);
  color: #e6cdff;
}

.modal .user-agent {
  margin-top: 8px;
  font-size: 0.8rem;
  padding: 8px;
  background: rgba(12, 6, 25, 0.6);
  border-radius: 6px;
  color: #d0afe9;
}

@media (max-width: 1180px) {
  .panel-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    top: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(210px, 320px) minmax(0, 1fr);
    grid-template-areas:
      'brand sub'
      'brand signout'
      'nav nav';
    align-items: center;
  }

  .sidebar-brand {
    grid-area: brand;
    min-width: 0;
    width: 100%;
  }

  .sidebar-sub-info {
    grid-area: sub;
    justify-self: end;
    margin-bottom: 8px;
    width: auto;
    min-width: 120px;
  }

  .sidebar-nav {
    grid-area: nav;
    min-width: 0;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  }

  .sidebar-nav button {
    min-height: 46px;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .signout-btn {
    grid-area: signout;
    margin-top: 0;
    width: auto;
    min-width: 142px;
    min-height: 46px;
    justify-content: center;
    text-align: center;
    justify-self: end;
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .stats-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .build-studio-grid {
    grid-template-columns: 1fr;
  }

  .logs-command-grid {
    grid-template-columns: 1fr;
  }

  .logs-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logs-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clickfix-add-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clickfix-add-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .clickfix-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clickfix-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .restore-shell {
    grid-template-columns: 1fr;
  }

  .restore-cookies-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .profile-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
  }

  .logs-search-grid,
  .modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logs-side-stack {
    grid-template-columns: 1fr;
  }

  .logs-bulk-row {
    grid-template-columns: 1fr 1fr;
  }

  .logs-bulk-row .select-all-item {
    grid-column: 1 / -1;
  }

  .dmg-position-grid {
    grid-template-columns: 1fr;
  }

  .stats-head,
  .country-card-head,
  .build-card-head,
  .clickfix-add-head,
  .restore-main-head,
  .restore-side-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .clickfix-server-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .clickfix-server-meta {
    width: 100%;
    justify-content: space-between;
  }

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

  .restore-side-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seeds-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-proxy-item > header {
    flex-direction: column;
    align-items: flex-start;
  }

  .sidebar {
    grid-template-columns: 1fr;
    grid-template-areas:
      'brand'
      'nav'
      'sub'
      'signout';
    align-items: stretch;
  }

  .sidebar-sub-info {
    grid-area: sub;
  }

  .sidebar-brand {
    max-width: none;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signout-btn {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .auth-page,
  .panel-page {
    padding: 12px;
  }

  .auth-shell {
    border-radius: 18px;
  }

  .brand-panel,
  .auth-panel {
    padding: 20px;
  }

  .sidebar {
    border-radius: 14px;
  }

  .workspace-head,
  .country-card,
  .stats-card,
  .country-map-card,
  .logs-search-card,
  .logs-metrics-panel,
  .logs-bulk-card {
    padding: 12px;
  }

  .logs-metrics,
  .logs-search-grid,
  .logs-filter-row,
  .modal-grid,
  .clickfix-summary-grid,
  .clickfix-stat-grid,
  .restore-side-stats {
    grid-template-columns: 1fr;
  }

  .country-card {
    padding: 0;
  }

  .stats-list {
    grid-template-columns: 1fr;
  }

  .dmg-builds-list .build-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .dmg-builds-list .build-actions {
    justify-content: flex-end;
  }

  .country-card-head {
    padding: 12px 12px 10px;
  }

  .country-table-wrap {
    padding: 6px 8px 10px;
  }

  .country-table {
    min-width: 540px;
  }

  .country-table-footer {
    padding: 10px;
  }

  .country-total-pill {
    margin-left: 4px;
  }

  .build-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .build-mode-tabs button {
    width: 100%;
    text-align: center;
  }

  .build-studio-grid {
    padding: 12px;
  }

  .build-side-grid {
    grid-template-columns: 1fr;
  }

  .build-actions {
    justify-content: stretch;
  }

  .build-actions .btn {
    flex: 1;
  }

  .logs-main-actions {
    justify-content: stretch;
  }

  .logs-main-actions .btn {
    flex: 1;
  }

  .logs-bulk-row {
    grid-template-columns: 1fr;
  }

  .logs-bulk-row .btn,
  .logs-main-actions .btn {
    width: 100%;
  }

  .logs-data-head {
    align-items: stretch;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .sidebar-nav button {
    justify-content: flex-start;
    text-align: left;
  }

  .signout-btn {
    width: 100%;
    justify-content: center;
    justify-self: stretch;
  }

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

  .clickfix-add-actions {
    grid-column: auto;
  }

  .clickfix-add-actions .btn {
    width: 100%;
  }

  .clickfix-server-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .clickfix-server-actions .btn {
    width: 100%;
  }

  .restore-actions {
    justify-content: stretch;
  }

  .restore-actions .btn {
    width: 100%;
  }

  .restore-result-panel textarea {
    min-height: 180px;
  }

  .seeds-toolbar {
    grid-template-columns: 1fr;
  }

  .seeds-toolbar .btn {
    width: 100%;
  }

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

  .profile-api-row {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    justify-content: stretch;
  }

  .profile-actions .btn {
    width: 100%;
  }

  .profile-var-row {
    grid-template-columns: 1fr;
  }
}

