:root {
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --border: #cbd5e1;
  --border-focus: #059669;
  --text: #090d16;
  --text-muted: #475569;
  --accent: #059669;
  --accent-light: #ecfdf5;
  --primary: #0284c7;
  --primary-light: #e0f2fe;
  --online: #10b981;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 8px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 20px -3px rgba(0,0,0,0.1), 0 4px 8px -4px rgba(0,0,0,0.04);
  --radius: 14px;
  --header-bg: rgba(255, 255, 255, 0.96);
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
}

[data-theme="dark"] {
  --bg: #0b0f19;
  --bg-subtle: #111827;
  --bg-card: #151d2e;
  --border: #283952;
  --border-focus: #10b981;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #10b981;
  --accent-light: rgba(16, 185, 129, 0.16);
  --primary: #38bdf8;
  --primary-light: rgba(56, 189, 248, 0.16);
  --online: #34d399;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 10px -1px rgba(0,0,0,0.55), 0 2px 4px -2px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 28px -3px rgba(0,0,0,0.7), 0 4px 10px -4px rgba(0,0,0,0.5);
  --header-bg: rgba(11, 15, 25, 0.96);
  --input-bg: #101726;
  --input-border: #2d3e5c;
}

/* Фоновая анимация (Северное сияние и 3D-печать) */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 1;
}

/* Кнопка переключения темы (🌙 / ☀️) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  transition: all .2s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}
.theme-toggle:hover {
  background: var(--border);
  transform: scale(1.08) rotate(12deg);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  background: var(--bg);
  transition: background-color .2s ease;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}
body {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: color .2s ease;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

a { color: var(--primary); text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1200px, 92%); margin: 0 auto; box-sizing: border-box; }
.nav-mobile-logout { display: none; }
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }

h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 1.15; color: var(--text); margin-bottom: 20px; }
h2 { font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; line-height: 1.25; margin-bottom: 12px; }
h3 { font-size: 18px; font-weight: 700; }
.gradient {
  background: linear-gradient(135deg, #0ca678 0%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .gradient {
  background: linear-gradient(135deg, #10b981 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--border);
  transition: background-color .2s ease, border-color .2s ease;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo {
  font-weight: 800;
  font-size: 21px;
  color: var(--text);
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  user-select: none;
}
.logo__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.35));
}
.logo:hover .logo__icon {
  transform: rotate(-10deg) scale(1.1);
  filter: drop-shadow(0 4px 14px rgba(16, 185, 129, 0.6));
}
.logo__brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.logo .logo__badge,
.logo__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
  color: #ffffff !important;
  padding: 3px 8px;
  border-radius: 7px;
  margin-left: 7px;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  line-height: 1.1;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  vertical-align: middle;
}
[data-theme="dark"] .logo .logo__badge,
[data-theme="dark"] .logo__badge {
  background: linear-gradient(135deg, #10b981 0%, #38bdf8 100%);
  color: #02131d !important;
  text-shadow: none;
  font-weight: 950;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55), 0 2px 6px rgba(16, 185, 129, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.logo:hover .logo__badge {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.6), 0 2px 10px rgba(12, 166, 120, 0.5);
}
.logo > span:not([class]) { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  padding: 0 14px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  white-space: nowrap;
  box-sizing: border-box;
  transition: .15s;
}
.nav a:hover { color: var(--text); background: var(--bg-subtle); }
.nav a.active { color: var(--primary); background: var(--primary-light); }
.userbox { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.userbox .theme-toggle {
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.userchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 5px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: var(--bg-subtle);
  color: var(--text);
  white-space: nowrap;
  height: 42px;
  box-sizing: border-box;
  text-decoration: none;
  transition: all .15s ease;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}
.userchip:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.nav-msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
  animation: navBadgePulse 2.2s infinite ease-in-out;
}
@keyframes navBadgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
  50% { transform: scale(1.12); box-shadow: 0 0 14px rgba(239, 68, 68, 0.85); }
}
.userchip .avatar {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}
.userchip .avatar.avatar--img {
  border: 1.5px solid var(--border) !important;
  box-sizing: border-box !important;
  object-fit: cover !important;
}
.userchip span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}
.userchip b {
  font-size: 13.5px;
  font-weight: 700;
  display: block;
  line-height: 1.2;
  color: var(--text);
}
.userchip small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  line-height: 1.2;
}
.userbox .btn {
  height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-sizing: border-box;
}
.burger { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; width: 42px; height: 42px; font-size: 20px; cursor: pointer; color: var(--text); box-sizing: border-box; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  padding: 12px 22px; border-radius: 10px; border: 1.5px solid transparent;
  cursor: pointer; transition: all .15s ease;
}
.btn--primary { background: var(--accent); color: #fff; font-weight: 800; }
.btn--primary:hover { background: #099268; box-shadow: 0 4px 14px rgba(12, 166, 120, 0.35); }
.btn--ghost { background: var(--bg-card); color: var(--text); border-color: var(--border); font-weight: 700; }
.btn--ghost:hover { background: var(--bg-subtle); border-color: var(--accent); }
.btn--outline { background: var(--bg-card); color: var(--text); border-color: var(--border); font-weight: 700; }
.btn--outline:hover { background: var(--bg-subtle); border-color: var(--accent); color: var(--accent); }
.btn--small { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn--wide { width: 100%; }
.link { background: none; border: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; font-weight: 600; }
.btn--small { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn--wide { width: 100%; }
.link { background: none; border: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }

/* Индикатор онлайн */
.online-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
  white-space: nowrap; flex-shrink: 0; line-height: 1.4;
}
.online-badge.online { background: #dcfce7; color: #15803d; }
.online-badge.offline { background: #f1f5f9; color: #64748b; }
[data-theme="dark"] .online-badge.online {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
[data-theme="dark"] .online-badge.offline {
  background: rgba(100, 116, 139, 0.16);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.online-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.online-badge.online .dot {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

/* Hero */
.hero--light {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, rgba(230, 252, 245, 0.45) 0%, rgba(248, 250, 252, 0.45) 100%);
  border-bottom: 1.5px solid var(--border);
}
[data-theme="dark"] .hero--light {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(11, 15, 25, 0.45) 100%);
}
.hero__inner { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px; }
.hero__text { max-width: 620px; }
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 700;
  background: var(--bg-card); border: 1.5px solid var(--border); color: var(--text); margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.lead { font-size: 18px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 36px; list-style: none; margin-top: 40px; padding-top: 24px; border-top: 1.5px solid var(--border); }
.hero__stats b { display: block; font-size: 26px; font-weight: 800; color: var(--text); }
.hero__stats span { font-size: 13px; color: var(--text-muted); }

.hero__image-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero__main-photo { border-radius: 20px; box-shadow: var(--shadow-lg); border: 3px solid var(--border); width: 100%; aspect-ratio: 16/10; object-fit: cover; }

/* Карусель Норильска и 3D печати */
.hero__carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1.5px rgba(0, 242, 254, 0.25);
  border: 3px solid var(--border);
  background: #0b1120;
  user-select: none;
}
.hero__slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.85s;
  overflow: hidden;
}
.hero__slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.hero__slide.prev {
  opacity: 0;
  z-index: 1;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.85s;
}
.hero__slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.0);
  transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}
.hero__slide.active .hero__slide-img {
  transform: scale(1.08);
}
.hero__slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 17, 32, 0.3) 0%,
    rgba(11, 17, 32, 0) 40%,
    rgba(11, 17, 32, 0.45) 100%
  );
  pointer-events: none;
}
/* Аврора-волна при переключении */
.hero__carousel-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 242, 254, 0.22) 35%,
    rgba(16, 185, 129, 0.28) 50%,
    rgba(0, 242, 254, 0.22) 65%,
    transparent 100%
  );
  mix-blend-mode: screen;
  transform: translateX(-120%);
}
.hero__carousel-aurora.flash {
  animation: auroraSweep 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes auroraSweep {
  0% { opacity: 0; transform: translateX(-120%); }
  35% { opacity: 0.6; }
  70% { opacity: 0.35; }
  100% { opacity: 0; transform: translateX(120%); }
}
/* Бейдж с иконкой и подписью кадра */
.hero__carousel-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 17, 32, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 242, 254, 0.3);
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
/* Стрелки переключения */
.hero__carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(11, 17, 32, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background 0.2s, transform 0.2s, border-color 0.2s;
  padding: 0;
}
.hero__carousel:hover .hero__carousel-nav {
  opacity: 0.85;
}
.hero__carousel-nav:hover {
  opacity: 1 !important;
  background: rgba(0, 242, 254, 0.3);
  border-color: rgba(0, 242, 254, 0.6);
  transform: translateY(-50%) scale(1.08);
}
.hero__carousel-nav--prev { left: 12px; }
.hero__carousel-nav--next { right: 12px; }
/* Индикаторы прогресса (Stories / Tesla style) */
.hero__carousel-indicators {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(11, 17, 32, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.hero__carousel-dot {
  position: relative;
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}
.hero__carousel-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}
.hero__carousel-dot.active {
  width: 28px;
  background: rgba(255, 255, 255, 0.25);
}
.hero__carousel-dot-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #00f2fe, #10b981);
  border-radius: 2px;
}
.hero__carousel-dot.active .hero__carousel-dot-fill {
  animation: heroDotFill 5s linear forwards;
}
@keyframes heroDotFill {
  0% { width: 0%; }
  100% { width: 100%; }
}
.hero__floating-card {
  position: static;
  background: var(--bg-card);
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hero__floating-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.hero__floating-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.online-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); flex-shrink: 0; }
.hero__floating-card b { display: block; font-size: 14px; color: var(--text); line-height: 1.25; }
.hero__floating-card small { font-size: 12.5px; color: var(--text-muted); line-height: 1.25; }

/* Баннер страницы */
.page-banner {
  padding: 44px 0 36px;
  background: rgba(241, 245, 249, 0.55);
  border-bottom: 1.5px solid var(--border);
}
[data-theme="dark"] .page-banner {
  background: rgba(17, 24, 39, 0.55);
}
.page-banner h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 8px; color: var(--text); }
.page-banner p { color: var(--text-muted); font-size: 16px; max-width: 680px; }

/* Секции */
.section { padding: 70px 0; }
.section--tight { padding: 40px 0 80px; }
.section--light-alt {
  background: rgba(241, 245, 249, 0.55);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .section--light-alt {
  background: rgba(17, 24, 39, 0.55);
}
.section__head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.link-more {
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
}

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.step { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.step span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-weight: 800; background: var(--accent-light); color: var(--accent); margin-bottom: 14px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); }

/* Карточки заказов */
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.ocard {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; cursor: pointer; transition: all .2s ease; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.ocard:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ocard__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.ocard__top > div:first-child {
  flex: 1;
  min-width: 0;
}
.ocard h3 { font-size: 17px; line-height: 1.35; color: var(--text); }
.ocard__bottom { display: flex; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); }
.ocard__bottom small { display: block; font-size: 12px; color: var(--text-muted); }
.ocard__bottom b { font-size: 17px; }
.ocard__meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }

.file-badge { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; flex-shrink: 0; white-space: nowrap; }
.file-badge--3mf { background: #fef3c7; color: #92400e; border-color: #fde68a; }
[data-theme="dark"] .file-badge { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); }
[data-theme="dark"] .file-badge--3mf { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border-color: rgba(245, 158, 11, 0.35); }

.status {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}
.st-open { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.st-work { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.st-ready { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.st-done { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }

[data-theme="dark"] .st-open { background: rgba(16, 185, 129, 0.22); color: #34d399; border-color: rgba(16, 185, 129, 0.4); }
[data-theme="dark"] .st-work { background: rgba(56, 189, 248, 0.22); color: #38bdf8; border-color: rgba(56, 189, 248, 0.4); }
[data-theme="dark"] .st-ready { background: rgba(234, 179, 8, 0.22); color: #facc15; border-color: rgba(234, 179, 8, 0.4); }
[data-theme="dark"] .st-done { background: rgba(148, 163, 184, 0.22); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.4); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; flex-shrink: 0; }
.chip--pla { background: #fff7ed; color: #c2410c; border-color: #ffedd5; }
.chip--petg { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.chip--abs { background: #fff1f2; color: #be123c; border-color: #ffe4e6; }
.chip--tpu { background: #faf5ff; color: #7e22ce; border-color: #f3e8ff; }
.chip--resin { background: #f0f9ff; color: #0369a1; border-color: #e0f2fe; }
.chip--spec { background: #fffbeb; color: #b45309; border-color: #fde68a; font-weight: 800; }
.chip--nylon { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.chip--carbon { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; font-weight: 800; }
.chip--pc { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.chip--asa { background: #fdf2f8; color: #9d174d; border-color: #fbcfe8; }

[data-theme="dark"] .chip--pla { background: rgba(234, 88, 12, 0.2); color: #fb923c; border-color: rgba(251, 146, 60, 0.35); }
[data-theme="dark"] .chip--petg { background: rgba(16, 185, 129, 0.2); color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
[data-theme="dark"] .chip--abs { background: rgba(244, 63, 94, 0.2); color: #fb7185; border-color: rgba(251, 113, 133, 0.35); }
[data-theme="dark"] .chip--tpu { background: rgba(168, 85, 247, 0.2); color: #c084fc; border-color: rgba(192, 132, 252, 0.35); }
[data-theme="dark"] .chip--resin { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); }
[data-theme="dark"] .chip--spec { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); font-weight: 800; }
[data-theme="dark"] .chip--nylon { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }
[data-theme="dark"] .chip--carbon { background: rgba(148, 163, 184, 0.2); color: #f1f5f9; border-color: rgba(148, 163, 184, 0.35); font-weight: 800; }
[data-theme="dark"] .chip--pc { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border-color: rgba(59, 130, 246, 0.35); }
[data-theme="dark"] .chip--asa { background: rgba(236, 72, 153, 0.2); color: #f472b6; border-color: rgba(236, 72, 153, 0.35); }

/* Карточки мастеров */
.printer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.pcard {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  box-sizing: border-box;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pcard:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.pcard__head { display: flex; gap: 14px; align-items: center; }
.pcard__head-info { flex: 1; min-width: 0; }
.pcard__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.pcard__title-row h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.pcard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
}
.pcard__stats > div, .pcard__stat-item {
  background: var(--bg-subtle);
  border-radius: 10px;
  padding: 8px 4px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  box-sizing: border-box;
}
.pcard__stat-stars {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.pcard__stats small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
}
.pcard__about {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.pcard__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.pcard__actions .btn {
  flex: 1;
  white-space: nowrap;
}

.avatar {
  flex: none; display: grid; place-items: center; border-radius: 50%;
  font-weight: 800; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, hsl(var(--h), 70%, 45%), hsl(calc(var(--h) + 40), 75%, 40%));
}
.avatar.avatar--img {
  background: none !important;
  object-fit: cover !important;
  border: 1.5px solid var(--border);
}
.avatar.avatar--preset {
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.avatar.avatar--emoji {
  border: 1.5px solid var(--border);
}
.avatar-editable {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: 50%;
  transition: transform .15s ease;
  flex-shrink: 0;
}
.avatar-editable:hover {
  transform: scale(1.04);
}
.avatar-editable__badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  transition: all .15s ease;
}
.avatar-editable:hover .avatar-editable__badge {
  transform: scale(1.15);
  background: var(--accent-hover);
}
.avatar-preset-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent) !important;
}
.stars { color: #f59f00; font-weight: 700; font-size: 14px; }

/* Сетка материалов */
.materials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-top: 24px; }
.mat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.mat-card__color { width: 44px; height: 8px; border-radius: 4px; margin-bottom: 14px; }
.mat-card p { font-size: 13px; color: var(--text-muted); margin: 8px 0 16px; flex: 1; line-height: 1.5; }
.mat-card b { color: var(--accent); font-size: 15px; }

/* Форма заказа */
.order-form {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px;
  align-items: start;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px; box-shadow: var(--shadow-md);
}
.dropzone {
  position: relative; display: block; cursor: pointer; border-radius: var(--radius);
  border: 2px dashed #cbd5e1; background: var(--bg-subtle);
  aspect-ratio: 10/7; overflow: hidden; transition: .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-light); }
.dropzone canvas { width: 100%; height: 100%; display: block; }
.dropzone__hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px; color: var(--text-muted); }
.dropzone__hint b { color: var(--text); font-size: 17px; }
.dropzone__icon { font-size: 38px; color: var(--accent); }
.hint-small { font-size: 12px; color: var(--text-muted); margin-top: 8px; text-align: center; }

.model-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.model-info div, .spec { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.model-info span, .spec span { display: block; font-size: 12px; color: var(--text-muted); }
.model-info b, .spec b { font-size: 14px; }
.warn { margin-top: 10px; color: #d9480f; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.field label { font-size: 13px; font-weight: 700; color: var(--text); }
.field small.field-hint { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.row { display: flex; gap: 14px; }
.row .field { flex: 1; }

/* ==========================================================
   СОВРЕМЕННЫЕ ЭЛЕГАНТНЫЕ ФОРМЫ (АНКЕТА МАСТЕРА И ЗАКАЗЧИКА)
   ========================================================== */
.form-card-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all .15s ease;
}
.form-card-block:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.form-block-head .badge-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.form-block-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}
.form-block-head small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 16px;
}
.col-full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  line-height: 1.3;
}
.field label .req {
  color: #ef4444;
  margin-left: 3px;
  font-weight: 800;
}
.field small.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Поля с аккуратными иконками-префиксами (эталон как у поля телефона) */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-with-icon .input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.input-with-icon input,
.input-with-icon select {
  padding-left: 44px !important;
  width: 100% !important;
  height: 48px !important;
  background-color: var(--input-bg) !important;
  color: var(--text) !important;
  border: 1.5px solid var(--input-border) !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
}
.input-with-icon .input-suffix {
  position: absolute;
  right: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
  user-select: none;
}
.input-with-icon.has-suffix input {
  padding-right: 68px !important;
}

/* Для многострочных полей (textarea) с иконкой на уровне первой строки */
.input-with-icon--textarea {
  align-items: flex-start;
}
.input-with-icon--textarea .input-icon {
  top: 14px;
  line-height: 1;
}
.input-with-icon--textarea textarea {
  padding-left: 44px !important;
  min-height: 92px;
  resize: vertical;
}

/* Единые базовые стили для всех типов полей ввода (вид эталонного поля телефона) */
input,
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--input-border);
  outline: none;
  background-color: var(--input-bg) !important;
  color: var(--text) !important;
  width: 100%;
  box-sizing: border-box;
  transition: all .15s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
input[type="checkbox"],
input[type="radio"] {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
}
input[type="file"] {
  height: auto !important;
  padding: 8px 12px;
  background: var(--input-bg) !important;
  cursor: pointer;
}
input[type="range"] {
  height: auto !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
/* Предотвращение белого фона автозаполнения браузера */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 5000s ease-in-out 0s;
}
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.75;
}
/* Скрываем спиннеры у type=number, чтобы числовые поля выглядели гладко и ровно */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}
select,
.input-with-icon select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--input-bg) !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 14px) center !important;
  background-size: 16px 16px !important;
  padding-right: 48px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}
[data-theme="dark"] select,
[data-theme="dark"] .input-with-icon select {
  background-color: var(--input-bg) !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 14px) center !important;
  background-size: 16px 16px !important;
  padding-right: 48px !important;
}
#scanHandover {
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px 16px !important;
  padding-right: 48px !important;
}
textarea {
  height: auto;
  min-height: 92px;
  padding: 12px 14px;
  line-height: 1.5;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-focus);
}
input:focus,
select:focus,
textarea:focus {
  background-color: var(--input-bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* Подгруппы внутри карточки формы (для аккуратного разделения печати и сканирования) */
.form-subgroup {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.form-subgroup:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.form-subgroup-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.form-subgroup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.form-subgroup-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.form-subgroup-header b {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.form-subgroup-header small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Интерактивные карточки технологий (FDM, SLA, 3D-сканирование) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 680px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }
}
.tile-card {
  display: flex;
  cursor: pointer;
  position: relative;
  height: 56px !important;
  max-height: 56px !important;
  box-sizing: border-box;
}
.tile-card input {
  display: none;
}
.tile-card__inner {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  transition: all .15s ease;
  width: 100%;
  height: 56px !important;
  max-height: 56px !important;
  box-sizing: border-box !important;
  overflow: hidden;
}
.tile-card:hover .tile-card__inner {
  border-color: var(--accent);
  background: var(--bg-card);
}
.tile-card__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.tile-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.tile-card__content b {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: -0.2px;
}
.tile-card__content small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.tile-card__check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
  flex-shrink: 0;
  transition: all .15s;
}
.tile-card input:checked + .tile-card__inner {
  border-color: var(--accent);
  background: var(--accent-light);
}
.tile-card input:checked + .tile-card__inner .tile-card__check {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Бейджи выбора материалов */
.mat-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mat-badge {
  display: inline-block;
  cursor: pointer;
}
.mat-badge input {
  display: none;
}
.mat-badge span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s ease;
}
.mat-badge:hover span {
  border-color: var(--accent);
  background: var(--bg-card);
}
.mat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mat-badge input:checked + span {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 2px 6px rgba(12, 166, 120, 0.15);
  color: var(--accent);
  font-weight: 700;
}

/* Индивидуальные цены для каждого материала мастера */
.mat-price-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 16px;
}
.mat-price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: all .15s ease;
}
.mat-price-item:hover {
  border-color: var(--border-focus);
}
.mat-price-item.disabled {
  opacity: 0.5;
  background: var(--bg-card);
}
.mat-price-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}
.mat-price-info input[type="checkbox"] {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.mat-price-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mat-price-meta b {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.25;
}
.mat-price-meta small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 2px;
}
.mat-price-input-wrap {
  width: 160px;
  flex-shrink: 0;
}
.mat-price-input-wrap .input-with-icon input {
  height: 42px !important;
  font-size: 14px;
  font-weight: 700;
  padding-left: 36px !important;
  padding-right: 56px !important;
  text-align: right;
}
.mat-price-input-wrap .input-with-icon .input-icon {
  left: 12px;
  font-size: 14px;
}
.mat-price-input-wrap .input-with-icon .input-suffix {
  right: 12px;
  font-size: 12px;
  font-weight: 700;
}

/* Дополнительные услуги (Service pills) */
.service-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service-pill {
  display: inline-block;
  cursor: pointer;
}
.service-pill input {
  display: none;
}
.service-pill span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .15s ease;
}
.service-pill:hover span {
  border-color: var(--primary);
  background: var(--bg-card);
  color: var(--text);
}
.service-pill input:checked + span {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.mat-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mat-selector label { display: block; cursor: pointer; }
.mat-selector input { display: none; }
.mat-selector span {
  display: block; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-subtle); font-size: 13px; text-align: center; transition: .15s;
}
.mat-selector span small { display: block; font-size: 11px; color: var(--text-muted); }
.mat-selector input:checked + span { border-color: var(--accent); background: var(--accent-light); font-weight: 700; color: var(--accent); }

.estimate-box {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 10px 0 18px;
}
[data-theme="dark"] .estimate-box {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--border);
  border-left-color: var(--accent);
}
.estimate-box span { display: block; font-size: 13px; color: var(--text-muted); }
.estimate-box b { display: block; font-size: 26px; font-weight: 800; color: var(--text); }
.estimate-box small { font-size: 12px; color: var(--text-muted); }

/* Модалка чата и раздельной регистрации */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__box { position: relative; width: min(600px, 100%); background: var(--bg-card); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); box-sizing: border-box; }
.modal__box--wide { width: min(840px, 100%); max-height: 90vh; overflow-y: auto; }
.modal__box--narrow { width: min(520px, 100%); }
.modal__box--chat { width: min(540px, 100%); height: 580px; display: flex; flex-direction: column; padding: 20px; }
.modal__close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-subtle); color: var(--text); cursor: pointer; font-size: 20px; line-height: 1; }

.modal-confirm-box {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
  padding: 8px 4px;
  box-sizing: border-box;
}
.modal-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  margin-top: 24px;
}
@media (max-width: 480px) {
  .modal-confirm-actions {
    flex-direction: column-reverse;
  }
  .modal-confirm-actions .btn {
    width: 100%;
  }
}

.auth-box {
  display: flex;
  flex-direction: column;
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--bg-subtle);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.auth-tab-btn {
  flex: 1;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-tab-btn:hover {
  color: var(--text);
}
.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.auth-intro {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.auth-intro h3 {
  font-size: 19px;
  margin-bottom: 4px;
}
.auth-quick-demo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .avatar-preset-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}
.avatar-preset-tile {
  cursor: pointer;
  background: var(--bg-subtle);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  transition: all .15s ease;
  box-sizing: border-box;
  min-width: 0;
}
.avatar-preset-tile:hover {
  border-color: var(--accent);
  background: var(--bg-card);
  transform: translateY(-1px);
}
.avatar-preset-tile.active {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 1px var(--accent);
}
.avatar-preset-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.avatar-preset-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-modal { display: flex; flex-direction: column; height: 100%; }
.chat-modal__head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.chat-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; }
.chat-order-tag { background: var(--bg-subtle); padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-muted); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; }
.chat-msg--me { justify-content: flex-end; }
.chat-msg--them { justify-content: flex-start; }
.chat-bubble { max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 14px; position: relative; }
.chat-msg--me .chat-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 2px; }
.chat-msg--them .chat-bubble { background: var(--bg-subtle); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 2px; }
.chat-bubble time { display: block; font-size: 10px; opacity: 0.75; text-align: right; margin-top: 4px; }
.chat-empty { text-align: center; color: var(--text-muted); font-size: 13px; margin: auto; padding: 20px; }
.chat-input { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; }

/* Отклики в заказе (карточка отклика мастера) */
.resp-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.resp-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.resp-item__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.resp-item__master {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.resp-item__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.resp-item__name {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}
.resp-item__sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.resp-item__price-box {
  text-align: right;
  flex-shrink: 0;
}
.resp-item__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}
.resp-item__days {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 600;
}
.resp-item__days b {
  color: var(--text);
}
.resp-item__msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
}
.resp-item__msg-icon {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1.4;
}
.resp-item__msg-text {
  flex: 1;
}
.resp-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}
.resp-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.resp-item__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.resp-item__actions .btn {
  height: 40px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 10px;
}
@media (max-width: 600px) {
  .resp-item__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .resp-item__price-box {
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .resp-item__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .resp-item__actions {
    margin-left: 0;
    width: 100%;
  }
  .resp-item__actions .btn {
    flex: 1;
  }
}

.contact-card { display: flex; align-items: center; justify-content: space-between; background: var(--accent-light); border: 1.5px solid var(--accent); padding: 14px 18px; border-radius: 12px; color: var(--text); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 99px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 200; opacity: 0; transition: .2s; }
.toast.show { opacity: 1; }

/* Галерея */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.gallery figure { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 14px 10px; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.8)); }

/* Тулбар и фильтры */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.tabs { display: flex; gap: 4px; background: var(--bg-subtle); padding: 4px; border-radius: 10px; border: 1px solid var(--border); max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs button { background: none; border: 0; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--text-muted); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.tabs button.active { background: var(--bg-card); color: var(--text); box-shadow: var(--shadow-sm); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select { width: auto; font-size: 13px; padding: 8px 12px; }

/* Футер */
.footer { background: var(--bg-subtle); border-top: 1px solid var(--border); padding: 50px 0 30px; font-size: 14px; color: var(--text-muted); margin-top: 60px; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer__inner > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.footer__inner b { display: block; color: var(--text); margin-bottom: 8px; font-size: 15px; }
.footer__inner a {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  padding: 2px 0;
  line-height: 1.4;
  text-decoration: none;
}
.footer__inner a:hover { color: var(--accent); }
.footer__copy { text-align: center; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }

/* Адаптив */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
  }
  .container {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }
  .header {
    width: 100%;
    overflow: visible;
  }
  .header__inner {
    height: 60px;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
  }
  .logo {
    font-size: 20px;
    flex-shrink: 0;
  }
  .userbox {
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
  }
  .header-logout-btn,
  #logoutBtn {
    display: none !important;
  }
  .userchip {
    padding: 2px !important;
    gap: 0 !important;
    border: none !important;
    background: transparent !important;
    height: 36px !important;
    box-sizing: border-box;
  }
  .userchip span,
  .userchip-text {
    display: none !important;
  }
  .userchip:hover {
    background: transparent !important;
    transform: scale(1.05);
  }
  .header-balance-chip {
    padding: 4px 8px;
    font-size: 12px;
    gap: 4px;
    height: 36px;
    box-sizing: border-box;
  }
  .header-balance-icon {
    font-size: 14px;
  }
  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .burger {
    display: block;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .hero__inner, .order-form {
    grid-template-columns: 1fr;
    width: 100%;
    box-sizing: border-box;
  }
  .order-form {
    padding: 20px 16px;
    border-radius: 16px;
    gap: 20px;
  }
  .page-banner {
    padding: 24px 0 20px;
    width: 100%;
    box-sizing: border-box;
  }
  .page-banner h1 {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .page-banner p {
    font-size: 14px;
  }
  .section {
    padding: 36px 0;
    width: 100%;
    box-sizing: border-box;
  }
  .section--tight {
    padding: 20px 0 48px;
    width: 100%;
    box-sizing: border-box;
  }
  .steps { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100vw;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-card);
    flex-direction: column;
    padding: 16px 20px 24px;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    z-index: 999999;
    box-sizing: border-box;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; justify-content: flex-start; }
  .nav-mobile-logout {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
  }
  .nav-mobile-logout:hover {
    background: rgba(239, 68, 68, 0.2);
  }
}
@media (max-width: 560px) {
  .hero__floating-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    width: 100%;
  }
  .hero__floating-card .btn {
    width: 100%;
    text-align: center;
  }
  .steps, .gallery, .footer__inner, .mat-selector, .form-grid, .tile-grid { grid-template-columns: 1fr; }
  .hero__stats { flex-direction: column; gap: 14px; }
  .row { flex-direction: column; }
}

@media (max-width: 480px) {
  .logo { font-size: 18px; }
  .logo .logo__badge,
  .logo__badge { font-size: 12px; padding: 2px 6px; margin-left: 5px; }
  .header__inner { padding: 0; height: 56px; }
  .userbox { gap: 4px; }
  .header-balance-chip { padding: 3px 6px; font-size: 11px; height: 32px; gap: 3px; }
  .header-balance-icon { font-size: 13px; }
  .theme-toggle { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
  .burger { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; }
  .userchip { height: 32px !important; }
  .avatar { width: 28px !important; height: 28px !important; font-size: 12px !important; }
  .order-form { padding: 14px 10px; }
  .container { padding: 0 10px !important; }
}

@media (max-width: 380px) {
  .logo { font-size: 17px; }
  .header-balance-chip { padding: 2px 4px; font-size: 10.5px; }
  .header-balance-amount { font-size: 10.5px; }
  .userbox { gap: 3px; }
}


/* ==========================================================
   ЛИЧНЫЙ КАБИНЕТ И ЧАТЫ В СТИЛЕ FUNPAY
   ========================================================== */
.cabinet-wrap {
  padding: 24px 0 60px;
  background: rgba(241, 245, 249, 0.55);
  min-height: calc(100vh - 180px);
}
[data-theme="dark"] .cabinet-wrap {
  background: rgba(17, 24, 39, 0.55);
}
.cabinet-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  height: 720px;
}

/* Левая колонка: Профиль и список чатов */
.cab-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cab-user-card {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.cab-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cab-user-meta {
  flex: 1;
}
.cab-role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 4px;
}
.cab-role--printer { background: #e0f2fe; color: #0284c7; }
.cab-role--customer { background: #e6fcf5; color: #0ca678; }
[data-theme="dark"] .cab-role--printer { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
[data-theme="dark"] .cab-role--customer { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.cab-demo-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.cab-guest-box {
  text-align: center;
  padding: 6px 0;
}

/* Вкладки в сайдбаре */
.cab-nav-tabs {
  display: flex;
  padding: 8px 12px;
  gap: 6px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.cab-tab-btn {
  flex: 1;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.cab-tab-btn.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.cab-search-box {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.cab-search-box input {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* Список диалогов */
.cab-dialog-list {
  flex: 1;
  overflow-y: auto;
}
.cab-no-dialogs {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
}
.cab-dialog-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.cab-dialog-item:hover {
  background: var(--bg-subtle);
}
.cab-dialog-item.active {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
}
.cab-dialog-avatar-wrap {
  position: relative;
  flex: none;
}
.cab-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  border: 2px solid var(--bg-card);
}
.cab-online-dot.online {
  background: var(--online);
}

.cab-dialog-info {
  flex: 1;
  min-width: 0;
}
.cab-dialog-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.cab-dialog-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cab-dialog-time {
  font-size: 11px;
  flex: none;
}
.cab-dialog-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  margin-left: 6px;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.cab-dialog-delete-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
  opacity: 0.35;
  color: var(--text-muted);
  transition: opacity 0.15s, transform 0.15s, background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cab-dialog-item:hover .cab-dialog-delete-btn {
  opacity: 0.8;
}
.cab-dialog-delete-btn:hover {
  opacity: 1 !important;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.15);
}
.btn--delete-chat {
  color: var(--text-muted);
  border-color: rgba(239, 68, 68, 0.25) !important;
}
.btn--delete-chat:hover {
  color: #ef4444 !important;
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.cab-dialog-order-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
}
.cab-order-mini-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.cab-status-badge {
  font-size: 10px !important;
  padding: 1px 6px !important;
}

.cab-dialog-snippet {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.3;
}

/* Правая панель: Чат и статус */
.cab-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cab-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 40px;
}

.cab-chat-box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cab-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

/* Фирменная плашка сделки FunPay */
.cab-order-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
[data-theme="dark"] .cab-order-banner {
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.35) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-bottom-color: #065f46;
}
.cab-order-banner__info {
  display: flex;
  flex-direction: column;
}
.cab-order-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Лента сообщений */
.cab-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
}
.cab-msg-row {
  display: flex;
}
.cab-msg-row.me {
  justify-content: flex-end;
}
.cab-msg-row.them {
  justify-content: flex-start;
}
.cab-msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}
.cab-msg-row.me .cab-msg-bubble {
  background: var(--accent);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}
.cab-msg-row.them .cab-msg-bubble {
  background: var(--bg-subtle);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}
.cab-msg-bubble time {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  text-align: right;
  margin-top: 4px;
}

/* Поле отправки */
.cab-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.cab-composer input[type="text"] {
  flex: 1;
}

/* Кнопка прикрепления фото */
.cab-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  transition: all .15s ease;
  flex-shrink: 0;
  user-select: none;
}
.cab-attach-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* Плашка превью прикрепленного фото перед отправкой */
.cab-photo-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: var(--bg-subtle);
  border-top: 1.5px solid var(--border);
}
.cab-photo-preview-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cab-photo-thumb-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  flex-shrink: 0;
}
.cab-photo-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid var(--border);
}
.cab-photo-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
.cab-photo-remove:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}
.cab-photo-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cab-photo-meta b {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cab-photo-meta small {
  font-size: 11px;
  color: var(--text-muted);
}

/* Отображение фото внутри пузыря сообщения */
.cab-msg-image-wrap {
  margin-bottom: 8px;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  max-width: 320px;
}
.cab-msg-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: transform .2s ease;
}
.cab-msg-img:hover {
  transform: scale(1.02);
}

/* Настройки профиля */
.cab-settings-panel {
  padding: 30px;
  overflow-y: auto;
  height: 100%;
}

@media (max-width: 860px) {
  .cabinet-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .cab-sidebar {
    height: 400px;
  }
  .cab-main {
    min-height: 540px;
  }
}


/* ==========================================================
   СЕКЦИИ ГЛАВНОЙ: ДВЕ СТОРОНЫ, FAQ, CTA
   ========================================================== */
.sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
.side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.side:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.side img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.side__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.side__body h3 {
  font-size: 22px;
  margin: 10px 0 14px;
}
.side__body .btn {
  margin-top: auto;
  align-self: flex-start;
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--accent-light);
  color: var(--accent);
}
.tag--primary {
  background: var(--primary-light);
  color: var(--primary);
}
.ticks {
  list-style: none;
  margin: 12px 0 24px;
}
.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 800;
}

/* FAQ аккордеоны */
.narrow {
  max-width: 860px;
  margin: 0 auto;
}
details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}
details[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
summary {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--accent);
  font-weight: 800;
  transition: transform .2s ease;
}
details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}
details p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.6;
}

/* Призыв к действию (CTA баннер) */
.cta-banner {
  padding: 60px 0;
  background: var(--bg-subtle);
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
}
[data-theme="dark"] .cta-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(56, 189, 248, 0.08) 100%);
}
.cta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-banner h2 {
  font-size: 28px;
  margin-bottom: 6px;
}

/* ==================== БАННЕР ДЛЯ ИСПОЛНИТЕЛЕЙ (PRINTERS.HTML) ==================== */
.join {
  padding: 60px 0 80px;
}
.join__inner {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 44px;
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.join__inner:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .join__inner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.join__image-wrap {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2.5px solid var(--border);
  aspect-ratio: 4/3;
  background: #0b1120;
}
.join__image-wrap img,
.join__inner > img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 2.5px solid var(--border);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.join__inner:hover .join__image-wrap img,
.join__inner:hover > img {
  transform: scale(1.03);
}
.join__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.join__content h2,
.join__inner h2 {
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.25;
  margin: 6px 0 14px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.3px;
}
.join__inner .ticks {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.join__inner .ticks li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.join__inner .ticks li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}
.join__inner .btn {
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
}
@media (max-width: 920px) {
  .join__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 28px 20px;
  }
  .join__image-wrap,
  .join__inner > img {
    aspect-ratio: 16/10;
  }
}

/* ==================== 3D-СКАНИРОВАНИЕ И РЕВЕРС-ИНЖИНИРИНГ ==================== */
.file-badge--scan {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #fff;
  border-color: #38bdf8;
  font-weight: 800;
}
.scan-workflow {
  margin: 32px 0 40px;
}
.scan-workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.scan-wf-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  transition: all 0.2s ease;
}
.scan-wf-step:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.scan-wf-num {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
[data-theme="dark"] .scan-wf-num {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}
.scan-wf-icon {
  font-size: 30px;
  margin-bottom: 12px;
  line-height: 1;
}
.scan-wf-step h4 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
}
.scan-wf-step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.scan-form-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: flex-start;
}
.scan-sidebar-sticky {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Фото дропзона сканирования */
.scan-upload-area {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: all 0.2s ease;
  position: relative;
}
.scan-upload-area:hover,
.scan-upload-area.drag {
  border-color: #0284c7;
  background: rgba(14, 165, 233, 0.05);
}
.scan-upload-icon {
  font-size: 44px;
  margin-bottom: 10px;
  line-height: 1;
}
.scan-upload-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.scan-upload-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
}
.scan-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.scan-photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
}
.scan-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scan-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.scan-photo-remove:hover {
  background: #ef4444;
}

/* Карточки целей сканирования */
.scan-goals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.scan-goal-card {
  position: relative;
  cursor: pointer;
}
.scan-goal-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.scan-goal-card__inner {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg-subtle);
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scan-goal-card input:checked + .scan-goal-card__inner {
  border-color: #0284c7;
  background: rgba(14, 165, 233, 0.08);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}
.scan-goal-card h5 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.scan-goal-card small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Переключатель 3D-печати */
.scan-print-toggle-box {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 16px;
  transition: all 0.2s ease;
}
.scan-print-toggle-box.active {
  border-color: var(--accent);
  background: var(--accent-light);
}
.scan-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}
.scan-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.scan-toggle-label b {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.scan-toggle-label span {
  font-size: 12px;
  color: var(--text-muted);
}
.scan-switch-btn {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--border);
  border-radius: 99px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.scan-switch-btn::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
input[type="checkbox"]:checked ~ .scan-switch-btn {
  background: var(--accent);
}
input[type="checkbox"]:checked ~ .scan-switch-btn::after {
  transform: translateX(22px);
}
.scan-print-options {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

/* Сайдбар калькулятора сканирования */
.scan-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.scan-summary-card h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.scan-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
}
.scan-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.scan-summary-row span {
  color: var(--text-muted);
}
.scan-summary-row b {
  color: var(--text);
  font-weight: 700;
  text-align: right;
}
.scan-price-tag {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
}
.scan-price-tag small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.scan-price-tag .val {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}

@media (max-width: 900px) {
  .scan-workflow-grid {
    grid-template-columns: 1fr 1fr;
  }
  .scan-form-layout {
    grid-template-columns: 1fr;
  }
  .scan-sidebar-sticky {
    position: static;
  }
}
@media (max-width: 560px) {
  .scan-workflow-grid {
    grid-template-columns: 1fr;
  }
  .scan-goals-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .sides {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .modal__box--wide {
    width: 100%;
    padding: 20px 16px;
    max-height: 94vh;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .tile-grid {
    grid-template-columns: 1fr;
  }
  .form-card-block {
    padding: 16px 14px;
  }
  .mat-price-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .mat-price-input-wrap {
    width: 100%;
  }
}

/* ==========================================================
   АВТОРИЗАЦИЯ ЧЕРЕЗ СОЦСЕТИ (VK & TELEGRAM)
   ========================================================== */
.social-login-block {
  margin-bottom: 20px;
}
.social-login-title {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.social-login-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .social-login-btns {
    grid-template-columns: 1fr;
  }
}
.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
  text-decoration: none;
}
.btn-social svg {
  flex-shrink: 0;
}
.btn-social--vk {
  background: #0077ff;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 119, 255, 0.25);
}
.btn-social--vk:hover {
  background: #0066dc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.35);
}
.btn-social--tg {
  background: #24A1DE;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(36, 161, 222, 0.25);
}
.btn-social--tg:hover {
  background: #1d8bbf;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(36, 161, 222, 0.35);
}
.social-login-or {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.social-login-or::before,
.social-login-or::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.social-login-or span {
  padding: 0 12px;
  white-space: nowrap;
}

/* -- Telegram Widget Wrapper & Overlay -- */
.tg-widget-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
}
.tg-widget-wrap .btn-social--tg {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.tg-iframe-slot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001; /* Невидимый, перехватывает клик в виджет */
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.tg-iframe-slot iframe {
  transform: scale(2.6);
  transform-origin: center center;
  cursor: pointer !important;
}

/* -- Онбординг модал (роль + район) -- */
.modal__onboarding {
  padding: 4px 0;
}
.modal__onboarding .role-tabs .btn--outline.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb, 0,210,140), 0.12);
  color: var(--accent);
}
.modal__box--narrow {
  max-width: 420px !important;
}

/* ==========================================================
   АДМИН-ПАНЕЛЬ (NORD 3D ADMIN)
   ========================================================== */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (max-width: 560px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.stat-widget {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 122px;
  box-sizing: border-box;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.stat-widget:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  width: 100%;
}
.stat-widget__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.25;
}
.stat-widget__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.stat-widget__value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin: 4px 0;
  letter-spacing: -0.5px;
}
.stat-widget__hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.35;
  word-break: break-word;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
}
.admin-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all .15s;
  border-radius: 8px 8px 0 0;
}
.admin-tab:hover {
  color: var(--text);
  background: var(--bg-subtle);
}
.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-card);
}

.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.admin-table-toolbar {
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.admin-table th {
  padding: 12px 16px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: rgba(14, 165, 233, 0.04);
}
.admin-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.btn-action {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: .15s;
}
.btn-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-action--danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-action--danger:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* ==========================================================
   ТЁМНАЯ ТЕМА ДЛЯ АДМИН-ПАНЕЛИ (NORD 3D ADMIN DARK THEME)
   ========================================================== */
[data-theme="dark"] .admin-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}
[data-theme="dark"] .stat-widget {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .stat-widget:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.18);
}
[data-theme="dark"] .stat-widget__icon {
  background: rgba(17, 24, 39, 0.9);
  border-color: var(--border);
}
[data-theme="dark"] .admin-tab {
  color: var(--text-muted);
}
[data-theme="dark"] .admin-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .admin-tab.active {
  color: var(--accent);
  background: var(--bg-card);
  border-bottom-color: var(--accent);
}
[data-theme="dark"] .admin-table-wrap {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .admin-table-toolbar {
  background: rgba(17, 24, 39, 0.7);
  border-bottom-color: var(--border);
}
[data-theme="dark"] .admin-table th {
  background: rgba(17, 24, 39, 0.85);
  color: #94a3b8;
  border-bottom-color: var(--border);
}
[data-theme="dark"] .admin-table td {
  border-bottom-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .admin-table tr:hover td {
  background: rgba(56, 189, 248, 0.06);
}
[data-theme="dark"] .btn-action {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .btn-action:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="dark"] #backendStatsOutput {
  background: #0d131f !important;
  border-color: #283952 !important;
  color: #38bdf8 !important;
}
[data-theme="dark"] #adminAuthBox {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65) !important;
}

/* ==========================================================
   МОНЕТИЗАЦИЯ: БЕЗОПАСНАЯ СДЕЛКА (ESCROW) И БУСТ-ОПЦИИ
   ========================================================== */

/* Карточка срочного заказа с золотым свечением */
.ocard--urgent {
  border: 2px solid #f59e0b !important;
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.35) 0%, var(--bg-card) 60%) !important;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.22) !important;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ocard--urgent:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(245, 158, 11, 0.35) !important;
  border-color: #d97706 !important;
}
[data-theme="dark"] .ocard--urgent {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, var(--bg-card) 60%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 6px 28px rgba(245, 158, 11, 0.28) !important;
}
[data-theme="dark"] .ocard--urgent:hover {
  box-shadow: 0 10px 36px rgba(245, 158, 11, 0.45) !important;
}

/* Чипы статуса монетизации */
.chip--urgent {
  background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
  color: #92400e !important;
  font-weight: 800 !important;
  border: 1px solid #f59e0b !important;
  letter-spacing: 0.2px;
}
[data-theme="dark"] .chip--urgent {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.4)) !important;
  color: #fef08a !important;
  border-color: #f59e0b !important;
}

.chip--escrow {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  font-weight: 700 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
[data-theme="dark"] .chip--escrow {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
}

/* 1-Клик переключатель (Toggle Switch) */
.switch-control {
  display: flex;
  align-items: center;
  gap: 14px;
}
.switch-ui {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
  flex-shrink: 0;
  cursor: pointer;
}
.switch-ui input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.switch-ui input:checked + .switch-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}
.switch-ui input:checked + .switch-slider:before {
  transform: translateX(24px);
}
[data-theme="dark"] .switch-slider {
  background-color: #334155;
}

/* Статус-пилюля переключателя */
.switch-status-pill {
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  transition: all .2s ease;
}
.switch-status-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}
[data-theme="dark"] .switch-status-pill.active {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
}

/* Сетки тарифов монетизации в админке */
.admin-boost-rates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: var(--bg-subtle);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  box-sizing: border-box;
}
.admin-boost-rates-grid .field,
.admin-escrow-rates-grid .field {
  min-width: 0 !important;
}
.admin-boost-rates-grid input,
.admin-escrow-rates-grid input {
  min-width: 0 !important;
  width: 100% !important;
}

.admin-escrow-rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: var(--bg-subtle);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  box-sizing: border-box;
}

@media (max-width: 680px) {
  .admin-boost-rates-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 12px !important;
  }
  .admin-escrow-rates-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 12px !important;
  }
  #btnSaveEscrowSettings,
  #btnSaveBoostSettings {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ==========================================================
   КОЛОНКИ ФОРМЫ ЗАКАЗА 3D-ПЕЧАТИ
   ========================================================== */
.order-form__left {
  display: flex;
  flex-direction: column;
  position: static;
  align-self: start;
}
@media (max-width: 768px) {
  .order-form__left {
    position: static;
  }
}

.order-form__right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-form__right .estimate-box {
  margin: 2px 0 4px;
}

#monetizationContainer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 6px 0 10px;
}
#monetizationContainer:empty {
  display: none;
  margin: 0;
}

#scanMonetizationBox {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
#scanMonetizationBox:empty {
  display: none;
  margin: 0;
}

.order-form__right button[type="submit"] {
  height: 52px;
  font-size: 16px;
  font-weight: 800;
  border-radius: 12px;
  letter-spacing: 0.2px;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(12, 166, 120, 0.28);
  transition: all .2s ease;
}
.order-form__right button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(12, 166, 120, 0.42);
}

/* Блок платных опций при создании заказа */
.paid-options-block {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 0;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s;
}
.paid-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.paid-option-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all .18s ease;
}
.paid-option-card:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}
.paid-option-card.selected {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}
.paid-option-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f59e0b;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}
.paid-option-content {
  flex: 1;
  min-width: 0;
}
.paid-option-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
}
.paid-option-price {
  font-size: 13px;
  font-weight: 800;
  color: #d97706;
  white-space: nowrap;
}
[data-theme="dark"] .paid-option-price {
  color: #fbbf24;
}
.paid-option-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Плашка гаранта безопасной сделки */
.escrow-banner-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(14, 165, 233, 0.08));
  border: 1.5px solid rgba(16, 185, 129, 0.32);
  margin: 0;
  box-sizing: border-box;
}
[data-theme="dark"] .escrow-banner-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(14, 165, 233, 0.08));
  border-color: rgba(52, 211, 153, 0.4);
}
.escrow-banner-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
[data-theme="dark"] .escrow-banner-icon {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.35);
}
.escrow-banner-text {
  flex: 1;
  min-width: 0;
}
.escrow-banner-text b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #059669;
  margin-bottom: 4px;
  line-height: 1.3;
}
[data-theme="dark"] .escrow-banner-text b {
  color: #34d399;
}
.escrow-banner-text span {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Монетизация: KPI карточки выручки в админке */
.revenue-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, border-color .2s;
}
.revenue-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.revenue-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.revenue-card__title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.revenue-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.revenue-card__value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.revenue-card__hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================
   МОДАЛЬНОЕ ОКНО ДЕТАЛЕЙ ЗАКАЗА (ORDER DETAILS MODAL)
   ========================================================== */
.modal__box--wide {
  position: relative;
  width: min(860px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}
.modal__close:hover {
  background: var(--bg-subtle);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.08);
}

.od {
  position: relative;
}

.od__head {
  padding-right: 60px;
  margin-bottom: 14px;
}
.od__head .ocard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.od__head h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 12px 0 8px;
  color: var(--text);
  line-height: 1.25;
}
.od__author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.od__author-row b {
  color: var(--text);
  font-weight: 600;
}

.od__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
@media (max-width: 620px) {
  .od__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }
}
@media (max-width: 420px) {
  .od__grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
  }
}

.spec {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  min-height: 58px;
  min-width: 0;
  transition: border-color .15s ease, background-color .15s ease;
}
.spec:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}
.spec span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  line-height: 1.2;
}
.spec b {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
}
.spec b.accent {
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
}
.spec.col-full {
  grid-column: 1 / -1;
}

.od .escrow-banner-card {
  margin: 0 0 22px;
}

.od__comment {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
  color: var(--text);
}
.od__comment b {
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.od__action {
  margin-top: 0;
  padding-top: 22px;
  border-top: 1.5px solid var(--border);
}
.od__action h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}
.od__action .muted {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 14px 18px;
  background: var(--bg-subtle);
  border-radius: 12px;
  border: 1.5px dashed var(--border);
}

/* Форма отклика мастера на заказ */
.resp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.resp-form .row {
  display: flex;
  gap: 16px;
  margin: 0;
}
.resp-form .row .field {
  flex: 1;
}
.resp-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.resp-form .field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.resp-form__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.resp-form__actions .btn {
  height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
}
@media (max-width: 560px) {
  .resp-form .row {
    flex-direction: column;
    gap: 12px;
  }
  .resp-form__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .resp-form__actions .btn {
    width: 100%;
  }
}

/* ==========================================================
   ПРИЗЫВ К ДЕЙСТВИЮ ДЛЯ ГОСТЕЙ (ORDER GUEST CTA BOX)
   ========================================================== */
.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cta-box:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.cta-box__info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cta-box__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.cta-box__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.cta-box__title b {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  margin-left: 2px;
}
.cta-box__hint {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 3px;
}
.cta-box__btn {
  height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 680px) {
  .cta-box {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }
  .cta-box__btn {
    width: 100%;
  }
}

/* ==========================================================
   КАРТОЧКА ОТПРАВЛЕННОГО ОТКЛИКА МАСТЕРА
   ========================================================== */
.resp-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.resp-status-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.resp-status-card__info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.resp-status-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}
.resp-status-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.resp-status-card__val {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.35;
}
.resp-status-card__val b {
  color: var(--accent);
  font-weight: 800;
}
.resp-status-card__btn {
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .resp-status-card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .resp-status-card__btn {
    width: 100%;
  }
}








/* ==========================================================
   КОШЕЛЁК И БАЛАНС (WALLET)
   ========================================================== */
.header-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 14px;
  height: 42px;
  box-sizing: border-box;
  background: rgba(12, 166, 120, 0.1);
  border: 1.5px solid rgba(12, 166, 120, 0.4);
  border-radius: 99px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  transition: all .15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-balance-chip:hover {
  background: rgba(12, 166, 120, 0.18);
  border-color: #0ca678;
  transform: translateY(-1px);
}
.header-balance-chip.active {
  background: rgba(12, 166, 120, 0.25);
  border-color: #0ca678;
  box-shadow: 0 0 10px rgba(12, 166, 120, 0.35);
}
.header-balance-icon {
  font-size: 15px;
  line-height: 1;
}
.header-balance-amount {
  color: #0ca678;
  font-weight: 800;
  letter-spacing: -0.2px;
}
[data-theme="dark"] .header-balance-amount {
  color: #20c997;
}

/* Компактный кошелёк в сайдбаре кабинета */
.cab-wallet-quick {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.cab-wallet-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all .15s;
}
.cab-wallet-pill:hover {
  border-color: var(--accent);
  background: var(--bg-card);
  transform: translateY(-1px);
}
.cab-wallet-pill__label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.cab-wallet-pill__val {
  font-size: 13px;
  font-weight: 800;
  color: #0ca678;
}
.cab-wallet-pill--rating .cab-wallet-pill__val {
  color: #f59e0b;
}
.cab-wallet-pill--hold .cab-wallet-pill__val {
  color: var(--accent);
}

/* Страница кошелька */
.wallet-page, .rating-page {
  padding: 30px 0 70px;
  min-height: calc(100vh - 180px);
}
.wallet-header-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.wallet-title {
  font-size: 32px;
  font-weight: 800;
  margin: 6px 0 6px;
  letter-spacing: -0.5px;
}
.wallet-subtitle {
  color: var(--text-muted);
  font-size: 14.5px;
  max-width: 640px;
  line-height: 1.5;
}
.wallet-demo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Сетка 4 KPI карточек */
.wallet-kpi-grid, .rating-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.wallet-kpi-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
  position: relative;
  overflow: hidden;
}
.wallet-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover, var(--accent));
}
.kpi-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.kpi-icon {
  font-size: 24px;
  line-height: 1;
}
.kpi-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.kpi-badge--active { background: rgba(12, 166, 120, 0.15); color: #0ca678; }
.kpi-badge--hold { background: rgba(2, 132, 199, 0.15); color: #0284c7; }
.kpi-badge--in { background: rgba(32, 201, 151, 0.15); color: #20c997; }
.kpi-badge--out { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.kpi-badge--rating { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.kpi-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.15;
}
.kpi-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 14px;
  flex: 1;
}
.kpi-quick-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.kpi-note {
  font-size: 11.5px;
  color: #0284c7;
  font-weight: 600;
  margin-top: auto;
  line-height: 1.3;
}
.kpi-submeta {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: auto;
}

/* Панель действий */
.wallet-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.wallet-actions-left {
  display: flex;
  gap: 12px;
}
.wallet-escrow-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.escrow-shield-icon {
  font-size: 18px;
  line-height: 1;
}

/* Секции */
.wallet-section, .rating-section {
  margin-bottom: 34px;
}
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-head-row h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
}
.tx-search-wrap input {
  width: 320px;
  max-width: 100%;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
}

/* Холды */
.wallet-holds-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hold-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(2, 132, 199, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 14px 18px;
  box-sizing: border-box;
}
.hold-item-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.hold-item-icon {
  font-size: 24px;
  line-height: 1.2;
  flex-shrink: 0;
}
.hold-item-info {
  flex: 1;
  min-width: 0;
}
.hold-item-info b {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
  word-break: break-word;
  line-height: 1.35;
}
.hold-item-info small {
  display: block;
  line-height: 1.4;
  word-break: break-word;
}
.hold-item-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.hold-item-amount {
  font-size: 18px;
  font-weight: 800;
  color: #0284c7;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .hold-item-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px 14px 12px !important;
  }
  .hold-item-main {
    width: 100% !important;
    align-items: flex-start !important;
  }
  .hold-item-info {
    width: 100% !important;
  }
  .hold-item-right {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-top: 10px !important;
    border-top: 1px dashed rgba(56, 189, 248, 0.25) !important;
    gap: 10px !important;
  }
  .hold-item-right .btn {
    flex: 1 !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
}

/* Фильтры */
.tx-filters-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.tx-pill {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.tx-pill:hover {
  background: var(--bg-subtle);
  color: var(--text);
}
.tx-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(12, 166, 120, 0.35);
}

/* Лента транзакций */
.tx-feed-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tx-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
  min-height: 220px;
  box-sizing: border-box;
}
.tx-empty-state__icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}
.tx-empty-state__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.tx-empty-state__desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.tx-empty-state__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.tx-list {
  display: flex;
  flex-direction: column;
}
.tx-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s ease;
}
.tx-row:last-child {
  border-bottom: none;
}
.tx-row:hover {
  background: var(--bg-subtle);
}
.tx-row__icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tx-icon {
  font-size: 20px;
  line-height: 1;
}
.tx-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tx-row__title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.tx-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.tx-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tx-badge--success { background: rgba(12, 166, 120, 0.15); color: #0ca678; }
.tx-badge--withdraw { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.tx-badge--hold { background: rgba(2, 132, 199, 0.15); color: #0284c7; }
.tx-badge--payment { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

.tx-row__desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-word;
  margin-bottom: 2px;
}
.tx-order-link {
  color: var(--accent);
  font-weight: 700;
  margin-left: 6px;
  text-decoration: none;
}
.tx-order-link:hover {
  text-decoration: underline;
}
.tx-row__date {
  font-size: 11px;
  color: var(--text-muted);
}
.tx-row__right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.tx-amount {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.tx-amount--plus { color: #0ca678; }
.tx-amount--minus { color: var(--text); }
.tx-amount--hold { color: #0284c7; }
.tx-fee {
  display: block;
  font-size: 11px;
}

/* Пресеты и способы оплаты */
.deposit-presets {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.preset-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.preset-btn:hover {
  border-color: var(--primary);
}
.preset-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.pay-method-card {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all .15s;
}
.pay-method-card input {
  display: none;
}
.pay-method-card:hover {
  border-color: var(--primary);
}
.pay-method-card.active {
  background: var(--primary-light);
  border-color: var(--primary);
}
.pay-method-icon {
  font-size: 20px;
  margin-bottom: 4px;
}
.pay-method-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.pay-method-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Квитанция операции */
.receipt-box {
  padding: 10px 0;
}
.receipt-header {
  text-align: center;
  margin-bottom: 18px;
}
.receipt-check-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(12, 166, 120, 0.15);
  color: #0ca678;
  font-size: 24px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.receipt-header h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
}
.receipt-amount-badge {
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}
.receipt-table {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.receipt-label {
  color: var(--text-muted);
}
.receipt-val {
  font-weight: 700;
  color: var(--text);
}

/* ==========================================================
   РЕЙТИНГ И РЕПУТАЦИЯ (RATING)
   ========================================================== */
.master-rep-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.master-rep-inner {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.master-rep-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.rep-verified-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.master-rep-info {
  flex: 1;
  min-width: 260px;
}
.master-rep-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.master-rep-title-line h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
}
.master-equip-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.master-rep-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* Сетка оценок и критериев */
.rating-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.rating-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.box-head {
  margin-bottom: 18px;
}
.box-head h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 3px;
}
.service-scores-list, .criteria-scores-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-score-item, .criterion-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service-score-head, .criterion-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}
.service-score-icon {
  font-size: 18px;
  line-height: 1;
}
.service-score-val {
  font-size: 15px;
  font-weight: 800;
  color: #f59e0b;
}
.service-score-bar-wrap, .criterion-bar-wrap {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.service-score-bar {
  height: 100%;
  background: linear-gradient(90deg, #0ca678, #20c997);
  border-radius: 999px;
  transition: width .4s ease;
}
.criterion-bar {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 999px;
  transition: width .4s ease;
}

/* Отзывы */
.reviews-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review-author-name b {
  font-size: 15px;
  color: var(--text);
}
.review-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
  flex-wrap: wrap;
}
.review-service-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--text);
}
.review-order-pill {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
}
.review-score-wrap {
  text-align: right;
}
.review-stars {
  font-size: 16px;
  margin-bottom: 2px;
}
.review-date {
  font-size: 11px;
}
.review-comment {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 14px;
  font-style: italic;
}
.review-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}
.review-escrow-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.review-subscores {
  display: flex;
  gap: 12px;
}
.review-subscores b {
  color: #f59e0b;
}

/* Мобильная адаптивность кошелька и рейтинга */
@media (max-width: 900px) {
  .wallet-kpi-grid, .rating-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rating-breakdown-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .wallet-kpi-grid, .rating-kpi-grid {
    grid-template-columns: 1fr;
  }
  .wallet-header-block {
    flex-direction: column;
    align-items: stretch;
  }
  .wallet-demo-card {
    align-items: flex-start;
  }
  .wallet-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .payment-methods-grid {
    grid-template-columns: 1fr;
  }
  .tx-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 16px;
    align-items: start;
  }
  .tx-row__icon-wrap {
    width: 38px;
    height: 38px;
  }
  .tx-row__icon-wrap .tx-icon {
    font-size: 17px;
  }
  .tx-row__right {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
    margin-top: 4px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: baseline;
  }
}

/* ==========================================================
   РАЗДЕЛ СДЕЛОК И ЗАКАЗОВ (В СТИЛЕ FUNPAY)
   ========================================================== */
.deal-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.deal-card:hover {
  box-shadow: var(--shadow-md);
}
.deal-card--target {
  box-shadow: 0 0 0 3px rgba(12, 166, 120, 0.25), var(--shadow-md);
  animation: dealHighlight 2s ease-out;
}
@keyframes dealHighlight {
  0% { transform: scale(1.015); border-color: var(--accent); }
  100% { transform: scale(1); }
}
@media (max-width: 768px) {
  .deals-header-block {
    flex-direction: column;
    align-items: stretch;
  }
  .deals-control-card > div {
    flex-direction: column;
    align-items: stretch;
  }
  .deals-role-tabs {
    flex-direction: column;
  }
  .deals-timeline {
    grid-template-columns: 1fr 1fr;
  }
}


/* ==========================================================
   РАЗДЕЛ ПОРТФОЛИО МАСТЕРОВ И ПОДТВЕРЖДЁННЫХ ОТЗЫВОВ
   ========================================================== */
.portfolio-printer-bar {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.portfolio-printer-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.portfolio-printer-bar__left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.portfolio-printer-bar__guest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.portfolio-filter-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portfolio-filter-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.portfolio-search-wrap {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.portfolio-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}

.portfolio-search-input,
input.portfolio-search-input,
input[type="text"].portfolio-search-input {
  width: 100% !important;
  height: 48px !important;
  padding: 0 44px 0 48px !important; /* Надёжный отступ 48px слева гарантирует, что текст никогда не наедет на иконку */
  border-radius: 12px !important;
  border: 1.5px solid var(--border) !important;
  background-color: var(--bg-subtle) !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.portfolio-search-input:focus,
input[type="text"].portfolio-search-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.18) !important;
}

.portfolio-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  z-index: 2;
  transition: color 0.15s;
}

.portfolio-search-clear:hover {
  color: var(--text);
}

.portfolio-filter-selects {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

select.portfolio-select,
.portfolio-select {
  height: 48px !important;
  padding: 0 40px 0 16px !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--border) !important;
  background-color: var(--bg-subtle) !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  outline: none !important;
  cursor: pointer !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

select.portfolio-select:focus,
.portfolio-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.18) !important;
}

.portfolio-chips-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portfolio-chips-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.portfolio-chips-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Кнопки-чипсы категорий и пластика в стиле NORD 3D */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-chip:hover {
  border-color: rgba(0, 242, 254, 0.5);
  background: rgba(0, 242, 254, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #06111f !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.35) !important;
  transform: translateY(-1px);
}

/* Цветовые акценты активных чипсов по видам пластика */
.filter-chip[data-mat="PETG"].active {
  background: #0ca678 !important;
  border-color: #0ca678 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(12, 166, 120, 0.4) !important;
}

.filter-chip[data-mat="PLA"].active {
  background: #e67700 !important;
  border-color: #e67700 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(230, 119, 0, 0.4) !important;
}

.filter-chip[data-mat="ABS"].active {
  background: #d9480f !important;
  border-color: #d9480f !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(217, 72, 15, 0.4) !important;
}

.filter-chip[data-mat="TPU"].active {
  background: #7048e8 !important;
  border-color: #7048e8 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(112, 72, 232, 0.4) !important;
}

.filter-chip[data-mat="RESIN"].active {
  background: #1971c2 !important;
  border-color: #1971c2 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(25, 113, 194, 0.4) !important;
}

.filter-chip[data-mat="CARBON"].active {
  background: #1e293b !important;
  border-color: #00f2fe !important;
  color: #00f2fe !important;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.25) !important;
}

.portfolio-bottom-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* Стилизованный тумблер проверенных отзывов */
.verified-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1.5px solid rgba(12, 166, 120, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.verified-toggle-label:hover {
  background: rgba(12, 166, 120, 0.12);
  border-color: #0ca678;
  transform: translateY(-1px);
}

.verified-toggle-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  border: 1.5px solid rgba(12, 166, 120, 0.6) !important;
  border-radius: 5px !important;
  background: var(--bg-card) !important;
  cursor: pointer !important;
  display: inline-grid !important;
  place-content: center !important;
  margin: 0 !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

.verified-toggle-label input[type="checkbox"]:checked {
  background: #0ca678 !important;
  border-color: #0ca678 !important;
  box-shadow: 0 0 10px rgba(12, 166, 120, 0.5) !important;
}

.verified-toggle-label input[type="checkbox"]:checked::before {
  content: "✓";
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.verified-toggle-text {
  font-size: 13px;
  font-weight: 700;
  color: #0ca678;
  white-space: nowrap;
}

.portfolio-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.portfolio-owner-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.portfolio-owner-tabs .tab-btn {
  padding: 5px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.portfolio-owner-tabs .tab-btn.active {
  background: var(--accent);
  color: #06111f;
  font-weight: 700;
}

/* Сетка портфолио */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 242, 254, 0.35);
}

.portfolio-card--verified {
  border-color: rgba(12, 166, 120, 0.3);
}

.portfolio-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/11;
  background: #0b1120;
  overflow: hidden;
}

.portfolio-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-card__img {
  transform: scale(1.05);
}

.portfolio-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.portfolio-card__verified-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(12, 166, 120, 0.4);
  color: #0ca678;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.portfolio-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-card__title {
  font-size: 16.5px;
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.35;
  color: var(--text);
}

.portfolio-card__master-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.portfolio-card__master-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.portfolio-card__master-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ca678, #00f2fe);
  color: #06111f;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-card__master-name {
  font-size: 13.5px;
  color: var(--text);
  transition: color 0.2s;
}

.portfolio-card__master-info:hover .portfolio-card__master-name {
  color: var(--accent);
}

.portfolio-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 14px;
}

/* БЛОК ПОДТВЕРЖДЁННОГО ОТЗЫВА ЗАКАЗЧИКА ПОД ФОТО */
.portfolio-review-box {
  background: rgba(12, 166, 120, 0.05);
  border: 1px solid rgba(12, 166, 120, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

[data-theme="dark"] .portfolio-review-box {
  background: rgba(12, 166, 120, 0.08);
}

.portfolio-review-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.portfolio-review-box__badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #0ca678;
}

.portfolio-review-box__stars {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: #f59f00;
}

.portfolio-review-box__customer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customer-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.portfolio-review-box__comment {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.45;
  font-style: italic;
  padding-left: 6px;
  border-left: 2.5px solid #0ca678;
}

.portfolio-review-box__metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.portfolio-card__independent-note {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  margin-bottom: 16px;
}

.portfolio-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

/* Загрузка фото в модалке портфолио */
.portfolio-upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: border-color 0.2s, background 0.2s;
}

.portfolio-upload-area:hover {
  border-color: var(--accent);
  background: rgba(0, 242, 254, 0.04);
}

.portfolio-preset-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip--preset {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 11.5px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s;
}

.chip--preset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip--preset.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.linked-review-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(12, 166, 120, 0.08);
  border: 1px solid rgba(12, 166, 120, 0.25);
}

.portfolio-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
}

.portfolio-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .portfolio-filter-top {
    flex-direction: column;
    align-items: stretch;
  }
  .portfolio-filter-selects {
    flex-direction: column;
    align-items: stretch;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PORTFOLIO ADD MODAL STYLES (CLEAN ALIGNMENT & THEME INTEGRATION)
   ========================================================================== */
.modal__box--portfolio {
  width: min(580px, calc(100vw - 32px)) !important;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 30px !important;
  border-radius: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.portfolio-modal__head {
  text-align: center;
  margin-bottom: 22px;
}

.portfolio-modal__icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
  display: inline-block;
}

.portfolio-modal__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}

.portfolio-modal__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 auto;
  max-width: 470px;
}

.portfolio-link-block {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  transition: border-color 0.2s, background-color 0.2s;
}

.portfolio-link-block:hover {
  border-color: rgba(16, 185, 129, 0.45);
}

.portfolio-link-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.portfolio-link-block__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  margin: 0;
}

.portfolio-link-block__icon {
  font-size: 16px;
}

.portfolio-link-block__desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 10px;
}

.portfolio-form-field {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.portfolio-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.portfolio-form-row .portfolio-form-field {
  margin-bottom: 0;
}

.portfolio-form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-star {
  color: #ef4444;
  font-weight: bold;
}

.portfolio-modal__input,
.portfolio-modal__select,
.portfolio-modal__textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.portfolio-modal__input,
.portfolio-modal__select {
  height: 44px;
  padding: 0 14px;
}

.portfolio-modal__select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.portfolio-modal__select option {
  background: var(--bg-card);
  color: var(--text);
}

.portfolio-modal__textarea {
  min-height: 84px;
  padding: 10px 14px;
  resize: vertical;
  line-height: 1.45;
}

.portfolio-modal__input:focus,
.portfolio-modal__select:focus,
.portfolio-modal__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.portfolio-photo-uploader {
  position: relative;
  width: 100%;
  border-radius: 14px;
}

.portfolio-photo-preview {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: #0b0f19;
}

.portfolio-photo-preview__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-photo-preview__overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
}

.portfolio-photo-preview__overlay .btn {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.portfolio-photo-preview__overlay .btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.portfolio-photo-placeholder {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-subtle);
  transition: border-color 0.2s, background-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.portfolio-photo-placeholder:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.portfolio-photo-placeholder__icon {
  font-size: 32px;
  margin-bottom: 6px;
  line-height: 1;
}

.portfolio-presets-section {
  margin-top: 12px;
  margin-bottom: 4px;
}

.portfolio-presets-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.portfolio-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.portfolio-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.portfolio-modal__btn-cancel {
  min-width: 96px;
  padding: 10px 18px;
  font-size: 13.5px;
  border-radius: 10px;
}

.portfolio-modal__btn-submit {
  min-width: 200px;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .modal__box--portfolio {
    padding: 20px 18px !important;
    border-radius: 16px;
  }
  .portfolio-form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .portfolio-modal__footer {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .portfolio-modal__btn-cancel,
  .portfolio-modal__btn-submit {
    width: 100%;
  }
}

/* ==========================================================================
   PRUSASLICER SERVER SLICER UI
   ========================================================================== */
.slicer-box {
  margin-top: 14px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all 0.2s ease;
}
.slicer-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.slicer-box__badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: -0.1px;
}
.slicer-box__time {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}
.slicer-box__details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.slicer-box__details b {
  color: var(--text);
  display: block;
  font-size: 13px;
  margin-top: 2px;
}
.slicer-box__actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  text-align: right;
}

.slicer-trigger-wrap {
  margin-top: 16px;
  margin-bottom: 0;
  width: 100%;
}
.btn-slicer-trigger {
  width: 100%;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: var(--accent);
  color: #ffffff !important;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  box-sizing: border-box;
  text-decoration: none;
}
.btn-slicer-trigger:hover {
  background: #099268;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}
.btn-slicer-trigger:active {
  transform: translateY(0);
}

/* ==========================================================================
   FINAL DEFINITIVE MOBILE RESPONSIVE OVERRIDES (Cascade Anchor)
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
  }

  /* Шапка */
  .header {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: visible !important;
  }
  .header__inner {
    height: 58px !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: visible !important;
  }
  .logo {
    font-size: 19px !important;
    flex-shrink: 0 !important;
  }
  .userbox {
    gap: 4px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  .header-logout-btn,
  #logoutBtn {
    display: none !important;
  }
  .userchip {
    padding: 0 !important;
    gap: 0 !important;
    border: none !important;
    background: transparent !important;
    height: 32px !important;
    min-width: 32px !important;
    box-sizing: border-box !important;
  }
  .userchip span,
  .userchip-text {
    display: none !important;
  }
  .userchip .avatar,
  .userchip div.avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
  }
  .header-balance-chip {
    padding: 3px 8px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
    height: 32px !important;
    box-sizing: border-box !important;
  }
  .header-balance-icon {
    font-size: 13px !important;
  }
  .theme-toggle {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .burger {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 17px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  /* Типографика */
  h1 {
    font-size: clamp(22px, 6.5vw, 32px) !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  .lead {
    font-size: 14px !important;
    word-break: break-word !important;
  }

  /* Все модальные окна */
  .modal {
    padding: 10px !important;
    align-items: center !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }
  .modal__box,
  .modal__box--wide,
  .modal__box--narrow,
  .modal__box--chat,
  .modal__box--portfolio {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 12px !important;
    max-height: 90vh !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .modal__close {
    top: 10px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 18px !important;
  }

  /* Сетка маскотов и аватаров (2 колонки на телефоне вместо 4) */
  .avatar-preset-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .avatar-preset-tile {
    padding: 8px 4px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  /* Сетка формы заказа */
  .hero__inner,
  .order-form {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .order-form {
    padding: 16px 12px !important;
    border-radius: 16px !important;
    gap: 16px !important;
  }

  /* Меню-выдвижка */
  .nav {
    display: none;
    position: fixed !important;
    top: 58px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 58px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: var(--bg-card, #131722) !important;
    flex-direction: column !important;
    padding: 16px 20px 24px !important;
    gap: 8px !important;
    border-bottom: 2px solid var(--border) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6) !important;
    z-index: 999999 !important;
    box-sizing: border-box !important;
  }
  .nav.open { display: flex !important; }
  .nav a {
    width: 100% !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: var(--text) !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border) !important;
    box-sizing: border-box !important;
  }
  .nav a:hover,
  .nav a.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
  }
}

@media (max-width: 380px) {
  .header__inner {
    padding: 0 6px !important;
    gap: 3px !important;
  }
  .logo {
    font-size: 17px !important;
  }
  .userbox {
    gap: 3px !important;
  }
  .header-balance-chip {
    padding: 2px 5px !important;
    font-size: 10.5px !important;
  }
  .header-balance-amount {
    font-size: 10.5px !important;
  }
  .theme-toggle,
  .burger {
    width: 30px !important;
    height: 30px !important;
  }
}


/* ==========================================================================
   ЮРИДИЧЕСКАЯ ОБВЯЗКА (152-ФЗ, 437 ГК РФ, COOKIE BANNER, 18+)
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 960px;
  background: var(--bg-surface, #1e293b);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  border-radius: 14px;
  padding: 14px 18px;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: slideUpCookie 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpCookie {
  from { transform: translate(-50%, 60px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.cookie-banner__text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text, #f8fafc);
  flex: 1;
}

.cookie-banner__text a {
  color: var(--accent, #00f2fe);
  text-decoration: underline;
  cursor: pointer;
}

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

.cookie-banner__btn-accept {
  background: var(--primary, #0ca678);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.cookie-banner__btn-accept:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.cookie-banner__btn-details {
  background: transparent;
  color: var(--text-muted, #94a3b8);
  border: 1px solid var(--border, rgba(255,255,255,0.15));
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.cookie-banner__btn-details:hover {
  background: rgba(255,255,255,0.06);
}

.badge-age-limit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted, #94a3b8);
  margin-left: 6px;
  vertical-align: middle;
}

.legal-callout-warning {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.legal-callout-info {
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-left: 4px solid var(--accent, #00f2fe);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.legal-doc-content h4 {
  margin: 18px 0 8px;
  font-size: 15px;
  color: var(--accent, #00f2fe);
}

.legal-doc-content p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.6;
}

.legal-doc-content ul {
  margin: 0 0 12px 20px;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.legal-doc-content li {
  margin-bottom: 6px;
}

@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 10px;
    padding: 12px 14px;
    gap: 12px;
  }
  .cookie-banner__btns {
    justify-content: flex-end;
  }
}
