﻿/* в•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђ
   Bauphoto Design System v5 вЂ” Clean rewrite
   Modern SaaS / field-work tool. Single definition
   per component. No layered overrides.
   в•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђв•ђ */

/* в”Ђв”Ђ 1. Design Tokens в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
:root {
  /* Primary вЂ” vivid emerald */
  --c-primary:        #1E4D5C;
  --c-primary-dark:   #163842;
  --c-primary-deeper: #102E38;
  --c-primary-light:  #E9F1F2;
  --c-primary-soft:   #D6E4E7;
  --c-primary-ring:   #5FA8B3;

  /* Top bar */
  --c-topbar:       #163842;
  --c-topbar-2:     #1E4D5C;
  --c-topbar-text:  #F0F5F6;
  --c-topbar-muted: rgba(240,245,246,0.78);

  /* Surfaces */
  --c-bg:          #F6F4EF;
  --c-surface:     #ffffff;
  --c-surface-alt: #FBF9F5;
  --c-surface-2:   #F0EDE7;

  /* Borders */
  --c-border:        #E7E2DA;
  --c-border-strong: #D4CEC4;
  --c-border-focus:  #3A7A8A;

  /* Text */
  --c-text:           #14242E;
  --c-text-secondary: #334A55;
  --c-text-muted:     #5E727D;

  /* Stage */
  --c-before:      #3E7CB1;
  --c-before-bg:   #EBF2F8;
  --c-before-text: #28527A;
  --c-during:      #C96A1B;
  --c-during-bg:   #FAF0E3;
  --c-during-text: #9A5212;
  --c-after:       #2E7D4D;
  --c-after-bg:    #E9F3EC;
  --c-after-text:  #1F5C37;

  /* Status */
  --c-active-bg:    #E4EFE9; --c-active-text:    #1F5C37;
  --c-paused-bg:    #FAF0E3; --c-paused-text:    #8A5A17;
  --c-completed-bg: #E9EDF5; --c-completed-text: #2B4A75;

  /* Danger / warning */
  --c-danger:        #C0392B;
  --c-danger-bg:     #F9ECEB;
  --c-danger-border: #EECBC7;
  --c-warning:       #B8860B;
  --c-warning-bg:    #FBF6E9;

  /* Radius */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-2xl:  20px;
  --r-full: 9999px;

  /* Shadows вЂ” actually visible */
  --sh-xs:   0 1px 2px rgba(0,0,0,0.08);
  --sh-sm:   0 1px 3px rgba(0,0,0,0.09), 0 4px 12px rgba(0,0,0,0.07);
  --sh-card: 0 1px 3px rgba(0,0,0,0.09), 0 4px 16px rgba(0,0,0,0.08);
  --sh-md:   0 2px 6px rgba(0,0,0,0.10), 0 8px 24px rgba(0,0,0,0.09);
  --sh-lg:   0 4px 12px rgba(0,0,0,0.11), 0 16px 40px rgba(0,0,0,0.09);
  --sh-xl:   0 8px 24px rgba(0,0,0,0.13), 0 24px 64px rgba(0,0,0,0.10);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Consolas', 'Fira Code', monospace;
}

/* в”Ђв”Ђ 2. Reset + base в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  padding: 2rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p { color: var(--c-text-secondary); line-height: 1.6; }
a { color: var(--c-primary); }
h1, h2, h3, h4 { color: var(--c-text); line-height: 1.25; }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--c-surface-alt);
  padding: 1px 5px;
  border-radius: var(--r-xs);
  border: 1px solid var(--c-border);
}

/* в”Ђв”Ђ 3. Top bar в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--c-topbar);
  color: var(--c-topbar-text);
  padding: 0 1.5rem;
  min-height: 56px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 4px 16px rgba(0,0,0,0.25);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--c-topbar-text);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.15s;
}
.app-title::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%2334d399'/%3E%3Cstop offset='.55' stop-color='%2310b981'/%3E%3Cstop offset='1' stop-color='%23047857'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='24' height='24' rx='7' fill='url(%23l)'/%3E%3Cpath d='M12 20.5s-5.4-5-5.4-9.2A5.4 5.4 0 0 1 12 5.9a5.4 5.4 0 0 1 5.4 5.4c0 4.2-5.4 9.2-5.4 9.2z' fill='%23fff'/%3E%3Ccircle cx='12' cy='11.1' r='2.7' fill='%2310b981'/%3E%3Ccircle cx='12' cy='11.1' r='1.2' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
  box-shadow: 0 2px 6px rgba(16,185,129,0.4);
  flex-shrink: 0;
}
.app-title:hover { opacity: 0.8; text-decoration: none; }
.app-title-short { display: none; }

.btn-link {
  background: none;
  border: none;
  color: var(--c-topbar-muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: var(--font);
  padding: 0.25rem 0;
  text-decoration: none;
  transition: color 0.15s;
  line-height: 1;
}
.btn-link:hover { color: var(--c-topbar-text); }

.top-bar-team-btn {
  color: var(--c-topbar-muted);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s;
}
.top-bar-team-btn:hover { color: var(--c-topbar-text); text-decoration: none; }

.top-bar-pill-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  color: var(--c-topbar-text);
  border: 1px solid rgba(255,255,255,0.14);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
  line-height: 1.6;
  transition: background 0.15s;
  cursor: pointer;
  font-family: var(--font);
}
.top-bar-pill-btn:hover { background: rgba(255,255,255,0.16); color: #fff; text-decoration: none; }
.top-bar-pill-btn:active { transform: scale(0.96); }

.log-nav-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(217,119,6,0.18);
  color: #EBD9A4;
  border: 1px solid rgba(217,119,6,0.32);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
  line-height: 1.5;
  transition: background 0.15s;
}
.log-nav-btn:hover { background: rgba(217,119,6,0.35); color: #fef08a; text-decoration: none; }
.log-nav-btn:active { transform: scale(0.95); }

.pending-nav-badge {
  background: #B8860B !important;
  color: #fff !important;
  border-radius: var(--r-full) !important;
  font-weight: 600 !important;
}
.pending-nav-badge:hover { background: #996F0B !important; }

/* в”Ђв”Ђ 4. Language switcher в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.lang-switcher-wrap { position: relative; display: flex; align-items: center; }

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--c-topbar-muted);
  border-radius: var(--r-sm);
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  min-width: 2.5rem;
  text-align: center;
  line-height: 1.5;
  transition: border-color 0.12s, color 0.12s;
}
.lang-btn:hover,
.lang-switcher-open .lang-btn { border-color: rgba(255,255,255,0.6); color: var(--c-topbar-text); }

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  min-width: 4rem;
  z-index: 1200;
  overflow: hidden;
}
.lang-switcher-open .lang-menu { display: block; animation: fade-down 0.12s var(--ease-out) both; }

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lang-menu-item {
  display: block;
  width: 100%;
  padding: 0.38rem 0.8rem;
  font-size: 0.76rem;
  font-family: var(--font);
  font-weight: 500;
  color: var(--c-text);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}
.lang-menu-item:hover { background: var(--c-surface-alt); }
.lang-menu-item--active { font-weight: 700; color: var(--c-primary); background: var(--c-primary-light); }
.lang-menu-item--active:hover { background: var(--c-primary-soft); }

/* Auth screens вЂ” lang switcher on light bg */
.screen .lang-switcher-wrap { margin-bottom: 0.75rem; }
.screen .lang-btn { border-color: var(--c-border); color: var(--c-text-secondary); background: var(--c-surface-alt); }
.screen .lang-btn:hover,
.screen .lang-switcher-open .lang-btn { border-color: var(--c-border-focus); color: var(--c-text); }

/* в”Ђв”Ђ 5. Page layout в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
}

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c-border);
}
.page-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--c-text);
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.user-info {
  font-size: 0.8rem;
  color: var(--c-text-secondary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.detail-back { margin-bottom: 0.85rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--c-text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem 0.35rem 0.55rem;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  box-shadow: var(--sh-xs);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.back-link:hover { background: var(--c-surface-2); border-color: var(--c-border-strong); color: var(--c-text); text-decoration: none; }

.section-title { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--c-text); }
.section-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.section-title-row .section-title { margin-bottom: 0; }
.stage-section { margin-bottom: 1.25rem; }
.stage-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-text-muted); margin-bottom: 0.5rem; }
.divider { border: none; border-top: 1px solid var(--c-border); margin: 1rem 0; }

/* в”Ђв”Ђ 6. Auth screens (login / register / pending) в”Ђв”Ђв”Ђ */
.screen {
  max-width: 420px;
  margin: clamp(1.5rem, 7vh, 5rem) auto;
  background: var(--c-surface);
  border-radius: var(--r-2xl);
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-xl);
  overflow: hidden;
  position: relative;
  animation: screen-in 0.28s var(--ease-out) both;
}
.screen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary-deeper), var(--c-primary), #5FA8B3, var(--c-primary));
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.screen-brand {
  text-align: center;
  padding: 2.25rem 2.5rem 1.75rem;
  background: linear-gradient(160deg, var(--c-primary-light) 0%, #FBF9F5 60%, #F0EDE7 100%);
  border-bottom: 1px solid rgba(184,212,216,0.55);
  margin-bottom: 0;
}

.screen-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #D6E4E7 0%, #8FC2CB 100%);
  border: 1.5px solid rgba(95,168,179,0.45);
  border-radius: var(--r-xl);
  box-shadow: 0 2px 12px rgba(95,168,179,0.3), 0 0 0 5px rgba(95,168,179,0.1), inset 0 1px 0 rgba(255,255,255,0.7);
  color: var(--c-primary-deeper);
}
.screen-logo svg { width: 24px; height: 24px; flex-shrink: 0; }

/* Screen card form area */
.screen form,
.screen > .screen-links,
.screen > p,
.screen > button,
.screen > .lang-switcher-wrap,
.screen > .error-msg,
.screen > .success-msg {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}
.screen form { padding-top: 1.75rem; padding-bottom: 0.25rem; }

.screen > .lang-switcher-wrap {
  position: absolute;
  top: 1rem;
  right: 1rem;
  margin: 0;
  padding: 0;
}

.screen h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--c-text);
  margin-bottom: 0.15rem;
}
.screen-subtitle { font-size: 0.8rem; color: var(--c-text-muted); margin: 0; }
.screen-form-title { font-size: 0.9rem; font-weight: 500; color: var(--c-text-secondary); margin-top: 0.2rem; }

.screen-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.5rem;
  padding-bottom: 1.75rem;
  font-size: 0.84rem;
  flex-wrap: wrap;
}
.screen-links a { color: var(--c-primary); text-decoration: none; font-weight: 500; }
.screen-links a:hover { text-decoration: underline; }
.screen-links-sep { color: var(--c-text-muted); font-size: 0.7rem; }

/* Centered variant вЂ” pending / confirm */
.screen--center { text-align: center; }
.screen--center .screen-brand { padding-bottom: 2rem; }
.screen--center > .screen-desc,
.screen--center > .screen-user-email,
.screen--center > button { padding-left: 2.5rem; padding-right: 2.5rem; }

.screen-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #FAF0E3, #F2DFB5);
  border-radius: 18px;
  border: 1.5px solid rgba(184,134,11,0.3);
  box-shadow: 0 2px 10px rgba(184,134,11,0.2), 0 0 0 5px rgba(184,134,11,0.08);
}
.screen-heading { font-size: 1.2rem; font-weight: 700; color: var(--c-text); letter-spacing: -0.02em; }
.screen-desc { color: var(--c-text-secondary); font-size: 0.88rem; max-width: 320px; margin: 0 auto 0.5rem; line-height: 1.6; }
.screen-user-email { display: block; color: var(--c-text-muted); font-size: 0.8rem; margin-bottom: 1.5rem; word-break: break-all; }

.stage-note {
  display: inline-block;
  background: var(--c-primary-light);
  color: var(--c-primary-deeper);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}
.login-demo-hint {
  font-size: 0.72rem;
  color: var(--c-text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--c-border);
  padding: 0.75rem 2.5rem 1.25rem;
}

/* в”Ђв”Ђ 7. Buttons в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.72rem 1.4rem;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  letter-spacing: -0.005em;
  min-height: 44px;
  transition: opacity 0.15s, transform 0.1s var(--ease-out), box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(5,120,85,0.25), 0 3px 10px rgba(5,120,85,0.20), inset 0 1px 0 rgba(255,255,255,0.14);
}
.btn:hover:not(:disabled):not([disabled]) {
  opacity: 0.93;
  box-shadow: 0 2px 4px rgba(5,120,85,0.30), 0 6px 16px rgba(5,120,85,0.24), inset 0 1px 0 rgba(255,255,255,0.14);
}
.btn:active:not(:disabled):not([disabled]) { transform: scale(0.97); box-shadow: var(--sh-xs); }
.btn:disabled, .btn[disabled] { background: var(--c-border-strong); color: var(--c-text-muted); cursor: not-allowed; box-shadow: none; opacity: 0.75; }
.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; box-shadow: 0 0 0 4px rgba(16,185,129,0.22); }

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
  box-shadow: none;
}
.btn-outline:hover:not(:disabled) { background: var(--c-primary-light); box-shadow: none; opacity: 1; }
.btn-outline:active:not(:disabled) { transform: scale(0.97); }

.btn-small {
  width: auto;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  min-height: 34px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-small:active { transform: scale(0.97); }

.btn-disabled {
  background: var(--c-border);
  color: var(--c-text-muted);
  cursor: not-allowed;
  width: auto;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--r-md);
  border: none;
  display: inline-block;
}

.btn-retry {
  white-space: nowrap;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--c-text-secondary);
  font-family: var(--font);
  transition: background 0.12s;
}
.btn-retry:hover { background: var(--c-surface-alt); }

.add-object-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.72rem 1.15rem;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  min-height: 44px;
  box-shadow: 0 1px 2px rgba(5,120,85,0.25), 0 3px 10px rgba(5,120,85,0.20), inset 0 1px 0 rgba(255,255,255,0.14);
  transition: opacity 0.15s, transform 0.1s var(--ease-out);
}
.add-object-btn::before { content: '+'; font-size: 1.05rem; font-weight: 600; line-height: 1; }
.add-object-btn:hover { opacity: 0.92; color: #fff; text-decoration: none; }
.add-object-btn:active { transform: scale(0.98); }

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
  min-height: 32px;
}
.btn-action:hover { background: var(--c-surface-alt); border-color: var(--c-border-strong); color: var(--c-text); text-decoration: none; }
.btn-action:active { transform: scale(0.96); }
.btn-action-danger { color: var(--c-danger); border-color: var(--c-danger-border); background: var(--c-danger-bg); }
.btn-action-danger:hover { background: #fee2e2; border-color: var(--c-danger); color: var(--c-danger); }
.btn-action-success { color: var(--c-primary-deeper); border-color: var(--c-primary-ring); background: var(--c-primary-light); }
.btn-action-success:hover { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-primary-deeper); }

/* в”Ђв”Ђ 8. Forms в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: -0.005em;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-md);
  font-size: 0.95rem;
  font-family: var(--font);
  font-weight: 500;
  color: var(--c-text);
  background: #fff;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
  width: 100%;
  min-height: 44px;
}
/* Typed text must be clearly visible (esp. passwords) */
.form-group input,
.form-group select,
.form-group textarea { letter-spacing: normal; }
.form-group input[type="password"],
.form-group input[type="text"].pw-visible { font-weight: 600; color: var(--c-text); }
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #5E727D; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: #fff;
  color: var(--c-text);
  border-color: var(--c-border-focus);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.22);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #5E727D; opacity: 1; font-weight: 400; }
.form-group textarea { min-height: 72px; resize: vertical; }

.form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 80px; }

.form-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 1.35rem 1.5rem 0.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--sh-xs);
}
.form-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.form-section-label::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }

.optional { font-size: 0.72rem; color: var(--c-text-muted); font-weight: normal; }
.required-star { color: #C0392B; font-weight: 700; }
.field-note { font-size: 0.78rem; color: var(--c-text-muted); margin-bottom: 0.8rem; font-style: italic; line-height: 1.5; }
.field-label { font-size: 0.8rem; font-weight: 600; color: var(--c-text); margin-bottom: 0.45rem; }

/* Stage chips (photo_point.js) — TASK11
   Прості значки + власний колір кожної стадії ЗАВЖДИ (не лише при виборі):
   before = синій, during = помаранчевий, after = зелений.
   Вибраний чіп заливається своїм кольором; невибрані — бліді (opacity .55).
   --c-before/--c-during/--c-after однакові в light і dark;
   --c-*-bg перевизначені для dark у блоці DARK MODE. */
.stage-chip-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
}
.stage-chip {
  --stage-c: var(--c-text-muted);
  --stage-soft: var(--c-surface-alt);
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  min-width: 0;
  min-height: 64px;
  padding: 0.55rem 0.4rem;
  border: 2px solid var(--stage-c);
  border-radius: var(--r-md);
  background: var(--stage-soft);
  color: var(--stage-c);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  opacity: 0.55;
  position: relative;
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.stage-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--stage-c);
}
.stage-svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: stroke 0.2s ease;
}
.stage-chip-label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* States */
.stage-chip:hover { opacity: 0.85; }
.stage-chip:focus-visible {
  opacity: 1;
  outline: 2px solid var(--stage-c);
  outline-offset: 2px;
  border-radius: var(--r-md);
}
.stage-chip:active { transform: scale(0.97); }

/* Вибрана стадія — яскрава заливка своїм кольором, біла іконка */
.stage-chip--active {
  opacity: 1;
  background: var(--stage-c);
  border-color: var(--stage-c);
  color: #fff;
  box-shadow: var(--sh-sm);
}
.stage-chip--active .stage-chip-icon { color: #fff; }
.stage-chip--active .stage-svg { stroke: #fff; }
.stage-chip--active .stage-chip-label { font-weight: 800; }

/* Кольори стадій */
.stage-chip[data-stage="before"] { --stage-c: var(--c-before); --stage-soft: var(--c-before-bg); }
.stage-chip[data-stage="during"] { --stage-c: var(--c-during); --stage-soft: var(--c-during-bg); }
.stage-chip[data-stage="after"]  { --stage-c: var(--c-after);  --stage-soft: var(--c-after-bg); }

.stage-chip[disabled],
.stage-chip:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* Ширші екрани — три чіпи в один ряд, іконка над текстом */
@media (min-width: 560px) {
  .stage-chip-group { flex-direction: row; flex-wrap: nowrap; gap: 0.55rem; }
  .stage-chip {
    flex: 1 1 0;
    width: auto;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    min-height: 72px;
  }
  .stage-chip-icon { width: 24px; height: 24px; }
  .stage-chip-label { font-size: 0.85rem; }
}

.error-msg {
  color: var(--c-danger);
  font-size: 0.84rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--c-danger-bg);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c-danger);
}
.success-msg {
  color: #1F5C37;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--c-primary-light);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c-primary);
  line-height: 1.5;
}

.search-input {
  width: 100%;
  padding: 0.68rem 0.9rem 0.68rem 2.4rem;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--font);
  background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23647587' stroke-width='2'/%3E%3Cpath d='M20 20l-3.5-3.5' stroke='%23647587' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0.9rem center;
  background-size: 15px;
  color: var(--c-text);
  margin-bottom: 1rem;
  min-height: 42px;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.search-input:focus { outline: none; background-color: #fff; border-color: var(--c-border-focus); box-shadow: 0 0 0 3px rgba(16,185,129,0.14); }
.search-input::placeholder { color: var(--c-text-muted); }

/* Password visibility toggle */
.password-wrap {
  position: relative;
}
.password-wrap .form-group input,
.password-wrap .form-group textarea { padding-right: 3rem; }
.password-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  transition: color 0.14s;
  z-index: 1;
}
.password-toggle:hover { color: var(--c-text); }
.password-toggle::before {
  content: '';
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s;
}
.password-toggle.show::before {
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.checkbox-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.85rem; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--c-text);
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.checkbox-label:hover { background: var(--c-surface-alt); border-color: var(--c-border); }
.checkbox-label input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--c-primary); cursor: pointer; flex-shrink: 0; }

.other-details-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-family: var(--font);
  color: var(--c-text);
  margin-top: 0.4rem;
  background: #fafafa;
  transition: border-color 0.14s;
}
.other-details-input:focus { outline: none; background: #fff; border-color: var(--c-border-focus); }

.location-status { font-size: 0.83rem; padding: 0.42rem 0.75rem; border-radius: var(--r-sm); margin-bottom: 1rem; }
.location-loading { background: var(--c-surface-alt); color: var(--c-text-muted); }
.location-ready   { background: var(--c-active-bg);   color: var(--c-active-text); }
.location-error   { background: var(--c-warning-bg);  color: var(--c-warning); }
.location-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.location-row .location-status { flex: 1; margin-bottom: 0; }

.photo-desktop-blocked {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--c-warning-bg);
  border: 1.5px solid var(--c-warning);
  border-radius: var(--r-md);
  color: #78350f;
  font-size: 0.88rem;
  line-height: 1.55;
}
.photo-desktop-blocked-icon { font-size: 1.5rem; flex-shrink: 0; }
.photo-desktop-blocked p { margin: 0; color: #78350f; }

:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
input[type="search"]::-webkit-search-cancel-button { opacity: 0.5; }

/* в”Ђв”Ђ 9. Status & role badges в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.24rem 0.65rem;
  border-radius: var(--r-full);
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.8; flex-shrink: 0; }
.status-active    { background: var(--c-active-bg);    color: var(--c-active-text);    border-color: #C9E2E6; }
.status-paused    { background: var(--c-paused-bg);    color: var(--c-paused-text);    border-color: #EBD9A4; }
.status-completed { background: var(--c-completed-bg); color: var(--c-completed-text); border-color: #C2D6E6; }

.role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-full);
  vertical-align: middle;
  border: 1px solid transparent;
}
.role-admin     { background: #fef9c3; color: #713f12; border-color: #EBD9A4; }
.role-master    { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.role-bauleiter { background: var(--c-completed-bg); color: var(--c-completed-text); border-color: #C2D6E6; }
.role-polier    { background: var(--c-paused-bg);    color: var(--c-paused-text);    border-color: #EBD9A4; }
.role-brigadier { background: var(--c-surface-alt);  color: var(--c-text-secondary); border-color: var(--c-border); }
.role-pending   { background: #f3f4f6; color: #6b7280; border-color: #d1d5db; }

.team-badge { font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.58rem; border-radius: var(--r-full); white-space: nowrap; flex-shrink: 0; border: 1px solid transparent; }
.team-badge-bauleiter { background: var(--c-completed-bg); color: var(--c-completed-text); border-color: #C2D6E6; }
.team-badge-polier    { background: var(--c-paused-bg);    color: var(--c-paused-text);    border-color: #EBD9A4; }
.team-badge-brigadier { background: var(--c-surface-alt);  color: var(--c-text-secondary); border-color: var(--c-border); }
.team-badge-admin     { background: #fef9c3; color: #713f12; border-color: #EBD9A4; }
.team-badge-master    { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.team-badge-pending   { background: #f3f4f6; color: #6b7280; border-color: #d1d5db; }

.user-status-badge { display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 500; padding: 0.18rem 0.58rem; border-radius: var(--r-full); white-space: nowrap; flex-shrink: 0; }
.user-status-active   { background: var(--c-active-bg);  color: var(--c-active-text);  border: 1px solid #C9E2E6; }
.user-status-inactive { background: #F0EDE7;              color: #5E727D;               border: 1px solid #D4CEC4; }
.user-status-pending  { color: #b45309; font-size: 0.78rem; }

/* в”Ђв”Ђ 10. Object cards в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.object-card-link { display: block; text-decoration: none; color: inherit; margin-bottom: 0.75rem; }

.object-card {
  position: relative;
  background: var(--c-surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border);
  padding: 1.25rem 1.4rem 1.3rem 1.7rem;
  box-shadow: var(--sh-card);
  transition: border-color 0.18s var(--ease-out), box-shadow 0.2s var(--ease-out), transform 0.18s var(--ease-out);
  overflow: hidden;
}
.object-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 4px;
  background: var(--c-border-strong);
  border-radius: var(--r-xl) 0 0 var(--r-xl);
}
.object-card--active::before    { background: var(--c-primary); }
.object-card--paused::before    { background: var(--c-warning); }
.object-card--completed::before { background: var(--c-before); }

.object-card-link:hover .object-card {
  border-color: var(--c-border-strong);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.object-card-link:active .object-card { transform: translateY(0); box-shadow: var(--sh-xs); }

.object-card-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.4rem 0.65rem; margin-bottom: 0.45rem; }
/* [TASK11] Назва проекту в картці — яскрава і добре читана в обох темах. */
.object-name { font-weight: 800; font-size: 1.08rem; color: var(--c-text); line-height: 1.3; letter-spacing: -0.015em; flex: 1; min-width: 0; }
.object-card-body p { font-size: 0.82rem; color: var(--c-text-secondary); margin-top: 0.18rem; line-height: 1.5; font-weight: 500; }
.object-card-body p:first-child { font-weight: 500; color: var(--c-text); }

/* в”Ђв”Ђ 11. Empty states в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.empty-msg { color: var(--c-text-muted); font-size: 0.84rem; padding: 1.75rem 0; text-align: center; }

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--c-surface);
  border: 1.5px dashed var(--c-border-strong);
  border-radius: var(--r-xl);
}
.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-size: 1.85rem;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #F6F4EF, #EAE5DC);
  border: 1px solid var(--c-border-strong);
  border-radius: 18px;
  box-shadow: var(--sh-xs);
}
.empty-state-msg { font-size: 0.9rem; color: var(--c-text-secondary); line-height: 1.7; font-weight: 500; max-width: 360px; margin: 0 auto; }

/* в”Ђв”Ђ 12. Object map screen header в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
/* Break out of body padding */
.map-obj-header,
.map-filter-bar,
.object-map,
.map-footer {
  margin-left: -1.5rem;
  margin-right: -1.5rem;
}

.map-obj-header {
  padding: 0.55rem 1.5rem 0;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  /* [FIX nav] keep the header (title, "← Назад", ⋯ menu) above the map layer
     so it is always clickable. Stays below the sticky .top-bar (z-index 200). */
  position: relative;
  z-index: 100;
}
.map-obj-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.15rem;
}
.map-obj-header-actions { display: flex; align-items: center; gap: 0.4rem; }
.map-obj-title-row { display: flex; align-items: center; gap: 0.5rem; margin: 0.1rem 0 0.05rem; flex-wrap: wrap; }
/* [FIX contrast] The header background is FORCED white (design-system.css:
   `html body .map-obj-header { background:#fff }`) in BOTH light and dark mode.
   So the title/meta must use explicit dark colors — following var(--c-text)
   turned the name near-white (#f1f5f9) on white in dark mode = unreadable. */
.map-obj-name { font-size: 1.2rem; font-weight: 800; color: #14242E; line-height: 1.2; letter-spacing: -0.025em; overflow-wrap: break-word; min-width: 0; }
.map-obj-meta { font-size: 0.73rem; color: #5E727D; margin: 0 0 0.1rem; }
.obj-edit-link { font-size: 0.78rem; color: var(--c-primary); font-weight: 500; text-decoration: none; }
.obj-edit-link:hover { text-decoration: underline; }
.obj-action-link {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--c-primary);
  border-radius: var(--r-md);
  transition: background 0.12s;
  white-space: nowrap;
}
.obj-action-link:hover { background: var(--c-primary-light); text-decoration: none; }
.obj-delete-btn {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--c-danger);
  background: var(--c-danger-bg);
  border: 1px solid var(--c-danger-border);
  border-radius: var(--r-md);
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: background 0.12s;
}
.obj-delete-btn:hover { background: #fee2e2; border-color: var(--c-danger); }

/* в”Ђв”Ђ 13. View switcher tabs в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.obj-view-tabs { display: flex; gap: 0; margin-top: 0.45rem; }
.obj-view-tabs .view-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.38rem 0.9rem 0.42rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  font-family: var(--font);
}
.obj-view-tabs .view-tab:hover { color: var(--c-text); border-bottom-color: var(--c-border-strong); background: none; }
.obj-view-tabs .view-tab--active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 700; background: none; }
.obj-view-tabs .view-tab--active:hover { color: var(--c-primary-dark); border-bottom-color: var(--c-primary-dark); background: none; }

.view-switcher { display: flex; gap: 0.18rem; flex-shrink: 0; }
.view-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  line-height: 1.5;
}
.view-tab:hover { background: var(--c-surface-alt); color: var(--c-text); }
.view-tab--active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.view-tab--active:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.view-tab:active { transform: scale(0.96); }

.view-pane-top { padding: 0.6rem 0 0.5rem; display: flex; align-items: center; gap: 0.75rem; }
.view-pane-top .btn { width: auto; }

/* в”Ђв”Ђ 14. Filter bar в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.map-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.35rem 1.25rem 0.45rem;
  background: var(--c-surface-alt);
  border-bottom: 1px solid var(--c-border);
}
.filter-bar-row,
.filter-bar-stages,
.filter-bar-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.22rem 0.3rem;
  width: 100%;
  min-height: 30px;
}
.filter-bar-search { margin-top: 0.22rem; }
.filter-bar-compact { flex-wrap: wrap; gap: 0.2rem 0.25rem; padding: 0; }
.filter-group { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
.filter-group-inline { display: contents; }
.filter-group-label { font-size: 0.63rem; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; margin-right: 0.1rem; white-space: nowrap; }
.filter-divider { color: var(--c-border-strong); font-size: 1rem; line-height: 1; flex-shrink: 0; margin: 0 0.05rem; user-select: none; }
.filter-date-sep { color: var(--c-text-muted); font-size: 0.76rem; flex-shrink: 0; user-select: none; }
.filter-bar-sep { display: inline-block; width: 1px; height: 18px; background: var(--c-border-strong); flex-shrink: 0; margin: 0 0.1rem; }
.filter-count-inline { margin-left: auto; flex-shrink: 0; font-size: 0.72rem; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.filter-quick { display: flex; gap: 0.25rem; margin-left: auto; flex-shrink: 0; }

.filter-btn {
  padding: 0.2rem 0.6rem;
  font-size: 0.74rem;
  font-family: var(--font);
  font-weight: 500;
  border-radius: var(--r-full);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.filter-btn:active { transform: scale(0.94); }
.filter-before.active { background: var(--c-before); border-color: var(--c-before); color: #fff; }
.filter-during.active { background: var(--c-during); border-color: var(--c-during); color: #fff; }
.filter-after.active  { background: var(--c-after);  border-color: var(--c-after);  color: #fff; }
.filter-content.active { background: #7c3aed; border-color: #7c3aed; color: #fff; }

.filter-quick-btn {
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-family: var(--font);
  border-radius: var(--r-sm);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.filter-quick-btn:hover { background: var(--c-border); }

.filter-search-inline { flex: 1 1 120px; min-width: 90px; max-width: 220px; }
.filter-search-input {
  flex: 1 1 160px;
  min-width: 120px;
  max-width: 300px;
  padding: 0.22rem 0.65rem 0.22rem 1.8rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.78rem;
  font-family: var(--font);
  background: var(--c-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23647587' stroke-width='2'/%3E%3Cpath d='M20 20l-3.5-3.5' stroke='%23647587' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0.45rem center;
  background-size: 13px;
  color: var(--c-text);
  height: 28px;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.filter-search-input:focus { outline: none; border-color: var(--c-border-focus); box-shadow: 0 0 0 2px rgba(16,185,129,0.14); }
.filter-search-input::placeholder { color: var(--c-text-muted); }

.filter-date-label { font-size: 0.7rem; font-weight: 600; color: var(--c-text-muted); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
.filter-date-input {
  padding: 0.22rem 0.48rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.76rem;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-surface);
  height: 28px;
  cursor: pointer;
  transition: border-color 0.14s;
}
.filter-date-input:focus { outline: none; border-color: var(--c-border-focus); }

.filter-result-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--c-text-muted);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  padding: 0.08rem 0.48rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-bar-compact .filter-result-count { margin-left: auto; }

.filter-clear-btn { flex-shrink: 0; color: var(--c-text-secondary); }
.filter-clear-btn:hover { background: var(--c-danger-bg); border-color: var(--c-danger-border); color: var(--c-danger); }

.filter-sort-select {
  padding: 0.16rem 0.38rem;
  font-size: 0.72rem;
  font-family: var(--font);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  cursor: pointer;
  height: 26px;
  flex-shrink: 0;
  transition: border-color 0.12s;
}
.filter-sort-select:focus { outline: none; border-color: var(--c-border-focus); }

/* в”Ђв”Ђ 15. Map container + footer в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.object-map {
  height: clamp(300px, 54vh, 680px);
  width: 100%;
  background: #d1d9e0;
  position: relative;
  /* [FIX nav] z-index:0 makes the map its own stacking context so Leaflet's
     internal panes/controls/popups (z-index up to ~1000) stay contained BELOW
     the sticky top-bar and object header — otherwise they paint over the header
     and swallow clicks on "Фотофіксація" / "← Назад". */
  z-index: 0;
}
.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  gap: 0.5rem;
}
.map-point-count { font-size: 0.72rem; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.map-footer-loc-btn,
.map-ctrl-btn {
  padding: 0.28rem 0.72rem;
  font-size: 0.78rem;
  font-family: var(--font);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--c-text-secondary);
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.map-footer-loc-btn:hover,
.map-ctrl-btn:hover { background: var(--c-surface-alt); border-color: var(--c-border-strong); }

.my-loc-icon { background: transparent; border: none; }
.my-loc-dot { width: 16px; height: 16px; background: var(--c-before); border: 2.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 0 rgba(59,130,246,0.5); animation: loc-pulse 2s infinite; }
@keyframes loc-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(59,130,246,0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(59,130,246,0); }
  100% { box-shadow: 0 0 0 0   rgba(59,130,246,0); }
}
.draft-marker-icon { background: transparent; border: none; }
.draft-marker-dot { width: 24px; height: 24px; background: var(--c-during); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.3); cursor: grab; }
.draft-marker-dot:active { cursor: grabbing; }

/* в”Ђв”Ђ 16. Leaflet popup в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.pp-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
}
.pp-leaflet-popup .leaflet-popup-content { margin: 12px 12px 10px; }

.pp-popup { width: 244px; font-family: var(--font); }
.pp-popup-thumb {
  width: 100%; height: 118px;
  background: var(--c-surface-alt);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid var(--c-border);
}
.pp-popup-img { width: 100%; height: 118px; object-fit: cover; border-radius: var(--r-md); display: block; }
.pp-popup-img-clickable { cursor: zoom-in; }
.pp-photo-status { font-style: italic; color: var(--c-text-muted); font-size: 0.75rem; }
.popup-stage-badge { display: inline-block; font-size: 0.64rem; font-weight: 700; padding: 0.13rem 0.44rem; border-radius: var(--r-full); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.05em; }
.popup-stage-before { background: var(--c-before-bg); color: var(--c-before-text); }
.popup-stage-during { background: var(--c-during-bg); color: var(--c-during-text); }
.popup-stage-after  { background: var(--c-after-bg);  color: var(--c-after-text); }
.pp-popup-body { font-size: 0.82rem; color: var(--c-text); }
.pp-popup-desc { font-weight: 600; margin-bottom: 0.18rem; word-break: break-word; line-height: 1.4; }
.pp-popup-meta { color: var(--c-text-secondary); font-size: 0.75rem; margin-bottom: 0.18rem; }
.pp-popup-addr { color: var(--c-text-secondary); font-size: 0.74rem; margin-bottom: 0.38rem; word-break: break-word; line-height: 1.4; }
.pp-popup-more-btn { background: none; border: none; padding: 0; color: var(--c-primary); font-size: 0.76rem; font-family: var(--font); cursor: pointer; font-weight: 500; }
.pp-popup-detail { font-size: 0.76rem; margin-top: 0.38rem; color: var(--c-text-secondary); }
.pp-popup-hr { border: none; border-top: 1px solid var(--c-border); margin: 0.45rem 0; }
.pp-popup-detail-row { color: var(--c-text-secondary); margin-bottom: 0.22rem; line-height: 1.4; word-break: break-word; }
.pp-popup-delete-btn {
  display: block; width: 100%; margin-top: 0.6rem;
  padding: 0.4rem 0.75rem;
  background: var(--c-danger-bg); color: var(--c-danger);
  border: 1px solid var(--c-danger-border);
  border-radius: var(--r-sm);
  font-size: 0.78rem; font-family: var(--font); font-weight: 500;
  cursor: pointer; text-align: center; transition: background 0.12s;
}
.pp-popup-delete-btn:hover { background: #fee2e2; border-color: var(--c-danger); }

.recorded-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.38rem; }
.recorded-tag { font-size: 0.64rem; font-weight: 700; padding: 0.11rem 0.44rem; border-radius: var(--r-full); background: var(--c-before-bg); color: var(--c-before-text); text-transform: uppercase; letter-spacing: 0.04em; }

/* в”Ђв”Ђ 17. View panes в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.view-pane--hidden { display: none !important; }
.view-pane--gallery {
  margin-left: -2rem;
  margin-right: -2rem;
  padding: 0.65rem 2rem 1.25rem;
  min-height: 240px;
  background: var(--c-bg);
}
.view-empty { padding: 3.5rem 1.5rem 2.5rem; text-align: center; }
.view-empty-main { font-size: 0.9rem; font-weight: 600; color: var(--c-text-secondary); margin-bottom: 0.4rem; }
.view-empty-hint { font-size: 0.78rem; color: var(--c-text-muted); line-height: 1.6; }
.view-empty > p { font-size: 0.85rem; color: var(--c-text-muted); font-style: italic; }

/* в”Ђв”Ђ 18. Gallery в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.pt-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 0.7rem; }

.pt-gallery-cell {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.09), 0 3px 10px rgba(0,0,0,0.08);
  cursor: default;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
  aspect-ratio: 1 / 1;
}
.pt-gallery-cell[data-photo-url] { cursor: zoom-in; }
.pt-gallery-cell:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 8px 24px rgba(0,0,0,0.16), 0 2px 6px rgba(0,0,0,0.10); }

.pt-gallery-thumb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #F6F4EF 0%, #ECE7DE 100%); }
.pt-gallery-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-gallery-no-photo { font-size: 0.68rem; color: var(--c-text-muted); text-align: center; padding: 1rem; line-height: 1.4; font-style: italic; }

.pt-gallery-loading {
  display: block;
  width: 50%;
  height: 9px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, #E7E2DA 0%, #F6F4EF 50%, #E7E2DA 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pt-gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem 0.45rem 0.35rem;
  background: linear-gradient(to top, rgba(8,14,28,0.88) 0%, rgba(8,14,28,0.4) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.pt-gallery-overlay-top { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem; }
.pt-gallery-overlay .popup-stage-badge { font-size: 0.58rem; padding: 0.09rem 0.38rem; opacity: 0.95; }
.pt-gallery-date { font-size: 0.64rem; font-weight: 600; color: rgba(255,255,255,0.9); white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.pt-gallery-overlay-meta { display: flex; flex-direction: column; gap: 0.04rem; }
.pt-gallery-desc { font-size: 0.64rem; color: rgba(255,255,255,0.95); text-shadow: 0 1px 3px rgba(0,0,0,0.7); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.pt-gallery-addr { font-size: 0.56rem; color: rgba(255,255,255,0.85); text-shadow: 0 1px 3px rgba(0,0,0,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Кнопка «Завантажити» у куті клітинки галереї */
.pt-gallery-dl-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: var(--r-full);
  background: rgba(8,14,28,0.6);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}
.pt-gallery-dl-btn:hover { background: rgba(8,14,28,0.88); transform: scale(1.08); }

.gallery-add-point-bar { display: flex; align-items: center; padding: 0.6rem 0 0.7rem; }
.gallery-add-point-bar .btn-small { width: auto; }

/* в”Ђв”Ђ 19. Add photo point screen в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.add-point-map,
.add-point-map-controls {
  margin-left: -2rem;
  margin-right: -2rem;
}
.add-point-map { height: clamp(180px, 32vh, 320px); width: 100%; background: #d1d9e0; position: relative; z-index: 0; /* [FIX nav] contain Leaflet below the header */ }
.add-point-map-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1.25rem;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.draft-coords-label { font-size: 0.72rem; color: var(--c-text-muted); font-variant-numeric: tabular-nums; flex: 1; }
.add-point-form-page { padding-top: 0.85rem; }
.add-point-map-hint { margin-bottom: 1rem; color: var(--c-text-secondary); font-size: 0.82rem; line-height: 1.5; font-style: italic; }

/* Map passive/active toggle states */
.add-point-map.map-passive .leaflet-container { touch-action: pan-y !important; cursor: default !important; }
.map-ctrl-passive { opacity: 0.8; }
.map-ctrl-active  { background: var(--c-active-bg) !important; color: var(--c-active-text) !important; border-color: #C9E2E6 !important; }

.add-pt-loc-status { display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 500; padding: 0.18rem 0.52rem; border-radius: var(--r-full); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.add-pt-loc-searching { background: var(--c-surface-alt); color: var(--c-text-muted); border: 1px solid var(--c-border); }
.add-pt-loc-ready     { background: var(--c-active-bg);   color: var(--c-active-text);  border: 1px solid #C9E2E6; }
.add-pt-loc-denied    { background: var(--c-warning-bg);  color: var(--c-warning);       border: 1px solid #EBD9A4; }

.photo-picker { display: flex; flex-direction: column; gap: 0.75rem; }
.photo-preview-area {
  width: 100%; min-height: 160px;
  background: linear-gradient(135deg, #FBF9F5, #F0EDE7);
  border: 2px dashed var(--c-border-strong);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: border-color 0.15s;
}
.photo-preview-area:hover { border-color: #9ca3af; }
.photo-preview-hint { font-size: 0.82rem; color: var(--c-text-muted); }
.photo-preview-img { width: 100%; max-height: 300px; object-fit: contain; border-radius: var(--r-lg); display: block; }
.photo-pick-btn { display: inline-block; padding: 0.48rem 1rem; background: var(--c-surface-alt); border: 1.5px solid var(--c-border); border-radius: var(--r-md); font-size: 0.88rem; cursor: pointer; text-align: center; color: var(--c-text-secondary); transition: background 0.12s; }
.photo-pick-btn:hover { background: var(--c-border); }
.photo-pick-btn-large {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  text-align: center;
  padding: 0.82rem 1rem;
  font-size: 0.96rem;
  font-weight: 600;
  font-family: var(--font);
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 0.5rem;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 46px;
  box-shadow: 0 1px 2px rgba(5,120,85,0.25), 0 3px 10px rgba(5,120,85,0.20);
  transition: opacity 0.15s;
}
.photo-pick-btn-large:hover,
.photo-pick-btn-large:active { opacity: 0.9; }
.photo-pick-btn-large:active { transform: scale(0.98); }

.photo-placeholder-card { background: var(--c-surface-alt); border: 2px dashed var(--c-border); border-radius: var(--r-md); padding: 1rem; margin-bottom: 1rem; text-align: center; }
.photo-placeholder-text { font-size: 0.85rem; color: var(--c-text-muted); margin-bottom: 0.75rem; }

/* в”Ђв”Ђ 20. Team screen в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.team-section { margin-bottom: 1.75rem; }
.team-section-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
  padding: 0.45rem 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.team-section-header::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }
.team-section-header--pending { color: #b45309; }

.team-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.25rem 0 0.55rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--c-border);
}
.team-group-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--c-text-muted); margin: 0; }
.team-group-count { font-size: 0.7rem; font-weight: 700; color: var(--c-text-muted); background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--r-full); padding: 0.08rem 0.48rem; }

.team-member-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 1rem 1.25rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--sh-card);
  transition: border-color 0.15s, box-shadow 0.18s, transform 0.15s var(--ease-out);
}
.team-member-card:hover { border-color: var(--c-border-strong); box-shadow: 0 4px 16px rgba(0,0,0,0.13), 0 1px 4px rgba(0,0,0,0.08); transform: translateY(-1px); }
.team-member-card--inactive { background: var(--c-surface-alt); opacity: 0.85; }
.team-member-card--pending { border-left: 3px solid var(--c-warning); background: #FBF6E9; }

.team-member-card-top { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.team-member-card-body { display: flex; flex-direction: column; gap: 0.12rem; margin-bottom: 0.5rem; }
.team-member-name { font-weight: 800; font-size: 1.08rem; color: #111827; line-height: 1.3; }
.team-member-email { font-size: 0.86rem; color: #5E727D; word-break: break-all; }
.team-member-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.team-member-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.team-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}

.team-add-section { margin-top: 2rem; padding-top: 1.25rem; border-top: 2px solid var(--c-border); }
.team-add-section-header { margin-bottom: 0.75rem; }
.team-add-section-header h3 { font-size: 1rem; font-weight: 700; color: var(--c-text); }
.team-add-form { margin-top: 0.75rem; }

.credentials-panel {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--c-primary-light), #fafdfb);
  border: 1px solid var(--c-primary-ring);
  border-left: 3px solid var(--c-primary);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.credentials-header { margin-bottom: 0.4rem; }
.credentials-title { font-size: 0.9rem; font-weight: 700; color: var(--c-primary-deeper); display: block; }
.credentials-note { font-size: 0.8rem; color: var(--c-text-secondary); margin-bottom: 0.5rem; line-height: 1.5; }
.credentials-box { background: var(--c-surface); border: 1px solid var(--c-primary-ring); border-radius: var(--r-md); padding: 0.7rem 1rem; margin: 0.5rem 0; font-size: 0.855rem; line-height: 1.9; color: var(--c-text); }
.credentials-row { display: flex; align-items: center; gap: 0.65rem; padding: 0.32rem 0; border-bottom: 1px solid var(--c-primary-ring); font-size: 0.85rem; }
.credentials-row:last-child { border-bottom: none; }
.credentials-label { font-size: 0.72rem; font-weight: 600; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.05em; min-width: 58px; }
.credentials-value { color: var(--c-text); font-weight: 500; word-break: break-all; }
.credentials-warning { font-size: 0.77rem; color: var(--c-danger); font-weight: 600; margin-top: 0.6rem; }

.pending-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pending-role-select { flex: 1; min-width: 120px; font-size: 0.78rem; padding: 0.28rem 0.5rem; border: 1px solid var(--c-border); border-radius: var(--r-md); background: #fff; font-family: var(--font); color: var(--c-text); }
.user-status-pending { color: #b45309; font-size: 0.78rem; }

/* в”Ђв”Ђ 21. Photo lightbox в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.photo-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(2,6,23,0.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-content { position: relative; max-width: 95vw; max-height: 95vh; }
.lightbox-img { display: block; max-width: 95vw; max-height: 88vh; object-fit: contain; border-radius: var(--r-md); box-shadow: 0 8px 40px rgba(0,0,0,0.7); }
.lightbox-close {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 1;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff; font-size: 0.95rem; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full); cursor: pointer;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* в”Ђв”Ђ 22. Deletion log в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.dl-summary { font-size: 0.8rem; color: var(--c-text-secondary); margin-bottom: 1rem; padding: 0.42rem 0.8rem; background: var(--c-surface-alt); border-radius: var(--r-sm); border: 1px solid var(--c-border); }
.dl-summary-bar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; padding: 0.45rem 0.85rem; background: var(--c-surface-alt); border-radius: var(--r-sm); border: 1px solid var(--c-border); font-size: 0.8rem; }
.dl-summary-total { color: var(--c-text-secondary); font-weight: 600; margin-right: 0.2rem; }
.dl-summary-pill { font-size: 0.68rem; font-weight: 700; padding: 0.11rem 0.48rem; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 0.04em; }
.dl-summary-object { background: var(--c-danger-bg); color: var(--c-danger); border: 1px solid var(--c-danger-border); }
.dl-summary-point  { background: var(--c-surface-alt); color: var(--c-text-secondary); border: 1px solid var(--c-border-strong); }

.dl-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-danger);
  padding: 0.95rem 1.1rem;
  margin-bottom: 0.6rem;
  box-shadow: var(--sh-xs);
}
.dl-card--object { border-left-color: var(--c-danger); }
.dl-card--point  { border-left-color: var(--c-before); }
.dl-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; flex-wrap: wrap; }
.dl-obj-name { font-weight: 700; font-size: 0.88rem; color: var(--c-text); }
.dl-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.28rem; flex-wrap: wrap; }
.dl-stage-badge { font-size: 0.64rem; font-weight: 700; padding: 0.11rem 0.44rem; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 0.05em; }
.dl-stage-before { background: var(--c-before-bg); color: var(--c-before-text); }
.dl-stage-during { background: var(--c-during-bg); color: var(--c-during-text); }
.dl-stage-after  { background: var(--c-after-bg);  color: var(--c-after-text); }
.dl-type-badge { font-size: 0.63rem; font-weight: 700; padding: 0.09rem 0.44rem; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; }
.dl-type-object { background: var(--c-danger-bg); color: var(--c-danger); border: 1px solid var(--c-danger-border); }
.dl-type-point  { background: var(--c-before-bg); color: var(--c-before-text); border: 1px solid #C2D6E6; }
.dl-desc { font-size: 0.85rem; color: var(--c-text); margin-bottom: 0.22rem; line-height: 1.4; }
.dl-addr { font-size: 0.78rem; color: var(--c-text-secondary); margin-bottom: 0.32rem; word-break: break-word; line-height: 1.4; }
.dl-deleted-by { font-size: 0.78rem; color: var(--c-danger); background: var(--c-danger-bg); border-left: 3px solid var(--c-danger-border); padding: 0.28rem 0.6rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; line-height: 1.5; margin-top: 0.1rem; }
.dl-date  { font-size: 0.78rem; color: var(--c-text-secondary); }
.dl-who   { font-size: 0.74rem; color: var(--c-text-muted); }
.dl-badge { font-size: 0.64rem; font-weight: 700; padding: 0.11rem 0.44rem; border-radius: var(--r-full); white-space: nowrap; }
.dl-badge-deleted { background: var(--c-danger-bg); color: var(--c-danger); }
.dl-no-desc { color: var(--c-text-muted); font-style: italic; }

/* в”Ђв”Ђ 23. PWA banners в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.pwa-banner {
  position: fixed;
  bottom: env(safe-area-inset-bottom, 0);
  left: 0; right: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  font-family: var(--font);
  box-shadow: 0 -2px 16px rgba(0,0,0,0.18);
  animation: banner-up 0.25s ease-out;
}
@keyframes banner-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.pwa-install-banner,
.pwa-ios-banner { background: var(--c-topbar); color: var(--c-topbar-text); border-top: 2px solid rgba(16,185,129,0.45); }
.pwa-update-banner { background: #163842; color: #DCEBEE; border-top: 2px solid #3A7A8A; }
.pwa-banner-text { flex: 1; line-height: 1.4; }
.pwa-banner-btn {
  flex-shrink: 0; padding: 0.36rem 0.9rem;
  background: var(--c-primary); color: #fff;
  border: none; border-radius: var(--r-sm);
  font-size: 0.82rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; white-space: nowrap; min-height: 34px;
  transition: opacity 0.15s;
}
.pwa-banner-btn:hover  { opacity: 0.88; }
.pwa-banner-btn:active { transform: scale(0.96); }
.pwa-update-banner .pwa-banner-btn { background: #3A7A8A; }
.pwa-update-banner .pwa-banner-btn:hover { background: #2563eb; }
.pwa-banner-dismiss {
  flex-shrink: 0; background: none; border: none;
  color: var(--c-topbar-muted); font-size: 1rem; cursor: pointer;
  padding: 0.3rem; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); transition: color 0.15s, background 0.15s;
}
.pwa-banner-dismiss:hover { color: var(--c-topbar-text); background: rgba(255,255,255,0.1); }

/* в”Ђв”Ђ 24. Admin screens в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.admin-home-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.admin-home-header h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--c-text); margin-bottom: 0.2rem; }
.admin-home-header-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.admin-section-label {
  font-size: 0.67rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--c-text-muted);
  margin: 0.5rem 0 1rem;
  display: flex; align-items: center; gap: 0.55rem;
}
.admin-section-label::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }

/* Admin home tabs — Objects | Staff switcher */
.home-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0.6rem 0 1.1rem;
  border-bottom: 1px solid var(--c-border);
}
.home-tab {
  appearance: none;
  border: none;
  background: none;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.home-tab:hover { color: var(--c-text); }
.home-tab--active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}
.home-tabpanel--hidden { display: none; }

/* Distinct Team / Objects blocks on the admin home */
.admin-section {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 1.1rem 1.1rem 1.2rem;
  margin: 1.4rem 0;
}
.admin-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #14242E;
  margin: 0 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--c-border-strong);
}
.admin-baul-assigned {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.admin-baul-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 1rem 1.3rem 1rem 1.5rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
  box-shadow: var(--sh-card);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.18s, transform 0.15s var(--ease-out);
}
.admin-baul-card::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--c-before); }
.admin-baul-card:hover { border-color: var(--c-border-strong); box-shadow: 0 4px 16px rgba(0,0,0,0.13), 0 1px 4px rgba(0,0,0,0.08); transform: translateY(-1px); }
.admin-baul-info { display: flex; flex-direction: column; gap: 0.18rem; min-width: 0; }
.admin-baul-name { font-weight: 800; font-size: 1.08rem; color: #111827; line-height: 1.3; }
.admin-baul-email { font-size: 0.86rem; color: #5E727D; word-break: break-all; }
.admin-baul-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.admin-baul-obj-count { font-size: 0.8rem; font-weight: 600; color: #334155; white-space: nowrap; }
.admin-baul-view-btn { margin-left: 0.2rem; white-space: nowrap; }
.admin-baul-assign { display: flex; gap: 0.5rem; width: 100%; margin-top: 0.6rem; }
.admin-baul-assign-select { flex: 1; min-width: 0; padding: 0.45rem 0.55rem; border: 1px solid var(--c-border-strong); border-radius: var(--r-md); background: var(--c-surface-alt); color: var(--c-text); font-size: 0.8rem; }

/* в”Ђв”Ђ Popup navigation (prev/next between photos) в”Ђв”Ђ */
.pp-popup-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.55rem; padding-top: 0.5rem; border-top: 1px solid var(--c-border); }
.pp-popup-nav-btn { flex: 1; padding: 0.42rem 0; border: 1px solid var(--c-border-strong); background: var(--c-surface-alt); color: var(--c-text); border-radius: var(--r-md); font-size: 0.95rem; cursor: pointer; }
.pp-popup-nav-btn:active { transform: scale(0.97); }
.pp-popup-nav-btn:disabled { opacity: 0.4; cursor: default; }
.pp-popup-nav-count { font-size: 0.75rem; color: var(--c-text-secondary); white-space: nowrap; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .admin-baul-name { color: #E2ECF0; }
  html:not([data-theme="light"]) .admin-baul-email { color: #8FA8B3; }
  html:not([data-theme="light"]) .admin-baul-obj-count { color: #C4D4DA; }
  html:not([data-theme="light"]) .admin-baul-assigned { color: #8FA8B3; }
  html:not([data-theme="light"]) .team-member-name { color: #E2ECF0; }
  html:not([data-theme="light"]) .team-member-email { color: #8FA8B3; }
  html:not([data-theme="light"]) .admin-section { background: var(--c-surface-alt); border-color: var(--c-border); }
  html:not([data-theme="light"]) .admin-section-title { color: #E2ECF0; border-bottom-color: var(--c-border-strong); }
}

/* Manual dark theme (html[data-theme="dark"]) — same rules, no media query */
  html[data-theme="dark"] .admin-baul-name { color: #E2ECF0; }
  html[data-theme="dark"] .admin-baul-email { color: #8FA8B3; }
  html[data-theme="dark"] .admin-baul-obj-count { color: #C4D4DA; }
  html[data-theme="dark"] .admin-baul-assigned { color: #8FA8B3; }
  html[data-theme="dark"] .team-member-name { color: #E2ECF0; }
  html[data-theme="dark"] .team-member-email { color: #8FA8B3; }
  html[data-theme="dark"] .admin-section { background: var(--c-surface-alt); border-color: var(--c-border); }
  html[data-theme="dark"] .admin-section-title { color: #E2ECF0; border-bottom-color: var(--c-border-strong); }


/* в”Ђв”Ђ 25. Edit user screen в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.edit-user-meta { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 1.5rem; padding: 0.65rem 1rem; background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.edit-user-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 0.5rem; }
.edit-user-actions .btn,
.edit-user-actions .btn-outline { width: auto; flex: 1; min-width: 120px; }

/* в”Ђв”Ђ 26. Legacy / misc в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
.pp-row { background: var(--c-surface); border-radius: var(--r-md); border: 1px solid var(--c-border); padding: 0.7rem 1rem; margin-bottom: 0.5rem; }
.pp-row-header { margin-bottom: 0.28rem; }
.pp-desc { font-weight: 600; font-size: 0.88rem; color: var(--c-text); }
.pp-row-meta { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--c-text-secondary); flex-wrap: wrap; }
.pp-address { font-size: 0.78rem; color: var(--c-text-secondary); margin-top: 0.22rem; line-height: 1.4; word-break: break-word; }
.pp-address-pending { color: var(--c-text-muted); font-style: italic; }
.pp-thumb-area { margin-top: 0.6rem; }
.pp-thumb-img { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--r-sm); display: block; }
.pp-other-details { font-size: 0.8rem; color: var(--c-text-secondary); margin-top: 0.32rem; font-style: italic; }
.pp-coords { font-size: 0.74rem; color: var(--c-text-muted); margin-top: 0.22rem; font-variant-numeric: tabular-nums; }
.pp-photo-status { font-style: italic; color: var(--c-text-muted); font-size: 0.75rem; }

.data-counts { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.data-counts li { color: var(--c-text-secondary); }

/* в”Ђв”Ђ 27. Print / PDF в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
#print-view { display: none; }

@media print {
  body > *:not(#print-view) { display: none !important; }
  body { padding: 0 !important; background: #fff !important; font-size: 10pt !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-view { display: block !important; }

  .pdf-report { font-family: 'Inter', sans-serif; font-size: 10pt; color: #14242E; line-height: 1.55; max-width: 100%; padding: 0; }
  .pdf-header { border-bottom: 2.5pt solid #1E4D5C; padding-bottom: 9pt; margin-bottom: 16pt; }
  .pdf-brand { font-size: 7.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: #5E727D; margin-bottom: 2pt; }
  .pdf-title { font-size: 20pt; font-weight: 700; color: #14242E; letter-spacing: -0.02em; margin-bottom: 4pt; line-height: 1.2; }
  .pdf-header-meta { font-size: 8pt; color: #5E727D; }
  .pdf-object-block { background: #FAFAF7; border: 1pt solid #E2DCD2; border-left: 4pt solid #1E4D5C; padding: 10pt 12pt; margin-bottom: 20pt; border-radius: 3pt; page-break-inside: avoid; }
  .pdf-meta-table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .pdf-meta-table td { padding: 2.5pt 6pt 2.5pt 0; vertical-align: top; }
  .pdf-label { font-size: 8pt; font-weight: 700; color: #5E727D; text-transform: uppercase; letter-spacing: 0.04em; width: 85pt; white-space: nowrap; }
  .pdf-section-title { font-size: 12pt; font-weight: 700; color: #14242E; letter-spacing: -0.01em; border-bottom: 1pt solid #E2DCD2; padding-bottom: 4pt; margin-bottom: 12pt; }
  .pdf-point { border: 1pt solid #E2DCD2; border-radius: 4pt; padding: 10pt 12pt; margin-bottom: 14pt; page-break-inside: avoid; }
  .pdf-point-before { border-left: 4pt solid #3E7CB1; }
  .pdf-point-during { border-left: 4pt solid #C96A1B; }
  .pdf-point-after  { border-left: 4pt solid #1E4D5C; }
  .pdf-point-header { display: flex; align-items: center; gap: 7pt; margin-bottom: 8pt; flex-wrap: wrap; }
  .pdf-point-index { font-size: 8.5pt; font-weight: 700; color: #5E727D; }
  .pdf-stage-badge { font-size: 7.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 1.5pt 5pt; border-radius: 100pt; }
  .pdf-stage-before { background: #EBF2F8; color: #28527A; }
  .pdf-stage-during { background: #FAF0E3; color: #9A5212; }
  .pdf-stage-after  { background: #E9F3EC; color: #1F5C37; }
  .pdf-point-date { font-size: 9pt; color: #5E727D; margin-left: auto; }
  .pdf-point-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-bottom: 8pt; }
  .pdf-point-table td { padding: 2pt 6pt 2pt 0; vertical-align: top; }
  .pdf-point-photo { margin-top: 8pt; }
  .pdf-point-img { display: block; max-width: 100%; max-height: 230pt; object-fit: contain; border-radius: 3pt; border: 1pt solid #E2DCD2; }
  .pdf-no-photo { font-size: 9pt; color: #5E727D; font-style: italic; padding: 10pt; background: #FAFAF7; border: 1pt dashed #D4CEC4; border-radius: 3pt; text-align: center; }
  .pdf-no-points { font-size: 10pt; color: #5E727D; font-style: italic; padding: 18pt; text-align: center; border: 1pt dashed #D4CEC4; border-radius: 4pt; }
  .pdf-footer { margin-top: 22pt; padding-top: 8pt; border-top: 1pt solid #E2DCD2; font-size: 8pt; color: #5E727D; text-align: center; }
}

/* в”Ђв”Ђ 28. Desktop в‰Ґ 860px в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
@media (min-width: 860px) {
  .page            { padding: 1.75rem 1.25rem; }
  .top-bar         { padding: 0 2rem; }
  .map-obj-header  { padding: 0.65rem 1.5rem 0; }
  .map-filter-bar  { padding: 0.4rem 1.5rem 0.5rem; }
  .map-footer      { padding: 0.5rem 1.5rem; }
}

/* в”Ђв”Ђ 29. Mobile в‰¤ 640px в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
@media (max-width: 640px) {
  body { padding: 0; }

  /* Reset negative margins вЂ” no body padding on mobile */
  .map-obj-header,
  .map-filter-bar,
  .object-map,
  .map-footer,
  .add-point-map,
  .add-point-map-controls,
  .view-pane--gallery {
    margin-left: 0;
    margin-right: 0;
  }
  .view-pane--gallery { padding-left: 0.9rem; padding-right: 0.9rem; }

  .screen {
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 3px solid var(--c-primary);
    box-shadow: none;
    min-height: 100dvh;
    min-height: 100vh;
  }
  .screen::before { display: none; }
  .screen-brand { padding-left: 1.25rem; padding-right: 1.25rem; }
  .screen form,
  .screen > .screen-links,
  .screen > p,
  .screen > button,
  .screen > .error-msg,
  .screen > .success-msg { padding-left: 1.25rem; padding-right: 1.25rem; }
  .screen > .lang-switcher-wrap { top: 0.75rem; right: 0.75rem; }
  .screen--center > .screen-desc,
  .screen--center > .screen-user-email,
  .screen--center > button { padding-left: 1.25rem; padding-right: 1.25rem; }
  .login-demo-hint { padding-left: 1.25rem; padding-right: 1.25rem; }

  .page { padding: 0.75rem 0.7rem; }

  /* Compact admin home + cards on phones */
  .admin-home-header { margin-bottom: 0.75rem; }
  .admin-home-header h2 { font-size: 1.25rem; }
  .admin-section-label { margin: 0.4rem 0 0.6rem; }
  .admin-baul-card { padding: 0.7rem 0.75rem; }
  .object-card { padding: 0.7rem 0.65rem 0.7rem 0.9rem; }

  /* Touch targets — mobile minimum is 44px (Apple HIG / WCAG 2.5.5) */
  .btn                  { padding: 0.82rem 1.2rem; font-size: 0.96rem; min-height: 48px; }
  .btn-small            { padding: 0.52rem 0.95rem; font-size: 0.85rem; min-height: 44px; }
  .add-object-btn       { min-height: 48px; font-size: 0.96rem; }
  .photo-pick-btn-large { min-height: 52px; font-size: 1rem; }

  .btn-link            { font-size: 0.88rem; padding: 0.3rem 0; min-height: 44px; display: inline-flex; align-items: center; }
  .top-bar-team-btn    { min-height: 44px; display: inline-flex; align-items: center; }
  .map-footer-loc-btn,
  .map-ctrl-btn        { padding: 0.52rem 0.95rem; font-size: 0.86rem; min-height: 44px; }
  .filter-btn          { padding: 0.38rem 0.82rem; font-size: 0.8rem; min-height: 44px; display: inline-flex; align-items: center; }
  .filter-quick-btn    { padding: 0.38rem 0.68rem; font-size: 0.78rem; min-height: 44px; display: inline-flex; align-items: center; }

  /* Forms */
  .form-group input,
  .form-group select,
  .form-group textarea { padding: 0.72rem; font-size: 1rem; min-height: 48px; }
  .form-group label    { font-size: 0.92rem; }
  .form-group          { margin-bottom: 1.2rem; }
  .search-input        { padding: 0.72rem; font-size: 1rem; min-height: 48px; }
  .other-details-input { padding: 0.68rem 0.85rem; font-size: 1rem; min-height: 44px; }
  .checkbox-label      { font-size: 0.92rem; padding: 0.42rem 0.6rem; min-height: 44px; }
  .checkbox-label input[type="checkbox"] { width: 1.2rem; height: 1.2rem; }
  /* [Mobile] role picker on the Team screen's pending-approval card */
  .pending-role-select { font-size: 1rem; padding: 0.5rem 0.6rem; min-height: 44px; }

  /* Map */
  .object-map    { height: clamp(260px, 48vh, 480px); }
  .add-point-map { height: clamp(160px, 25vh, 240px); }
  .map-obj-header { padding: 0.5rem 0.9rem 0; }
  .map-filter-bar { padding: 0.38rem 0.9rem 0.48rem; }
  .map-footer     { padding: 0.5rem 0.9rem; padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0)); flex-wrap: wrap; gap: 0.4rem; }
  .add-point-map-controls { padding: 0.48rem 0.9rem; flex-wrap: wrap; gap: 0.5rem; }
  .add-pt-loc-status { max-width: none; flex: 1 1 auto; }
  .add-point-form-page { padding: 0.85rem 0.9rem; }

  /* Popups */
  .pp-popup       { width: 255px; }
  .pp-popup-thumb { height: 128px; }
  .pp-popup-img   { height: 128px; }
  .pp-popup-more-btn   { font-size: 0.86rem; padding: 0.3rem 0; min-height: 44px; display: inline-flex; align-items: center; }
  .pp-popup-delete-btn { padding: 0.58rem 0.75rem; font-size: 0.86rem; min-height: 44px; margin-top: 0.72rem; }

  /* Gallery */
  .pt-gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.45rem; }
  .photo-preview-area { min-height: 180px; }
  .photo-preview-img  { max-height: 340px; }

  /* Cards */
  .object-card { padding: 0.9rem 0.85rem 0.9rem 1.1rem; }
  .team-member-card { padding: 0.85rem 1rem; }
  .team-member-actions { gap: 0.38rem; }
  .btn-action { padding: 0.4rem 0.8rem; font-size: 0.82rem; min-height: 44px; display: inline-flex; align-items: center; }

  /* Top bar */
  .top-bar {
    height: auto;
    min-height: 52px;
    padding: 0 0.9rem;
    padding-top: calc(0.7rem + env(safe-area-inset-top, 0));
    padding-bottom: 0.42rem;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.22rem;
  }
  .top-bar-actions     { flex-wrap: wrap; justify-content: flex-end; gap: 0.38rem; }
  .top-bar--home       { flex-direction: column; align-items: flex-start; gap: 0.32rem; padding-bottom: 0.5rem; }
  .top-bar--home .top-bar-actions { width: 100%; justify-content: flex-start; flex-wrap: nowrap; }
  .top-bar--home .app-title-full  { display: none; }
  .top-bar--home .app-title-short { display: inline; }
  .top-bar-pill-btn { min-height: 44px; padding: 0.26rem 0.52rem; display: inline-flex; align-items: center; }
  .log-nav-btn      { min-height: 44px; padding: 0.26rem 0.52rem; display: inline-flex; align-items: center; }
  .lang-btn         { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

  /* Obj view tabs */
  .obj-view-tabs .view-tab { padding: 0.38rem 0.82rem 0.42rem; font-size: 0.78rem; }
  .filter-bar-row { gap: 0.28rem 0.38rem; }
  .filter-bar-sep { display: none; }
  .filter-group   { flex-wrap: wrap; }
  .map-obj-header-top { flex-wrap: wrap; row-gap: 0.18rem; }
  .map-obj-title-row  { flex-wrap: wrap; row-gap: 0.12rem; }

  /* Admin */
  .admin-home-header { flex-direction: column; align-items: flex-start; }
  .admin-baul-card   { flex-direction: column; align-items: flex-start; }
  .obj-delete-btn, .obj-action-link { padding: 0.35rem 0.8rem; font-size: 0.82rem; min-height: 44px; display: flex; align-items: center; }

  /* Edit user */
  .edit-user-actions .btn,
  .edit-user-actions .btn-outline { flex: 1 1 100%; }

  /* Object ☰ menu (layers/filters + Export PDF / Edit / Delete) */
  .obj-menu-item { min-height: 44px; display: flex; align-items: center; }
  .obj-menu-btn  { width: 44px; height: 44px; }

  /* Password show/hide toggle (login / register) */
  .password-toggle { width: 44px; height: 44px; right: 0.2rem; }

  /* Lightbox */
  .lightbox-close { min-width: 44px; min-height: 44px; }

  /* PWA */
  .pwa-banner         { padding: 0.82rem 1rem; padding-bottom: calc(0.82rem + env(safe-area-inset-bottom, 0)); font-size: 0.86rem; }
  .pwa-banner-btn     { min-height: 44px; }
  .pwa-banner-dismiss { min-width: 44px; min-height: 44px; }

  /* Filter вЂ” two-row search */
  .filter-bar-search .filter-search-inline { flex: 1 1 100%; max-width: none; order: 1; }
  .filter-bar-search .filter-date-input    { flex: 1 1 40%; min-width: 100px; order: 2; }
  .filter-bar-search .filter-date-sep      { order: 2; }
  .filter-bar-search .filter-sort-select   { order: 2; }
  .filter-bar-search .filter-quick-btn     { order: 2; }
  .filter-bar-stages { gap: 0.28rem 0.32rem; }
  .filter-bar-search { gap: 0.28rem 0.32rem; margin-top: 0.28rem; }
  /* [Mobile] >=16px prevents iOS Safari from zooming in on focus */
  .filter-search-input { flex: 1 1 100%; max-width: none; height: 44px; font-size: 1rem; }
  .filter-date-input   { height: 44px; font-size: 1rem; }
  .filter-sort-select  { height: 44px; font-size: 1rem; }
  .view-tab            { padding: 0.28rem 0.68rem; font-size: 0.78rem; min-height: 44px; }
  .obj-view-tabs .view-tab { min-height: 44px; }
  .filter-search-inline { flex: 1 1 100%; max-width: none; }
}

/* в”Ђв”Ђ 30. Very small в‰¤ 380px в”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђв”Ђ */
@media (max-width: 380px) {
  .map-obj-name  { font-size: 0.9rem; }
  .filter-btn    { padding: 0.3rem 0.58rem; font-size: 0.76rem; }
  .pp-popup      { width: 230px; }
  .top-bar-actions { gap: 0.3rem; }
  .top-bar-pill-btn,
  .log-nav-btn   { padding: 0.18rem 0.42rem; font-size: 0.7rem; }
  .lang-btn      { min-width: 1.9rem; padding: 0.18rem 0.36rem; font-size: 0.7rem; }
}

/* ═══ Radical readability fix: object cards always readable, any theme ═══ */
.object-card,
.object-card--active,
.object-card--paused,
.object-card--completed {
  background: #ffffff !important;
  border-color: #d4dde7 !important;
}
.object-card .object-name { color: #14242E !important; font-weight: 800; font-size: 1.08rem; }
.object-card-body p { color: #2d3b4f !important; }
.object-card-body p:first-child { color: #14242E !important; }
.shared-badge { color: #1F5C37 !important; background: #D6E4E7 !important; }
.status-badge { font-weight: 700; }
.object-card-link { color: inherit; }
/* ═══ Object header ☰ menu button + its items inside the lp-drawer's
   "actions" group (round4 §1: merged with the layers/filters drawer) ═══ */
.map-obj-header-actions { position: relative; }
.obj-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.obj-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-text);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.obj-menu-item:hover { background: var(--c-surface-alt); }
.obj-menu-item--danger { color: #dc2626; }
.obj-menu-item--danger:hover { background: #F9ECEB; }
/* [UX-MOBILE] Prevent iOS auto-zoom: form controls must be >= 16px */
input, textarea, select { font-size: 16px; }

/* ── iPhone safe-area support (notch + home indicator) ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .screen {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-top: env(safe-area-inset-top);
  }
}
@media (max-width: 640px) {
  .add-point-form-page { padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
  #save-btn {
    position: sticky;
    bottom: calc(0.6rem + env(safe-area-inset-bottom));
    z-index: 20;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  }
}

/* ── 31. Schemes (Anschlüsse) ──────────────────────────────────── */

.view-pane--schemes {
  margin-left: -2rem;
  margin-right: -2rem;
  padding: 0.65rem 2rem 1.25rem;
  min-height: 240px;
  background: var(--c-bg);
}

.filter-schemes-toggle.active { background: #0e7490; border-color: #0e7490; color: #fff; }

/* Record list */
.sc-list-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.sc-list-count { font-size: 0.72rem; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.sc-list { display: flex; flex-direction: column; gap: 0.6rem; }

.sc-card {
  display: flex;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.sc-card-bar { width: 5px; flex-shrink: 0; }
.sc-card-body { flex: 1; min-width: 0; padding: 0.65rem 0.8rem; cursor: pointer; }
.sc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.sc-card-type { font-size: 0.78rem; font-weight: 700; }
.sc-card-date { font-size: 0.72rem; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.sc-card-addr { font-size: 0.92rem; font-weight: 600; color: var(--c-text); margin-top: 0.15rem; overflow-wrap: break-word; }
.sc-card-note { font-size: 0.78rem; color: var(--c-text-secondary); margin-top: 0.2rem; }
.sc-card-meta { font-size: 0.7rem; color: var(--c-text-muted); margin-top: 0.35rem; }
.sc-card-actions { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.6rem 0.6rem; border-left: 1px solid var(--c-border); flex-shrink: 0; }
.sc-card-btn {
  padding: 0.24rem 0.6rem;
  font-size: 0.7rem;
  font-family: var(--font);
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.sc-card-btn:hover { background: var(--c-surface-alt); }
.sc-card-btn--danger { color: var(--c-danger); border-color: var(--c-danger-border); }
.sc-card-btn--danger:hover { background: var(--c-danger-bg); }

/* Щойно збережений запис (§6) — коротка підсвітка + скрол до нього */
.sc-card--highlight { animation: sc-card-flash 2.2s ease-out; }
@keyframes sc-card-flash {
  0%   { box-shadow: 0 0 0 3px var(--c-primary-ring); }
  100% { box-shadow: var(--sh-xs); }
}

/* Type color dot (shared: card / popup / editor title) */
.sc-type-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }

/* Add/edit record modal */
.sc-modal {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(15,23,42,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.sc-modal-card {
  width: 100%; max-width: 460px;
  max-height: 92vh; overflow-y: auto;
  background: var(--c-surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 1.1rem 1.25rem calc(1.1rem + env(safe-area-inset-bottom));
  box-shadow: var(--sh-xl);
}
@media (min-width: 640px) {
  .sc-modal { align-items: center; }
  .sc-modal-card { border-radius: var(--r-xl); }
}
.sc-modal-title { font-size: 1.05rem; font-weight: 700; color: var(--c-text); margin-bottom: 0.9rem; }
.sc-modal-length { font-size: 0.82rem; color: var(--c-text-secondary); margin: -0.5rem 0 0.9rem; }
.sc-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.4rem; }
.sc-modal-danger { color: var(--c-danger); border-color: var(--c-danger-border); margin-right: auto; }
.sc-modal-danger:hover { background: var(--c-danger-bg); }

/* Empty scheme-field-template hint inside the line modal (TASK_schemes_fields_fix2.md §2.4) */
.sc-empty-tpl-hint {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem;
  background: var(--c-surface-alt); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: 0.6rem 0.75rem; margin-bottom: 0.9rem;
}
.sc-empty-tpl-hint p { margin: 0; font-size: 0.82rem; color: var(--c-text-secondary); }

/* Drawing editor */
.sc-editor-bar {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.5rem 0; margin-bottom: 0.3rem;
}
.sc-editor-title { display: flex; align-items: center; font-size: 0.86rem; font-weight: 600; color: var(--c-text); min-width: 0; overflow-wrap: break-word; }
.sc-editor-stat { margin-left: auto; font-size: 0.72rem; color: var(--c-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.sc-tools {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 0.55rem;
}
.sc-tool-btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.sc-tool-btn:hover { background: var(--c-border); }
.sc-tool-btn--active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.sc-tool-group { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }

.sc-editor-map { height: clamp(300px, 52vh, 640px); width: 100%; }

/* Вибір ділянки для PDF: палець малює рамку, сторінка не скролить */
#sc-area-map { touch-action: none; }

/* Базова підкладка OSM ↔ Супутник (§1, TASK_schemes_round3.md) — компактна
   кнопка-контрол Leaflet, спільна для редактора схем і «Мапи» об'єкта. */
.leaflet-control.sc-basemap-btn {
  background: var(--c-surface);
  color: var(--c-text-secondary);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 0.32rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: var(--sh-xs);
  white-space: nowrap;
}
.leaflet-control.sc-basemap-btn:hover { background: var(--c-border); }
.leaflet-control.sc-basemap-btn--active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.sc-editor-footer { flex-wrap: wrap; gap: 0.5rem 0.75rem; }
.sc-hint { font-size: 0.76rem; color: var(--c-text-muted); flex: 1 1 220px; min-width: 0; }

/* Вибір кольору / товщини лінії в модалці «Інфо лінії» (2026-09-10) */
.sc-swatch-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.sc-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--c-border-strong);
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1;
}
.sc-swatch--active { box-shadow: 0 0 0 3px var(--c-primary-ring); border-color: var(--c-primary); }
.sc-weight-btn { padding: 0.25rem 0.6rem; font-size: 0.78rem; }
.sc-save-btn--dirty { box-shadow: 0 0 0 3px var(--c-primary-ring); }

/* Пронумерований маркер зафіксованої точки (§2) — лінія, що малюється,
   і вершини вже збережених ліній у редакторі (showVertices). */
.sc-vertex-icon { background: transparent; border: none; }
.sc-vertex-dot {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

/* Leaflet popup content (line/dim) — reuses .pp-popup width from Leaflet popup section */
.sc-popup { width: 220px; font-family: var(--font); }
.sc-popup-head { display: flex; align-items: center; font-size: 0.78rem; font-weight: 700; color: var(--c-text); margin-bottom: 0.25rem; }
.sc-popup-name { font-size: 0.86rem; font-weight: 600; color: var(--c-text); margin-bottom: 0.15rem; overflow-wrap: break-word; }
.sc-popup-note { font-size: 0.78rem; color: var(--c-text-secondary); margin-bottom: 0.25rem; overflow-wrap: break-word; }
.sc-popup-meta { font-size: 0.72rem; color: var(--c-text-muted); margin-bottom: 0.15rem; }
.sc-popup-len { font-size: 0.78rem; font-weight: 600; color: var(--c-text); margin-bottom: 0.3rem; }
.sc-popup-actions { display: flex; gap: 0.4rem; margin-top: 0.3rem; }
.sc-popup-btn {
  flex: 1;
  padding: 0.3rem 0.4rem;
  font-size: 0.72rem;
  font-family: var(--font);
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  color: var(--c-text-secondary);
  cursor: pointer;
}
.sc-popup-btn:hover { background: var(--c-border); }
.sc-popup-btn--danger { color: var(--c-danger); }

/* Dimension label (divIcon) drawn on the map */
.sc-dim-label-wrap { background: transparent; border: none; pointer-events: none; }
.sc-dim-label {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f172a;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,23,42,0.18);
  border-radius: var(--r-sm);
  white-space: nowrap;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .view-pane--schemes { margin-left: 0; margin-right: 0; padding-left: 0.9rem; padding-right: 0.9rem; }
  .sc-card { flex-direction: column; }
  .sc-card-actions { flex-direction: row; border-left: none; border-top: 1px solid var(--c-border); }
  .sc-card-btn { flex: 1; text-align: center; }
}

/* ── 32. Scheme field template + line view modal (TASK_schemes_fields.md §1) ── */

.page-header .btn-action { display: inline-flex; margin-top: 0.7rem; }

.sc-field-required { color: var(--c-danger); }

/* Line info — read-only view (Мапа об'єкта, §1.3) */
.sc-view-row { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.86rem; padding: 0.3rem 0; border-bottom: 1px solid var(--c-border); }
.sc-view-row:last-of-type { border-bottom: none; }
.sc-view-label { color: var(--c-text-muted); flex-shrink: 0; }
.sc-view-value { color: var(--c-text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Admin settings screen: field template list */
.sf-field-list { display: flex; flex-direction: column; gap: 0.5rem; }
.sf-field-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  padding: 0.6rem 0.7rem;
}
.sf-field-order { display: flex; flex-direction: column; gap: 0.2rem; justify-content: center; }
.sf-order-btn {
  width: 26px; height: 26px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  color: var(--c-text-secondary);
  font-size: 0.7rem;
  cursor: pointer;
}
.sf-order-btn:hover:not(:disabled) { background: var(--c-border); }
.sf-order-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.sf-field-body { flex: 1; min-width: 0; }
.sf-field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.sf-field-label { font-size: 0.92rem; font-weight: 700; color: var(--c-text); }
.sf-field-type { font-size: 0.72rem; color: var(--c-text-muted); }
.sf-field-options { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.sf-option-chip {
  font-size: 0.7rem;
  padding: 0.12rem 0.5rem;
  border-radius: var(--r-full);
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  color: var(--c-text-secondary);
}
.sf-field-actions { display: flex; flex-direction: column; gap: 0.3rem; justify-content: center; flex-shrink: 0; }

@media (max-width: 640px) {
  .sf-field-row { flex-wrap: wrap; }
  .sf-field-order { flex-direction: row; }
  .sf-field-actions { flex-direction: row; width: 100%; }
  .sf-field-actions .sc-card-btn { flex: 1; text-align: center; }
}

/* ── 33. Side drawer: layers + filters (TASK_schemes_fields.md §2) ── */

.lp-backdrop {
  position: fixed; inset: 0; z-index: 3500;
  background: rgba(15,23,42,0.4);
}
.lp-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 3600;
  width: min(320px, 86vw);
  background: var(--c-surface);
  border-left: 1px solid var(--c-border-strong);
  box-shadow: var(--sh-xl);
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.lp-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.lp-drawer-title { font-size: 1rem; font-weight: 700; color: var(--c-text); }
.lp-drawer-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  color: var(--c-text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
}
.lp-drawer-close:hover { background: var(--c-border); }
.lp-group { border-top: 1px solid var(--c-border); padding-top: 0.6rem; margin-top: 0.6rem; }
.lp-group:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.lp-group-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  background: none; border: none;
  padding: 0.3rem 0.1rem;
  font-size: 0.82rem; font-weight: 700; color: var(--c-text);
  text-transform: uppercase; letter-spacing: 0.04em;
  cursor: pointer;
}
.lp-group-caret { color: var(--c-text-muted); transition: transform 0.15s; }
.lp-group-body { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.4rem; }
.lp-group-body--collapsed { display: none; }
.lp-date-row { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem; }
.lp-date-row .filter-date-input { flex: 1; min-width: 0; }
.lp-group-body .filter-search-input { width: 100%; box-sizing: border-box; }
.lp-group-body .filter-sort-select { width: 100%; height: 34px; margin-top: 0.4rem; box-sizing: border-box; }
/* Recorded-content checkboxes (width/depth/other) — only shown while
   "during" is checked; indented to read as a sub-set of that stage. */
.lp-subgroup {
  display: flex; flex-direction: column; gap: 0.25rem;
  margin-left: 0.6rem; padding-left: 0.55rem;
  border-left: 2px solid var(--c-border);
}
.lp-actions-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.lp-actions-row .filter-quick-btn { flex: 1 1 auto; text-align: center; }

/* ── PDF: static map (tiles + SVG overlay) for scheme export ────── */
@media print {
  .sc-pdf-map { position: relative; overflow: hidden; margin-bottom: 14pt; border: 1pt solid #E2DCD2; border-radius: 3pt; page-break-inside: avoid; }
  .sc-pdf-tile { position: absolute; width: 256px; height: 256px; display: block; }
  .sc-pdf-svg { position: absolute; top: 0; left: 0; }
  .sc-pdf-attr { position: absolute; bottom: 2pt; right: 4pt; font-size: 6pt; color: #5E727D; background: rgba(255,255,255,0.75); padding: 0 2pt; }
  .sc-pdf-table th { font-size: 8pt; font-weight: 700; color: #5E727D; text-transform: uppercase; letter-spacing: 0.04em; text-align: left; padding: 2pt 6pt 4pt 0; border-bottom: 1pt solid #E2DCD2; }
  .sc-pdf-table td { border-bottom: 0.5pt solid #EFEBE3; }

  /* Легенда ділянки: картки підключень стовпчиком, дві колонки внизу */
  .pdf-area-legend { display: flex; flex-wrap: wrap; gap: 7pt; align-items: flex-start; margin-bottom: 10pt; }
  .pdf-legend-item { flex: 1 1 45%; max-width: 49%; border: 0.75pt solid #E2DCD2; border-radius: 3pt; background: #FBFAF7; padding: 5pt 7pt; page-break-inside: avoid; }
  .pdf-legend-head { display: flex; align-items: center; gap: 4pt; margin-bottom: 3pt; font-weight: 700; font-size: 9pt; color: #14242E; }
  .pdf-legend-idx { display: inline-flex; align-items: center; justify-content: center; width: 13pt; height: 13pt; border-radius: 50%; background: #14242E; color: #fff; font-size: 7.5pt; flex: 0 0 auto; }
  .pdf-legend-title { min-width: 0; overflow-wrap: break-word; }
  .pdf-legend-row { display: flex; gap: 6pt; font-size: 8.5pt; line-height: 1.35; }
  .pdf-legend-k { flex: 0 0 40%; color: #5E727D; }
  .pdf-legend-v { flex: 1 1 auto; color: #14242E; overflow-wrap: break-word; }
}
