/* ===== Калькулятор тарифов ===== */
.tariff-switch {
  display: flex;
  width: 100%;
  gap: 4px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 28px;
  box-sizing: border-box;
}

.tariff-switch-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 11px 16px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: normal;
  text-align: center;
}

/* На средних экранах три кнопки тесноваты — уменьшаем кегль */
@media (max-width: 900px) {
  .tariff-switch-btn {
    padding: 10px 10px;
    font-size: 0.8rem;
  }
}

/* На узких экранах — кнопки в столбик, чтобы текст не вылезал */
@media (max-width: 560px) {
  .tariff-switch {
    flex-direction: column;
  }
  .tariff-switch-btn {
    font-size: 0.88rem;
    padding: 11px 16px;
  }
}

.tariff-switch-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.tariff-switch-btn.active {
  color: #141414;
  background: var(--sky-orange, #FF9000);
  box-shadow: 0 4px 16px rgba(255, 144, 0, 0.3);
}

.calc-panel {
  background: rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 30px;
  width: 100%;
}

/* Плашка «оплата через Telegram» на странице тарифов */
/* ===== ПРОБНИК ===== */
.trial-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
  padding: 22px 26px;
  border-radius: 16px;
  border: 1px solid rgba(255, 144, 0, 0.35);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 144, 0, 0.16) 0%, transparent 60%),
    rgba(255, 255, 255, 0.03);
}

.trial-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
}

.trial-price-value {
  font-size: clamp(2rem, 4.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--sky-orange, #FF9000);
}

.trial-price-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.trial-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 320px;
  justify-content: flex-end;
}

.trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .trial-hero {
    padding: 18px 18px;
    gap: 16px;
  }
  .trial-badges {
    justify-content: flex-start;
  }
}

/* ===== ТАРИФЫ: панели и переключатель ===== */
.pay-note {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
  margin: -20px 0 26px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 144, 0, 0.28);
  background: rgba(255, 144, 0, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  line-height: 1.55;
}

.calc-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  text-align: left;
  letter-spacing: -0.4px;
}

.calc-sub {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.calc-row {
  margin-bottom: 24px;
}

.calc-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.calc-label strong {
  color: var(--sky-orange, #FF9000);
  font-size: 1rem;
}

.calc-hint {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 10px;
}

.calc-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-total-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.calc-total-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--sky-orange, #FF9000);
}

.calc-total-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
  margin-bottom: 18px;
}

/* Периоды внутри калькулятора */
.calc-panel .period-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  justify-content: stretch;
  margin-bottom: 0;
}

.calc-panel .period-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 0;
}

.calc-panel .period-btn:hover {
  border-color: rgba(255, 144, 0, 0.45);
  background: rgba(255, 144, 0, 0.07);
}

.calc-panel .period-btn.active {
  border-color: var(--sky-orange, #FF9000);
  background: rgba(255, 144, 0, 0.14);
  color: #fff;
}

.calc-panel .period-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--sky-orange, #FF9000);
}

/* Сетка мобильных пакетов */
.mobile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

.mobile-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 16px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-cell span {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

.mobile-cell:hover {
  border-color: rgba(255, 144, 0, 0.45);
  background: rgba(255, 144, 0, 0.07);
}

.mobile-cell.active {
  border-color: var(--sky-orange, #FF9000);
  background: rgba(255, 144, 0, 0.14);
}

.mobile-cell.active span {
  color: var(--sky-orange, #FF9000);
}

/* Слайдер (общий для страниц) */
.device-slider-wrap {
  margin: 6px 0 2px;
}

/* Полоса ползунка остаётся тонкой (6px), но кликабельная зона
   вокруг неё расширена за счёт прозрачных отступов самого трека. */
.device-slider {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 26px;               /* кликабельная высота */
  margin: 0;
  padding: 10px 0;            /* прозрачная зона сверху/снизу */
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-image: linear-gradient(90deg, rgba(255, 144, 0, 0.25), rgba(255, 144, 0, 0.75));
  background-repeat: no-repeat;
  background-size: 100% 6px;  /* сама полоса — 6px */
  background-position: center;
  outline: none;
  cursor: grab;
  box-sizing: border-box;
  /* Убираем выделение/каретку: при перетаскивании браузер иначе
     включает режим выделения текста и рисует вертикальную палочку */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  caret-color: transparent;
  -webkit-tap-highlight-color: transparent;
}

.device-slider:focus,
.device-slider:focus-visible {
  outline: none;
  caret-color: transparent;
}

.device-slider::-webkit-slider-thumb,
.device-slider::-moz-range-thumb {
  -webkit-user-select: none;
  user-select: none;
  caret-color: transparent;
}

.device-slider:hover {
  cursor: grab;
}

.device-slider:active {
  cursor: grabbing;
}

.device-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: transparent;
}

.device-slider:active::-webkit-slider-thumb { cursor: grabbing; }
.device-slider:active::-moz-range-thumb { cursor: grabbing; }

.device-slider:focus-visible {
  outline: 2px solid rgba(255, 144, 0, 0.5);
  outline-offset: 4px;
}

.device-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;        /* центрируем бегунок 24px на полосе 6px внутри трека 26px */
  border-radius: 50%;
  background: var(--sky-orange, #FF9000);
  border: 3px solid #fff;
  box-shadow: 0 0 12px rgba(255, 144, 0, 0.6);
  cursor: grab;
}

.device-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sky-orange, #FF9000);
  border: 3px solid #fff;
  box-shadow: 0 0 12px rgba(255, 144, 0, 0.6);
  cursor: grab;
}

/* Шкала: позиции считаются по фактическому положению ползунка,
   иначе подписи не совпадают с бегунком на краях диапазона. */
.device-slider-scale {
  position: relative;
  height: 16px;
  margin-top: 8px;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
}

.device-slider-scale span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.device-slider-scale span:first-child { transform: translateX(0); }
.device-slider-scale span:last-child { transform: translateX(-100%); }

@media (max-width: 767px) {
  .calc-panel {
    padding: 20px;
  }

  .calc-panel .period-selector {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .calc-panel .period-btn {
    padding: 11px 6px;
    font-size: 0.78rem;
  }

  .calc-panel .period-price {
    font-size: 0.92rem;
  }

  .tariff-switch {
    display: flex;
    width: 100%;
  }

  .tariff-switch-btn {
    flex: 1;
    padding: 11px 12px;
    font-size: 0.84rem;
  }

  .calc-total-value {
    font-size: 1.5rem;
  }
}

/* ========================================================== */
/* СТРАНИЦЫ: ТАРИФЫ, ИНСТРУКЦИЯ, ПОДДЕРЖКА                    */
/* Оранжево-чёрно-белая тема                                  */
/* ========================================================== */

.page-shell {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--sky-orange, #FF9000);
  margin-bottom: 14px;
}

.page-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  margin: 0 0 14px;
}

.page-lead {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  max-width: 640px;
  margin: 0 0 40px;
}

.page-rule {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  margin: 44px 0;
}

/* ===== Карточки ===== */
.glass-card {
  background: rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  padding: 28px;
}

.glass-card h3 {
  font-size: 1.15rem;
  color: #fff;
  margin: 0 0 8px;
}

.glass-card p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* ===== Тарифы ===== */
.tariff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tariff-card {
  position: relative;
  background: rgba(40, 40, 40, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.tariff-card:hover {
  border-color: rgba(255, 144, 0, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.tariff-card.is-popular {
  border-color: rgba(255, 144, 0, 0.6);
  background: linear-gradient(160deg, rgba(255, 144, 0, 0.14), rgba(20, 20, 20, 0.75) 55%);
}

.tariff-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #141414;
  background: var(--sky-orange, #FF9000);
  border-radius: 4px;
  padding: 4px 9px;
  margin-bottom: 16px;
}

.tariff-name {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 10px;
}

.tariff-period {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.tariff-price {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 18px;
  letter-spacing: -1px;
}

.tariff-price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 4px;
}

.tariff-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  flex: 1;
}

.tariff-specs li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 8px;
}

.tariff-specs li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--sky-orange, #FF9000);
  font-weight: 700;
}

/* ===== Кнопки страниц ===== */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--sky-orange, #FF9000);
  color: #141414;
  border-color: var(--sky-orange, #FF9000);
}

.btn-primary:hover {
  background: var(--sky-orange-light, #FFA133);
  border-color: var(--sky-orange-light, #FFA133);
  box-shadow: 0 8px 24px rgba(255, 144, 0, 0.35);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Красный вариант основной кнопки — тот же размер, другой цвет */
.btn-primary.btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.btn-primary.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

/* «Переоткрыть» для закрытого тикета — зелёный */
.btn-primary.btn-danger.is-reopen {
  background: #22c55e;
  border-color: #22c55e;
  color: #06240f;
}

.btn-primary.btn-danger.is-reopen:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 144, 0, 0.5);
}

.btn-block {
  width: 100%;
}

/* ===== Баннер согласия на cookie (js/cookie-consent.js) ===== */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 12000;
  width: min(680px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(26, 26, 26, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, 24px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cookie-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cookie-banner__text {
  flex: 1 1 auto;
  font-size: 0.83rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.cookie-banner__title {
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.cookie-banner__text a {
  color: var(--sky-orange, #FF9000);
  text-decoration: underline;
}

.cookie-banner__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
}

.cookie-banner__actions .btn-primary,
.cookie-banner__actions .btn-ghost {
  padding: 10px 16px;
  font-size: 0.83rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    bottom: 12px;
    padding: 14px 16px;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn-primary,
  .cookie-banner__actions .btn-ghost {
    width: 100%;
  }
}

/* ===== Инструкция: шаги ===== */
.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.step-col {
  padding: 26px 22px 0 0;
}

.step-num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--sky-orange, #FF9000);
  margin-bottom: 14px;
}

.step-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.step-col p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.instruction-card {
  background: rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 26px 30px;
  margin-bottom: 16px;
}

.instruction-card:last-child {
  margin-bottom: 0;
}

.instruction-card h3 {
  font-size: 1.1rem;
  color: #fff;
  margin: 0 0 10px;
}

.instruction-card p,
.instruction-card li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

.instruction-card ol {
  margin: 0;
  padding-left: 20px;
}

.instruction-card code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 144, 0, 0.14);
  border: 1px solid rgba(255, 144, 0, 0.28);
  color: var(--sky-orange-light, #FFA133);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.86rem;
}

/* ===== Поддержка / тикеты ===== */
.support-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.support-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}

.support-tabs::-webkit-scrollbar {
  display: none;
}

.support-tab {
  position: relative;
  padding: 13px 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.support-tab:hover {
  color: #fff;
}

.support-tab.active {
  color: var(--sky-orange, #FF9000);
}

.support-tab.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--sky-orange, #FF9000);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Пустое состояние */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.empty-state .empty-icon {
  font-size: 40px;
  opacity: 0.45;
  margin-bottom: 14px;
}

.empty-state .empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.empty-state .empty-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 340px;
  line-height: 1.6;
}

/* Список тикетов */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  background: rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ticket-item:hover {
  background: rgba(255, 144, 0, 0.08);
  border-color: rgba(255, 144, 0, 0.4);
  transform: translateX(2px);
}

.ticket-main {
  flex: 1;
  min-width: 0;
  /* Строки внутри — блочные, иначе тема и email идут в одну линию и накладываются */
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticket-subject {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-preview {
  display: block;
  font-size: 0.84rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
}

.ticket-date {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.ticket-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.ticket-status.status-open {
  background: rgba(255, 144, 0, 0.16);
  color: var(--sky-orange, #FF9000);
}

.ticket-status.status-answered {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.ticket-status.status-closed {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
}

.tab-panel-lead {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 22px;
  max-width: 640px;
}

.tab-panel-lead a {
  color: var(--sky-orange, #FF9000);
  text-decoration: none;
}

.tab-panel-lead a:hover {
  text-decoration: underline;
}

.support-auth {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 144, 0, 0.07), rgba(25, 25, 25, 0.5) 55%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 560px;
}

.auth-lock {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sky-orange, #FF9000);
  background: rgba(255, 144, 0, 0.13);
  border: 1px solid rgba(255, 144, 0, 0.35);
  box-shadow: 0 0 30px rgba(255, 144, 0, 0.15);
  margin-bottom: 18px;
}

.support-auth h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #fff;
  margin: 0 0 10px;
}

.support-auth p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 24px;
  max-width: 420px;
}

.support-auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.support-auth-actions .btn-primary,
.support-auth-actions .btn-ghost {
  min-width: 150px;
}

@media (max-width: 767px) {
  .support-auth {
    padding: 32px 20px;
  }

  .support-auth-actions {
    width: 100%;
  }

  .support-auth-actions .btn-primary,
  .support-auth-actions .btn-ghost {
    flex: 1;
    min-width: 0;
  }
}

/* Блок формы — без карточки, в стиле остальных страниц */
.form-block {
  max-width: 720px;
}

.ticket-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}


/* Форма нового тикета */
.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.form-field .optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.78rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--sky-orange, #FF9000);
  background: rgba(255, 255, 255, 0.07);
}

.form-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 6px;
}

.form-alert {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.form-alert.show {
  display: block;
}

.form-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ff8080;
}

.form-alert.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

/* Диалог тикета */
.ticket-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.ticket-dialog-head h3 {
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 6px;
  word-break: break-word;
}

.ticket-dialog-head .ticket-date {
  font-size: 0.8rem;
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 18px;
}

.msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

/* Текст сообщения — переносим строки здесь, т.к. подпись вынесена в отдельный блок */
.msg-text {
  white-space: pre-wrap;
}

.msg-user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-support {
  align-self: flex-start;
  background: rgba(255, 144, 0, 0.14);
  border: 1px solid rgba(255, 144, 0, 0.35);
  color: #fff;
  border-bottom-left-radius: 4px;
}

.msg-time {
  display: block;
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 5px;
}

.ticket-reply {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.ticket-reply .form-textarea {
  min-height: 90px;
  max-height: 180px;
  padding: 13px 16px;
}

/* Кнопки под полем ввода: «Отправить ответ» слева, «Закрыть тикет» справа */
.ticket-reply-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ticket-reply-actions .btn-primary {
  flex: 0 0 auto;
}

/* «Закрыть тикет» прижата к правому краю */
/* «Закрыть тикет» прижата к правому краю */
.ticket-reply-actions #closeTicketBtn {
  margin-left: auto;
}

/* На странице клиента кнопка одна — не растягиваем на всю ширину */
.ticket-reply > .btn-primary {
  align-self: flex-start;
}

/* Загрузка / спиннер */
.spinner-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--sky-orange, #FF9000);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Адаптив страниц */
@media (max-width: 767px) {
  .page-shell {
    padding: 28px 16px 60px;
  }

  .glass-card {
    padding: 20px;
  }

  .support-head {
    flex-direction: column;
    align-items: stretch;
  }

  .support-tab {
    padding: 12px 14px;
    font-size: 0.86rem;
  }

  .ticket-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ticket-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .msg {
    max-width: 92%;
  }

  .step-col {
    padding: 22px 0 0;
  }
}

/* ===== ПАНЕЛЬ АДМИНИСТРАТОРА: разделы ===== */
.admin-sections {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-section-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-section-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.admin-section-btn.active {
  background: rgba(255, 144, 0, 0.14);
  border-color: rgba(255, 144, 0, 0.5);
  color: var(--sky-orange, #FF9000);
}

.admin-section-btn svg {
  flex: 0 0 auto;
}

.admin-section-panel {
  display: none;
}

.admin-section-panel.active {
  display: block;
}

/* ===== ПАНЕЛЬ АДМИНИСТРАТОРА: пользователи ===== */
.admin-users-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-users-search {
  flex: 1 1 280px;
  min-width: 0;
}

.admin-users-count {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.admin-user-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 144, 0, 0.35);
}

.admin-user-item:focus-visible {
  outline: 2px solid var(--sky-orange, #FF9000);
  outline-offset: 2px;
}

.admin-user-item:active {
  transform: scale(0.995);
}

/* ===== МОДАЛКА КАРТОЧКИ ПОЛЬЗОВАТЕЛЯ ===== */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.admin-modal {
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #17171a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.admin-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
  word-break: break-all;
}

.admin-modal-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.admin-modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.admin-modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
}

.um-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.um-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.um-section h4 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sky-orange, #FF9000);
}

.um-hint {
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.4);
}

.um-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 18px;
}

.um-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.um-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.42);
}

.um-value {
  font-size: 0.88rem;
  color: #fff;
  word-break: break-all;
}

.um-value.um-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.um-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.um-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.85);
}

.um-row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.um-row-title {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.um-row-click {
  cursor: pointer;
  transition: background 0.15s ease;
}

.um-row-click:hover {
  background: rgba(255, 255, 255, 0.09);
}

.um-empty {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.35);
  padding: 4px 0;
}

.um-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* Поля управления не должны растягиваться на всю ширину модалки */
.um-actions .um-field {
  width: 100%;
  max-width: 340px;
}

.um-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-left: -10px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.15s ease;
}

.um-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.um-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--sky-orange, #FF9000);
  cursor: pointer;
}

.um-toggle span {
  cursor: pointer;
  user-select: none;
}

/* Нижняя панель с общей кнопкой «Сохранить» */
.um-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  margin: 0 -20px -22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #17171a;
}

.um-footer .form-alert {
  flex: 1 1 100%;
  margin: 0;
}

.um-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-right: 4px;
}

.um-footer-actions .btn-primary,
.um-footer-actions .btn-ghost {
  margin-right: 0;
}

.um-footer-actions .btn-primary {
  margin-right: 6px;
}

.um-dirty-hint {
  font-size: 0.76rem;
  color: var(--sky-orange, #FF9000);
}

/* Ссылка для смены пароля */
.um-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 12px;
}

.um-link-box:last-child {
  margin-bottom: 0;
}

.um-link-input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.um-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.um-input {
  flex: 0 1 auto;
  width: 100%;
  max-width: 340px;
  padding: 9px 12px;
  font-size: 0.86rem;
  border-radius: 8px;
}

@media (max-width: 560px) {
  .admin-modal {
    max-height: 92vh;
  }
  .admin-modal-body {
    padding: 14px 14px 18px;
  }
  .um-grid {
    grid-template-columns: 1fr;
  }
}

.admin-user-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.admin-user-email {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-meta {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.admin-user-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-badge-admin {
  border-color: rgba(255, 144, 0, 0.5);
  background: rgba(255, 144, 0, 0.14);
  color: var(--sky-orange, #FF9000);
}

.admin-badge-ok {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.admin-user-date {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .admin-section-btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .admin-user-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .admin-user-side {
    width: 100%;
    justify-content: space-between;
  }

  .admin-user-badges {

/* ===== ПАНЕЛЬ: действия с тикетом ===== */
.admin-reply-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.admin-reply-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

/* Подпись автора сообщения: всегда над текстом, отдельной строкой */
.msg-author {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.2;
  color: #fff;
}

/* Сообщение администратора (светлый пузырь) — подпись красная */
.msg-support .msg-author {
  color: #ef4444;
}

/* Сообщение клиента (оранжевый пузырь) — подпись тёмная, иначе не видна */
.msg-user .msg-author {
  color: rgba(20, 20, 20, 0.8);
}

/* Выпадающие списки в тёмной теме: без этого текст в <option>
   белый на белом фоне и виден только при наведении */
select.form-input,
.form-input select,
select {
  background-color: #1f1f1f;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

select.form-input option,
.form-input select option,
select option {
  background-color: #1f1f1f;
  color: #fff;
}

select.form-input:focus,
select:focus {
  color: #fff;
}

    justify-content: flex-start;
  }
}

