/* ==========================================================================
   ЮРПОМ.рф | Strict Corporate Executive Design System (Professional Legal Portal)
   ========================================================================== */

:root {
  /* Strict Corporate Slate & Alabaster Palette */
  --bg-main: #ffffff;
  --bg-panel: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --color-navy: #1e293b;
  --color-blue-institutional: #1d4ed8;
  --color-blue-hover: #1e40af;
  --color-bronze: #854d0e;
  --color-bronze-bg: #fefce8;
  --color-success: #0f766e;
  --color-success-bg: #f0fdf4;

  --border-default: #cbd5e1;
  --border-subtle: #e2e8f0;
  --border-focus: #475569;
  --border-bronze: #ca8a04;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.05);
  
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.mobile-nav-lock {
  overflow: hidden !important;
  touch-action: none;
}

.hidden { display: none !important; }
.font-semibold { font-weight: 600; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.text-white { color: var(--text-primary); font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }

/* ==========================================================================
   Navigation (Executive Corporate Toolbar)
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border-default);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  height: 68px;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  z-index: 2;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.accent-dot {
  color: var(--color-blue-institutional);
}

.beta-badge,
.online-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  padding: 2.5px 8px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  text-transform: lowercase;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  vertical-align: middle;
}

.online-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-green 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.75);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.nav-city-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  outline: none;
  font-family: inherit;
}

.nav-city-btn:hover {
  background: #ffffff;
  border-color: var(--color-blue-institutional);
  color: var(--color-blue-institutional);
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.nav-city-btn .pin-icon { font-size: 12px; }
.nav-city-btn .caret-down { font-size: 10px; color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: clamp(0.6rem, 1.2vw, 1.4rem);
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 1rem;
  z-index: 1;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 0.4rem 0.35rem;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-blue-institutional);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-blue-institutional);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  z-index: 2;
}

.nav-actions .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-actions .btn-sm,
.nav-actions #nav-login-btn,
.nav-actions #nav-reg-btn,
.nav-actions .nav-city-btn {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}
.link-btn:hover { color: var(--color-blue-institutional); }

/* Strict Business Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 13px;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 15px;
}

.btn-full { width: 100%; }

.btn-outline {
  background: #ffffff;
  border-color: var(--border-default);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--border-focus);
}

.btn-primary {
  background: var(--color-blue-institutional);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-blue-hover);
}

.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
}

/* ==========================================================================
   TOP SEARCH SECTION (AI Legal System at the Very Top)
   ========================================================================== */
.main-view {
  transition: opacity 0.2s ease;
}

.top-search-section {
  background: var(--bg-main);
  border-bottom: 2px solid var(--border-default);
  padding: 3rem 0 3.5rem;
}

.search-workspace {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.header-minimal {
  margin-bottom: 1.25rem;
}

.system-status-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-blue-institutional);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
}

.main-system-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.system-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 850px;
  line-height: 1.6;
}

/* Executive Search Box at Top */
.primary-search-container {
  margin-bottom: 0.85rem;
}

.search-box-executive {
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  transition: var(--transition);
  overflow: hidden;
}

.search-box-executive:focus-within {
  border-color: var(--color-blue-institutional);
  box-shadow: 0 8px 25px rgba(29, 78, 216, 0.12);
}

.search-input-wrapper {
  display: flex;
  align-items: flex-start;
  padding: 1.25rem 1.25rem 0.5rem;
  gap: 1rem;
}

.search-icon-symbol {
  font-size: 1.5rem;
  color: var(--color-blue-institutional);
  user-select: none;
  pointer-events: none;
}

#ai-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  resize: none;
  line-height: 1.5;
  -webkit-appearance: none;
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}

#ai-input::placeholder {
  color: #94a3b8;
}

.search-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.25rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
}

.security-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-search-execute {
  padding: 0.7rem 1.6rem;
  font-weight: 700;
  font-size: 14px;
}

/* Quick Cases Pills */
.quick-cases-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.prompt-pill {
  background: #ffffff;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.prompt-pill:hover {
  background: var(--bg-subtle);
  color: var(--color-blue-institutional);
  border-color: var(--color-blue-institutional);
}

/* ==========================================================================
   AI Consultation & Lawyer Escalation Handoff
   ========================================================================== */
.ai-consultation-panel {
  margin-top: 0.85rem;
  margin-bottom: 1.5rem;
  background: #ffffff;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.panel-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.system-ident {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 15px;
  color: var(--color-navy);
}

.status-dot-active {
  width: 10px;
  height: 10px;
  background: var(--color-blue-institutional);
  border-radius: 50%;
}

.badge {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid #bbf7d0; }
.badge-indigo { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-gold { background: var(--color-bronze-bg); color: var(--color-bronze); border: 1px solid #fde047; }

.ai-report-content {
  padding: 2rem 2rem 1.5rem;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.ai-report-content p { margin-bottom: 1rem; }
.ai-report-content h3 { font-size: 17px; margin-bottom: 0.8rem; color: var(--color-navy); }
.ai-report-content ul { margin-left: 1.5rem; margin-bottom: 1.2rem; }
.ai-report-content li { margin-bottom: 0.5rem; }

/* Escalation Transition Box (How AI leads to the lawyer) */
.escalation-box {
  padding: 2rem;
  background: #fdfaf6; /* Soft institutional warm tone for recommendation */
}

.ai-conclusion-callout {
  background: #ffffff;
  border-left: 4px solid var(--color-bronze);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.callout-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.callout-header h4 { font-size: 15px; font-weight: 700; color: var(--color-bronze); transition: color var(--transition-fast); }
#ai-escalation-reason { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0; }

.ai-conclusion-callout.is-informational {
  border-left-color: var(--color-blue-institutional);
  background: #f8fafc;
}
.ai-conclusion-callout.is-informational .callout-header h4 {
  color: var(--color-blue-institutional);
}

/* Specialist Handoff Card */
.specialist-handoff-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.handoff-meta { flex: 1; min-width: 280px; }

.specialist-profile-grid {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

.specialist-photo {
  width: 85px;
  height: 85px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-default);
}

.specialist-details h3 { font-size: 1.25rem; margin-bottom: 0.2rem; color: var(--text-primary); }

.tags-inline {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.handoff-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
  min-width: 260px;
}

.cost-breakdown {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-val { font-size: 13px; font-weight: 700; color: var(--color-navy); line-height: 1.2; }
.cost-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ==========================================================================
   Sections & Institutional Cards
   ========================================================================== */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.info-section,
.lawyers-section,
.legal-knowledge-section,
.legal-calculator-section,
.regional-offices-section,
.federal-cities-section {
  padding: 3.5rem 0;
}

.section-header { margin-bottom: 2.5rem; }
.flex-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; border-bottom: 2px solid var(--color-navy); padding-bottom: 1rem; }

.section-tag {
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
  display: block;
  margin-bottom: 0.3rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-navy);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-blue-institutional);
  margin-bottom: 1.2rem;
  background: var(--bg-subtle);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
}

.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.feature-card p { font-size: 14px; color: var(--text-secondary); }

/* Directory */
.filter-pills {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--color-navy);
  color: #ffffff;
  border-color: var(--color-navy);
}

.lawyers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.lawyer-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.lawyer-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.lawyer-card-header {
  position: relative;
  height: 260px;
  background: #0f172a;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  display: block;
}

.lawyer-card-header.avatar-placeholder-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lawyer-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: top center !important;
  display: block;
  transition: transform 0.3s ease;
}

.lawyer-card:hover .lawyer-card-img.is-real-photo {
  transform: scale(1.03);
}

.lawyer-card-img.is-svg-avatar,
.lawyer-card-img[src*=".svg"] {
  width: 110px !important;
  height: 110px !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  background: #ffffff;
  padding: 6px;
  border: 3px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  margin: auto;
}

.lawyer-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lawyer-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.2rem; color: var(--text-primary); }
.lawyer-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 1.2rem; flex: 1; line-height: 1.5; }

.lawyer-card-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   CRM Corporate Workspace (Lawyer Desk)
   ========================================================================== */
.crm-container { max-width: 1100px; padding: 2.5rem 2rem; }

.crm-header {
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-left: 5px solid var(--color-navy);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.lawyer-profile-bar { display: flex; align-items: center; gap: 1.25rem; }
.crm-avatar { width: 70px; height: 70px; border-radius: var(--radius-sm); border: 1px solid var(--border-default); object-fit: cover; }
.flex-row-align { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.3rem; }
.crm-title { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.crm-active-contacts-row {
  margin-top: 0.4rem;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.crm-active-contacts-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.crm-stats {
  display: flex;
  gap: 2rem;
  background: var(--bg-subtle);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.stat-item { display: flex; flex-direction: column; }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.stat-val { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }

.crm-section-title { margin-bottom: 1.25rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.5rem; }
.crm-section-title h3 { font-size: 1.25rem; color: var(--text-primary); }

.leads-list { display: flex; flex-direction: column; gap: 1.25rem; }

.lead-card {
  padding: 1.5rem;
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--color-blue-institutional);
  background: #ffffff;
  border-radius: var(--radius-sm);
}

.lead-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.lead-time { font-size: 12px; color: var(--text-muted); font-weight: 600; }

.ai-summary-box {
  background: var(--bg-panel);
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.2rem;
}

.ai-summary-title { font-size: 13px; font-weight: 700; color: var(--color-navy); margin-bottom: 0.4rem; }

.lead-actions { display: flex; justify-content: space-between; align-items: center; }

.client-contact-badge {
  background: #ffffff;
  border: 1px solid var(--border-default);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.65);
  z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}

.modal-card {
  max-width: 540px;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-focus);
  padding: 2rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.modal-lg { max-width: 800px; }
.modal-close-btn { position: absolute; top: 1rem; right: 1.25rem; background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.modal-close-btn:hover { color: var(--text-primary); }
.modal-header { margin-bottom: 1.2rem; text-align: left; }
.modal-header h3 { font-size: 1.4rem; margin: 0.4rem 0; color: var(--text-primary); font-weight: 800; }

.payment-summary-box { background: var(--bg-subtle); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 1.2rem; margin-bottom: 1.2rem; }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 14px; color: var(--text-secondary); }
.summary-line:last-child { margin-bottom: 0; }
.total-line { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.price-gold { color: var(--text-primary); font-size: 13px; font-weight: 700; }

.separator { border: none; border-top: 1px solid var(--border-subtle); margin: 0.75rem 0; }

.legal-disclaimer-box {
  background: var(--color-bronze-bg);
  border: 1px solid var(--border-bronze);
  padding: 0.8rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-sm);
}

.form-group { margin-bottom: 1rem; text-align: left; width: 100%; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 0.35rem; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; min-width: 100%; max-width: 100%; box-sizing: border-box;
  padding: 0.7rem 0.9rem;
  background: #ffffff; border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-sans); font-size: 14px; outline: none; transition: var(--transition);
}
.form-group textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
  display: block;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--color-blue-institutional);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}

.form-checkbox { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 1.5rem; text-align: left; }
.form-checkbox input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; cursor: pointer; }
.form-checkbox a { color: var(--color-blue-institutional); text-decoration: underline; font-weight: 500; }

.legal-doc-text h2 { font-size: 1.5rem; margin-bottom: 0.8rem; color: var(--text-primary); font-weight: 800; }
.legal-doc-text h4 { font-size: 1.1rem; color: var(--color-navy); margin: 1.25rem 0 0.4rem; font-weight: 700; }
.legal-doc-text p, .legal-doc-text li { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.6rem; }

/* ==========================================================================
   Footer (Ergonomic 3-Tier Architecture)
   ========================================================================== */
.footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border-default);
  padding: 4rem 0 2.5rem;
  margin-top: 5rem;
}

.footer-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* Tier 1: 4-column balanced grid */
.footer-top-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr 1.35fr;
  gap: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-col-brand {
  gap: 1rem;
}

.footer-logo {
  margin-bottom: 0.2rem;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.footer-badges-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-mini-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-default);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.footer-col-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border-subtle);
}

.footer-menu-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-menu-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  transition: var(--transition);
  display: inline-block;
}

.footer-menu-links a:hover {
  color: var(--color-blue-institutional);
  text-decoration: underline;
  transform: translateX(2px);
}

.footer-col-contacts {
  gap: 1rem;
}

.footer-contact-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-channel-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-email-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  max-width: 100%;
  box-sizing: border-box;
}

.footer-email-icon {
  flex-shrink: 0;
  color: var(--color-blue-institutional);
}

.footer-email-text {
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: manual;
}

.footer-email-link:hover {
  border-color: var(--color-blue-institutional);
  color: var(--color-blue-institutional);
  background: #f8fafc;
}

.contact-hint {
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  margin-top: 0.2rem;
}

.footer-contact-note {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0.25rem 0 0.5rem;
}

.footer-lawyer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.domain-tag {
  color: var(--color-navy);
  font-weight: 700;
}

/* Tier 3: Legal disclaimer & copyright */
.footer-bottom-disclaimer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-bottom-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.copyright-year {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0;
  white-space: nowrap;
}

.footer-meta-requisites {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.footer-meta-requisites strong {
  color: var(--text-secondary);
}

.disclaimer-text {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: justify;
  margin: 0;
}

@media (max-width: 1120px) {
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .footer-bottom-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .main-system-title { font-size: 2rem; }
  .nav-links { display: none; }
  .grid-3, .lawyers-grid { grid-template-columns: 1fr; }
  .specialist-handoff-card { flex-direction: column; align-items: stretch; }
  .handoff-action { align-items: stretch; text-align: left; margin-top: 1rem; }
  .cost-breakdown { align-items: flex-start; text-align: left; margin-bottom: 0.8rem; }
}

/* ==========================================================================
   Local LLM Streaming & Status Elements
   ========================================================================== */
.streaming-cursor {
  display: inline-block;
  color: var(--color-blue-institutional);
  animation: cursor-blink 0.8s infinite;
  font-weight: 900;
  margin-left: 2px;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.ai-loading-state {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem 0;
  color: var(--text-secondary);
}

.status-dot-online {
  background-color: #10b981 !important;
}

.status-dot-offline {
  background-color: #eab308 !important;
}

.llm-source-badge {
  font-size: 11px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 0.5rem;
  color: var(--color-blue-institutional);
  font-weight: 600;
  vertical-align: middle;
}

.ai-thinking-box {
  background: #f8fafc;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  margin: 1rem 0;
}

.thinking-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 13px;
  color: var(--color-navy);
  margin-bottom: 0.6rem;
}

.thinking-stream-preview {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 90px;
  overflow: hidden;
  line-height: 1.5;
}

.thinking-collapsible {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.5rem;
  font-size: 12px;
}

.thinking-collapsible summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  user-select: none;
}

.thinking-collapsible summary:hover {
  color: var(--color-blue-institutional);
}

.thinking-text-body {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 250px;
  overflow-y: auto;
}

/* ==========================================================================
   City Selection & Regional AI Matching Styles
   ========================================================================== */
.city-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.city-selector-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.city-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
}

.city-select-dropdown {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-blue-institutional);
  cursor: pointer;
  outline: none;
}

.city-select-dropdown:focus {
  border-color: var(--color-blue-institutional);
}

.city-guarantee-note {
  font-size: 12px;
  color: #059669;
  font-weight: 600;
}

.registry-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.registry-city-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.city-select-dropdown-sm {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  outline: none;
}

/* ==========================================================================
   CRM Tabs & Lawyer Registration Form Styles
   ========================================================================== */
.crm-tabs-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 0.5rem;
}

.crm-tab-btn {
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.2rem;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.crm-tab-btn:hover {
  background: var(--bg-subtle);
  color: var(--color-navy);
}

.crm-tab-btn.active {
  background: var(--color-navy);
  color: #ffffff;
  border-color: var(--color-navy);
}

.crm-tab-btn-ghost {
  margin-left: auto;
  background: transparent;
  border: 1px dashed var(--border-default);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.crm-tab-btn-ghost:hover {
  border-color: var(--color-navy);
  color: var(--color-navy);
  background: var(--bg-subtle);
}

.crm-welcome-box {
  background: #ecfdf5;
  border: 1px solid #10b981;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: fadeIn 0.3s ease-in-out;
}

.crm-welcome-title {
  color: #065f46;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.crm-welcome-desc {
  color: #047857;
  font-size: 12px;
  line-height: 1.4;
}

/* БЛОК ЗАГРУЗКИ ФОТОГРАФИИ ДЛЯ ЮРИСТА */
.lawyer-photo-upload-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.lawyer-photo-upload-container:hover {
  border-color: var(--color-blue-institutional);
  background: #f1f5f9;
}

.photo-preview-wrapper {
  position: relative;
  width: 86px;
  height: 86px;
  flex-shrink: 0;
  cursor: pointer;
}

.photo-preview-img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.photo-preview-wrapper:hover .photo-preview-img {
  transform: scale(1.04);
}

.photo-preview-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--color-gold);
  color: #ffffff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border: 2px solid #ffffff;
}

.photo-upload-info {
  flex: 1;
  min-width: 240px;
}

.photo-upload-title {
  font-weight: 700;
  color: var(--color-navy);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.photo-upload-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.photo-upload-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .lawyer-photo-upload-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem;
  }
  .photo-upload-actions {
    justify-content: center;
  }
}

.registration-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.reg-header {
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.2rem;
}

.reg-header h2 {
  font-size: 1.4rem;
  margin: 0.4rem 0;
  color: var(--color-navy);
}

.grid-2-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.grid-3-form {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 1.2rem;
}

@media (max-width: 768px) {
  .grid-2-form, .grid-3-form {
    grid-template-columns: 1fr;
  }
}

.services-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-pill:hover {
  background: #ffffff;
  border-color: var(--color-blue-institutional);
}

.checkbox-pill input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--color-blue-institutional);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.checkbox-pill:has(input:checked) {
  background: #ffffff;
  border-color: var(--color-blue-institutional);
  box-shadow: 0 1px 3px rgba(27, 79, 138, 0.08);
  font-weight: 600;
  color: var(--color-navy);
}

.reg-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Hybrid Monetization Model Styles (0 ₽ Free + 1 790 ₽ VIP)
   ========================================================================== */
.modal-booking-hybrid {
  max-width: 650px !important;
  width: 95%;
}

.tariff-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.2rem 0;
}

@media (max-width: 640px) {
  .tariff-selector-grid {
    grid-template-columns: 1fr;
  }
}

.tariff-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1.1rem;
  background: #ffffff;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tariff-card:hover {
  border-color: var(--color-blue-institutional);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tariff-card.active {
  border-color: var(--color-blue-institutional);
  background: #f8fafc;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.1);
}

.tariff-card.active::before {
  content: "ВЫБРАНО";
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--color-blue-institutional);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
}

.tariff-radio-indicator {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tariff-radio-indicator input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-blue-institutional);
  margin: 0;
}

.tariff-card-content {
  flex: 1;
}

.tariff-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.tariff-badge-popular {
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.tariff-badge-vip {
  background: #ede9fe;
  color: #4f46e5;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.tariff-price-tag {
  font-size: 1.15rem;
  font-weight: 800;
}

.free-tag {
  color: #16a34a;
}

.vip-tag {
  color: #4338ca;
}

.tariff-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0.2rem 0 0.4rem 0;
}

.tariff-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.tariff-features {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tariff-features li {
  margin-bottom: 2px;
}

.tariff-guarantee-note {
  background: #fef2f2;
  border: 1px dashed #f87171;
  border-radius: 6px;
  padding: 6px 8px;
  margin: 0.6rem 0;
  font-size: 11px;
  color: #991b1b;
  line-height: 1.35;
}

.tariff-action-btn {
  width: 100%;
  margin-top: 0.8rem;
  font-size: 12px;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  color: var(--color-navy);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.tariff-action-btn:hover {
  background: #ffffff;
  border-color: var(--color-blue-institutional);
}

.tariff-action-btn.active {
  background: var(--color-blue-institutional);
  color: #ffffff;
  border-color: var(--color-blue-institutional);
}

.btn-stat-replenish {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #10b981;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 0.5rem;
}

.btn-stat-replenish:hover {
  background: #10b981;
  color: #ffffff;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}

@media (max-width: 640px) {
  .packages-grid {
    grid-template-columns: 1fr;
  }
}

.package-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1rem;
  text-align: center;
  background: #ffffff;
  position: relative;
  transition: var(--transition);
}

.package-card:hover {
  border-color: var(--color-blue-institutional);
  box-shadow: var(--shadow-sm);
}

.package-card.featured {
  border: 2px solid var(--color-blue-institutional);
  background: #f8fafc;
}

.package-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  background: var(--color-blue-institutional);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.package-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
}

.package-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-navy);
}

.package-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   SEO & Local Navigation Components
   ========================================================================== */

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-city-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.nav-city-btn:hover {
  background: #ffffff;
  border-color: var(--color-blue-institutional);
  color: var(--color-blue-institutional);
  box-shadow: 0 1px 4px rgba(29, 78, 216, 0.15);
}

.geo-city-badge {
  display: inline-block;
  color: var(--color-blue-institutional);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  font-weight: 700;
}

.city-quick-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
}

.city-quick-selector-btn:hover {
  border-color: var(--color-blue-institutional);
  box-shadow: var(--shadow-sm);
}

.change-link-text {
  color: var(--color-blue-institutional);
  font-weight: 600;
  font-size: 12px;
  text-decoration: underline;
}

/* ==========================================================================
   Section: Legal Knowledge FAQ (LSI & YMYL)
   ========================================================================== */

.legal-knowledge-section {
  padding: 3.5rem 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
}

.faq-accordion-container {
  width: 100%;
  max-width: 100%;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item[open] {
  border-color: var(--color-blue-institutional);
  box-shadow: var(--shadow-md);
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s ease;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary:hover {
  background-color: #f8fafc;
}

.faq-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-civil { background: #dbeafe; color: #1e40af; }
.badge-auto { background: #fef3c7; color: #92400e; }
.badge-family { background: #fce7f3; color: #9d174d; }
.badge-business { background: #e0e7ff; color: #3730a3; }
.badge-criminal { background: #fee2e2; color: #991b1b; }

.faq-question {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.faq-arrow {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
  color: var(--color-blue-institutional);
}

.faq-body {
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: #fafbfd;
}

.faq-legal-law {
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-left: 3px solid var(--color-blue-institutional);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.faq-text-content {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.faq-text-content p {
  margin-bottom: 0.75rem;
}

.faq-steps-list {
  margin: 0.75rem 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-steps-list li {
  line-height: 1.5;
}

.faq-action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

/* ==========================================================================
   Section: Legal Calculator
   ========================================================================== */

.legal-calculator-section {
  padding: 3.5rem 0;
  background: var(--bg-main);
  border-top: 1px solid var(--border-subtle);
}

.calc-workspace-card {
  width: 100%;
  max-width: 100%;
  margin: 2rem auto 0;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.calc-tabs-row {
  display: flex;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
  padding: 0.5rem 0.5rem 0;
  gap: 0.5rem;
  overflow-x: auto;
}

.calc-tab-pill {
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.calc-tab-pill.active {
  background: #ffffff;
  border-color: var(--border-default);
  color: var(--color-blue-institutional);
  margin-bottom: -1px;
}

.calc-pane {
  padding: 2rem;
}

.calc-grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.calc-input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.calc-input-group input[type="number"],
.calc-input-group input[type="date"],
.calc-input-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
}

.calc-input-group input:focus,
.calc-input-group select:focus {
  border-color: var(--color-blue-institutional);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.calc-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.checkbox-label-simple {
  display: flex !important;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.4;
  margin-top: 1.5rem;
}

.calc-result-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
}

.calc-result-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.calc-result-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.calc-result-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-blue-institutional);
  font-family: var(--font-sans);
}

.calc-result-formula {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.calc-result-note {
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   Section: Regional Offices (Local SEO)
   ========================================================================== */

.regional-offices-section {
  padding: 4rem 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
}

.offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.office-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition);
}

.office-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-blue-institutional);
}

.office-card.featured {
  border-color: var(--color-blue-institutional);
  box-shadow: 0 4px 16px -2px rgba(29, 78, 216, 0.12);
}

.office-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.office-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.office-address {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.office-spec {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.office-contacts {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-blue-institutional);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Section: Federal Cities Directory (Footer Hub & 8 Federal Districts)
   ========================================================================== */

.federal-cities-section {
  padding: 1.75rem 0 2rem 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
}

.federal-cities-section .section-header {
  margin-bottom: 0.75rem;
}

.federal-cities-section .section-title {
  font-size: 1.35rem;
  margin-bottom: 0.2rem;
}

.federal-cities-section .section-tag {
  font-size: 10.5px;
  margin-bottom: 0.25rem;
}

.districts-accordion-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  width: 100%;
}

@media (max-width: 1100px) {
  .districts-accordion-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .districts-accordion-grid {
    grid-template-columns: 1fr;
  }
}

.district-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.district-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-sm);
}

.district-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
}

.district-header-text,
.district-icon-title {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.district-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.25;
  margin: 0;
}

.district-code-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.district-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.district-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.district-major-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.district-major-centers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.3rem;
}

.district-city-block,
.district-city-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.25rem 0.35rem;
  min-height: 28px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
  line-height: 1.15;
  word-break: break-word;
  box-shadow: none;
}

.district-city-block:hover,
.district-city-pill:hover {
  background: #eff6ff;
  border-color: var(--color-blue-institutional);
  color: var(--color-blue-institutional);
  box-shadow: none;
  transform: translateY(-1px);
}

.district-city-block.major-pill,
.district-city-pill.major-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
}

.district-city-block.active-city,
.district-city-pill.active-city,
.district-city-btn.active-city {
  background: var(--color-navy) !important;
  color: #ffffff !important;
  border-color: var(--color-navy) !important;
  font-weight: 700 !important;
  box-shadow: none;
}

.district-expand-details {
  margin-top: 0.15rem;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.3rem;
}

.district-expand-summary {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--color-blue-institutional);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
  padding: 0.15rem 0;
  transition: color 0.15s ease;
}

.district-expand-summary:hover {
  color: var(--color-navy);
}

.district-expand-summary::-webkit-details-marker {
  display: none;
}

.expand-caret {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.district-expand-details[open] .expand-caret {
  transform: rotate(180deg);
}

.district-all-cities-scroll {
  margin-top: 0.35rem;
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.35rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Custom scrollbar for city drawer */
.district-all-cities-scroll::-webkit-scrollbar {
  width: 4px;
}
.district-all-cities-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.district-all-cities-scroll::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}
.district-all-cities-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.district-city-btn {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 5px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 3px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.district-city-btn:hover {
  background: #eff6ff;
  border-color: var(--color-blue-institutional);
  color: var(--color-blue-institutional);
}

/* ==========================================================================
   Modal: Russian Cities Selector (1 100+ Cities)
   ========================================================================== */

.modal-city-card {
  max-width: 680px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.city-modal-search-bar {
  position: relative;
  margin: 1.25rem 0 1rem;
}

.city-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
}

.city-modal-search-bar input {
  width: 100%;
  padding: 0.8rem 2.5rem 0.8rem 2.8rem;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.city-modal-search-bar input:focus {
  border-color: var(--color-blue-institutional);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.btn-clear-search {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  font-size: 12px;
}

.top-cities-box {
  margin-bottom: 1rem;
}

.top-cities-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.city-chip-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 0.3rem 0.75rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.city-chip-btn:hover, .city-chip-btn.active {
  background: var(--color-blue-institutional);
  border-color: var(--color-blue-institutional);
  color: #ffffff;
}

.city-search-results-box {
  flex: 1;
  overflow-y: auto;
  max-height: 380px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.city-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.city-search-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.city-search-item.active {
  background: #dbeafe;
  border-color: var(--color-blue-institutional);
}

.city-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.city-item-region {
  font-size: 12px;
  color: var(--text-muted);
}

/* Footer Company Details */
.footer-company-info {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 12px;
  line-height: 1.5;
}

/* ==========================================================================
   ПАНЕЛЬ УПРАВЛЕНИЯ ПЛАТФОРМОЙ (ADMIN DASHBOARD ИП ВАНИН В.В.)
   ========================================================================== */
.btn-admin-nav {
  color: var(--text-secondary);
  font-weight: 600;
  border: 1px solid transparent;
  transition: var(--transition);
}
.btn-admin-nav:hover {
  color: var(--color-navy);
  background: var(--bg-hover);
  border-color: var(--border-color);
}

.admin-container,
.container.admin-container,
main#admin-view .container {
  padding: 1.5rem 1rem 4rem;
  max-width: 1560px !important;
  width: 96% !important;
  margin: 0 auto;
}

/* Строгая верхняя плашка управления */
.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 1.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 4px solid var(--color-navy);
  border-radius: 4px;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.admin-jurisdiction-line {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-jurisdiction-line::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-navy);
  border-radius: 1px;
}

.admin-badge-strip {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.admin-badge-strip .badge {
  border-radius: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 2px 8px;
}

.admin-main-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0.15rem 0 0.35rem;
  line-height: 1.2;
}

.admin-title-desc {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
  max-width: 680px;
}

.admin-actions-bar {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-actions-bar .btn {
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 12px;
}

.btn-danger-outline {
  background: #ffffff;
  border: 1px solid #ef4444;
  color: #dc2626;
  font-weight: 700;
  border-radius: 3px;
  padding: 0.4rem 0.8rem;
  transition: var(--transition);
  cursor: pointer;
  font-size: 12px;
}
.btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.btn-danger {
  background: #dc2626;
  color: white;
  border: 1px solid #b91c1c;
  font-weight: 700;
  border-radius: 3px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
}
.btn-danger:hover {
  background: #b91c1c;
}

.btn-success-outline {
  background: #ffffff;
  border: 1px solid #16a34a;
  color: #15803d;
  font-weight: 700;
  border-radius: 3px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
}
.btn-success-outline:hover {
  background: #f0fdf4;
  border-color: #15803d;
}

.btn-indigo-outline {
  background: #ffffff;
  border: 1px solid #475569;
  color: #1e293b;
  font-weight: 700;
  border-radius: 3px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
}
.btn-indigo-outline:hover {
  background: #f1f5f9;
}

.btn-xs {
  font-size: 11px;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  font-weight: 700;
}

/* Строгие регламентные KPI метрики */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-stat-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 102px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: relative;
  transition: var(--transition);
}

.admin-stat-card:hover {
  border-color: #94a3b8;
}

.admin-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.admin-stat-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.admin-stat-num {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  margin: 0.2rem 0;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.admin-stat-desc {
  font-size: 11.5px;
  color: #475569;
  font-weight: 500;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.35rem;
  margin-top: 0.25rem;
}

/* Строгие вкладки реестра */
.admin-tabs-nav {
  display: flex;
  gap: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-bottom: 2px solid #0f172a;
  border-radius: 4px 4px 0 0;
  margin-bottom: 0;
  overflow: hidden;
}

.admin-tab-btn {
  background: #f8fafc;
  border: none;
  border-right: 1px solid #cbd5e1;
  padding: 0.85rem 1.5rem;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.admin-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  border-bottom: 3px solid #0f172a;
  margin-bottom: -1px;
}

.admin-section-content {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: none;
  padding: 1.5rem;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Строгий блок оповещений Telegram */
.admin-telegram-settings-card {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-left: 4px solid #0f172a !important;
  border-radius: 4px !important;
  padding: 1rem 1.25rem !important;
  margin-bottom: 1.25rem !important;
}

/* Панель поиска и фильтров */
.admin-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.admin-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 0.45rem 0.75rem;
  flex: 1;
  min-width: 280px;
}

.admin-search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  color: #0f172a;
}

.admin-search-box input::placeholder {
  color: #94a3b8;
}

.admin-filter-group select {
  padding: 0.45rem 0.75rem;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-weight: 600;
}

/* Таблица специалистов и лидов */
.admin-table-container {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  overflow-x: auto;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.admin-table th {
  background: #0f172a;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: #f8fafc;
  border: 1px solid #1e293b;
  border-bottom: 2px solid #334155;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
  color: #1e293b;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

.admin-lawyer-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.admin-lawyer-name {
  font-weight: 700;
  color: var(--color-navy);
}

.admin-lawyer-spec-hint {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-actions-cell {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}

.admin-auth-card {
  max-width: 440px;
  text-align: center;
}

/* ==========================================================================
   АВТОМАТИЧЕСКОЕ ОПРЕДЕЛЕНИЕ ГОРОДА (GEOLOCATION & TOAST)
   ========================================================================== */

.city-auto-detect-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.city-auto-detect-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.city-auto-detect-btn:active {
  transform: translateY(0);
}

.modal-city-auto-box {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-modal-auto-detect {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.btn-modal-auto-detect:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.modal-auto-status {
  font-size: 0.8rem;
  font-weight: 600;
  color: #059669;
  width: 100%;
  text-align: center;
}

.city-confirm-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 420px;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.city-toast-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.city-toast-pin {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.city-toast-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.city-toast-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.city-toast-name {
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 700;
}

.city-toast-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.city-toast-close {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.city-toast-close:hover {
  color: #334155;
  background: #f1f5f9;
}

@media (max-width: 640px) {
  .city-confirm-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
    flex-direction: column;
    align-items: flex-start;
  }
  .city-toast-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   24 ВИДА ПРАВОВОЙ ПОМОЩИ (КАТАЛОГ И МОДАЛЬНОЕ ОКНО)
   ========================================================================== */

.services-catalog-section {
  padding: 4.5rem 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.services-search-wrap {
  min-width: 320px;
  max-width: 440px;
  width: 100%;
}

.services-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.services-search-box:focus-within {
  border-color: var(--color-blue-institutional);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.services-search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  width: 100%;
  color: var(--text-primary);
}

.services-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.8rem 0 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.service-filter-btn {
  background: #ffffff;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.service-filter-btn:hover {
  border-color: var(--color-blue-institutional);
  color: var(--color-blue-institutional);
}

.service-filter-btn.active {
  background: var(--color-blue-institutional);
  border-color: var(--color-blue-institutional);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 3px solid #1e3a8a;
  border-radius: 4px;
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
  border-color: #94a3b8;
  border-top-color: #2563eb;
}

.service-card-top {
  margin-bottom: 1rem;
}

.service-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

.service-category-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  border: 1px solid #e2e8f0;
}

.service-law-badge {
  font-size: 11px;
  font-weight: 600;
  color: #1e3a8a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  text-align: right;
  max-width: 220px;
  line-height: 1.3;
  font-family: var(--font-mono, monospace);
}

.service-card-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0.5rem 0 0.5rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.service-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.service-card-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}

.service-card-actions .btn {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  padding: 0.5rem 0.65rem;
  white-space: nowrap;
  border-radius: 4px;
  letter-spacing: 0.01em;
  text-align: center;
}

.service-card-actions .btn-outline {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.service-card-actions .btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.service-card-actions .btn-primary {
  background: #1e3a8a;
  border: 1px solid #1e3a8a;
  color: #ffffff;
}

.service-card-actions .btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.services-search-box .search-lens svg {
  vertical-align: middle;
  color: #64748b;
}

/* Modal Service Detail */
.modal-service-card {
  max-width: 820px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  overflow: hidden;
}

.modal-service-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.service-modal-badge-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.service-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-navy);
  margin: 0 0 0.4rem;
}

.modal-service-body {
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.service-info-block {
  background: #f8fafc;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
}

.service-block-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 0.75rem;
}

.service-check-list, .service-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-check-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  position: relative;
  padding-left: 1.5rem;
}

.service-check-list li::before {
  content: "•";
  position: absolute;
  left: 0.5rem;
  color: var(--color-blue-institutional);
  font-weight: bold;
}

.service-steps-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  position: relative;
  padding-left: 1.5rem;
}

.service-steps-list li::before {
  content: "✓";
  position: absolute;
  left: 0.3rem;
  color: #059669;
  font-weight: 700;
}

.service-price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-default);
}

.service-price-table th, .service-price-table td {
  padding: 0.65rem 1rem;
  font-size: 13px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.service-price-table th {
  background: #f1f5f9;
  color: var(--color-navy);
  font-weight: 700;
  font-size: 12px;
}

.service-price-table td:last-child {
  font-weight: 700;
  color: var(--color-blue-institutional);
  white-space: nowrap;
}

.service-price-disclaimer {
  margin-top: 0.6rem;
  line-height: 1.4;
}

.modal-service-footer {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.modal-service-footer .btn {
  flex: 1;
  min-width: 220px;
}

/* ==========================================================================
   Modal: Lawyer Detail Card (Подробная карточка специалиста из реестра)
   ========================================================================== */
.modal-lawyer-detail-card {
  max-width: 840px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-default);
}

.modal-lawyer-detail-header {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.modal-lawyer-detail-avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-default);
  box-shadow: var(--shadow-sm);
  background: #0f172a;
}

.modal-lawyer-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: top center !important;
  display: block;
}

.modal-lawyer-detail-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #334155;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  user-select: none;
}

.modal-lawyer-detail-main-info {
  flex: 1;
  min-width: 0;
}

.modal-lawyer-badges-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.modal-lawyer-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-navy);
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

.modal-lawyer-role {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.modal-lawyer-rating-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.modal-lawyer-rating-stars {
  color: #f59e0b;
  font-weight: 700;
}

.modal-lawyer-rating-divider {
  color: var(--border-default);
}

.modal-lawyer-reviews-text {
  font-weight: 600;
  color: var(--text-secondary);
}

.modal-lawyer-guarantee-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.modal-lawyer-detail-body {
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.lawyer-detail-section {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
}

.lawyer-detail-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
}

.lawyer-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.65rem 1.25rem;
  font-size: 0.88rem;
}

.lawyer-detail-kv {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lawyer-detail-kv .kv-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.lawyer-detail-kv .kv-value {
  font-weight: 600;
  color: #0f172a;
}

.lawyer-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lawyer-spec-tag {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 3px solid #1e3a8a;
  border-radius: 3px;
  padding: 0.38rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lawyer-bio-content {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #334155;
  white-space: pre-line;
}

.lawyer-detail-guarantees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  border: 1px solid #cbd5e1;
}

.guarantee-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.guarantee-icon {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e3a8a;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
  font-family: "Times New Roman", Times, Georgia, serif;
}

.modal-lawyer-detail-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.modal-lawyer-detail-footer .btn {
  min-width: 180px;
}

@media (max-width: 640px) {
  .modal-lawyer-detail-header {
    flex-direction: column;
    text-align: center;
  }
  .modal-lawyer-badges-row, .modal-lawyer-rating-row {
    justify-content: center;
  }
  .modal-lawyer-detail-footer .btn {
    width: 100%;
  }
}

/* Switch Toggle UI */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 26px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch-toggle input:checked + .switch-slider {
  background-color: var(--color-blue-institutional);
}
.switch-toggle input:checked + .switch-slider:before {
  transform: translateX(22px);
}

.empty-leads-box {
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}


@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .services-search-wrap {
    max-width: 100%;
  }
}

@media (max-width: 1200px) {
  .nav-container {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }
  .nav-links {
    gap: 0.45rem;
    margin: 0 0.25rem;
  }
  .nav-link {
    font-size: 12px;
    padding: 0.35rem 0.15rem;
  }
  .beta-badge {
    display: none;
  }
  .btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 12.5px;
  }
}

@media (max-width: 1040px) {
  .nav-links {
    display: none;
  }
  .nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .nav-container {
    padding: 0 0.5rem;
  }
  .btn-sm {
    padding: 0.3rem 0.55rem;
    font-size: 11.5px;
  }
  #mode-switch-text {
    display: none;
  }
  #mode-switch-btn::after {
    content: "CRM";
    font-size: 11.5px;
    font-weight: 700;
  }
}

/* ==========================================================================
   МОДЕРАЦИЯ И ВЕРИФИКАЦИЯ СПЕЦИАЛИСТОВ (СТИЛЬ ЮРПОМ)
   ========================================================================== */
.moderation-banner-pending {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 4px solid var(--color-blue-institutional, #1d4ed8);
  border-radius: var(--radius-md, 10px);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  animation: fadeIn 0.3s ease-in-out;
}

.moderation-banner-rejected {
  background: #ffffff;
  border: 1px solid #fecaca;
  border-top: 4px solid #dc2626;
  border-radius: var(--radius-md, 10px);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  animation: fadeIn 0.3s ease-in-out;
}

.moderation-banner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.moderation-banner-header-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.moderation-banner-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.08);
}

.moderation-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-navy, #0f172a);
  margin: 0;
  line-height: 1.3;
}

.moderation-banner-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 500;
}

.moderation-banner-badge-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.moderation-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d97706;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
  animation: pulse-amber 2s infinite;
}

@keyframes pulse-amber {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(217, 119, 6, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
  }
}

.moderation-banner-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.95rem 1.15rem;
}

.moderation-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.moderation-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.moderation-data-table thead th {
  background: #f1f5f9;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  border-bottom: 2px solid #cbd5e1;
}

.moderation-data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: middle;
}

.moderation-data-table tbody tr:last-child td {
  border-bottom: none;
}

.moderation-data-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.moderation-data-table tbody tr:hover {
  background: #f0fdf4;
}

.mod-table-param {
  font-weight: 600;
  color: var(--color-navy, #0f172a);
  white-space: nowrap;
}

.mod-table-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
}

.mod-chip-value {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 4px 10px;
  width: fit-content;
}

.moderation-banner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}

.moderation-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.moderation-card:hover {
  border-color: var(--color-blue-institutional);
  box-shadow: var(--shadow-md);
}

.badge-warning {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.badge-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.admin-quick-filter-pills {
  display: flex;
  gap: 4px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.admin-pill-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition);
}

.admin-pill-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.admin-pill-btn.active {
  background: #0f172a;
  color: #ffffff !important;
  border-color: #0f172a;
}

.verify-details-row td {
  background: #f8fafc;
  padding: 0.85rem 1.25rem !important;
  border: 1px solid #cbd5e1 !important;
}

/* Официальные институциональные штампы статуса */
.status-stamp {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 2px;
  border: 1px solid currentColor;
  line-height: 1.2;
}

.status-stamp.pending {
  color: #92400e;
  background: #fef3c7;
  border-color: #f59e0b;
}

.status-stamp.active {
  color: #166534;
  background: #dcfce7;
  border-color: #22c55e;
}

.status-stamp.rejected {
  color: #991b1b;
  background: #fee2e2;
  border-color: #ef4444;
}

.status-stamp.blocked {
  color: #334155;
  background: #f1f5f9;
  border-color: #64748b;
}


/* ==========================================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ И ОТЗЫВЧИВЫЙ ДИЗАЙН (MOBILE-FIRST RESPONSIVE SUITE)
   ========================================================================== */

/* 1. Кнопка мобильного гамбургер-меню */
.nav-mobile-toggle {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  transition: var(--transition);
  color: var(--text-primary);
  flex-shrink: 0;
  outline: none;
}

.nav-mobile-toggle:hover,
.nav-mobile-toggle:focus-visible {
  background: var(--bg-subtle);
  border-color: var(--color-blue-institutional);
}

.nav-mobile-toggle .hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-mobile-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-mobile-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-mobile-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 2. Боковая шторка мобильной навигации (Mobile Nav Drawer) */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 86vw;
  height: 100%;
  height: 100dvh;
  background: #ffffff;
  z-index: 2000;
  box-shadow: -4px 0 25px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  pointer-events: none;
}

.mobile-nav-drawer.is-open {
  right: 0;
  pointer-events: auto;
}

.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.mobile-nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
  flex-shrink: 0;
}

.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-nav-brand .brand-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.5px;
}

.mobile-nav-brand .mobile-nav-badge {
  font-size: 11px;
  font-weight: 700;
  background: #f0fdf4;
  color: #15803d;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.mobile-nav-close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  line-height: 1;
}

.mobile-nav-close-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.mobile-nav-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-city-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-city-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.mobile-city-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
  cursor: pointer;
  width: 100%;
}

.mobile-city-btn:hover {
  border-color: var(--color-blue-institutional);
  color: var(--color-blue-institutional);
}

.mobile-city-arrow {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.8rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
  background: var(--bg-subtle);
  color: var(--color-blue-institutional);
}

.mobile-nav-item .nav-item-icon {
  font-size: 16px;
  width: 24px;
  display: inline-flex;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-nav-footer-actions {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* 3. Адаптивность для экранов планшетов и ноутбуков (<= 1040px) */
@media (max-width: 1040px) {
  .nav-links {
    display: none !important;
  }
  .nav-mobile-toggle {
    display: flex;
  }
  .nav-actions {
    margin-left: auto;
    gap: 0.5rem;
  }
  #nav-reg-btn {
    display: none;
  }
}

/* 4. Глубокая адаптивность под смартфоны (<= 768px) */
@media (max-width: 768px) {
  /* Защита от автозума в iOS Safari */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Контейнер страницы */
  .container {
    padding: 0 1rem;
    width: 100%;
    max-width: 100%;
  }

  /* Шапка */
  .navbar {
    height: 60px;
  }
  .nav-container {
    padding: 0 0.75rem;
    gap: 0.4rem;
  }
  .brand-logo {
    font-size: 1.15rem;
    gap: 0.35rem;
  }
  .online-status-badge {
    font-size: 10.5px;
    padding: 2px 6px;
  }
    .nav-actions .btn-sm,
  .nav-actions #nav-login-btn,
  .nav-actions .nav-city-btn {
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 0 0.65rem;
    font-size: 12px;
    line-height: 32px;
  }

  /* Верхний аналитический блок ИИ */
  .top-search-section {
    padding: 1.5rem 0 2rem;
  }
  .system-status-tag {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 0.4rem;
  }
  .main-system-title {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
    line-height: 1.25;
    margin-bottom: 0.6rem;
  }
  .system-desc {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  /* Блок селектора города */
  .city-selector-bar {
    padding: 0.75rem;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }
  .city-selector-inner {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
  }
  .city-label {
    font-size: 12px;
  }
  .city-quick-selector-btn {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 13px;
    justify-content: space-between;
    min-height: 44px;
    white-space: normal;
    text-align: left;
  }
  .city-auto-detect-btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    font-size: 13px;
  }
  .city-guarantee-note {
    font-size: 11.5px;
    text-align: center;
    width: 100%;
  }

  /* Форма поиска и ввода вопроса */
  .search-box-executive {
    cursor: text;
    position: relative;
    z-index: 10;
  }
  .search-input-wrapper {
    padding: 0.85rem;
    gap: 0.5rem;
    cursor: text;
  }
  .search-icon-symbol {
    font-size: 1.25rem;
    pointer-events: none;
  }
  #ai-input {
    font-size: 16px !important;
    min-height: 85px;
    width: 100%;
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-appearance: none;
    -webkit-user-select: text;
    user-select: text;
  }
  .search-action-bar {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
  }
  .security-meta {
    width: 100%;
    justify-content: space-between;
    font-size: 11px;
    gap: 0.5rem;
  }
  .btn-search-execute {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 14px;
    min-height: 48px;
    justify-content: center;
  }

  /* Быстрые подсказки-запросы: плавный свайп */
  .quick-cases-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.4rem;
    margin-bottom: 0.85rem;
    gap: 0.4rem;
  }
  .quick-cases-row::-webkit-scrollbar {
    display: none;
  }
  .prompt-pill {
    flex-shrink: 0;
    font-size: 12px;
    padding: 0.4rem 0.75rem;
    white-space: nowrap;
  }

  /* Блок консультации ИИ */
  .ai-consultation-panel {
    margin-top: 0.65rem;
    margin-bottom: 1.25rem;
  }
  .panel-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }
  .ai-report-content {
    padding: 1.25rem 1rem;
    font-size: 14px;
    line-height: 1.65;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .ai-report-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.85rem 0;
  }
  .ai-report-content pre,
  .ai-report-content code {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .ai-report-content p, .ai-report-content ul {
    margin-bottom: 0.85rem;
  }
  .ai-report-content h3 {
    font-size: 15.5px;
  }
  .escalation-box {
    padding: 1.25rem 1rem;
  }
  .ai-conclusion-callout {
    padding: 1rem;
    margin-bottom: 1.25rem;
  }
  .specialist-handoff-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem 1rem;
  }
  .handoff-meta {
    min-width: 0;
    width: 100%;
  }
  .specialist-profile-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
  .specialist-photo {
    width: 76px;
    height: 76px;
  }
  .specialist-details h3 {
    font-size: 1.15rem;
  }
  .tags-inline {
    justify-content: center;
    flex-wrap: wrap;
  }
  #book-consult-btn {
    width: 100%;
    min-height: 48px;
    font-size: 14.5px;
    justify-content: center;
  }

  /* Каталог 24 услуг */
  .section-header.flex-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .services-search-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .services-search-box {
    width: 100%;
  }
  .services-search-box input {
    width: 100%;
    font-size: 16px !important;
    min-height: 44px;
  }
  .services-filter-bar {
    margin-bottom: 1.25rem;
  }
  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem;
    padding-bottom: 0.4rem;
  }
  .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .service-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12.5px;
    padding: 0.4rem 0.75rem;
  }
  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .service-card {
    padding: 1.25rem 1rem;
  }
  .service-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .service-card-footer .btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  /* Реестр адвокатов */
  .lawyers-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .lawyer-card {
    padding: 1.25rem 1rem;
  }
  .lawyer-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
  .lawyer-card-badges,
  .lawyer-card-rating {
    justify-content: center;
    flex-wrap: wrap;
  }
  .lawyer-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .lawyer-card-footer .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* Интерактивный калькулятор */
  .calc-pane {
    padding: 1.25rem 1rem;
  }
  .calc-grid-form {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .calc-tabs-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .calc-tabs-row::-webkit-scrollbar {
    display: none;
  }
  .calc-tab-pill {
    padding: 0.6rem 0.85rem;
    font-size: 12.5px;
    flex-shrink: 0;
  }
  .calc-result-box {
    margin-top: 1.25rem;
    padding: 1rem;
  }
  .calc-result-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .calc-result-val {
    font-size: 1.6rem;
  }

  /* Гарантии, представительства, 1100+ городов */
  .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .offices-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .districts-accordion-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .district-major-centers {
    grid-template-columns: 1fr !important;
    gap: 0.4rem;
  }

  /* Модальные окна */
  .modal-overlay {
    z-index: 5000 !important;
    padding: 10px;
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-card,
  .modal-lg,
  .modal-booking-hybrid,
  .modal-city-card,
  .modal-service-card,
  .modal-lawyer-detail-card {
    width: calc(100vw - 20px) !important;
    max-width: 100% !important;
    margin: 12px auto !important;
    padding: 1.25rem 1rem !important;
    max-height: 92dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .modal-close-btn {
    top: 0.6rem;
    right: 0.6rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .tariff-selector-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .tariff-card {
    padding: 0.85rem;
  }

  /* Всплывающая плашка подтверждения города */
  .city-confirm-toast {
    min-width: 0 !important;
    width: calc(100vw - 24px) !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
    padding: 0.85rem 1rem !important;
  }
  .city-confirm-toast .btn {
    width: 100%;
    min-height: 40px;
  }

  /* Подвал сайта */
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.6rem;
  }

  /* Кабинет юриста и Админ-панель */
  .crm-container,
  .admin-container {
    padding: 1rem 0.5rem;
    width: 100%;
    max-width: 100%;
  }
  .crm-header {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .crm-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem;
  }
  .crm-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .grid-2-form, .grid-3-form {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .admin-stat-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem;
  }
  .admin-table-container,
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    margin-top: 0.75rem;
  }
}

/* 5. Ультракомпактные экраны (<= 480px) */
@media (max-width: 480px) {
  .nav-container {
    padding: 0 0.5rem;
  }
  .brand-logo {
    font-size: 1.1rem;
  }
  .online-status-badge {
    display: none;
  }
    .nav-actions #nav-login-btn,
  .nav-actions .btn-sm,
  .nav-actions .nav-city-btn {
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    padding: 0 0.55rem;
    font-size: 11.5px;
    line-height: 30px;
  }
  .main-system-title {
    font-size: 1.3rem;
  }
  .crm-stats,
  .admin-stat-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   CALLCHECK AUTHENTICATION UI (SMS.RU /api/call)
   ========================================================================== */
.callcheck-intro-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin: 1.25rem 0 1rem;
}
.callcheck-intro-text {
  font-size: 14px;
  color: #334155;
  margin-bottom: 12px;
  line-height: 1.45;
}
.callcheck-dial-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff !important;
  font-size: 1.35rem;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}
.callcheck-dial-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
}
.callcheck-dial-action-btn:active {
  transform: translateY(0);
}
.callcheck-subhint {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
  margin-top: 6px;
}
.callcheck-status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}
.callcheck-status-badge.waiting {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}
.callcheck-status-badge.verified {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
}
.callcheck-status-badge.expired {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.callcheck-pulse-ring {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  animation: callcheck-pulse 1.6s infinite;
  flex-shrink: 0;
}
@keyframes callcheck-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* ==========================================================================
   Универсальное модальное окно уведомлений и диалогов (в стиле ЮРПОМ)
   ========================================================================== */
.modal-alert-overlay {
  z-index: 10050 !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(15, 23, 42, 0.72) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.25rem !important;
}

.modal-alert-overlay.hidden {
  display: none !important;
}

.modal-alert-card {
  max-width: 480px !important;
  width: 100% !important;
  padding: 2.25rem 2rem 2rem 2rem !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
  text-align: center;
  position: relative;
  transform: scale(0.95);
  opacity: 0;
  animation: appAlertPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  margin: auto !important;
}

@keyframes appAlertPopIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.alert-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}

.alert-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.alert-icon-wrapper.success {
  background: #ecfdf5;
  color: #059669;
  border: 2px solid #a7f3d0;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.18);
}

.alert-icon-wrapper.error {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #fecaca;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.18);
}

.alert-icon-wrapper.warning {
  background: #fffbeb;
  color: #d97706;
  border: 2px solid #fde68a;
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.18);
}

.alert-icon-wrapper.info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 2px solid #bfdbfe;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.18);
}

.alert-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-text-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.alert-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.alert-message {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  white-space: pre-line;
  word-break: break-word;
  max-height: 50vh;
  overflow-y: auto;
  padding: 0 0.5rem;
  text-align: center;
}

.alert-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
  width: 100%;
}

.btn-alert-action {
  min-width: 140px;
  padding: 0.75rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-alert-action:focus-visible {
  outline: 2px solid var(--color-blue-institutional, #1d4ed8);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .modal-alert-card {
    padding: 1.75rem 1.25rem 1.5rem 1.25rem !important;
    border-radius: 14px !important;
  }
  .alert-title {
    font-size: 1.15rem;
  }
  .alert-message {
    font-size: 0.9rem;
    padding: 0;
  }
  .alert-actions {
    flex-direction: column-reverse;
    gap: 0.6rem;
  }
  .btn-alert-action {
    width: 100%;
  }
}
