/* ==========================================================================
   HEN4ICK STUDIO | MODRINTH DARK RED-BLUE THEME
   Inspired by: Modrinth (https://modrinth.com/mod/3dskinlayers)
   Style: Deep Obsidian Canvas + Ambient Red-Blue Glow + Frosted Glass Cards
   ========================================================================== */

:root {
  /* Базовая палитра Modrinth */
  --bg-canvas: #090b10;
  --bg-card: rgba(16, 20, 30, 0.76);
  --bg-card-hover: rgba(22, 28, 42, 0.88);
  --bg-surface-elevated: rgba(24, 30, 46, 0.85);
  --bg-input: rgba(12, 15, 24, 0.85);

  /* Фирменный градиент Modrinth Red & Blue */
  --grad-red-blue: linear-gradient(135deg, #ef4444 0%, #a855f7 50%, #3b82f6 100%);
  --grad-red-blue-btn: linear-gradient(135deg, #ff2e55 0%, #3b82f6 100%);
  --grad-red-blue-subtle: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(59, 130, 246, 0.18) 100%);
  --grad-red-blue-border: linear-gradient(135deg, rgba(239, 68, 68, 0.5) 0%, rgba(59, 130, 246, 0.5) 100%);

  /* Акцентные цвета */
  --accent-red: #ff3b5c;
  --accent-red-glow: rgba(255, 59, 92, 0.45);
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.45);
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-cyan: #38bdf8;

  /* Типографика и текст (Высокий контраст) */
  --text-main: #f8fafc;
  --text-bright: #ffffff;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  /* Границы и размытие */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(99, 102, 241, 0.4);

  --radius-card: 18px;
  --radius-inner: 12px;
  --radius-pill: 9999px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Базовые сбросы и глобальные стили
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(239, 68, 68, 0.45);
  color: #ffffff;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(9, 11, 16, 0.7);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-red), var(--accent-blue));
  border-radius: 10px;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  user-select: none;
  overflow-x: hidden;
  padding-bottom: 84px;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   ФОНОВОЕ АНИМИРОВАННОЕ СИЯНИЕ (AMBIENT AURORA RED + BLUE)
   -------------------------------------------------------------------------- */
.ambient-glow-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 50% 10%, rgba(18, 22, 34, 0.6) 0%, var(--bg-canvas) 100%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  will-change: transform, opacity;
  opacity: 0.38;
  mix-blend-mode: screen;
}

.glow-orb-red {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(255, 46, 85, 0.85) 0%, rgba(225, 29, 72, 0.4) 45%, transparent 75%);
  animation: floatRedOrb 18s ease-in-out infinite alternate;
}

.glow-orb-blue {
  width: 560px;
  height: 560px;
  bottom: 2%;
  right: -130px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.85) 0%, rgba(37, 99, 235, 0.45) 45%, transparent 75%);
  animation: floatBlueOrb 22s ease-in-out infinite alternate;
}

.glow-orb-purple {
  width: 440px;
  height: 440px;
  top: 38%;
  left: 20%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.55) 0%, rgba(236, 72, 153, 0.25) 50%, transparent 75%);
  animation: pulsePurpleOrb 16s ease-in-out infinite alternate;
}

@keyframes floatRedOrb {
  0% { transform: translate(0, 0) scale(1); opacity: 0.35; }
  50% { transform: translate(60px, 80px) scale(1.18); opacity: 0.52; }
  100% { transform: translate(-40px, 140px) scale(0.95); opacity: 0.32; }
}

@keyframes floatBlueOrb {
  0% { transform: translate(0, 0) scale(1); opacity: 0.36; }
  50% { transform: translate(-70px, -90px) scale(1.22); opacity: 0.54; }
  100% { transform: translate(50px, -50px) scale(0.92); opacity: 0.30; }
}

@keyframes pulsePurpleOrb {
  0% { transform: translate(0, 0) scale(0.9); opacity: 0.22; }
  50% { transform: translate(45px, -45px) scale(1.25); opacity: 0.40; }
  100% { transform: translate(-35px, 55px) scale(1.05); opacity: 0.24; }
}

/* --------------------------------------------------------------------------
   Контейнер приложения и Модринф Шапка
   -------------------------------------------------------------------------- */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 14px;
  background: rgba(9, 11, 16, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-glass);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--grad-red-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 18px rgba(255, 46, 85, 0.45);
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .sub {
  font-size: 11px;
  color: var(--text-sub);
  display: block;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: 0.3px;
}

.live-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-btn:active {
  transform: scale(0.92);
}

/* --------------------------------------------------------------------------
   Основная область и вкладки
   -------------------------------------------------------------------------- */
.app-main {
  padding: 18px 18px;
  flex: 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: tabFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Заголовки секций (Modrinth Section Headers)
   -------------------------------------------------------------------------- */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-sub);
  margin-bottom: 12px;
  margin-top: 14px;
  position: relative;
  padding-left: 12px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: var(--grad-red-blue);
}

.badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.live-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.view-all-link {
  font-size: 11px;
  color: #60a5fa;
  cursor: pointer;
  text-transform: none;
  font-weight: 600;
  transition: color 0.15s;
}

.view-all-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Метрики P&L (Финансовый дашборд Modrinth)
   -------------------------------------------------------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-red-blue);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.metric-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.metric-sub {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 500;
}

/* Баннер сегодняшней активности (живые покупки) */
.today-live-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(59, 130, 246, 0.12) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
  animation: banner-subtle-glow 3s infinite alternate;
}

@keyframes banner-subtle-glow {
  0% { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.35); }
  100% { box-shadow: 0 4px 24px rgba(59, 130, 246, 0.25); border-color: rgba(59, 130, 246, 0.5); }
}

.today-live-pulsar {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pulsar-core {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  z-index: 2;
}

.pulsar-wave {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: pulsar-ripple 1.8s infinite ease-out;
  z-index: 1;
}

@keyframes pulsar-ripple {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.today-live-info {
  flex: 1;
  min-width: 0;
}

.today-live-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.today-live-subtitle {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.today-live-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 8px;
  color: #34d399;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Статус-пилюли в шапке метрик */
.metric-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.metric-pill-status {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.pill-ready {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.pill-hold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.pill-today {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.pill-live {
  background: rgba(255, 46, 85, 0.15);
  color: #ff6b81;
  border: 1px solid rgba(255, 46, 85, 0.35);
  animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

.text-amber {
  color: #fbbf24 !important;
}

/* --------------------------------------------------------------------------
   Тумблеры 24/7 (Modrinth Cyber Switches)
   -------------------------------------------------------------------------- */
.toggles-list {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 4px 16px;
  margin-bottom: 22px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.toggle-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-glass);
}

.toggle-item:last-child {
  border-bottom: none;
}

.toggle-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bg-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.bg-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.bg-cyan { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.bg-indigo { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.toggle-info {
  flex: 1;
}

.toggle-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.engine-tag {
  font-size: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 700;
  text-transform: uppercase;
}

.toggle-desc {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* Стили переключателя (Switch) с красно-синим неоном */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

input:checked + .slider {
  background: var(--grad-red-blue) !important;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 16px rgba(255, 46, 85, 0.45), 0 0 16px rgba(59, 130, 246, 0.35);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* --------------------------------------------------------------------------
   Быстрый склад на дашборде
   -------------------------------------------------------------------------- */
.quick-stock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stock-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  padding: 12px 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.stock-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
}

.stock-card:active {
  transform: scale(0.98);
}

.stock-cat-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.stock-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stock-count {
  font-size: 16px;
  font-weight: 800;
  color: #38bdf8;
}

.stock-count.zero {
  color: var(--accent-red);
}

.stock-sold-txt {
  font-size: 10px;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   ВКЛАДКА СКЛАДА (Modrinth Subtabs & Layout)
   -------------------------------------------------------------------------- */
.stock-header-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.primary-btn {
  background: var(--grad-red-blue-btn);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(255, 46, 85, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 24px rgba(255, 46, 85, 0.45);
}

.primary-btn:active {
  transform: scale(0.97);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.secondary-btn:active {
  transform: scale(0.97);
}

/* Субвкладки склада (Штучный vs Облачный софт) */
.modrinth-subtabs {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 8px;
  background: rgba(14, 18, 28, 0.85);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border-glass);
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modrinth-subtab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modrinth-subtab-btn.active {
  background: var(--grad-red-blue-subtle);
  color: #ffffff;
  border-color: rgba(255, 46, 85, 0.45);
  box-shadow: 0 0 14px rgba(255, 46, 85, 0.2);
}

.subtab-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.subtab-badge-glow {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* Штучный склад: список категорий */
.stock-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.full-stock-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 16px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.full-stock-item:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(59, 130, 246, 0.15);
}

.full-stock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.full-stock-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-bright);
}

.full-stock-total {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.full-stock-total.empty {
  background: rgba(255, 46, 85, 0.14);
  color: var(--accent-red);
  border-color: rgba(255, 46, 85, 0.3);
}

.full-stock-details {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-sub);
}

.full-stock-arrow {
  color: var(--text-sub);
  font-size: 16px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   ОБЛАЧНЫЙ РАЗДЕЛ (ПРОГРАММЫ GOOGLE ДИСК В СТИЛЕ MODRINTH)
   -------------------------------------------------------------------------- */
.cloud-hero-card {
  background: linear-gradient(135deg, rgba(255, 46, 85, 0.14) 0%, rgba(14, 18, 28, 0.9) 45%, rgba(59, 130, 246, 0.16) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.cloud-hero-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.cloud-hero-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--grad-red-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(255, 46, 85, 0.35);
  flex-shrink: 0;
}

.cloud-hero-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.cloud-hero-badge {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cloud-hero-desc {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
}

.cloud-software-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cloud-mod-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 16px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.cloud-mod-card:hover {
  border-color: rgba(255, 46, 85, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 46, 85, 0.15);
}

.cloud-mod-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cloud-mod-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 46, 85, 0.2), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.cloud-mod-meta {
  flex: 1;
  min-width: 0;
}

.cloud-mod-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.cloud-mod-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cloud-mod-price {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.cloud-mod-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.modrinth-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
}

.modrinth-tag-accent {
  background: rgba(255, 46, 85, 0.12);
  color: #ff6b81;
  border: 1px solid rgba(255, 46, 85, 0.3);
}

.modrinth-tag-live {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.modrinth-tag-success {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.modrinth-tag-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.cloud-link-box {
  background: rgba(8, 10, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cloud-link-preview {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.cloud-link-actions-row {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.cloud-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  text-decoration: none;
}

.cloud-icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.cloud-edit-btn {
  width: 100%;
  background: var(--grad-red-blue-btn);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(255, 46, 85, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cloud-edit-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* --------------------------------------------------------------------------
   Детализация склада (Drilldown)
   -------------------------------------------------------------------------- */
.category-drilldown-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.back-btn {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  width: fit-content;
  transition: color 0.15s;
}

.back-btn:hover {
  color: #93c5fd;
}

.drilldown-title-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drilldown-title-box h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-bright);
}

.action-pill-btn {
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: fit-content;
}

.item-filter-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 14px;
  gap: 4px;
}

.filter-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-sub);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab.active {
  background: var(--grad-red-blue-subtle);
  color: #fff;
  border: 1px solid rgba(255, 46, 85, 0.4);
}

.drilldown-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drilldown-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drilldown-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drilldown-item-id {
  font-size: 11px;
  color: var(--text-sub);
  font-family: monospace;
}

.drilldown-item-content {
  font-family: monospace;
  font-size: 13px;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 10px;
  border-radius: 8px;
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
}

.item-date {
  font-size: 11px;
  color: var(--text-sub);
}

.item-btns {
  display: flex;
  gap: 6px;
}

.item-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.item-btn.btn-del {
  color: var(--accent-red);
  background: rgba(255, 46, 85, 0.1);
  border-color: rgba(255, 46, 85, 0.3);
}

/* --------------------------------------------------------------------------
   ВКЛАДКА СДЕЛОК (Deals & Search)
   -------------------------------------------------------------------------- */
.deals-header-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 13px;
  color: var(--text-sub);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 11px 14px 11px 38px;
  border-radius: 14px;
  font-size: 13px;
  outline: none;
  backdrop-filter: blur(16px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.deals-filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.deal-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.deal-filter-btn.active {
  background: var(--grad-red-blue-subtle);
  color: #fff;
  border-color: rgba(255, 46, 85, 0.5);
  box-shadow: 0 0 12px rgba(255, 46, 85, 0.2);
}

.deals-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}

.deal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
}

.deal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.deal-buyer {
  font-size: 14px;
  font-weight: 800;
  color: #60a5fa;
}

.deal-price {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
}

.deal-item {
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.deal-status-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  text-transform: uppercase;
  display: inline-block;
}

.status-paid { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-sent { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.status-done { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.status-rolled_back { background: rgba(255, 46, 85, 0.15); color: var(--accent-red); border: 1px solid rgba(255, 46, 85, 0.3); }

/* --------------------------------------------------------------------------
   ВКЛАДКА НАСТРОЕК (Профиль, AI и Кошелек)
   -------------------------------------------------------------------------- */
.user-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 20px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.profile-avatar-box {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--grad-red-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(255, 46, 85, 0.45);
}

.profile-meta {
  flex: 1;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.profile-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-bright);
}

.owner-badge {
  background: rgba(255, 46, 85, 0.14);
  color: #ff6b81;
  border: 1px solid rgba(255, 46, 85, 0.35);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.profile-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.profile-handle {
  color: #60a5fa;
  font-weight: 700;
}

.auth-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
}

.auth-sec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 4px 16px;
  margin-bottom: 18px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-glass);
  font-size: 13px;
  transition: background 0.15s ease;
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row.interactive {
  cursor: pointer;
  border-radius: 10px;
  padding: 14px 6px;
  margin: 0 -6px;
}

.setting-row.interactive:hover {
  background: rgba(255, 255, 255, 0.04);
}

.setting-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-title {
  font-weight: 700;
  color: var(--text-bright);
  font-size: 13px;
}

.setting-subdesc {
  font-size: 11px;
  color: var(--text-sub);
}

.setting-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.setting-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 11px;
}

.setting-val {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
}

.setting-chevron {
  font-size: 18px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   КОШЕЛЕК И БАЛАНС PLAYEROK
   -------------------------------------------------------------------------- */
.wallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 20px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.wallet-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.wallet-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-sub);
}

.wallet-balance-val {
  font-size: 26px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -0.5px;
  margin: 4px 0 2px;
}

.wallet-sub-val {
  font-size: 11px;
  color: var(--text-sub);
}

.wallet-badge-live {
  font-size: 10px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
}

.wallet-filter-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.wallet-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.wallet-pill.active {
  background: var(--grad-red-blue-subtle);
  color: #fff;
  border-color: rgba(255, 46, 85, 0.5);
}

.wallet-tx-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.wallet-tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.wallet-tx-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-tx-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.tx-icon-withdraw { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.tx-icon-income { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.tx-icon-promo { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.tx-icon-refund { background: rgba(255, 46, 85, 0.15); color: #ff6b81; }

.wallet-tx-meta {
  display: flex;
  flex-direction: column;
}

.wallet-tx-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
}

.wallet-tx-date {
  font-size: 10px;
  color: var(--text-muted);
}

.wallet-tx-right {
  text-align: right;
}

.wallet-tx-amount {
  font-size: 13px;
  font-weight: 800;
}

.tx-amt-income { color: #38bdf8; }
.tx-amt-withdraw { color: #60a5fa; }
.tx-amt-promo { color: #c084fc; }
.tx-amt-refund { color: var(--accent-red); }

.wallet-tx-status {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

.tx-st-confirmed { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.tx-st-pending { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.tx-st-refund { background: rgba(255, 46, 85, 0.15); color: #ff6b81; }

/* --------------------------------------------------------------------------
   Системная инфо-карточка
   -------------------------------------------------------------------------- */
.system-info-card {
  padding: 14px 16px;
}

.sys-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.sys-item:last-child {
  border-bottom: none;
}

.sys-lbl {
  color: var(--text-sub);
}

.sys-val {
  color: var(--text-bright);
  font-weight: 700;
  font-family: monospace;
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   НИЖНЯЯ ПАНЕЛЬ НАВИГАЦИИ (MODRINTH FLOATING DOCK)
   -------------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 460px;
  height: 64px;
  background: rgba(12, 15, 24, 0.86);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid var(--border-glass);
  border-radius: 26px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 46, 85, 0.12);
  padding: 4px;
}

.nav-tab {
  background: none;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-sub);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 18px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex: 1;
  height: 52px;
}

.nav-icon {
  font-size: 18px;
  transition: transform 0.2s;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
}

.nav-tab.active {
  background: var(--grad-red-blue-subtle);
  border-color: rgba(255, 46, 85, 0.45);
  box-shadow: 0 0 14px rgba(255, 46, 85, 0.22);
  color: #fff;
}

.nav-tab.active .nav-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(255, 46, 85, 0.6));
}

.nav-tab.active .nav-label {
  color: #ffffff;
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   МОДАЛЬНЫЕ ОКНА (Modrinth Deep Glass Modals)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.25s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  background: rgba(14, 18, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px 26px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  font-size: 20px;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}

.modal-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-bright);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.modal-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 0 15px rgba(255, 46, 85, 0.2);
}

.modal-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: var(--text-bright);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.modal-hint {
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid #3b82f6;
  padding: 10px 12px;
  border-radius: 0 10px 10px 0;
  font-size: 11px;
  line-height: 1.5;
  color: #cbd5e1;
}

.modal-hint code {
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
  color: #93c5fd;
  font-family: monospace;
}

.modal-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-family: monospace;
  font-size: 12px;
  padding: 12px;
  border-radius: 14px;
  outline: none;
  resize: vertical;
  min-height: 110px;
}

.modal-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding-top: 8px;
}

.btn-cancel {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-submit {
  flex: 2;
  background: var(--grad-red-blue-btn);
  border: none;
  color: #fff;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 46, 85, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit:hover {
  filter: brightness(1.08);
}

.btn-submit:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   График и Тост
   -------------------------------------------------------------------------- */
.chart-section {
  margin-bottom: 22px;
}

.chart-metric-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.metric-pill {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.metric-pill.active {
  background: var(--grad-red-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 46, 85, 0.3);
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  padding: 16px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.chart-stat-sub-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 2px;
}

.chart-stat-main-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.chart-svg-wrapper {
  width: 100%;
  height: 125px;
  margin-bottom: 8px;
}

.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 20, 32, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 46, 85, 0.25);
  z-index: 200;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.hidden {
  opacity: 0;
  transform: translate(-50%, 14px);
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Детализация сделки и Чат-лента (Modrinth Deal Modal)
   -------------------------------------------------------------------------- */
.deal-mini-info-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-info-item {
  font-weight: 800;
  font-size: 13px;
  color: #fff;
}

.mini-info-price {
  font-weight: 800;
  font-size: 14px;
  color: #38bdf8;
}

.mini-info-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-info-id {
  font-size: 10px;
  color: var(--text-sub);
  font-family: monospace;
}

.delivered-snippet {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.deliv-snip-lbl {
  font-size: 10px;
  color: #38bdf8;
  font-weight: 800;
}

.deliv-snip-content {
  font-family: monospace;
  font-size: 11px;
  color: #cbd5e1;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 8px;
  border-radius: 6px;
  margin-top: 3px;
}

.deal-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn-deliver {
  background: var(--grad-red-blue-btn);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 46, 85, 0.35);
  transition: all 0.2s;
}

.action-btn-deliver:hover {
  filter: brightness(1.08);
}

.action-btn-dispute {
  background: rgba(255, 46, 85, 0.14);
  border: 1px solid rgba(255, 46, 85, 0.35);
  color: #ff6b81;
  padding: 11px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.dossier-box {
  background: rgba(255, 46, 85, 0.08);
  border: 1px solid rgba(255, 46, 85, 0.3);
  border-radius: 12px;
  padding: 10px;
  font-size: 11px;
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: #ff6b81;
  margin-bottom: 6px;
}

.dossier-content {
  font-family: monospace;
  font-size: 10px;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px;
  border-radius: 6px;
  color: #fca5a5;
}

/* Чат-лента событий */
.chat-timeline-container {
  background: rgba(8, 10, 16, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble-buyer {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-bottom-left-radius: 3px;
}

.chat-bubble-seller {
  align-self: flex-end;
  background: var(--grad-red-blue);
  color: #fff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 14px rgba(255, 46, 85, 0.3);
}

.chat-bubble-system {
  align-self: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
  font-size: 10px;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  text-align: center;
}

.chat-msg-time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3px;
  display: block;
  text-align: right;
}

.quick-templates-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tpl-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #cbd5e1;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.tpl-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input-textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  resize: none;
  min-height: 48px;
}

.chat-input-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.chat-send-btn {
  background: var(--grad-red-blue-btn);
  border: none;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 46, 85, 0.35);
}

/* Инспектор выбранного дня на графике */
.day-inspector-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0;
}

.day-inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.day-inspector-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-bright);
}

.day-inspector-badge {
  font-size: 10px;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.14);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.day-inspector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
}

.insp-lbl {
  display: block;
  font-size: 10px;
  color: var(--text-sub);
  margin-bottom: 2px;
}

.insp-val {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-bright);
}

.chart-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-glass);
  text-align: center;
}

.chart-sum-lbl {
  font-size: 10px;
  color: var(--text-sub);
  display: block;
}

.chart-sum-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-bright);
}

.textarea-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.line-counter {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.modal-result {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.cloud-modal-target-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cloud-target-lbl {
  font-size: 11px;
  color: var(--text-sub);
  text-transform: uppercase;
  font-weight: 800;
}

.cloud-target-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

/* Переключатель типа товара в модальном окне */
.prod-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 12px;
}

.prod-type-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(16, 20, 32, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all var(--trans-fast);
  color: var(--text-main);
}

.prod-type-btn:hover {
  background: rgba(26, 32, 50, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.prod-type-btn.active {
  background: rgba(255, 46, 85, 0.12);
  border-color: rgba(255, 46, 85, 0.45);
  box-shadow: 0 0 16px rgba(255, 46, 85, 0.2);
}

.prod-type-btn .type-icon {
  font-size: 20px;
}

.prod-type-btn .type-title {
  font-size: 13px;
  font-weight: 700;
  display: block;
  color: #fff;
}

.prod-type-btn .type-sub {
  font-size: 10px;
  color: var(--text-sub);
  display: block;
  margin-top: 2px;
}

.prod-type-btn.active .type-title {
  color: #ff6b81;
}

.status-check-btn {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-check-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

