/* ═══════════════════════════════════════════════════════════════════════════
   Фаворит Эксперт — главные стили
   Все цвета через CSS variables для лёгкой смены темы
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  --primary: #00A8FF;
  --primary-dark: #1097DD;
  --primary-light: #29A3FF;
  --bg: #F5F7FA;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --text-on-primary: #FFFFFF;
  --border: #E5E7EB;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --ink: #0F172A;
  --accent: #0F766E;
  --soft-blue: #EFF6FF;
  --soft-green: #ECFDF5;
  --soft-orange: #FFF7ED;

  /* Размеры layout */
  --header-height: 56px;
  --navbar-height: 64px;
  --content-max-width: 480px;
  --surface-gap: 6px;
  --surface-radius: 8px;
  --surface-padding-y: 12px;
  --surface-padding-x: 16px;
  --surface-shadow: var(--shadow-md);

  /* Отступы */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;

  /* Скругление */
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-full: 9999px;

  /* Тени */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-header: 0 1px 0 var(--border);
}

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  /* Поддержка safe area (выемка iPhone) */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* скролл только внутри main-content */
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(0, 168, 255, 0.45);
  outline-offset: 3px;
}

/* ─── Утилиты ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── Экран загрузки ─────────────────────────────────────────────────────── */
.loader-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  background: var(--bg);
  z-index: 9999;
}

.loader-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Экран авторизации ──────────────────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo-text {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1;
}

.auth-logo-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--spacing-xs);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.input-password-wrap {
  position: relative;
}

/* Скрываем встроенный глазик браузера (Edge, Chrome) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.input-password-wrap .form-input {
  width: 100%;
  padding-right: 44px; /* место под глазик */
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.password-toggle:hover { color: var(--text-primary); }

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* ─── Форма (общее) ──────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  padding: 12px var(--spacing-md);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--primary);
}

.form-input:disabled,
.form-input.readonly {
  background: var(--bg);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.form-error {
  padding: 10px var(--spacing-md);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
}

/* ─── Кнопки ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 12px var(--spacing-md);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
}

.btn:active { opacity: 0.85; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-danger-text {
  background: transparent;
  color: var(--danger);
  padding-left: 0; padding-right: 0;
}

.btn-full { width: 100%; }

/* ─── Layout приложения ──────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

#app input,
#app textarea,
#app select,
#app .generated-password code {
  -webkit-user-select: text;
  user-select: text;
}

/* ─── Верхний хедер ──────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--spacing-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-header);
  flex-shrink: 0;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-on-primary);
  font-family: inherit;
  transition: opacity 0.15s;
}
.header-avatar:active { opacity: 0.8; }

/* ─── Контент (скроллируемая область) ───────────────────────────────────── */
.main-content {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--spacing-md);
}
.main-content::-webkit-scrollbar { display: none; }

.offline-banner {
  flex-shrink: 0;
  width: min(calc(100% - 24px), var(--content-max-width));
  margin: var(--spacing-sm) auto 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 8px 12px;
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
  border-radius: var(--surface-radius);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: var(--shadow-sm);
}

.offline-banner-mark {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--warning);
  color: var(--text-on-primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

body.is-offline .main-content {
  padding-top: var(--spacing-sm);
}

/* ─── Нижний навбар ──────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: calc(var(--navbar-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.navbar-item {
  flex: 0 1 calc(var(--content-max-width) / 3);
  max-width: calc(var(--content-max-width) / 3);
  height: var(--navbar-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 0 8px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.navbar-item:focus-visible {
  outline-offset: -4px;
  border-radius: var(--radius-sm);
}

.navbar-item.active {
  color: var(--primary);
}

.navbar-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Страница задач ─────────────────────────────────────────────────────── */

.tasks-page {
  min-height: 100%;
  background: var(--bg);
}

.task-list,
.case-hero,
#task-map,
.detail-section,
.detail-disclosure,
.experts-page,
.settings-page,
.wip-page {
  width: 100%;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
}

/* Список карточек */
.task-list {
  display: flex;
  flex-direction: column;
  gap: var(--surface-gap);
  padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
}

/* Карточка задачи */
.task-card {
  background: var(--bg-card);
  border-radius: var(--surface-radius);
  padding: var(--surface-padding-y) var(--surface-padding-x);
  box-shadow: var(--surface-shadow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.task-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-sm);
}

.task-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.task-card-date {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Бейдж статуса */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.new .status-dot { background: var(--primary); }
.status-badge.new { color: var(--primary); }

.status-badge.scheduled .status-dot { background: var(--warning); }
.status-badge.scheduled { color: var(--warning); }

.status-badge.awaiting_act .status-dot { background: #6366F1; }
.status-badge.awaiting_act { color: #4F46E5; }

.status-badge.ready .status-dot { background: var(--success); }
.status-badge.ready { color: var(--success); }

.task-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.task-card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.task-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-meta-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 13px;
  color: var(--text-secondary);
}

.task-meta-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-meta-row svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.task-card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: var(--spacing-sm);
  align-items: center;
  margin-bottom: 8px;
}

.task-card-chevron {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  justify-self: end;
}

.task-card-vehicle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.task-card-vehicle span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.plate-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #CBD5E1;
  border-radius: 5px;
  background: #F8FAFC;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

/* Пустое состояние */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  padding: 60px var(--spacing-md);
  text-align: center;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  stroke: var(--border);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state-sub {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Скелетон загрузки задач */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #f0f0f0 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--surface-radius);
  padding: var(--spacing-md);
  box-shadow: var(--surface-shadow);
}

.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}

/* ─── Страница деталей задачи ────────────────────────────────────────────── */

.detail-back-bar {
  width: 100%;
  padding: var(--spacing-sm) 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.detail-page > .detail-back-bar {
  width: calc(100% + (var(--spacing-md) * 2));
  margin-left: calc(-1 * var(--spacing-md));
  margin-right: calc(-1 * var(--spacing-md));
}

.detail-back-bar > .skeleton {
  margin-left: auto;
  margin-right: auto;
  max-width: calc(var(--content-max-width) - 32px);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  padding: 4px var(--spacing-md);
}

.back-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Адрес осмотра */
#task-map {
  width: 100%;
  flex-shrink: 0;
}

.detail-section-location {
  padding-bottom: 12px;
}

.location-address-block {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  background: #F8FAFC;
}

.location-map-frame {
  position: relative;
  height: clamp(170px, 48vw, 230px);
  border-radius: var(--radius-sm);
  background: var(--border);
  overflow: hidden;
}

.location-map-frame iframe,
.location-map-image,
.location-map-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.location-map-canvas {
  position: relative;
  z-index: 0;
}

.location-map-image {
  object-fit: cover;
}

.location-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.location-map-canvas .leaflet-control-attribution {
  font-size: 10px;
  line-height: 1.2;
  opacity: 0.82;
}

.location-card-kicker {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-secondary);
}

.location-card-address {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-page {
  min-height: 100%;
  background: var(--bg);
  padding: 0 var(--spacing-md) var(--spacing-md);
}

.detail-page > .case-hero,
.detail-page > .detail-section,
.detail-page > .detail-disclosure {
  border: none;
  border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
  margin-top: var(--surface-gap);
}

.case-hero {
  background: var(--bg-card);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.case-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.case-external-status {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--soft-green);
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}

.case-hero h1 {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--ink);
}

.case-hero p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-section {
  padding: var(--spacing-md);
  background: var(--bg-card);
}

.detail-section + .detail-section {
  margin-top: var(--surface-gap);
}

.detail-section-heading {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.detail-section-heading > svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.detail-section-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ECFEFF;
  color: #0F766E;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
  flex-shrink: 0;
}

.detail-section-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-section-icon-blue {
  background: var(--soft-blue);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(16, 151, 221, 0.14);
}

.detail-section-icon-green {
  background: var(--soft-green);
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(4, 120, 87, 0.13);
}

.detail-section-icon-orange {
  background: var(--soft-orange);
  color: #C2410C;
  box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.13);
}

.detail-section-icon-red {
  background: #FEF2F2;
  color: #DC2626;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.13);
}

.detail-section-heading h2 {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--spacing-sm);
}

.contact-main {
  min-width: 0;
}

.contact-name {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.contact-phone {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

.contact-call-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--text-on-primary);
  font-size: 13px;
  line-height: 1.15;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.contact-call-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.appointment-section {
  border-top: none;
}

.appointment-section:not(.appointment-section-locked) .detail-section-heading {
  margin-bottom: 10px;
}

.appointment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.appointment-native-picker {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.appointment-native-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.56fr);
  gap: 8px;
}

.appointment-native-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.appointment-native-field span {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
}

.appointment-native-input {
  width: 100%;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #F8FAFC;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: light;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.appointment-native-input:focus {
  border-color: rgba(0, 168, 255, 0.55);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.08);
}

.appointment-native-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  display: none;
  -webkit-appearance: none;
}

.appointment-native-input::-webkit-inner-spin-button {
  display: none;
}

.appointment-picker-hint {
  display: block;
  min-height: 16px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.3;
}

.appointment-picker-invalid .appointment-picker-hint {
  display: block;
  color: var(--danger);
  font-weight: 700;
}

.appointment-picker-invalid .appointment-native-input {
  border-color: rgba(239, 68, 68, 0.6);
  background: #FFFBFB;
}

.appointment-submit {
  min-height: 40px;
  padding-top: 9px;
  padding-bottom: 9px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

.appointment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding-top: var(--spacing-xs);
}

.appointment-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.appointment-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.appointment-status {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--soft-green);
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}

.inspection-start-btn {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--text-on-primary);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.inspection-start-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.act-section {
  overflow: hidden;
}

.act-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.act-photo-pick {
  width: 100%;
}

.act-preview {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #F8FAFC;
}

.act-preview img {
  width: 100%;
  max-height: 220px;
  display: block;
  object-fit: contain;
  background: #FFFFFF;
}

.act-ready {
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--soft-green);
  color: #047857;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
}

.detail-info-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.info-row {
  display: grid;
  grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
  gap: var(--spacing-md);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.info-row-wide {
  grid-template-columns: 1fr;
  gap: 3px;
}

.info-label {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
}

.info-value {
  min-width: 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.info-row-muted .info-value {
  color: var(--text-secondary);
}

.detail-disclosure {
  margin-top: var(--surface-gap);
  background: var(--bg-card);
}

.detail-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-disclosure summary::-webkit-details-marker {
  display: none;
}

.detail-disclosure summary svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s;
}

.detail-disclosure[open] summary svg {
  transform: rotate(180deg);
}

.detail-disclosure .detail-info-list {
  margin: 0 var(--spacing-md) var(--spacing-md);
}

/* Маркер на карте */
.map-marker {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0,168,255,0.5);
}

/* Детали задачи */
.detail-card {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

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

.detail-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.detail-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.detail-car {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
}

.detail-car svg {
  width: 32px;
  height: 32px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.detail-car-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-car-year {
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-meta-list {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-meta-row {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

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

.detail-meta-row svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 1px;
}

.detail-description {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.detail-maps-btn {
  margin-top: var(--spacing-sm);
}

/* ─── Фотоосмотр ─────────────────────────────────────────────────────────── */
.inspection-page {
  min-height: 100%;
  background: var(--bg);
  padding: 0 var(--spacing-md) var(--spacing-md);
}

.inspection-hero,
.inspection-block,
.inspection-submit-panel,
.inspection-locked {
  width: 100%;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
}

.inspection-page > .detail-back-bar {
  width: calc(100% + (var(--spacing-md) * 2));
  margin-left: calc(-1 * var(--spacing-md));
  margin-right: calc(-1 * var(--spacing-md));
}

.inspection-hero {
  margin-top: var(--surface-gap);
  padding: var(--spacing-md);
  border-radius: var(--surface-radius);
  background: var(--bg-card);
  box-shadow: var(--surface-shadow);
}

.inspection-kicker {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inspection-hero h1 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
}

.inspection-hero p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
}

.inspection-block-list {
  display: flex;
  flex-direction: column;
  gap: var(--surface-gap);
  margin-top: var(--surface-gap);
}

.inspection-block {
  padding: var(--spacing-md);
  border-radius: var(--surface-radius);
  background: var(--bg-card);
  box-shadow: var(--surface-shadow);
}

.inspection-block-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--spacing-md);
  margin-bottom: 12px;
}

.inspection-block-head h2 {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.inspection-block-head p {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.inspection-count {
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #F1F5F9;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.inspection-doc-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.inspection-doc-choice button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #F8FAFC;
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.inspection-doc-choice button.active {
  border-color: rgba(0, 168, 255, 0.55);
  background: var(--soft-blue);
  color: var(--primary-dark);
}

.inspection-extra-doc-control {
  margin-bottom: 12px;
}

.inspection-extra-doc-control select {
  width: 100%;
  height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.inspection-extra-doc-control select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.12);
}

.inspection-extra-doc-panels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspection-extra-doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspection-extra-doc-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #F8FAFC;
  overflow: hidden;
}

.inspection-extra-doc-panel.is-selected {
  border-color: rgba(0, 168, 255, 0.28);
  background: #F8FBFF;
}

.inspection-extra-doc-panel.is-complete {
  border-color: rgba(16, 185, 129, 0.45);
  background: #F7FFFB;
}

.inspection-extra-doc-panel summary {
  min-height: 46px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.inspection-extra-doc-panel summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.inspection-extra-doc-panel[open] summary::before {
  transform: rotate(45deg);
}

.inspection-extra-doc-panel summary::-webkit-details-marker {
  display: none;
}

.inspection-extra-doc-panel summary span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.inspection-extra-doc-panel summary em {
  padding: 4px 7px;
  border-radius: 999px;
  background: #EEF2F7;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 800;
}

.inspection-extra-doc-panel summary button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--text-secondary);
  cursor: pointer;
}

.inspection-extra-doc-panel summary b {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--primary-dark);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.inspection-extra-doc-panel summary button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.inspection-extra-doc-panel > .inspection-shot-list {
  padding: 0 8px 8px;
}

.inspection-field {
  display: block;
  margin-top: 12px;
}

.inspection-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.inspection-field input {
  width: 100%;
  height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}

.inspection-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.12);
}

.inspection-block-empty {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.inspection-block-empty {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #F8FAFC;
}

.inspection-shot-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.inspection-shot,
.inspection-additional-photo-card {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #F8FAFC;
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.inspection-shot:disabled,
.inspection-additional-photo-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.inspection-shot.filled,
.inspection-additional-photo-card.filled {
  border-color: rgba(16, 185, 129, 0.45);
  background: #F7FFFB;
}

.inspection-shot-preview {
  width: 54px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #FFFFFF;
  overflow: hidden;
}

.inspection-shot-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.inspection-shot-preview svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inspection-shot-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inspection-shot-label {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.inspection-shot-optional {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
}

.inspection-shot-state {
  padding: 4px 7px;
  border-radius: 999px;
  background: #EEF2F7;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.inspection-shot.filled .inspection-shot-state {
  background: var(--soft-green);
  color: #047857;
}

.inspection-additional-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.inspection-additional-photo-strip button {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #FFFFFF;
  overflow: hidden;
}

.inspection-additional-photo-strip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.inspection-additional-photo-strip span {
  position: absolute;
  left: 4px;
  bottom: 4px;
  min-width: 18px;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #FFFFFF;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
}

.inspection-submit-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--surface-gap);
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--surface-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

.inspection-submit-title {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.inspection-submit-note {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.25;
}

.inspection-submit-btn {
  min-height: 38px;
  min-width: 108px;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
}

.inspection-complete-panel {
  width: 100%;
  max-width: var(--content-max-width);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--surface-gap);
  margin-left: auto;
  margin-right: auto;
  padding: 12px;
  border-radius: var(--surface-radius);
  background: var(--soft-green);
  color: #047857;
}

.inspection-complete-panel h2 {
  color: #047857;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}

.inspection-complete-panel p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.inspection-locked {
  margin-top: var(--surface-gap);
}

.inspection-locked p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

.inspection-geo-gate {
  width: 100%;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--surface-gap);
  border: none;
  border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
}

.inspection-geo-copy {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

.inspection-geo-address {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #F8FAFC;
}

.inspection-geo-address span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.inspection-geo-address strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.inspection-geo-error,
.inspection-geo-warning,
.inspection-geo-ok {
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.inspection-geo-error {
  background: #FEF2F2;
  color: var(--danger);
  font-weight: 700;
}

.inspection-geo-warning {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #FFF7ED;
  color: #9A3412;
}

.inspection-geo-warning strong {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
}

.inspection-geo-warning span {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.inspection-geo-ok {
  background: var(--soft-green);
  color: #047857;
  font-weight: 800;
}

.inspection-geo-reason-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspection-geo-reason-form label,
.inspection-geo-reason-form label span {
  display: block;
}

.inspection-geo-reason-form label span {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.inspection-geo-reason-form textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.inspection-geo-reason-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.12);
}

.inspection-camera {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  background: #000000;
}

.inspection-camera-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #000000;
}

#inspection-video,
#inspection-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#inspection-video.mirror {
  transform: scaleX(-1);
}

#inspection-canvas {
  display: none;
}

#inspection-pinned {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  width: 116px;
  max-height: 104px;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: #FFFFFF;
  object-fit: contain;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.inspection-top-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  min-width: 58px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
}

.inspection-car-mask,
.inspection-vin-mask,
.inspection-odo-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.inspection-car-mask.show,
.inspection-vin-mask.show,
.inspection-odo-mask.show {
  display: flex;
}

.inspection-car-mask img {
  width: 92%;
  max-width: 95vw;
  max-height: 70vh;
  object-fit: contain;
}

.inspection-vin-mask div,
.inspection-odo-mask div {
  position: relative;
  border: 2.5px solid var(--primary);
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.12);
}

.inspection-vin-mask div {
  width: 80%;
  max-width: 500px;
  aspect-ratio: 4 / 1;
}

.inspection-odo-mask div {
  width: 70%;
  max-width: 420px;
  aspect-ratio: 3 / 1;
}

.inspection-vin-mask span,
.inspection-odo-mask span {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  color: #E0F2FE;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.inspection-bottom-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 44px 20px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 800;
  text-align: center;
}

.inspection-dark-warning {
  position: absolute;
  left: 50%;
  bottom: 86px;
  z-index: 5;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.inspection-rotate-prompt {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #FFFFFF;
  color: var(--ink);
  text-align: center;
}

.inspection-rotate-prompt svg {
  width: 88px;
  height: 88px;
  margin-bottom: 18px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.inspection-rotate-prompt svg g {
  transform-origin: 50px 50px;
  animation: rotate-phone 1.5s ease-in-out infinite;
}

.inspection-rotate-prompt svg circle {
  fill: var(--primary);
}

.inspection-rotate-prompt p {
  max-width: 280px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}

.inspection-rotate-prompt span {
  max-width: 290px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

@keyframes rotate-phone {
  0%, 100% { transform: rotate(0deg); }
  35%, 75% { transform: rotate(-90deg); }
}

.inspection-camera-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #FFFFFF;
}

.inspection-camera-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.inspection-camera-controls {
  min-height: calc(116px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--bg-card);
}

.inspection-step-info {
  min-height: 20px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.inspection-step-info:empty {
  display: none;
}

.inspection-capture-controls {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 72px;
}

.inspection-capture-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  inline-size: 72px;
  block-size: 72px;
  min-width: 72px;
  min-height: 72px;
  max-width: 72px;
  max-height: 72px;
  flex: 0 0 72px;
  aspect-ratio: 1;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 4px solid var(--primary);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.inspection-capture-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--primary);
}

.inspection-capture-btn:active::after {
  width: 48px;
  height: 48px;
}

.inspection-flash-btn {
  position: absolute;
  left: calc(50% - 86px);
  top: 50%;
  width: 48px;
  height: 48px;
  inline-size: 48px;
  block-size: 48px;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
  flex: 0 0 48px;
  aspect-ratio: 1;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #0F172A;
  color: #FFFFFF;
  cursor: pointer;
}

.inspection-flash-btn.disabled {
  opacity: 0.35;
}

.inspection-flash-btn.active {
  color: #FACC15;
}

.inspection-flash-btn svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.inspection-additional-done-btn {
  position: absolute;
  left: calc(50% + 106px);
  top: 50%;
  min-height: 44px;
  padding: 10px 17px;
  transform: translate(-50%, -50%);
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: var(--text-on-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 168, 255, 0.28);
}

.inspection-preview-controls {
  width: 100%;
  max-width: 360px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inspection-review-mode #inspection-preview {
  object-fit: contain;
  background: #000000;
}

.inspection-review-mode .inspection-bottom-hint {
  padding-top: 24px;
}

@media (orientation: portrait) {
  .inspection-camera.landscape-required .inspection-rotate-prompt {
    display: flex;
  }
}

@media (orientation: landscape) {
  .inspection-camera {
    flex-direction: row;
  }

  .inspection-camera-stage {
    order: 1;
    flex: 3 1 auto;
  }

  .inspection-camera-controls {
    position: relative;
    order: 2;
    --inspection-controls-width: clamp(112px, 31vw, 124px);
    flex: 0 0 calc(var(--inspection-controls-width) + env(safe-area-inset-right));
    width: calc(var(--inspection-controls-width) + env(safe-area-inset-right));
    min-height: 100dvh;
    gap: 8px;
    padding: 0 calc(10px + env(safe-area-inset-right)) 0 10px;
    border-left: 1px solid var(--border);
  }

  .inspection-step-info {
    max-width: 104px;
    min-height: 0;
    font-size: 12px;
    line-height: 1.25;
  }

  .inspection-capture-controls {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 154px;
    display: block;
  }

  .inspection-capture-btn,
  .inspection-flash-btn {
    position: absolute;
    flex-shrink: 0;
    border-radius: 999px;
  }

  .inspection-flash-btn {
    left: 50%;
    top: calc(50% + 84px);
    transform: translate(-50%, -50%);
  }

  .inspection-capture-btn {
    left: 50%;
    top: 50%;
    width: 72px !important;
    height: 72px !important;
    inline-size: 72px;
    block-size: 72px;
    transform: translate(-50%, -50%);
  }

  .inspection-preview-controls {
    max-width: 92px;
    grid-template-columns: 1fr;
  }

  .inspection-preview-controls .btn {
    min-height: 42px;
    padding: 9px 8px;
    font-size: 13px;
  }

  .inspection-bottom-hint {
    right: 0;
    bottom: 0;
  }

  .inspection-camera-close {
    position: fixed;
    top: 14px;
    right: calc(14px + env(safe-area-inset-right));
    background: #0F172A;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
  }

  .inspection-top-badge {
    top: 14px;
    left: 14px;
  }

  .inspection-additional-done-btn {
    left: 50%;
    top: calc(50% - 86px);
    transform: translate(-50%, -50%);
    min-height: 40px;
    padding: 9px 13px;
    font-size: 12px;
  }
}

.inspection-guide {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  overflow-y: auto;
}

.inspection-guide-card {
  width: 100%;
  max-width: 400px;
  padding: 22px;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.inspection-guide-card h3 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

.inspection-guide-card p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.inspection-guide-card > img {
  width: 100%;
  max-height: 180px;
  display: block;
  margin: 14px auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: contain;
}

.inspection-example-strip {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.inspection-example-strip img {
  height: 132px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #F8FAFC;
  object-fit: contain;
}

.inspection-guide-note {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  background: #FFFBEB;
  color: #92400E;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  text-align: left;
}

/* ─── Админский раздел экспертов ─────────────────────────────────────────── */
.experts-page {
  min-height: 100%;
  padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
}

.expert-create-card,
.expert-card {
  background: var(--bg-card);
  border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow);
}

.expert-form {
  display: flex;
  flex-direction: column;
}

.experts-section-title {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: var(--surface-padding-y) var(--surface-padding-x) var(--spacing-sm);
  text-transform: uppercase;
}

.expert-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px var(--surface-padding-x);
  border-top: 1px solid var(--border);
}

.expert-field--city {
  position: relative;
}

.expert-field span,
.generated-password-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.expert-field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  padding: 4px 0;
}

.expert-toggle-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  padding: 10px var(--surface-padding-x);
  border-top: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
}

.generated-password {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-sm) var(--surface-padding-x) 0;
  padding: 10px 12px;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  background: #F0FDF4;
}

.generated-password code {
  display: block;
  margin-top: 2px;
  color: #065F46;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.7px;
  overflow-wrap: anywhere;
}

.copy-password-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  background: #FFFFFF;
  color: #047857;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.copy-password-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.expert-form > .btn {
  margin: var(--spacing-sm) var(--surface-padding-x) var(--surface-padding-y);
  width: calc(100% - (var(--surface-padding-x) * 2));
}

.experts-list-title {
  padding: 18px var(--spacing-xs) 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.experts-list {
  display: flex;
  flex-direction: column;
  gap: var(--surface-gap);
}

.expert-card {
  padding: var(--surface-padding-y) var(--surface-padding-x);
  cursor: pointer;
}

.expert-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.expert-card-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.expert-card-avatar {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #E0F2FE;
  color: #0369A1;
  font-size: 14px;
  font-weight: 800;
}

.expert-card-text {
  min-width: 0;
}

.expert-card-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.expert-card-name {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.expert-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.expert-badge.admin {
  background: #EFF6FF;
  color: #1D4ED8;
}

.expert-badge.self {
  background: #F1F5F9;
  color: #475569;
}

.expert-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
}

.expert-card-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.expert-card-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.expert-card-login span {
  color: var(--text-secondary);
  font-size: 12px;
}

.expert-card-login strong {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.expert-card-actions {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.expert-card.is-expanded .expert-card-actions {
  display: grid;
}

.expert-action-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(14, 165, 233, 0.32);
  border-radius: 8px;
  background: #F0F9FF;
  color: #0369A1;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.expert-action-btn.danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: #FEF2F2;
  color: #B91C1C;
}

.expert-action-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.expert-action-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.expert-action-btn.is-loading {
  pointer-events: none;
}

/* ─── Страница настроек ──────────────────────────────────────────────────── */
.settings-page {
  padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--surface-gap);
}

/* Секция настроек */
.settings-section {
  background: var(--bg-card);
  border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow);
  overflow: visible;
}

.settings-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  padding: var(--surface-padding-y) var(--surface-padding-x) var(--spacing-sm);
}

/* Профиль — аватар */
.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-md) var(--surface-padding-x) var(--spacing-sm);
  gap: var(--spacing-sm);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  font-weight: 700;
  color: var(--text-on-primary);
}

.profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Поля профиля */
.settings-field {
  padding: 10px var(--surface-padding-x);
  border-top: 1px solid var(--border);
}

.settings-field:first-of-type {
  border-top: none;
}

.settings-field-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-field-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
  padding: 4px 0;
}

.settings-field-input:disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
}

.settings-field-value {
  min-height: 27px;
  padding: 4px 0;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Toggle переключатель */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px var(--surface-padding-x);
  border-top: 1px solid var(--border);
}

.settings-row:first-child { border-top: none; }

.settings-row-label {
  font-size: 15px;
  color: var(--text-primary);
}

.settings-action {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px var(--surface-padding-x);
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.settings-action svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.settings-action-danger {
  color: var(--danger);
}

.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Автодополнение города */
.settings-field--city {
  position: relative;
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  list-style: none;
  z-index: 100;
  margin: 0;
  padding: 4px 0;
}

.city-suggestion-item {
  padding: 11px var(--spacing-md);
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
}

.city-suggestion-item:hover,
.city-suggestion-item:active {
  background: var(--bg);
}

/* Версия приложения */
.app-version {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
  padding: var(--spacing-sm);
}

/* Кнопка сохранения профиля */
.save-btn-wrap {
  padding: var(--spacing-sm) var(--surface-padding-x) var(--surface-padding-y);
}

/* ─── Страница «В разработке» (Календарь) ───────────────────────────────── */
.wip-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: var(--spacing-lg);
  text-align: center;
  gap: var(--spacing-md);
}

.wip-icon {
  width: 80px;
  height: 80px;
  stroke: var(--border);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wip-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-secondary);
}

.wip-sub {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.7;
  max-width: 240px;
}

/* ─── Экран обязательных разрешений ─────────────────────────────────────── */
.permission-screen {
  z-index: 9000;
  align-items: stretch;
  overflow-y: auto;
}

.permission-panel {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 28px var(--spacing-md);
}

.permission-kicker {
  margin-bottom: var(--spacing-sm);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.permission-panel h1 {
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.12;
}

.permission-panel p {
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.45;
}

.permission-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.permission-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.permission-item div {
  min-width: 0;
}

.permission-item strong,
.permission-item span {
  display: block;
}

.permission-item strong {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.25;
}

.permission-item span {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
}

.permission-item em {
  flex-shrink: 0;
  min-width: 96px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.permission-item.is-granted em {
  background: var(--soft-green);
  color: var(--success);
}

.permission-item.is-prompt em {
  background: var(--soft-blue);
  color: var(--primary-dark);
}

.permission-item.is-denied em,
.permission-item.is-error em {
  background: #FEF2F2;
  color: var(--danger);
}

.permission-error {
  margin-bottom: var(--spacing-md);
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #FEF2F2;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.permission-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.permission-logout {
  min-height: 42px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ─── Toast уведомления ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--navbar-height) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  width: calc(100% - 32px);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  padding: 12px var(--spacing-md);
  background: var(--text-primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.2s ease-out;
  pointer-events: auto;
}

.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 360px) {
  .contact-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .contact-call-btn {
    width: 100%;
  }

  .location-map-frame {
    height: 168px;
  }

  .appointment-native-fields {
    grid-template-columns: minmax(0, 1fr) minmax(82px, 0.72fr);
  }

  .appointment-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .inspection-doc-choice {
    grid-template-columns: 1fr;
  }

  .inspection-submit-panel {
    grid-template-columns: 1fr;
  }

  .inspection-submit-btn {
    width: 100%;
  }

  .generated-password {
    grid-template-columns: 1fr;
  }

  .copy-password-btn {
    justify-content: center;
    width: 100%;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
