/* ===== Трекер-Контроль: Дизайн-система (стилистика T-Style 2.0) ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --yellow: #FFDD2D;
  --yellow-hover: #F0CE24;
  --yellow-deep: #D4A700;
  --yellow-soft: #FFF9D9;
  --yellow-grad: linear-gradient(135deg, #FFDD2D 0%, #F5C400 100%);
  
  --ink: #14171A;
  --ink-secondary: #3B424C;
  --ink-muted: #6B7684;
  --ink-faint: #9EA8B5;
  
  --bg: #F4F6F9;
  --card-bg: #FFFFFF;
  --border-subtle: 1px solid rgba(20, 23, 26, 0.08);
  --border-strong: 1px solid rgba(20, 23, 26, 0.16);
  
  --ok: #00B341;
  --ok-soft: #EDFDF2;
  --ok-border: rgba(0, 179, 65, 0.25);
  
  --warn: #F59E0B;
  --warn-soft: #FEF3C7;
  
  --danger: #F53636;
  --danger-soft: #FEECEB;
  --danger-border: rgba(245, 54, 54, 0.2);
  
  --info: #2563EB;
  --info-soft: #EFF6FF;
  
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --shadow-sm: 0 2px 6px rgba(20, 23, 26, 0.04);
  --shadow-card: 0 4px 16px rgba(20, 23, 26, 0.06), 0 1px 3px rgba(20, 23, 26, 0.03);
  --shadow-hover: 0 10px 28px rgba(20, 23, 26, 0.10);
  --shadow-yellow: 0 6px 20px rgba(245, 196, 0, 0.35);
  
  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  box-sizing: border-box;
  max-width: 100vw;
  width: 100%;
  overflow-x: hidden;
}

*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  padding-bottom: env(safe-area-inset-bottom, 24px);
}

/* Header & Role Navigation */
.header {
  background: #181B1F;
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-top {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--yellow-grad);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-yellow);
}

.brand-title {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  background: rgba(255, 221, 45, 0.2);
  color: var(--yellow);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* Role Selector */
.role-bar {
  background: #121417;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 20px;
}

.role-bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.role-bar-inner::-webkit-scrollbar { display: none; }

.role-label {
  font-size: 12px;
  font-weight: 700;
  color: #8E99A8;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.role-chip {
  background: rgba(255, 255, 255, 0.06);
  color: #D1D7E0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

.role-chip.active {
  background: var(--yellow-grad);
  color: var(--ink);
  font-weight: 800;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(245, 196, 0, 0.35);
}

/* Walkthrough Bar */
.walkthrough-bar {
  background: linear-gradient(90deg, #181B1F 0%, #22262E 100%);
  border-bottom: 2px solid var(--accent);
  color: #FFFFFF;
  padding: 10px 16px;
  position: sticky;
  top: 55px;
  z-index: 45;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.2s ease;
}

.walkthrough-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.walkthrough-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  flex: 1;
}

.walkthrough-step-badge {
  background: var(--accent);
  color: #111111;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  display: inline-block;
}

.walkthrough-title {
  font-weight: 800;
  font-size: 14px;
  color: #FFFFFF;
}

.walkthrough-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

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

.btn-text-short {
  display: none;
}

@media (max-width: 540px) {
  .header-top {
    padding: 8px 12px;
    gap: 8px;
  }
  .brand-sub {
    display: none !important;
  }
  .brand-name {
    font-size: 14px !important;
  }
  .brand-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
  }
  .brand-badge {
    display: none !important;
  }
  .btn-text-full {
    display: none !important;
  }
  .btn-text-short {
    display: inline !important;
  }
  .btn-sm {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
  .walkthrough-bar {
    padding: 8px 12px;
  }
  .walkthrough-inner {
    gap: 8px;
  }
}

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

.walkthrough-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.walkthrough-close:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.15);
}

/* Main Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Alert Banner */
.alert-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--danger-border);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: fadeIn 0.3s ease;
  position: relative;
  overflow: hidden;
}

.alert-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--danger);
}

.alert-card.warning::before {
  background: var(--warn);
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alert-icon {
  font-size: 24px;
}

.alert-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}

.alert-sub {
  font-size: 13px;
  color: var(--ink-secondary);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(20, 23, 26, 0.1);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  background: transparent;
  border: none;
  padding: 12px 18px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--ink);
  font-weight: 800;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ink);
  border-radius: 3px 3px 0 0;
}

.tab-badge {
  background: #E4E7EB;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.tab-btn.active .tab-badge {
  background: var(--yellow-grad);
  color: var(--ink);
}

/* Cards Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

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

.card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.card-sub {
  font-size: 13px;
  color: var(--ink-muted);
}

/* Status Chips */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-chip.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}

.status-chip.warn {
  background: var(--warn-soft);
  color: #B45309;
}

.status-chip.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.status-chip.info {
  background: var(--info-soft);
  color: var(--info);
}

.status-chip.neutral {
  background: #EAECEF;
  color: var(--ink-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--yellow-grad);
  color: var(--ink);
  box-shadow: var(--shadow-yellow);
}

.btn-primary:hover {
  background: var(--yellow-hover);
  box-shadow: 0 8px 24px rgba(245, 196, 0, 0.45);
}

.btn-dark {
  background: #181B1F;
  color: #FFFFFF;
}

.btn-dark:hover {
  background: #2A2E35;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(20, 23, 26, 0.15);
  color: var(--ink);
}

.btn-outline:hover {
  background: rgba(20, 23, 26, 0.04);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid #E2E6EB;
  border-radius: var(--radius-md);
  outline: none;
  background: #FFFFFF;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--yellow-deep);
  box-shadow: 0 0 0 3px rgba(255, 221, 45, 0.25);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 18, 22, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  transform: translateY(16px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.close-btn {
  background: #F0F2F5;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--ink-secondary);
}

/* Telemetry box */
.telemetry-card {
  background: #181B1F;
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.telemetry-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.telemetry-row:last-child {
  margin-bottom: 0;
}

.telemetry-badge {
  color: var(--ok);
  font-weight: bold;
}

/* Camera scan box */
.camera-box {
  border: 2px dashed #CBD2DB;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: #FAFBFC;
  transition: all 0.2s ease;
}

.camera-box:hover {
  border-color: var(--yellow-deep);
  background: #FFFDF5;
}

.camera-preview {
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-top: 12px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(440px, calc(100vw - 32px));
  width: auto;
}

.toast {
  background: rgba(24, 27, 31, 0.95);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: popIn 0.25s ease;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

.toast.ok {
  border-left: 5px solid var(--ok);
}

.toast.err {
  border-left: 5px solid var(--danger);
}

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

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive & Anti-Stretch Adaptive Rules */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

@media (max-width: 900px) {
  .container {
    padding: 18px 14px 70px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 14px 12px 60px;
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .header-top {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .role-bar {
    padding: 6px 12px;
  }
  .alert-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    gap: 12px;
  }
  .alert-card .btn {
    width: 100%;
  }
  .card {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }
  .card-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  .card-header .status-chip {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .header-top {
    padding: 8px 10px;
    gap: 6px;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 10px;
  }
  .brand-title {
    font-size: 14px;
    letter-spacing: -0.3px;
  }
  .brand-badge {
    display: none;
  }
  .current-user-card {
    padding: 4px 8px;
    font-size: 11px;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .nav-tabs {
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 4px;
  }
  .tab-btn {
    padding: 8px 12px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .modal-overlay {
    padding: 8px;
  }
  .modal-card {
    padding: 18px 14px;
    border-radius: 18px;
    max-height: 94vh;
    width: 100%;
  }
  .login-card {
    padding: 20px 14px;
    border-radius: 20px;
    max-width: 100%;
  }
  .user-select-list {
    grid-template-columns: 1fr;
    max-height: 200px;
  }
  .camera-viewport-container {
    height: 260px;
  }
  .btn {
    font-size: 13px;
  }
}

/* ===== Экран входа и авторизации сотрудника ===== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 10%, #222831 0%, #0D1117 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(24, 27, 31, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.login-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
}

.plate-badge {
  font-family: var(--font-mono);
  background: #FFFFFF;
  color: var(--ink);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #C8CED8;
  white-space: nowrap;
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.user-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;
  margin-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.user-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.user-select-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.user-select-item.selected {
  background: rgba(255, 221, 45, 0.12);
  border-color: var(--yellow);
  box-shadow: 0 0 15px rgba(255, 221, 45, 0.2);
}

.user-select-avatar {
  font-size: 22px;
  line-height: 1;
}

.user-select-info {
  flex: 1;
}

.user-select-name {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
}

.user-select-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.user-select-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.pin-field-wrapper {
  margin-bottom: 20px;
}

.pin-input {
  width: 100%;
  height: 52px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 20px;
  text-align: center;
  letter-spacing: 6px;
  font-family: var(--font-mono);
  outline: none;
  transition: all 0.15s ease;
}

.pin-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 20px rgba(255, 221, 45, 0.25);
}

.login-demo-hints {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.demo-fill-btn {
  background: none;
  border: none;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.current-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.logout-link {
  font-size: 12px;
  color: #FFDD2D;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 4px;
}

/* ===== Живая камера и видоискатель ===== */
.camera-viewport-container {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 18px;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#liveCameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-scan-reticle {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 30px;
  right: 30px;
  border: 2px dashed rgba(255, 221, 45, 0.7);
  border-radius: 16px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}

.reticle-hint {
  background: rgba(0, 0, 0, 0.7);
  color: #FFDD2D;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.reticle-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FFDD2D, transparent);
  box-shadow: 0 0 8px #FFDD2D;
  animation: scanLaser 2s linear infinite;
}

@keyframes scanLaser {
  0% { top: 10%; opacity: 0.2; }
  50% { opacity: 1; }
  100% { top: 90%; opacity: 0.2; }
}

.camera-shutter-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 0 20px rgba(255, 221, 45, 0.4);
}

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

.shutter-inner {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--yellow);
}

/* Пульсирующая точка записи голоса */
.recording-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #F53636;
  animation: pulseRecording 1s infinite alternate;
}

@keyframes pulseRecording {
  from { transform: scale(0.8); opacity: 0.5; }
  to { transform: scale(1.3); opacity: 1; }
}

.voice-recording-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 54, 54, 0.1);
  border: 1px solid rgba(245, 54, 54, 0.3);
  padding: 8px 12px;
  border-radius: 12px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #D32F2F;
}

.ai-loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(20, 23, 26, 0.2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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


