/* sellerdesk — базовая тема */

:root {
  color-scheme: dark;
  --bg: #23262e;
  --panel: #2c303a;
  --ink: #e9ebf2;
  --ink-soft: #c2c8d6;
  --muted: #8f96a8;
  --line: #3a3f4c;
  --line-strong: #4b5161;
  --sidebar: #1a1d24;
  --sidebar-2: #22252d;
  --sidebar-ink: #d3d7e3;
  --sidebar-muted: #878fa2;
  --accent: #7c83ff;
  --accent-2: #a07cff;
  --accent-strong: #656df0;
  --green: #4ecf94;
  --green-bg: #1e3a30;
  --red: #f07b7b;
  --red-bg: #3d262a;
  --amber: #e0a54a;
  --amber-bg: #3b3122;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Каркас ---------- */

.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--sidebar-ink);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: 0 6px 16px rgba(91, 91, 245, 0.4);
}

.brand-mark-lg {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 15px;
}

.brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.2px;
  color: #f4f5fa;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-sep {
  height: 1px;
  margin: 10px 8px;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--sidebar-ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
}

.nav-item.is-active {
  background: rgba(91, 91, 245, 0.2);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item svg {
  flex: 0 0 auto;
  opacity: 0.85;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  letter-spacing: 0;
}

.nav-badge[hidden] {
  display: none;
}

.sidebar-foot {
  padding: 0 10px;
  font-size: 11px;
  color: var(--sidebar-muted);
  letter-spacing: 0.3px;
}

/* ---------- Профиль в сайдбаре ---------- */

.profile-block {
  position: relative;
}

.profile-trigger {
  gap: 10px;
}

.profile-trigger-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.profile-trigger-label {
  font-size: 11px;
  color: var(--sidebar-muted);
  letter-spacing: 0.2px;
}

.profile-trigger-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #f2f3f9;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chevron {
  flex: 0 0 auto;
  color: var(--sidebar-muted);
  transition: transform 0.15s ease;
}

.profile-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.profile-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 4px;
  right: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: #242833;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 13px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card-text {
  min-width: 0;
}

.profile-name {
  font-size: 15px;
  font-weight: 650;
  color: #f5f6fb;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Аватары ---------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  user-select: none;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.avatar-lg {
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.avatar-0 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.avatar-1 { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.avatar-2 { background: linear-gradient(135deg, #10b981, #0d9488); }
.avatar-3 { background: linear-gradient(135deg, #f59e0b, #ef6c00); }
.avatar-4 { background: linear-gradient(135deg, #ec4899, #be185d); }
.avatar-5 { background: linear-gradient(135deg, #64748b, #334155); }

/* ---------- Основная область ---------- */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 34px;
  background: rgba(35, 38, 46, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.topbar-title {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-weight: 600;
}

.page {
  padding: 26px 34px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Панели и карточки ---------- */

.panel {
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  color: #fff;
  border-radius: var(--radius);
  background:
    radial-gradient(700px 240px at 92% -20%, rgba(124, 92, 245, 0.65), transparent 70%),
    linear-gradient(135deg, #1b1e30 0%, #2a2e4d 100%);
  box-shadow: var(--shadow);
}

.hero-kicker {
  font-size: 11.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #9ea4c9;
}

.hero-title {
  margin: 7px 0 10px;
  font-size: 27px;
  font-weight: 680;
  letter-spacing: -0.4px;
}

.hero-text {
  margin: 0;
  max-width: 620px;
  color: #c7cbe3;
  line-height: 1.55;
}

.hero-badge {
  flex: 0 0 auto;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-link {
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  border-color: #5a5f8a;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  text-decoration: none;
}

.card-icon,
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #343a52;
  color: var(--accent);
  font-weight: 700;
}

.card-title {
  margin: 4px 0 0;
  font-size: 15.5px;
  font-weight: 650;
}

.card-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.card-arrow {
  margin-top: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

.check-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.85;
}

/* ---------- Статистика ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stat-note {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Сетка админки ---------- */

.grid-admin {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
}

/* ---------- Формы ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

.input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #242730;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 131, 255, 0.2);
}

select.input {
  cursor: pointer;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  background: #262a33;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.field-inline {
  min-width: 160px;
}

.field-grow {
  flex: 1 1 220px;
}

.filters-actions {
  display: flex;
  gap: 8px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  filter: saturate(0.35);
}

.btn-primary:disabled {
  background: #3b4050;
  color: #9aa0b0;
}

.btn-primary:disabled:hover {
  background: #3b4050;
  color: #9aa0b0;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 6px 16px rgba(91, 91, 245, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-strong) 0%, #6a4ae0 100%);
  color: #fff;
}

.btn-ghost {
  color: var(--ink-soft);
  background: transparent;
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: #333844;
  color: var(--ink);
}

.btn-soft {
  color: var(--ink-soft);
  background: #343945;
  border-color: #414755;
}

.btn-soft:hover {
  background: #3c4250;
  color: var(--ink);
}

.btn-danger-soft {
  color: var(--red);
  background: var(--red-bg);
  border-color: #5a3238;
}

.btn-danger-soft:hover {
  background: #4a2d31;
}

.btn-success-soft {
  color: var(--green);
  background: var(--green-bg);
  border-color: #2f5c48;
}

.btn-success-soft:hover {
  background: #244538;
  color: var(--green);
}

.btn-sm {
  padding: 7px 11px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.btn.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.profile-menu .btn-ghost {
  color: #d7daea;
  border-color: rgba(255, 255, 255, 0.16);
}

.profile-menu .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ---------- Сообщения ---------- */

.alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 34px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  line-height: 1.5;
}

.alert-success {
  color: #8ee7bb;
  background: var(--green-bg);
  border-color: #2f5a49;
}

.alert-error {
  color: #ffb3b3;
  background: var(--red-bg);
  border-color: #5a3238;
}

.alert-info {
  color: #c3c7ff;
  background: #2e3350;
  border-color: #3d4370;
}

.alert-close {
  flex: 0 0 auto;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
}

.alert-close:hover {
  opacity: 1;
}

/* ---------- Таблицы ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  padding: 11px 13px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  background: #262a33;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: #2f3440;
}

.table-empty {
  padding: 24px 13px;
  text-align: center;
  color: var(--muted);
}

.accounts-hint {
  margin: 0 0 16px;
  font-size: 13px;
}

.accounts-index {
  width: 52px;
  color: var(--muted);
}

.accounts-email {
  display: inline-block;
}

.accounts-account {
  white-space: nowrap;
}

.accounts-link {
  font-weight: 600;
  color: var(--ink);
}

.accounts-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.accounts-copy {
  margin-left: 6px;
  vertical-align: middle;
}

.photo-cell {
  white-space: nowrap;
}

.photo-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ---------- Карточка Fortnite-аккаунта ---------- */

.account-subtitle {
  margin: 0 0 16px;
  font-size: 14px;
}

.account-detail {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.account-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.access-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.access-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-section {
  margin-bottom: 28px;
}

.detail-section h3 {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--ink);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1150px) {
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-item {
  padding: 12px 14px;
  background: #262a33;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-label {
  margin-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.detail-desc {
  margin: 0;
  padding: 16px;
  background: #262a33;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Аккаунты Supercell ---------- */

.sc-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sc-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sc-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sc-tab:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.sc-tab.is-active {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
  font-weight: 600;
}

.sc-tab-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
}

.sc-tab-icon-fallback {
  font-size: 14px;
  line-height: 1;
}

.sc-search-field {
  flex: 1 1 280px;
  min-width: 220px;
  max-width: 460px;
}

.sc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .sc-grid {
    grid-template-columns: 1fr;
  }
}

.sc-grid-empty {
  grid-column: 1 / -1;
  padding: 28px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.sc-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sc-tile[hidden] {
  display: none;
}

.sc-tile:hover,
.sc-tile:focus-visible {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  outline: none;
}

.sc-tile-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sc-tile-icon {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.sc-tile-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #262a33;
  font-size: 26px;
}

.sc-tile-title {
  flex: 1 1 auto;
  min-width: 0;
}

.sc-tile-name {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: break-word;
}

.sc-tile-id {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.sc-tile-tag {
  flex: 0 0 auto;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.sc-tile-mail-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.sc-tile-mail {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 11px;
  background: #262a33;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13.5px;
  color: var(--ink-soft);
  word-break: break-all;
}

.sc-tile-mail-empty {
  color: var(--muted);
  font-family: inherit;
  font-style: italic;
}

.sc-tile-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #262a33;
  color: var(--ink-soft);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sc-tile-copy:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.sc-tile-copy-tag {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.sc-tile-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-tile-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  line-height: 1.4;
}

.sc-tile-stat-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.sc-tile-stat-value {
  color: var(--ink);
  font-weight: 600;
  word-break: break-word;
}

.detail-item-wide {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .detail-item-wide {
    grid-column: span 1;
  }
}

.mail-value {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}

.games-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  background: #262a33;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.game-item {
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.photo-item img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.photo-item:hover img {
  opacity: 0.9;
}

.photo-copy-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.photo-item:hover .photo-copy-overlay {
  opacity: 1;
}

.photo-copy-icon {
  font-size: 26px;
  color: #fff;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-actions-top {
  margin: 0 0 24px;
  justify-content: flex-start;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-success {
  color: var(--green);
  background: var(--green-bg);
}

.status-error {
  color: var(--red);
  background: var(--red-bg);
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  z-index: 999;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #181b22;
  color: var(--ink);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cell-actions {
  text-align: right;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.row-actions form {
  margin: 0;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-weight: 600;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.nowrap {
  white-space: nowrap;
}

.details-cell {
  max-width: 280px;
  overflow-wrap: anywhere;
}

.empty-row {
  padding: 26px 14px;
  text-align: center;
  color: var(--muted);
}

.event-name {
  display: block;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Бейджи ---------- */

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.role-admin {
  color: #c3c0ff;
  background: #34315c;
}

.role-user {
  color: #c2c8d6;
  background: #343945;
}

.profile-menu .role-badge {
  margin-top: 3px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-on {
  color: var(--green);
}

.status-off {
  color: var(--red);
}

.sev {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.sev-info {
  color: #c2c8d6;
  background: #343945;
}

.sev-warning {
  color: var(--amber);
  background: var(--amber-bg);
}

.sev-critical {
  color: #ffb3b3;
  background: #473037;
}

/* ---------- Пагинация ---------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.pagination-info {
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- Пустые состояния ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 64px 30px;
  text-align: center;
}

.empty-title {
  margin: 6px 0 0;
  font-size: 19px;
  font-weight: 650;
}

.empty-text {
  margin: 0;
  max-width: 540px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Страница входа ---------- */

.login-body {
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(124, 131, 255, 0.28), transparent 65%),
    radial-gradient(800px 500px at 100% 100%, rgba(160, 124, 255, 0.18), transparent 60%),
    #1c1f26;
}

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
}

.login-card {
  width: 100%;
  max-width: 392px;
  padding: 34px 32px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.login-subtitle {
  font-size: 12.5px;
  color: var(--muted);
}

.login-card .alert {
  margin: 0 0 16px;
}

.login-note {
  margin: 20px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.error-card {
  text-align: center;
}

.error-code {
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--accent);
}

.error-title {
  margin: 12px 0 8px;
  font-size: 20px;
}

.error-text {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.error-actions {
  display: flex;
  justify-content: center;
}

/* ---------- Профили Playerok ---------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Мини-поповер «Новый профиль» */

.add-wrap {
  position: relative;
  display: inline-block;
}

.add-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  padding: 4px;
  border-radius: 24px;
  background: rgba(44, 48, 58, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 0 0 1px var(--line), 0 18px 44px rgba(0, 0, 0, 0.45);
  transform-origin: 100% 0;
  transform: translateY(-6px) scale(0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.18s ease, visibility 0s linear 0.25s;
}

.add-popover.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease,
    visibility 0s;
}

.add-panel[hidden],
.add-view[hidden] {
  display: none !important;
}

.add-choose {
  position: relative;
  display: flex;
}

.add-glass {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1),
    width 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.add-glass.no-anim {
  transition: none;
}

.add-option {
  position: relative;
  z-index: 1;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}

.add-option:hover,
.add-option:focus-visible {
  color: var(--ink);
  text-decoration: none;
}

.add-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.add-inpanel {
  display: flex;
  align-items: center;
  gap: 4px;
  width: min(370px, calc(100vw - 48px));
  padding: 2px;
}

.add-inpanel.shake {
  animation: add-shake 0.4s;
}

@keyframes add-shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.add-back {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.add-back:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.add-input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.add-input::placeholder {
  color: var(--muted);
}

.add-input:focus {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.add-create-fields {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 2px 0;
}

.add-create-fields .add-input {
  width: 100%;
}

.add-submit {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.add-submit:hover {
  background: var(--accent-strong);
}

.add-submit:active {
  transform: scale(0.94);
}

.add-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.add-loadpanel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px 10px 16px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.add-mini {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: add-spin 0.8s linear infinite;
}

@keyframes add-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Модалка результата */

.add-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 14, 18, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.add-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0s;
}

.add-modal {
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #2c303a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(12px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.add-backdrop.is-open .add-modal {
  transform: none;
  opacity: 1;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.add-view {
  text-align: center;
}

.add-view.in {
  animation: add-view-in 0.45s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.add-panel.in {
  animation: add-view-in 0.45s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@keyframes add-view-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.add-view h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 650;
  color: var(--ink);
}

.add-view p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.add-view .add-account {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.add-view .add-error {
  margin-top: 12px;
  color: #ff9b93;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.add-badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  animation: add-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.add-badge-ok {
  background: rgba(48, 179, 80, 0.16);
  color: #4ade80;
}

.add-badge-bad {
  background: rgba(255, 69, 58, 0.16);
  color: #ff6b61;
}

@keyframes add-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

.add-users {
  display: grid;
  gap: 2px;
  margin: 16px 0 14px;
  text-align: left;
}

.add-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 14px;
  cursor: pointer;
}

.add-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Вышестоящие роли остаются с доступом: тумблер включён и не переключается. */
.add-user.is-locked {
  cursor: default;
}

.add-user.is-locked:hover {
  background: transparent;
}

.add-user.is-locked .add-toggle {
  opacity: 0.75;
}

.add-user input:disabled + .add-toggle {
  cursor: not-allowed;
}

.add-user b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.add-role {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11.5px;
}

.add-user input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.add-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.25s ease;
}

.add-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.add-user input:checked + .add-toggle {
  background: #30b350;
}

.add-user input:checked + .add-toggle::after {
  transform: translateX(18px);
}

.add-user input:focus-visible + .add-toggle {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.add-primary,
.add-secondary {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.add-primary {
  background: var(--accent);
  color: #fff;
}

.add-primary:hover {
  background: var(--accent-strong);
}

.add-secondary {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.add-secondary:hover {
  background: rgba(255, 255, 255, 0.11);
}

.add-primary:active,
.add-secondary:active {
  transform: scale(0.97);
}

.add-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 140;
  padding: 11px 18px;
  border-radius: 999px;
  background: #1c1f27;
  color: #f5f6fb;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 500;
  transform: translate(-50%, 30px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.add-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Доступ к профилю в списке и форме */

.manager-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.manager-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  background: #2f3441;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.manager-chip.is-inactive {
  opacity: 0.55;
}

.manager-chip.is-admin {
  background: #34315c;
  color: #c3c0ff;
}

.manager-chip-mark {
  display: inline-flex;
  align-items: center;
  color: var(--amber);
  line-height: 1;
}

.icon-star {
  display: block;
}

.manager-more {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.manager-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.manager-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #262a33;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
}

.manager-option:hover {
  background: #2d323d;
}

.manager-option.is-locked {
  cursor: default;
  opacity: 0.75;
}

.manager-option.is-locked:hover {
  background: #262a33;
}

.manager-option input {
  accent-color: var(--accent);
}

.manager-option.is-inactive {
  opacity: 0.55;
}

.manager-empty {
  color: var(--muted);
  font-size: 12.5px;
}

@media (prefers-reduced-motion: reduce) {
  .add-popover,
  .add-glass,
  .add-modal,
  .add-backdrop,
  .add-toast {
    transition: none;
  }
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #262a33;
  border-radius: 11px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-decoration: none;
}

.tab.is-active {
  background: #343946;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.tab-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-weight: 650;
}

.tab.is-active .tab-count {
  background: #3d425e;
  color: #c7c9ff;
}

.profile-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.profile-title {
  color: var(--ink);
  font-weight: 600;
}

.profile-title:hover {
  color: var(--accent);
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.profile-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-registered {
  color: #c2c8d6;
  background: #343945;
}

.status-active {
  color: #8ee7bb;
  background: var(--green-bg);
}

.status-verified {
  color: #c3c0ff;
  background: #34315c;
}

.status-banned {
  color: #ffb3b3;
  background: var(--red-bg);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.avatar-xs {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

.panel-narrow {
  max-width: 860px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
}

.textarea {
  min-height: 96px;
  font-family: inherit;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.checkbox input {
  margin: 0;
}

.checkbox label {
  cursor: pointer;
}

.back-link {
  display: inline-flex;
  align-self: flex-start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.detail-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.detail-title {
  margin: 0 0 3px;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.3px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--amber);
  background: var(--amber-bg);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}

.grid-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.info-list > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.info-list dt {
  color: var(--muted);
  font-size: 12.5px;
}

.info-list dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.panel-actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.panel-actions form {
  margin: 0;
}

.alert-inline {
  margin: 0;
}

.role-manager {
  color: var(--amber);
  background: var(--amber-bg);
}

.role-worker {
  color: #c2c8d6;
  background: #343945;
}

/* ---------- Панель управления профилем поверх списка ---------- */

.has-panel {
  overflow: hidden;
}

.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.74);
  backdrop-filter: blur(3px);
}

.panel-backdrop[hidden] {
  display: none;
}

.panel-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: #1a1d26;
  border: 1px solid #2b2f3b;
  border-radius: 12px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
}

.panel-modal-body {
  padding: 22px 24px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.panel-modal-close {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6f7890;
  line-height: 0;
  cursor: pointer;
}

.panel-modal-close:hover {
  color: #fff;
}

.panel-modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.panel-modal-flash {
  padding: 16px 60px 0 24px;
}

.panel-modal-flash .alert {
  margin: 0;
}

.panel-modal-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: #6f7890;
  font-size: 13px;
}

/* Содержимое панели профиля повторяет разметку основного сайта. */

.pk-detail-form {
  margin: 0;
}

.pk-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-right: 44px;
}

.pk-detail-head .avatar {
  width: 58px;
  height: 58px;
  font-size: 21px;
}

.pk-detail-head-text {
  flex: 1 1 auto;
  min-width: 0;
}

.pk-detail-head-text h3 {
  margin: 0 0 6px;
  color: #f4f4f5;
  font-size: 20px;
  font-weight: 600;
}

.pk-detail-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #9aa3b5;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pk-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pk-detail-actions .btn {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.pk-detail-updated {
  margin-left: auto;
  color: #6f7890;
  font-size: 12px;
}

.pk-detail-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #2b2f3b;
}

.pk-detail-section h4 {
  margin: 0 0 12px;
  color: #9aa3b5;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pk-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.pk-detail-cell {
  min-width: 0;
  padding: 8px 10px;
  background: #12141a;
  border: 1px solid #2b2f3b;
  border-radius: 8px;
}

.pk-detail-cell-wide {
  grid-column: 1 / -1;
}

.pk-detail-label {
  display: block;
  margin-bottom: 4px;
  color: #6f7890;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pk-detail-value {
  display: block;
  min-width: 0;
  color: #e6e6ea;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pk-detail-value-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pk-mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

/* Поля редактирования выглядят как значения ячейки и проявляются при наведении. */
.pk-cell-input {
  width: calc(100% + 12px);
  margin: 0 0 0 -6px;
  padding: 3px 6px;
  font-size: 13px;
  color: #e6e6ea;
  background: transparent;
  border-color: transparent;
  border-radius: 6px;
}

.pk-cell-input:hover {
  background: #161922;
  border-color: #3a4152;
}

.pk-cell-input:focus {
  background: #12141a;
  border-color: var(--accent);
  box-shadow: none;
}

textarea.pk-cell-input {
  min-height: 52px;
  resize: vertical;
}

.pk-detail-cell .checkbox {
  margin-top: 6px;
  font-size: 12px;
  color: #9aa3b5;
}

.pk-detail-cell .checkbox label {
  color: #9aa3b5;
}

.pk-detail-note .pk-detail-value {
  white-space: pre-wrap;
}

.pk-detail-access {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pk-detail-access .manager-chip {
  background: #232838;
  color: #c9cfda;
}

.pk-detail-access .manager-chip.is-admin {
  background: #2b2f4d;
  color: #c9c6ff;
}

.pk-detail-access .manager-option {
  background: #12141a;
  border: 1px solid #2b2f3b;
  border-radius: 8px;
  color: #c9cfda;
}

.pk-detail-access .manager-option:hover {
  background: #1a1d26;
  border-color: #3a4152;
}

@media (max-width: 820px) {
  .panel-backdrop {
    padding: 12px;
  }

  .panel-modal {
    max-height: calc(100vh - 24px);
  }

  .panel-modal-body {
    padding: 18px 16px 22px;
  }

  .pk-detail-updated {
    width: 100%;
    margin-left: 0;
  }

  .pk-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1080px) {
  .grid-admin,
  .grid-profile {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .profile-block {
    flex: 1 1 100%;
  }

  .profile-menu {
    right: auto;
    width: min(320px, 90vw);
  }

  .nav-sep {
    display: none;
  }

  .sidebar-foot {
    display: none;
  }

  .topbar {
    padding: 16px 20px;
  }

  .page {
    padding: 20px;
  }

  .alert {
    margin: 16px 20px 0;
  }

  .hero {
    flex-direction: column;
  }

  .info-list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
}

/* ---------- �������� �������� Playerok ---------- */

/* Общий баланс и заморозки Playerok */

.pk-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 36px;
  margin-bottom: 18px;
}

.pk-balance-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pk-balance-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pk-balance-item b {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.pk-balance-available b {
  color: var(--green);
}

.pk-balance-frozen b {
  color: var(--amber);
}

.pk-balance-note {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 12px;
}

.pk-frozen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: -6px 0 18px;
}

.pk-frozen-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pk-frozen-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pk-frozen-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-frozen-sum {
  color: var(--amber);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.pk-frozen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.pk-frozen-amount {
  color: var(--ink);
  font-weight: 600;
}

.pk-frozen-when {
  color: var(--amber);
}

.pk-frozen-title {
  flex: 1 1 100%;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-panel {
  padding: 20px;
}

.pk-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pk-stat {
  padding: 6px 12px;
  background: #262a33;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.pk-stat b {
  color: var(--ink);
}

.pk-stat-active {
  background: var(--green-bg);
  border-color: #2f5d4b;
  color: #8ee7bb;
}

.pk-stat-active b {
  color: #8ee7bb;
}

.pk-stat-unverified {
  background: #3d3520;
  border-color: #5d4d29;
  color: #ffd28a;
}

.pk-stat-unverified b {
  color: #ffd28a;
}

.pk-stat-banned {
  background: var(--red-bg);
  border-color: #5a3238;
  color: #ffb3b3;
}

.pk-stat-banned b {
  color: #ffb3b3;
}

.pk-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.pk-empty {
  grid-column: 1 / -1;
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.pk-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #282c35;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.pk-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.pk-card.pk-active {
  border-color: #2f5d4b;
}

.pk-card.pk-verified {
  border-color: #454275;
  box-shadow: 0 0 0 1px rgba(124, 131, 255, 0.18);
}

.pk-card.pk-banned {
  background: #2e262a;
}

.pk-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pk-avatar-ph {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.3px;
  user-select: none;
}

.pk-card-head-text {
  min-width: 0;
  flex: 1 1 auto;
}

.pk-card-head-text h3 {
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responsible-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.responsible-star {
  display: inline-flex;
  align-items: center;
  color: var(--amber);
}

.pk-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pk-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.pk-badge-registered {
  color: #c2c8d6;
  background: #343945;
}

.pk-badge-active {
  color: #8ee7bb;
  background: var(--green-bg);
}

.pk-badge-verified {
  color: #c3c0ff;
  background: #34315c;
}

.pk-badge-banned {
  color: #ffb3b3;
  background: var(--red-bg);
}

.pk-badge-unverified {
  color: #ffd28a;
  background: #3d3520;
}

.pk-badge-proxy {
  color: #9fd0ff;
  background: #26364a;
}

.pk-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pk-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pk-value {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-note-text {
  white-space: normal;
  word-break: break-word;
}

.pk-value-muted {
  color: var(--muted);
}

.pk-card-balance-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  min-height: 24px;
}

.pk-card-balance {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.pk-card-balance-frozen,
.pk-card-frozen {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9cdcff;
  background: rgba(120, 190, 255, 0.12);
  border: 1px solid rgba(120, 190, 255, 0.3);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pk-card-balance-frozen {
  padding: 1px 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.pk-card-frozen {
  padding: 2px 8px;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.3;
}

.icon-snow {
  flex: none;
  width: 13px;
  height: 13px;
  color: inherit;
  fill: currentColor;
}

.pk-mail-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.pk-mail {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  background: #22252d;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: Consolas, monospace;
  font-size: 12.5px;
  word-break: break-all;
  cursor: pointer;
}

.pk-mail:hover {
  border-color: var(--line-strong);
}

.pk-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.pk-card-foot .pk-mini-select {
  flex: 1 1 auto;
}

.pk-foot-form {
  display: flex;
  margin: 0;
}

.pk-select {
  padding: 8px 10px;
  color: var(--ink);
  background: #242730;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.pk-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.pk-mini {
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1;
}

.pk-panel-open {
  width: 100%;
  justify-content: center;
  padding: 8px 10px;
  font-size: 13px;
}

.pk-launch {
  width: 100%;
  padding: 9px 10px;
  font-size: 13px;
}

.btn-launch {
  color: #fff;
  background: linear-gradient(135deg, #2f9e65 0%, #1f7d4f 100%);
  box-shadow: 0 6px 16px rgba(47, 158, 101, 0.24);
}

.btn-launch:hover {
  background: linear-gradient(135deg, #35b172 0%, #238b58 100%);
}

.btn-launch:disabled,
.btn-launch:disabled:hover {
  color: #c3ccd8;
  background: #3b4050;
  box-shadow: none;
  cursor: progress;
}

/* ---------- Залив аккаунтов на Playerok ---------- */

.upload-seller {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.upload-seller-text {
  min-width: 0;
  flex: 1 1 auto;
}

.upload-seller-name {
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
}

.upload-seller-badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: #343945;
}

.upload-seller-badge.is-ok {
  color: var(--green);
  background: var(--green-bg);
  border-color: #2d5a48;
}

.upload-seller-badge.is-bad {
  color: var(--red);
  background: var(--red-bg);
  border-color: #5a3238;
}

.upload-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.upload-tab {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #2a2e37;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.upload-tab:hover {
  background: #333844;
  color: var(--ink);
}

.upload-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: transparent;
}

.upload-pane[hidden],
.upload-form[hidden],
.upload-result[hidden],
.upload-error[hidden],
.upload-warn[hidden],
.upload-photos[hidden],
.upload-sc-grid[hidden],
.upload-sc-empty[hidden],
.upload-sc-card[hidden] {
  display: none !important;
}

.upload-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.upload-search .btn[hidden] {
  display: none !important;
}

.upload-error {
  margin-bottom: 14px;
  padding: 11px 14px;
  color: var(--red);
  background: var(--red-bg);
  border: 1px solid #5a3238;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.45;
}

.upload-warn {
  padding: 11px 14px;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid #5a4a2c;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.45;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upload-target {
  padding: 14px 16px;
  background: #262a33;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.upload-target-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.upload-target-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  word-break: break-word;
}

.upload-target-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(124, 131, 255, 0.14);
  border: 1px solid rgba(124, 131, 255, 0.3);
}

.upload-target-meta {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-word;
}

.upload-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-photo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: #1f222a;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.upload-actions .btn {
  padding: 11px 18px;
}

/* Кнопки замены эмодзи у полей текста. */
.upload-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.upload-name-row .input {
  flex: 1 1 240px;
  min-width: 0;
}

.upload-emoji-btn {
  white-space: nowrap;
}

.field > .upload-emoji-btn {
  align-self: flex-start;
}

.upload-sc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.upload-sc-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  text-align: left;
  color: var(--ink);
  background: #2a2e37;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-sc-card:hover {
  background: #313641;
  border-color: var(--accent);
}

.upload-sc-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #1f222a;
  font-size: 18px;
  overflow: hidden;
}

.upload-sc-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-sc-text {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-sc-name {
  font-size: 13.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-sc-sub,
.upload-sc-mail {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-sc-count {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
}

.upload-sc-empty {
  grid-column: 1 / -1;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.upload-result {
  margin-top: 6px;
}

.upload-result-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--green-bg);
  border: 1px solid #2d5a48;
  border-radius: var(--radius-sm);
}

.upload-result-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #0f1f19;
  background: var(--green);
  font-size: 18px;
  font-weight: 700;
}

.upload-result-body {
  min-width: 0;
  flex: 1 1 auto;
}

.upload-result-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--green);
}

.upload-result-name {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13.5px;
  word-break: break-word;
}

.upload-result-meta {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.upload-result-sync {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.upload-result-warning {
  margin-top: 6px;
  padding: 8px 10px;
  color: #ffdca8;
  background: #4a3520;
  border: 1px solid #63471f;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.upload-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

@media (max-width: 760px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .upload-seller {
    flex-wrap: wrap;
  }

  .upload-actions .btn {
    width: 100%;
  }
}

/* ---------- Шаблоны текстов Playerok ---------- */

.tpl-panel-head {
  align-items: flex-start;
}

.tpl-panel-head .tpl-hint {
  margin: 4px 0 0;
}

.tpl-intro code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #343945;
  color: var(--ink-soft);
}

.tpl-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.tpl-games-panel,
.tpl-editor-panel {
  background: #262a33;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.tpl-games-panel {
  padding: 8px;
}

.tpl-editor-panel {
  min-width: 0;
  padding: 18px;
}

/* Горизонтальное меню игр: одна строка с прокруткой. */
.tpl-games-list {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.tpl-games-list .tpl-empty {
  flex: 1 0 auto;
  width: 100%;
  padding: 16px 12px;
}

.tpl-game {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tpl-game:hover {
  background: #2f343f;
}

.tpl-game.active {
  background: #343945;
  border-color: var(--line-strong);
}

.tpl-game-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.tpl-game-slug {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.tpl-game-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.tpl-game-badges span {
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #22252d;
  color: var(--muted);
  font-size: 10px;
}

.tpl-game.active .tpl-game-badges span {
  background: #2b2f3a;
}

.tpl-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.tpl-editor-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.tpl-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.tpl-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tpl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.tpl-tab {
  margin-bottom: -1px;
  padding: 9px 12px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.tpl-tab:hover {
  background: #2f343f;
  color: var(--ink);
}

.tpl-tab.active {
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-weight: 650;
}

.tpl-tab-count {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 10px;
  background: #343945;
  color: var(--muted);
  font-size: 11px;
}

.tpl-tab.active .tpl-tab-count {
  background: rgba(124, 131, 255, 0.2);
  color: #c3c0ff;
}

.tpl-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tpl-hint code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #343945;
  color: var(--ink-soft);
}

.tpl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.tpl-chips[hidden] {
  display: none;
}

.tpl-chip {
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #2b2f3a;
  color: var(--ink-soft);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  cursor: pointer;
}

.tpl-chip:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ---------- Плиточки шаблонов ---------- */

.tpl-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tpl-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #242730;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tpl-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 131, 255, 0.14);
}

.tpl-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #262a33;
}

.tpl-card-badge {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tpl-card-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.tpl-card-remove {
  padding: 0 6px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.2;
  cursor: pointer;
}

.tpl-card-remove:hover {
  background: var(--red-bg);
  color: var(--red);
}

.tpl-card-input {
  display: block;
  width: 100%;
  min-height: 84px;
  box-sizing: border-box;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow: hidden;
  resize: none;
}

.tpl-card-input:focus {
  outline: none;
}

/* Плавное раскрытие предпросмотра под textarea плиточки. */
.tpl-card-preview {
  display: grid;
  grid-template-rows: 0fr;
  background: #20232b;
  transition: grid-template-rows 0.28s ease;
}

.tpl-card-preview.is-open {
  grid-template-rows: 1fr;
  border-top: 1px solid var(--line);
}

.tpl-card-preview-inner {
  min-height: 0;
  overflow: hidden;
}

.tpl-card-preview-head {
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tpl-card-preview-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 14px 14px;
}

.tpl-card-preview-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #242730;
}

.tpl-card-preview-item-head {
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  background: #2b2f3a;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tpl-card-preview-item pre {
  margin: 0;
  padding: 10px 12px;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.tpl-card-preview-empty {
  color: var(--muted);
  font-size: 12px;
}

.tpl-textarea {
  width: 100%;
  min-height: 420px;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #242730;
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.tpl-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 131, 255, 0.2);
}

.tpl-textarea-emoji {
  min-height: 180px;
}

.tpl-editor-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
}

.tpl-status.dirty {
  color: var(--amber);
}

.tpl-status.clean {
  color: var(--green);
}

.tpl-counter {
  color: var(--muted);
}

.tpl-preview {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tpl-preview[hidden] {
  display: none;
}

.tpl-preview-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink);
}

.tpl-preview-head .tpl-hint {
  margin: 0;
}

.tpl-preview-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tpl-preview-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #242730;
}

.tpl-preview-item-head {
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  background: #2b2f3a;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tpl-preview-item pre {
  margin: 0;
  padding: 12px 14px;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.tpl-warning {
  padding: 9px 12px;
  border: 1px solid #5a4a2c;
  border-radius: 8px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 12px;
  line-height: 1.6;
}

.tpl-warning code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
}

.tpl-emoji-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 24px;
  line-height: 1;
}

.tpl-emoji-preview span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #2b2f3a;
}

.tpl-empty {
  padding: 40px 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.tpl-games-panel .tpl-empty {
  padding: 22px 10px;
}

.tpl-error {
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid #5a3238;
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
}

.tpl-error[hidden] {
  display: none;
}

.tpl-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 12, 18, 0.66);
}

.tpl-modal-backdrop[hidden] {
  display: none;
}

.tpl-modal {
  width: 480px;
  max-width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 22px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.tpl-modal h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.tpl-field {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.tpl-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #242730;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.tpl-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 131, 255, 0.2);
}

.tpl-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.tpl-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 200;
  transform: translateX(-50%);
  padding: 9px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #1a1d24;
  color: var(--ink);
  font-size: 13px;
  box-shadow: var(--shadow);
}

.tpl-toast.error {
  border-color: #5a3238;
  background: var(--red-bg);
  color: var(--red);
}

.tpl-toast[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .tpl-game {
    min-width: 150px;
  }
}

/* =========================
   Supercell: �������, ��������, ������� � ��
   ========================= */

.sc-modal-backdrop[hidden],
.sc-lightbox[hidden],
.sc-gallery[hidden],
.sc-crop-editor[hidden],
.sc-ai-editor[hidden],
.sc-ai-result[hidden] {
  display: none !important;
}

.photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
}

.sc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 18px;
  overflow-y: auto;
  background: rgba(10, 12, 16, 0.72);
}

body.sc-modal-open {
  overflow: hidden;
}

.sc-modal {
  width: min(880px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sc-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.sc-modal-head h2 {
  margin: 0;
  font-size: 19px;
}

.sc-modal-sub {
  margin: 4px 0 0;
  font-size: 13px;
}

.sc-modal-close {
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sc-modal-close:hover {
  color: var(--ink);
  border-color: var(--line);
}

.sc-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 22px;
}

.sc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
}

.sc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.sc-photo-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #262a33;
}

.sc-photo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sc-photo-head h3 {
  margin: 0;
  font-size: 14px;
}

.sc-access-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.sc-upload-btn {
  cursor: pointer;
}

.sc-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.sc-photo-empty {
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.sc-photo-tile {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.sc-photo-tile img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: zoom-in;
}

.sc-photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  color: #fff;
  background: rgba(16, 18, 23, 0.78);
  border: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.sc-photo-remove:hover {
  background: var(--red);
}

.sc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.85);
}

.sc-lightbox-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(1100px, 100%);
  max-height: 100%;
}

.sc-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 10px;
  background: #14161b;
}

.sc-lightbox-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ---------- ������� ������ Supercell ---------- */

.sc-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #262a33;
}

.sc-gallery-viewer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-gallery-nav {
  flex: 0 0 auto;
  width: 38px;
  height: 74px;
  color: var(--ink-soft);
  background: #22252d;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.sc-gallery-nav:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--accent);
}

.sc-gallery-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.sc-gallery-photo-wrap {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: #1b1e25;
  border-radius: 8px;
  overflow: hidden;
}

.sc-gallery-photo {
  display: block;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

/* Режим обрезки занимает место самого фото, а не отдельный блок снизу. */
.sc-gallery-photo-wrap.is-cropping #scPhotoLink,
.sc-gallery-photo-wrap.is-cropping .sc-gallery-badge,
.sc-gallery-photo-wrap.is-cropping .sc-crop-marks {
  display: none !important;
}

.sc-crop-marks {
  position: absolute;
  border: 2px dashed rgba(124, 131, 255, 0.95);
  background: rgba(124, 131, 255, 0.12);
  pointer-events: none;
}

.sc-gallery-badge {
  position: absolute;
  top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 18, 23, 0.8);
}

.sc-gallery-badge.is-ai {
  left: 8px;
  color: #d9c4ff;
}

.sc-gallery-badge.is-crop {
  right: 8px;
  color: #ffdca8;
}

.sc-gallery-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sc-gallery-counter {
  color: var(--muted);
  font-size: 12.5px;
}

.sc-gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sc-ai-versions {
  position: relative;
  display: inline-flex;
}

.sc-ai-versions-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(124, 131, 255, 0.22);
  color: #c9cdff;
  font-size: 11px;
  font-weight: 700;
}

.sc-ai-versions-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 40;
  width: min(440px, calc(100vw - 48px));
  max-height: min(420px, 45vh);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #262a33;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.sc-ai-versions-menu[hidden] {
  display: none;
}

.sc-ai-versions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.sc-ai-versions-close {
  padding: 2px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.sc-ai-versions-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.sc-ai-versions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-ai-version {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sc-ai-version:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(124, 131, 255, 0.28);
}

.sc-ai-version.is-active {
  border-color: rgba(124, 131, 255, 0.5);
  background: rgba(124, 131, 255, 0.08);
}

.sc-ai-version.is-active:hover {
  border-color: rgba(124, 131, 255, 0.7);
  background: rgba(124, 131, 255, 0.14);
}

.sc-ai-version-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #1f2229;
  cursor: pointer;
}

.sc-ai-version-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sc-ai-version-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sc-ai-version-name {
  color: var(--ink);
  font-size: 12.5px;
}

.sc-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sc-thumb {
  position: relative;
  width: 66px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  overflow: hidden;
  background: #1b1e25;
  cursor: pointer;
}

.sc-thumb.is-active {
  border-color: var(--accent);
}

.sc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sc-thumb-badges {
  position: absolute;
  right: 3px;
  bottom: 2px;
  display: flex;
  gap: 2px;
  font-size: 10px;
}

/* ---------- ���� ---------- */

.sc-crop-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: #1b1e25;
}

.sc-crop-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #1b1e25;
  border-radius: 8px;
}

.sc-crop-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  user-select: none;
  touch-action: none;
}

.sc-crop-frame img {
  display: block;
  max-width: 100%;
  max-height: 460px;
  pointer-events: none;
}

.sc-crop-box {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(124, 131, 255, 0.12);
  cursor: move;
  box-shadow: 0 0 0 9999px rgba(8, 10, 14, 0.45);
}

.sc-crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 3px;
}

.sc-crop-handle.nw { left: -8px; top: -8px; cursor: nwse-resize; }
.sc-crop-handle.ne { right: -8px; top: -8px; cursor: nesw-resize; }
.sc-crop-handle.sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.sc-crop-handle.se { right: -8px; bottom: -8px; cursor: nwse-resize; }

.sc-crop-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.sc-crop-size {
  font-size: 12.5px;
  font-weight: 600;
}

.sc-crop-hint {
  flex: 1 1 260px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- ��-�������� ---------- */

.sc-ai-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--accent-2);
  border-radius: var(--radius-sm);
  background: #292735;
}

.sc-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sc-ai-head h3 {
  margin: 0;
  font-size: 15px;
}

.sc-ai-photo img {
  display: block;
  max-height: 200px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.sc-ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.sc-input-row {
  display: flex;
  gap: 6px;
}

.sc-input-row input {
  flex: 1 1 auto;
}

.sc-ai-result {
  padding: 12px 14px;
  color: var(--ink-soft);
  background: var(--green-bg);
  border: 1px solid #2c5b49;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.sc-ai-result b {
  color: var(--green);
}

/* ---------- Мини-поповер «Новый аккаунт Playerok» ---------- */

.add-create-panel {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(400px, calc(100vw - 48px));
  padding: 6px;
}

.add-create-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.add-create-title {
  flex: 1;
  min-width: 0;
  padding-left: 2px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
}

.add-create-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-create-main .add-create-fields {
  flex: 1;
}

.add-avatar {
  position: relative;
  flex: 0 0 auto;
  display: block;
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border: 1.5px dashed rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.add-avatar:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.add-avatar.has-avatar {
  border-color: transparent;
}

.add-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.add-create-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.add-tool {
  flex: 1 1 auto;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.add-tool:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

.add-tool:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ---------- Настройки: база ников, аватарок и почт ---------- */

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 92px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.settings-stat b {
  font-size: 17px;
}

.settings-stat span {
  color: var(--muted);
  font-size: 11.5px;
}

.settings-add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}

.settings-add .field {
  flex: 1 1 220px;
}

.settings-add-hint {
  flex-basis: 100%;
}

.settings-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.settings-avatar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.settings-avatar img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.settings-avatar-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-avatar.is-missing img {
  opacity: 0.3;
}

.settings-note {
  color: var(--muted);
  font-size: 12.5px;
}

/* Звук уведомлений и системные уведомления. */
.settings-sound-lead {
  margin: 0 0 12px;
}

.settings-sound-form .field {
  flex: 1 1 260px;
}

.settings-sound-delete {
  margin-top: 6px;
}

.settings-sound-desktop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-sound-desktop .field-label {
  margin-bottom: 2px;
  color: var(--ink);
}

.settings-sound-desktop .btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 720px) {
  .settings-add .field {
    flex-basis: 100%;
  }
}


.settings-import {
  flex-direction: column;
  align-items: stretch;
}

.settings-import .field {
  flex: 1 1 auto;
}

.settings-import .textarea {
  width: 100%;
  min-height: 132px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.settings-import .btn {
  align-self: flex-start;
}


/* ???????? Playerok ?? ????: ???? ????????? ????, ???????? ???????? ???????? ?????????. */
.avatar-photo {
  overflow: hidden;
  padding: 0;
  background: #242730;
}

.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pk-avatar-ph.is-photo {
  overflow: hidden;
  padding: 0;
  background: #242730;
}

.pk-avatar-ph.is-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Verifikaciya profilya Playerok: sessiya Telegram i shagi proverki. */
.verify-backdrop {
  z-index: 140;
}

.verify-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
}

.verify-modal .panel-modal-body {
  padding-top: 24px;
}

.verify-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #6f7890;
  background: transparent;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.verify-close:hover {
  color: #fff;
  background: #2a2e39;
}

.verify-head h3 {
  margin: 0 0 4px;
  color: #f4f4f5;
  font-size: 19px;
  font-weight: 650;
}

.verify-account {
  margin: 0;
  padding-right: 36px;
  color: #9aa3b5;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.verify-drop {
  margin-top: 16px;
  padding: 26px 20px;
  border: 2px dashed #343a47;
  border-radius: 12px;
  background: #161920;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.verify-drop:hover,
.verify-drop.is-dragover {
  border-color: var(--accent);
  background: #191d2a;
}

.verify-drop-icon {
  margin-bottom: 6px;
  font-size: 34px;
  line-height: 1;
}

.verify-drop-title {
  margin-bottom: 6px;
  color: #e6e8ee;
  font-size: 15px;
  font-weight: 600;
}

.verify-drop-hint {
  margin-bottom: 14px;
  color: #82909f;
  font-size: 12.5px;
  line-height: 1.5;
}

.verify-drop-hint code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #232838;
  font-family: ui-monospace, Consolas, monospace;
}

.verify-pick-row {
  display: flex;
  justify-content: center;
}

.verify-filename {
  margin-top: 12px;
  color: #8ee7bb;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.verify-filename[hidden] {
  display: none;
}

.verify-run-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.verify-run {
  min-width: 220px;
  justify-content: center;
}

.verify-run.is-running {
  cursor: progress;
}

.verify-run.is-ok {
  background: var(--green);
  box-shadow: 0 6px 16px rgba(34, 160, 100, 0.3);
}

.verify-run.is-fail {
  background: var(--red);
  box-shadow: 0 6px 16px rgba(190, 50, 60, 0.3);
}

.verify-run:disabled {
  opacity: .55;
  cursor: default;
}

.verify-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: verify-spin .8s linear infinite;
}

@keyframes verify-spin {
  to { transform: rotate(360deg); }
}

.verify-progress {
  margin-top: 18px;
}

.verify-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.verify-note {
  flex: 1 1 auto;
  min-width: 0;
  color: #82909f;
  overflow-wrap: anywhere;
}

.verify-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #232838;
  color: #c9cfda;
  font-size: 12px;
  white-space: nowrap;
}

.verify-badge.is-running { background: #1e3350; color: #7ab8ff; }
.verify-badge.is-ok { background: #16341f; color: #7ee6a2; }
.verify-badge.is-already { background: #333018; color: #e6d27e; }
.verify-badge.is-timeout { background: #3a2a16; color: #f0b46a; }
.verify-badge.is-need_code { background: #2d1e3f; color: #c39bff; }
.verify-badge.is-error { background: #3a1c1c; color: #f06a6a; }

.verify-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.verify-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #2b2f3b;
  border-radius: 8px;
  background: #12141a;
  transition: border-color .15s, background .15s;
}

.verify-step.is-running { border-color: #1d4ed8; background: #111a2b; }
.verify-step.is-done { border-color: #1f5134; }
.verify-step.is-error { border-color: #6b2020; background: #1e1214; }
.verify-step.is-skipped { opacity: .55; }

.verify-step-icon {
  flex: 0 0 20px;
  width: 20px;
  color: #6f7890;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.verify-step-icon .verify-spinner {
  width: 11px;
  height: 11px;
  margin: 0;
  vertical-align: 0;
}

.verify-step.is-running .verify-step-icon { color: #7ab8ff; }
.verify-step.is-done .verify-step-icon { color: #7ee6a2; }
.verify-step.is-error .verify-step-icon { color: #f06a6a; }

.verify-step-body {
  flex: 1 1 auto;
  min-width: 0;
}

.verify-step-title {
  display: block;
  color: #e6e8ee;
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.verify-step.is-error .verify-step-title { color: #f18a8a; }
.verify-step.is-skipped .verify-step-title { color: #9aa3b5; }

.verify-step-msg {
  display: block;
  margin-top: 2px;
  color: #9aa3b5;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.verify-step.is-error .verify-step-msg { color: #d98a8a; }

.verify-log-wrap {
  margin-top: 10px;
}

.verify-log-wrap summary {
  margin-bottom: 8px;
  color: #82909f;
  font-size: 12.5px;
  cursor: pointer;
}

.verify-log-wrap summary:hover {
  color: #c9cfda;
}

.verify-log {
  max-height: 300px;
  padding: 10px 12px;
  border: 1px solid #2b2f3b;
  border-radius: 8px;
  background: #0e1015;
  color: #c9cfda;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-y: auto;
}

.verify-line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.verify-line .verify-time {
  margin-right: 6px;
  color: #5d6675;
}

.verify-line.is-bot { color: #7ab8ff; }
.verify-line.is-send { color: #7ee6a2; }
.verify-line.is-ok { color: #7ee6a2; font-weight: 600; }
.verify-line.is-error { color: #f06a6a; }
.verify-line.is-info { color: #82909f; }

@media (max-width: 720px) {
  .verify-modal {
    width: calc(100vw - 24px);
    max-width: none;
  }

  .verify-run {
    width: 100%;
  }
}

/* Rating pill on Playerok profile cards (dark theme). */
.pk-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid rgba(224, 165, 74, 0.35);
  border-radius: 999px;
  background: var(--amber-bg);
  color: #f0c987;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.pk-card-rating b {
  color: #ffd08a;
  font-size: 13px;
  font-weight: 700;
}

.pk-card-rating-muted {
  border-color: var(--line);
  background: rgba(143, 150, 168, 0.12);
  color: var(--muted);
}

/* ---------- Combobox filters ---------- */

.combo {
  position: relative;
  width: max-content;
  min-width: 180px;
}

.combo-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.combo-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.combo-trigger:focus-visible,
.combo-trigger[aria-expanded="true"] {
  outline: none;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.combo-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-chevron {
  flex: 0 0 auto;
  opacity: 0.65;
  transition: transform 0.25s ease;
}

.combo-trigger[aria-expanded="true"] .combo-chevron {
  transform: rotate(180deg);
}

.combo-popover {
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: max-content;
  min-width: 100%;
  max-width: min(340px, calc(100vw - 32px));
  transform-origin: 0 0;
}

.combo-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px;
}

.combo-glass {
  top: 0;
  bottom: auto;
  left: 0;
  height: 0;
  border-radius: 14px;
}

.combo-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  text-align: left;
  white-space: nowrap;
}

.combo-option::after {
  content: "\2713";
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
  opacity: 0;
}

.combo-option[aria-selected="true"] {
  color: var(--ink);
}

.combo-option[aria-selected="true"]::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .combo-trigger,
  .combo-chevron {
    transition: none;
  }
}

/* ---------- Лоты игровых аккаунтов на карточке профиля ---------- */

.lot-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid #3a4050;
  border-radius: 8px;
  background: #1a1d24;
  color: #c2c8d6;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.lot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lot-icon-sm {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 10px;
}

.lot-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
}

.lot-badge-listed {
  color: #8ee7bb;
  background: var(--green-bg);
}

.lot-badge-sold {
  color: #c3c0ff;
  background: #34315c;
}

.lot-badge-awaiting {
  color: #ffdca8;
  background: #4a3520;
}

.lot-badge-confirming {
  color: #a9d4ff;
  background: #23364d;
}

.lot-badge-moderation {
  color: #a5e7ff;
  background: #1b3a47;
}

.lot-badge-returned {
  color: #ffcf9e;
  background: var(--amber-bg);
}

.lot-badge-withdrawn {
  color: #c2c8d6;
  background: #343945;
}

.lot-badge-draft {
  color: #9fc4ff;
  background: #1d2733;
}

.lot-row-draft {
  border-color: #2f3d52;
}

.pk-lots-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pk-lots-head h4 {
  margin: 0;
}

.lot-sync-form {
  flex: 0 0 auto;
  margin: 0;
}

.pk-lots-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pk-lots-total,
.pk-lots-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #343945;
  color: #c2c8d6;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.lot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #12141a;
  border: 1px solid #2b2f3b;
  border-radius: 8px;
}

.lot-row-sold,
.lot-row-withdrawn {
  opacity: 0.82;
}

.lot-row-awaiting {
  border-color: #63471f;
  background: #1a1510;
}

.lot-row-confirming {
  border-color: #2d4a68;
  background: #121820;
}

.lot-row-moderation {
  border-color: #2b5563;
  background: #101a1f;
}

.lot-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lot-email {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lot-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lot-note {
  overflow: hidden;
  color: #9aa3b5;
  font-size: 12px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lot-source {
  align-self: flex-start;
  padding: 0 6px;
  border-radius: 999px;
  background: #1d2733;
  color: #8fb7e6;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lot-status-form,
.lot-delete-form {
  flex: 0 0 auto;
  margin: 0;
}

.lot-status-select {
  width: auto;
  min-width: 118px;
}

.pk-lot-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.pk-lot-remove:hover {
  border-color: #54343a;
  background: var(--red-bg);
  color: var(--red);
}

.pk-lot-edit {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.pk-lot-edit:hover {
  border-color: #3d4a63;
  background: #1d2733;
  color: #9fc4ff;
}

.lot-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.lot-add-form {
  margin-top: 10px;
  padding: 10px;
  background: #12141a;
  border: 1px dashed #353a47;
  border-radius: 8px;
}

.lot-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.lot-add-cell {
  min-width: 0;
}

.lot-add-note {
  grid-column: 1 / -1;
}

.lot-add-submit {
  margin-top: 10px;
}

/* ---------- Страница редактирования лота ---------- */

.lot-edit-page {
  max-width: 760px;
}

.lot-edit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #2b2f3b;
}

.lot-edit-head-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lot-edit-head-text .lot-sub {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lot-edit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lot-edit-description {
  min-height: 240px;
  resize: vertical;
  line-height: 1.5;
}

.lot-edit-price {
  max-width: 220px;
}

.lot-price-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.lot-price-pair .lot-edit-price {
  flex: 1 1 220px;
  max-width: 260px;
}

.lot-price-income-input {
  color: var(--green);
  font-weight: 600;
}

/* ---------- Цена со скидкой, как на Playerok ---------- */

.lot-price-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
}

.lot-price-edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}

.lot-price-figure {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lot-price-figure-value {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.lot-price-strike {
  color: var(--muted);
  text-decoration: line-through;
}

.lot-price-income {
  color: var(--green);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.lot-price-discount {
  flex: 1 1 220px;
  max-width: 260px;
}

.lot-price-discount-box {
  position: relative;
  display: block;
}

.lot-price-discount-box .input {
  padding-right: 66px;
}

.lot-price-percent {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 2px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  background: var(--red);
  border-radius: 999px;
  transform: translateY(-50%);
  pointer-events: none;
}

.lot-price-percent[hidden] {
  display: none;
}

.lot-price-hint {
  margin: -2px 0 0;
}

.lot-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.lot-edit-danger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #2b2f3b;
}

.lot-edit-danger .field-hint {
  margin: 0;
}

.pk-lot-mini-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}

.pk-lot-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.pk-lot-mini:hover {
  background: rgba(255, 255, 255, 0.055);
}

.pk-lot-mini-email {
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-lot-mini-more-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pk-lot-mini-more {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.pk-lot-mini-toggle {
  padding: 2px 8px;
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  background: rgba(124, 131, 255, 0.1);
  border: 1px solid rgba(124, 131, 255, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pk-lot-mini-toggle:hover {
  background: rgba(124, 131, 255, 0.2);
  border-color: var(--accent);
}

/* `hidden` у flex-строки не сработает без явного display: none. */
.pk-lot-mini[hidden],
.pk-lot-mini-more-row[hidden] {
  display: none;
}

.lot-frozen {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #8fd8ff;
  font-size: 12px;
  line-height: 1;
  background: rgba(96, 190, 255, 0.14);
  border: 1px solid rgba(96, 190, 255, 0.45);
  border-radius: 999px;
  cursor: help;
}

.lot-frozen:focus-visible {
  outline: 2px solid rgba(143, 216, 255, 0.7);
  outline-offset: 2px;
}

.lot-price {
  flex: none;
  color: #8ee6b0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pk-lot-mini-views {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pk-lot-mini-views svg {
  width: 13px;
  height: 13px;
  opacity: 0.85;
}

/* Мини-карточка лота при наведении: стеклянная панель в духе iOS. */
.pk-lot-tip {
  position: fixed;
  z-index: 130;
  width: 272px;
  max-width: calc(100vw - 16px);
  padding: 14px 15px 15px;
  color: var(--ink);
  background: rgba(44, 48, 58, 0.92);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transform-origin: 50% 100%;
  transition:
    opacity 0.15s ease,
    transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
}

.pk-lot-tip.is-below {
  transform-origin: 50% 0;
  transform: translateY(-6px) scale(0.97);
}

.pk-lot-tip.is-visible {
  opacity: 1;
  transform: none;
  /* Карточка должна принимать мышь: из неё копируют почту и название. */
  pointer-events: auto;
}

.pk-lot-tip[hidden] {
  display: none;
}

.pk-lot-tip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pk-lot-tip-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pk-lot-tip-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pk-lot-tip-head-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pk-lot-tip-game {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pk-lot-tip-status {
  align-self: flex-start;
  padding: 1px 8px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  white-space: nowrap;
}

.pk-lot-tip-status-listed {
  color: #8ee7bb;
  background: var(--green-bg);
}

.pk-lot-tip-status-sold {
  color: #c3c0ff;
  background: #34315c;
}

.pk-lot-tip-status-awaiting {
  color: #ffdca8;
  background: #4a3520;
}

.pk-lot-tip-status-confirming {
  color: #a9d4ff;
  background: #23364d;
}

.pk-lot-tip-status-moderation {
  color: #a5e7ff;
  background: #1b3a47;
}

.pk-lot-tip-status-returned {
  color: #ffcf9e;
  background: var(--amber-bg);
}

.pk-lot-tip-status-withdrawn {
  color: #c2c8d6;
  background: #343945;
}

.pk-lot-tip-title {
  display: -webkit-box;
  margin: 11px 0 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.32;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pk-lot-tip-title[hidden] {
  display: none;
}

.pk-lot-tip-mail {
  display: block;
  padding: 7px 10px;
  margin-top: 9px;
  overflow: hidden;
  color: #cfe0ff;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.pk-lot-tip-mail[hidden] {
  display: none;
}

.pk-lot-tip-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 10px;
  margin-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.pk-lot-tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.pk-lot-tip-row b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pk-lot-tip-row svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.frozen-tip {
  position: fixed;
  z-index: 120;
  width: max-content;
  max-width: 268px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(44, 48, 58, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 44px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 100%;
  transform: translateY(6px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.16s ease;
}

.frozen-tip.is-below {
  transform-origin: 50% 0;
  transform: translateY(-6px) scale(0.96);
}

.frozen-tip.is-visible {
  transform: none;
  opacity: 1;
}

.frozen-tip[hidden] {
  display: none;
}

.frozen-tip-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.frozen-tip-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #bfe9ff;
  font-size: 14px;
  line-height: 1;
  background: linear-gradient(160deg, rgba(120, 205, 255, 0.35), rgba(96, 190, 255, 0.12));
  border: 1px solid rgba(143, 216, 255, 0.5);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.frozen-tip-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.frozen-tip-title {
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.25;
}

.frozen-tip-sub {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
}

.frozen-tip-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.frozen-tip-body[hidden] {
  display: none;
}

.frozen-tip-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  line-height: 1.4;
}

.frozen-tip-row span {
  color: var(--muted);
}

.frozen-tip-row b {
  color: #cfe9ff;
  font-weight: 650;
  white-space: nowrap;
}

.lot-frozen-note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #8fd8ff;
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- Получение писем (IMAP) ---------- */

.mail-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mail-section-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mail-section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}

.mail-section-subtitle {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.rambler-container {
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.rambler-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rambler-form .rambler-input {
  flex: 1 1 280px;
  width: auto;
  min-width: 0;
}

.mail-hint {
  margin: 0 0 14px;
}

.mail-error {
  margin-bottom: 14px;
}

.rambler-server-info {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.rambler-server-info:empty {
  display: none;
}

.rambler-server-info strong {
  color: var(--ink-soft);
  font-weight: 650;
}

.rambler-folders {
  margin-bottom: 22px;
}

.rambler-folders:empty {
  display: none;
}

.mail-list-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 650;
}

.folder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.folder-button {
  padding: 8px 12px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: #242730;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.folder-button:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.folder-button.is-active {
  color: #fff;
  background: rgba(124, 131, 255, 0.18);
  border-color: var(--accent);
}

.email-item {
  padding: 15px 17px;
  margin-bottom: 12px;
  background: #242730;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.email-item:last-child {
  margin-bottom: 0;
}

.email-header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 13px;
}

.email-header strong {
  color: var(--ink);
  font-weight: 650;
}

.email-date {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.email-body {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.email-item .btn {
  margin-top: 10px;
}

.endpoints-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.endpoint-card {
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.endpoint-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.endpoint-method {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #fff;
  background: #2f9e6a;
  border-radius: 6px;
}

.endpoint-path {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--ink-soft);
  font-size: 13px;
}

.endpoint-desc {
  color: var(--muted);
  font-size: 13px;
}

.endpoint-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.endpoint-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.endpoint-inputs .rambler-input {
  flex: 1 1 240px;
  width: auto;
  min-width: 0;
}

.endpoint-response {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 12px 14px;
  background: #242730;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.endpoint-response .muted {
  margin: 0;
}

.endpoint-response pre {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.endpoint-loading {
  color: var(--muted);
  font-size: 13px;
}

.endpoint-error {
  margin: 0;
  color: var(--red);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.endpoint-success {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- Просмотр письма ---------- */

body.mail-viewer-open {
  overflow: hidden;
}

.mail-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mail-viewer[hidden] {
  display: none;
}

.mail-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.74);
  backdrop-filter: blur(2px);
}

.mail-viewer-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  height: min(88vh, 900px);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mail-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  background: var(--sidebar-2);
  border-bottom: 1px solid var(--line);
}

.mail-viewer-titles {
  min-width: 0;
}

.mail-viewer-subject {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.mail-viewer-meta {
  color: var(--muted);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.mail-viewer-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mail-viewer-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.mail-viewer-body {
  flex: 1;
  width: 100%;
  background: #fff;
  border: 0;
}

@media (max-width: 720px) {
  .mail-viewer {
    padding: 10px;
  }

  .mail-viewer-dialog {
    height: 94vh;
  }
}

/* ---------- Прокси Playerok ---------- */

.proxy-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.proxy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #4b5568;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.proxy-status-ok {
  border-left-color: #46b37a;
}

.proxy-status-error,
.proxy-status-cooldown {
  border-left-color: #d0574f;
}

.proxy-status-off {
  opacity: 0.65;
}

.proxy-status-idle {
  border-left-color: #6b7488;
}

.proxy-row-main {
  display: flex;
  flex: 1 1 240px;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.proxy-name {
  font-weight: 600;
}

.proxy-url {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-error {
  overflow: hidden;
  color: #ff9e96;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-row-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
  text-align: right;
}

.proxy-state {
  font-size: 12.5px;
  font-weight: 600;
}

.proxy-assigned {
  color: var(--muted);
  font-size: 11.5px;
}

.proxy-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proxy-row-actions form {
  margin: 0;
}
