/* Final cascade overrides: loaded after the complete theme. */
.plan-point:hover,
.plan-point:focus,
.plan-point:focus-visible {
  border-color: transparent !important;
  outline: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5) !important;
}

.plan-point:hover::after,
.plan-point:focus::after,
.plan-point:focus-visible::after {
  border-color: transparent !important;
}

/* Telegram Mini App style marker search pulse after “На плане”. */
.plan-point.is-focus-target {
  z-index: 25;
  animation: report-point-focus .52s ease-in-out 8;
}

.plan-point.is-focus-target::before {
  inset: -14px !important;
  background: rgba(255, 157, 28, .92) !important;
  filter: blur(6px) !important;
  animation: report-point-focus-glow .52s ease-in-out 8 !important;
}

.plan-polygon {
  animation: none !important;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 2.5px color-mix(in srgb, var(--status) 58%, transparent));
}

.plan-polygon.is-focus-target {
  z-index: 24;
  animation: report-polygon-focus .72s cubic-bezier(.4, 0, .2, 1) 5 !important;
  will-change: transform, filter, fill-opacity;
}

@keyframes report-point-focus {
  50% { transform: translate(-50%, -50%) scale(1.35); }
}

@keyframes report-point-focus-glow {
  0%, 100% { transform: scale(.5); opacity: .15; }
  50% { transform: scale(1.35); opacity: .95; }
}

@keyframes report-polygon-focus {
  0%, 100% {
    transform: scale(1);
    fill-opacity: .72;
    filter: drop-shadow(0 0 2.5px color-mix(in srgb, var(--status) 58%, transparent));
  }
  50% {
    transform: scale(1.075);
    fill-opacity: .96;
    filter: drop-shadow(0 0 9px color-mix(in srgb, var(--status) 92%, transparent));
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-point.is-focus-target,
  .plan-point.is-focus-target::before,
  .plan-polygon.is-focus-target { animation: none !important; }
}

/* Destructive account action: intentionally quiet until the user points at it. */
.user-editor-actions {
  align-items: center;
  flex-wrap: wrap;
}

.delete-user-button {
  margin-right: auto;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(239, 91, 85, .42) !important;
  border-radius: 12px;
  background: transparent !important;
  color: #ff766f !important;
  box-shadow: none !important;
  font-weight: 700;
}

.delete-user-button:hover:not(:disabled) {
  border-color: rgba(239, 91, 85, .8) !important;
  background: rgba(239, 91, 85, .1) !important;
  color: #ff8a84 !important;
}

[data-theme="light"] .delete-user-button {
  color: #a62620 !important;
  border-color: rgba(166, 38, 32, .35) !important;
}

[data-theme="light"] .delete-user-button:hover:not(:disabled) {
  color: #7f1712 !important;
  background: rgba(166, 38, 32, .08) !important;
}

@media (max-width: 640px) {
  .delete-user-button { width: 100%; margin-right: 0; }
}

/* Unified report statuses and plan legend. */
.status-draft { --status: #8b9299; }
.status-new { --status: #f6c62f; }
.status-rework { --status: #9b5de5; }
.status-rejected { --status: #ef4f4f; }
.status-accepted { --status: #36bd72; }
.status-partialRejected { --status: #36bd72; --status-secondary: #ef4f4f; }
.status-partialRework { --status: #36bd72; --status-secondary: #9b5de5; }

.plan-point.status-draft,
.plan-point.status-new,
.plan-point.status-rework,
.plan-point.status-rejected,
.plan-point.status-accepted {
  border-color: color-mix(in srgb, var(--status) 70%, white) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(25,25,25,.9)) !important;
}
.plan-point.status-draft::before,
.plan-point.status-new::before,
.plan-point.status-rework::before,
.plan-point.status-rejected::before,
.plan-point.status-accepted::before { background: var(--status) !important; }
.plan-point.status-draft span,
.plan-point.status-new span,
.plan-point.status-rework span,
.plan-point.status-rejected span,
.plan-point.status-accepted span { color: var(--status) !important; }

.plan-point.status-partialRejected,
.plan-point.status-partialRework {
  border: 2px solid transparent !important;
  background: linear-gradient(#17191a,#17191a) padding-box, conic-gradient(var(--status) 0 50%,var(--status-secondary) 50% 100%) border-box !important;
}
.plan-point.status-partialRejected::before,
.plan-point.status-partialRework::before { background: linear-gradient(90deg,var(--status),var(--status-secondary)) !important; }
.plan-point.status-partialRejected span,
.plan-point.status-partialRework span { color: var(--status-secondary) !important; }

.plan-polygon.status-draft { fill: rgba(139,146,153,.22) !important; stroke: #8b9299 !important; }
.plan-polygon.status-new { fill: rgba(246,198,47,.22) !important; stroke: #f6c62f !important; }
.plan-polygon.status-rework { fill: rgba(155,93,229,.22) !important; stroke: #9b5de5 !important; }
.plan-polygon.status-rejected { fill: rgba(239,79,79,.22) !important; stroke: #ef4f4f !important; }
.plan-polygon.status-accepted { fill: rgba(54,189,114,.22) !important; stroke: #36bd72 !important; }
.plan-polygon.status-partialRejected { fill: url(#partial-rejected-fill) !important; stroke: #36bd72 !important; }
.plan-polygon.status-partialRework { fill: url(#partial-rework-fill) !important; stroke: #9b5de5 !important; }

.status-tag.status-draft { color:#aeb4ba !important; background:rgba(139,146,153,.15) !important; }
.status-tag.status-new { color:#f6c62f !important; background:rgba(246,198,47,.14) !important; }
.status-tag.status-rework { color:#ba8cff !important; background:rgba(155,93,229,.15) !important; }
.status-tag.status-rejected { color:#ff7777 !important; background:rgba(239,79,79,.15) !important; }
.status-tag.status-accepted { color:#67dc98 !important; background:rgba(54,189,114,.15) !important; }
.status-tag.status-partialRejected { color:#fff !important; background:linear-gradient(90deg,rgba(54,189,114,.65),rgba(239,79,79,.65)) !important; }
.status-tag.status-partialRework { color:#fff !important; background:linear-gradient(90deg,rgba(54,189,114,.65),rgba(155,93,229,.65)) !important; }

.plan-legend { min-height: 44px; height: auto !important; flex-wrap: wrap; padding-block: 8px !important; }
.plan-legend i.draft { background:#8b9299 !important; }
.plan-legend i.new { background:#f6c62f !important; }
.plan-legend i.rework { background:#9b5de5 !important; }
.plan-legend i.rejected { background:#ef4f4f !important; }
.plan-legend i.accepted { background:#36bd72 !important; }
.plan-legend i.partialRejected { background:linear-gradient(90deg,#36bd72 50%,#ef4f4f 50%) !important; }
.plan-legend i.partialRework { background:linear-gradient(90deg,#36bd72 50%,#9b5de5 50%) !important; }

/* Report-first creation card. */
.report-create-form { width: min(800px, 100%); }
.annotation-form-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.report-kind-switch span { display: inline-flex; min-height: 42px; align-items: center; padding: 0 16px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 700; }
.report-create-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.report-create-grid > label { grid-column: span 3; }
.report-create-grid > label.wide { grid-column: 1 / -1; }
.report-create-grid > label:nth-last-child(-n+3) { grid-column: span 2; }
.report-create-grid input,
.report-create-grid select { height: 46px; min-height: 46px; box-sizing: border-box; }
.unified-report-form .report-create-grid { width: calc(100% - 22px); }
.unified-report-form .report-create-grid > label { align-self: end; }
.unified-report-form .report-create-grid > input[type="hidden"] { display: none; }
.unified-report-form .report-fields-primary { grid-template-columns: repeat(3,minmax(0,1fr)); }
.unified-report-form .report-fields-primary > label { grid-column: auto; }
.unified-report-form .report-fields-location { grid-template-columns: repeat(4,minmax(0,1fr)); }
.unified-report-form .report-fields-location > label,
.unified-report-form .report-fields-location > label:nth-last-child(-n+3) { grid-column: auto; }
.unified-report-form .report-comment { width: 100%; }
.unified-report-form .report-photo-field { display: grid !important; grid-template-columns: auto minmax(220px,1fr) auto; align-items: center; gap: 12px; }
.unified-report-form .report-photo-field input { height: 46px; min-height: 46px; margin: 0 !important; box-sizing: border-box; }
.unified-report-form .report-photo-field .camera-button { height: 46px; min-height: 46px; margin: 0 !important; white-space: nowrap; box-shadow: none !important; }
.estimate-settings { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 18px; padding: 16px 18px; border-radius: 15px; background: var(--surface-2); }
.estimate-settings div { display: grid; gap: 4px; }
.estimate-settings strong { color: var(--text); }
.estimate-settings span { color: var(--muted); font-size: 11px; }
.estimate-settings button { min-height: 42px; padding: 0 16px; border: 1px solid var(--line) !important; border-radius: 12px; background: var(--surface) !important; color: var(--text) !important; box-shadow: none !important; white-space: nowrap; }
.estimate-settings button:hover { background: color-mix(in srgb, var(--surface) 88%, var(--brand-yellow)) !important; }
.member-organization { display: block; margin-top: 3px; color: var(--muted); }
.materials-editor { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface-2) 72%, transparent); }
.report-section-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.report-section-title span { color: var(--text); font-weight: 800; }
.report-section-title small { color: var(--muted); }
.material-row { display: grid; grid-template-columns: minmax(180px, 2fr) 1fr 1fr 42px; gap: 10px; align-items: end; margin-bottom: 10px; }
.material-row select,
.material-row input,
.material-row .remove-material { height: 48px !important; min-height: 48px !important; box-sizing: border-box; }
.material-row input[readonly] { cursor: default; color: var(--text); opacity: .82; }
.material-row input[type="hidden"] { display: none !important; }
.estimate-picker { position: relative; margin-top: 6px; }
.estimate-picker-trigger { display: flex; width: 100%; height: 48px; align-items: center; justify-content: space-between; gap: 12px; overflow: hidden; padding: 0 14px; border: 1px solid var(--line) !important; border-radius: 13px; background: var(--surface-2) !important; color: var(--text) !important; box-shadow: none !important; text-align: left; white-space: nowrap; text-overflow: ellipsis; }
.estimate-picker-trigger span { flex: none; color: var(--brand-yellow); transition: transform .18s ease; }
.estimate-picker-trigger.open span { transform: rotate(180deg); }
.estimate-picker-menu { position: absolute; z-index: 80; top: calc(100% + 6px); left: 0; width: max(100%, 440px); max-width: min(680px, 82vw); max-height: min(340px, 52vh); overflow-y: auto; overscroll-behavior: contain; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 20px 55px rgba(0,0,0,.48); scrollbar-width: thin; scrollbar-color: var(--brand-yellow) var(--surface-2); }
.estimate-picker-menu[hidden] { display: none !important; }
.estimate-picker-menu button { display: block; width: 100%; min-height: 42px; padding: 9px 12px; border: 0 !important; border-radius: 10px; background: transparent !important; color: var(--text) !important; box-shadow: none !important; text-align: left; line-height: 1.3; }
.estimate-picker-menu button:hover { background: color-mix(in srgb,var(--surface) 82%,var(--brand-yellow)) !important; }
.estimate-picker-menu::-webkit-scrollbar { width: 9px; }
.estimate-picker-menu::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 10px; }
.estimate-picker-menu::-webkit-scrollbar-thumb { background: var(--brand-yellow); border: 2px solid var(--surface-2); border-radius: 10px; }
.material-row .remove-material { border: 1px solid rgba(239,91,85,.32) !important; border-radius: 11px; background: transparent !important; color: #ff766f !important; box-shadow: none !important; font-size: 20px; }
.material-row .remove-material:hover { background: transparent !important; border-color:rgba(239,91,85,.32) !important; box-shadow:none !important; filter:none !important; transform:none !important; }
.add-material-button { width: 100%; min-height: 44px; border: 1px solid var(--line) !important; border-radius: 12px; background: var(--surface) !important; color: var(--text) !important; box-shadow: none !important; font-weight: 800; }
.add-material-button:hover { background: color-mix(in srgb, var(--surface) 88%, var(--brand-yellow)) !important; }
.record-view-materials { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.record-view-materials > small { display: block; margin-bottom: 10px; color: var(--muted); letter-spacing: .12em; }
.record-view-materials > div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-top: 1px solid var(--line); }
.record-view-materials > div span { color: var(--muted); white-space: nowrap; }

@media (max-width: 640px) {
  .report-create-grid { grid-template-columns: 1fr; }
  .unified-report-form .report-fields-primary,
  .unified-report-form .report-fields-location { grid-template-columns: 1fr; }
  .report-create-grid > label,
  .report-create-grid > label.wide,
  .report-create-grid > label:nth-last-child(-n+3) { grid-column: auto; }
  .material-row { grid-template-columns: 1fr 1fr 42px; }
  .material-row label:first-child { grid-column: 1 / -1; }
  .report-section-title { display: block; }
  .report-section-title small { display: block; margin-top: 4px; }
  .estimate-settings { align-items: stretch; flex-direction: column; }
  .estimate-picker-menu { width: min(620px, 82vw); }
}

/* Telegram Mini App point markers: saturated glass badge with a white symbol. */
.plan-point.status-draft,
.plan-point.status-new,
.plan-point.status-rework,
.plan-point.status-rejected,
.plan-point.status-accepted {
  border: 1px solid rgba(255,255,255,.88) !important;
  background: radial-gradient(circle at 34% 27%, rgba(255,255,255,.72) 0 7%, var(--status) 34%, color-mix(in srgb,var(--status) 72%,#111) 100%) !important;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.72), inset 0 -3px 6px rgba(0,0,0,.22), 0 2px 7px rgba(0,0,0,.4) !important;
}
.plan-point.status-draft span,
.plan-point.status-new span,
.plan-point.status-rework span,
.plan-point.status-rejected span,
.plan-point.status-accepted span {
  color: #fff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.38) !important;
}
.plan-point.status-partialRejected,
.plan-point.status-partialRework {
  border: 1px solid rgba(255,255,255,.88) !important;
  background: conic-gradient(from 0deg,var(--status) 0 50%,var(--status-secondary) 50% 100%) !important;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.58), inset 0 -3px 6px rgba(0,0,0,.22), 0 2px 7px rgba(0,0,0,.4) !important;
}
.plan-point.status-partialRejected span,
.plan-point.status-partialRework span {
  color: #fff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.45) !important;
}
.plan-point::after {
  inset: 2px !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg,rgba(255,255,255,.22),transparent 45%) !important;
}

/* Unified flat status markers: no glass, glare, halo or glossy shading. */
.plan-point,
.plan-point.status-draft,
.plan-point.status-new,
.plan-point.status-progress,
.plan-point.status-review,
.plan-point.status-rework,
.plan-point.status-rejected,
.plan-point.status-accepted,
.plan-point.status-done {
  width: 22px !important;
  height: 22px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--status) !important;
  box-shadow: 0 0 7px color-mix(in srgb,var(--status) 72%,transparent),0 0 15px color-mix(in srgb,var(--status) 38%,transparent) !important;
  filter: none !important;
  animation: flat-point-pulse 3.6s ease-in-out infinite !important;
}
.plan-point.status-partialRejected,
.plan-point.status-partialRework {
  width: 22px !important;
  height: 22px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(90deg,var(--status) 0 50%,var(--status-secondary) 50% 100%) !important;
  box-shadow: 0 0 7px color-mix(in srgb,var(--status) 72%,transparent),0 0 15px color-mix(in srgb,var(--status-secondary) 38%,transparent) !important;
  filter: none !important;
  animation: flat-point-pulse 3.6s ease-in-out infinite !important;
}
.plan-point::before,
.plan-point::after {
  display: none !important;
  content: none !important;
  animation: none !important;
}
.plan-point span,
.plan-point.status-draft span,
.plan-point.status-new span,
.plan-point.status-rework span,
.plan-point.status-rejected span,
.plan-point.status-accepted span,
.plan-point.status-partialRejected span,
.plan-point.status-partialRework span {
  color: #fff !important;
  font: 900 12px/1 Arial,sans-serif !important;
  text-shadow: none !important;
}
.plan-point:hover,
.plan-point.selected {
  border: 0 !important;
  outline: 0 !important;
  background: var(--status) !important;
  color: #fff !important;
  box-shadow: 0 0 9px color-mix(in srgb,var(--status) 82%,transparent),0 0 19px color-mix(in srgb,var(--status) 45%,transparent) !important;
  filter: none !important;
}
.plan-point.status-partialRejected:hover,
.plan-point.status-partialRejected.selected,
.plan-point.status-partialRework:hover,
.plan-point.status-partialRework.selected {
  background: linear-gradient(90deg,var(--status) 0 50%,var(--status-secondary) 50% 100%) !important;
}
@keyframes flat-point-pulse {
  0%,100% { box-shadow: 0 0 6px color-mix(in srgb,var(--status) 58%,transparent),0 0 12px color-mix(in srgb,var(--status) 28%,transparent); }
  50% { box-shadow: 0 0 9px color-mix(in srgb,var(--status) 76%,transparent),0 0 19px color-mix(in srgb,var(--status) 42%,transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .plan-point { animation: none !important; }
}

/* Keep every status color immutable under the global button hover rules. */
.plan-stage .plan-point.status-draft,
.plan-stage .plan-point.status-draft:hover,
.plan-stage .plan-point.status-draft.selected { background:#8b9299 !important; background-color:#8b9299 !important; }
.plan-stage .plan-point.status-new,
.plan-stage .plan-point.status-new:hover,
.plan-stage .plan-point.status-new.selected { background:#f6c62f !important; background-color:#f6c62f !important; }
.plan-stage .plan-point.status-rework,
.plan-stage .plan-point.status-rework:hover,
.plan-stage .plan-point.status-rework.selected { background:#9b5de5 !important; background-color:#9b5de5 !important; }
.plan-stage .plan-point.status-rejected,
.plan-stage .plan-point.status-rejected:hover,
.plan-stage .plan-point.status-rejected.selected { background:#ef4f4f !important; background-color:#ef4f4f !important; }
.plan-stage .plan-point.status-accepted,
.plan-stage .plan-point.status-accepted:hover,
.plan-stage .plan-point.status-accepted.selected { background:#36bd72 !important; background-color:#36bd72 !important; }
.plan-stage .plan-point.status-progress,
.plan-stage .plan-point.status-progress:hover,
.plan-stage .plan-point.status-progress.selected { background:#f6c62f !important; background-color:#f6c62f !important; }
.plan-stage .plan-point.status-review,
.plan-stage .plan-point.status-review:hover,
.plan-stage .plan-point.status-review.selected { background:#f6c62f !important; background-color:#f6c62f !important; }
.plan-stage .plan-point.status-done,
.plan-stage .plan-point.status-done:hover,
.plan-stage .plan-point.status-done.selected { background:#36bd72 !important; background-color:#36bd72 !important; }
.plan-stage .plan-point.status-partialRejected,
.plan-stage .plan-point.status-partialRejected:hover,
.plan-stage .plan-point.status-partialRejected.selected { background:linear-gradient(90deg,#36bd72 0 50%,#ef4f4f 50% 100%) !important; background-color:transparent !important; }
.plan-stage .plan-point.status-partialRework,
.plan-stage .plan-point.status-partialRework:hover,
.plan-stage .plan-point.status-partialRework.selected { background:linear-gradient(90deg,#36bd72 0 50%,#9b5de5 50% 100%) !important; background-color:transparent !important; }

/* Full-width plan: record details open in a modal card instead of a side panel. */
.plan-layout { grid-template-columns:minmax(0,1fr) !important; }
.plan-layout .plan-stage-wrap { width:100%; }

/* Modal close icon: never draw the global interactive hover tile behind it. */
.annotation-form-head .annotation-close,
.annotation-form-head .annotation-close:hover,
.annotation-form-head .annotation-close:focus,
.annotation-form-head .annotation-close:focus-visible,
.annotation-form-head .annotation-close:active {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
.annotation-form-head .annotation-close:hover {
  color: var(--muted) !important;
}

/* Крестики во всех карточках остаются нейтральными при наведении. */
.delete-photo:hover,
[data-remove-selected-photo]:hover,
.camera-dialog .annotation-close:hover,
.photo-viewer-close:hover {
  background:transparent !important;
  border-color:transparent !important;
  box-shadow:none !important;
  filter:none !important;
  transform:none !important;
}

@media (max-width:640px){
  .unified-report-form .report-create-grid { width:100%; }
  .unified-report-form .report-photo-field { grid-template-columns:1fr; }
}

/* Персональная настройка главного меню. */
.sidebar-foot > button[data-action="menu-settings"] svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; }
.menu-settings-dialog { width:min(650px,100%); }
.menu-settings-list { display:grid; gap:8px; margin-top:22px; }
.menu-settings-list article { display:grid; grid-template-columns:26px minmax(150px,1fr) auto auto; align-items:center; gap:12px; min-height:54px; padding:8px 10px 8px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); }
.menu-settings-list article > svg { width:21px; height:21px; fill:none; stroke:var(--muted); stroke-width:1.7; }
.menu-settings-list article > strong { color:var(--text); }
.menu-settings-list article > label { display:flex; align-items:center; gap:7px; margin:0; color:var(--muted); }
.menu-settings-list article > label input { width:18px !important; height:18px; min-height:0 !important; margin:0 !important; accent-color:var(--brand-yellow); }
.menu-settings-list article > div { display:flex; gap:6px; }
.menu-settings-list article > div button { width:34px; height:34px; padding:0; border:1px solid var(--line) !important; border-radius:9px; background:transparent !important; color:var(--text) !important; box-shadow:none !important; }
.menu-settings-list article > div button:hover:not(:disabled) { background:color-mix(in srgb,var(--surface-2) 78%,var(--brand-yellow)) !important; }
.menu-settings-list article > div button:disabled { opacity:.25; }
.menu-access-settings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 18px; }
.menu-access-settings legend { grid-column:1/-1; }
@media(max-width:560px){.menu-settings-list article{grid-template-columns:24px 1fr auto}.menu-settings-list article>label{grid-column:2}.menu-settings-list article>div{grid-column:3;grid-row:1/3}.menu-access-settings{grid-template-columns:1fr}}

/* Карточки объектов и архив. */
.project-admin { overflow:hidden; border:1px solid var(--line) !important; border-radius:20px !important; background:var(--surface) !important; box-shadow:0 12px 34px rgba(0,0,0,.16); }
.project-admin > header { border:0 !important; border-radius:19px 19px 0 0 !important; }
.project-admin.collapsed > header { border-radius:19px !important; }
.project-admin.collapsed .project-admin-content { display:none; }
.project-admin-icon svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:1.7; }
.project-admin .archive-project-button { color:#ff7772 !important; border-color:rgba(239,79,79,.35) !important; }
.estimate-setting-actions { display:flex !important; grid-auto-flow:column; gap:8px !important; align-items:center; }
.project-archive-section { margin-top:28px; padding:20px; border:1px solid var(--line); border-radius:20px; background:var(--surface); }
.project-archive-section > header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:14px; }
.project-archive-section h2 { margin:4px 0; }
.project-archive-section p { margin:4px 0; color:var(--muted); }
.project-archive-section button { min-height:40px; padding:0 13px; border:1px solid var(--line) !important; border-radius:11px; background:var(--surface-2) !important; color:var(--text) !important; box-shadow:none !important; }
.project-archive-section > div { display:grid; gap:10px; }
.project-archive-section article { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:15px; border:1px solid var(--line); border-radius:15px; background:var(--surface-2); }
.project-archive-section article > div:first-child { display:grid; gap:4px; }
.project-archive-section article span,.project-archive-section article small { color:var(--muted); }
.project-archive-section article > div:last-child { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.project-archive-section .danger { color:#ff7772 !important; border-color:rgba(239,79,79,.35) !important; }
@media(max-width:800px){.project-admin>header,.project-archive-section>header,.project-archive-section article{align-items:flex-start;flex-direction:column}.estimate-setting-actions{grid-auto-flow:row!important;align-items:stretch}.project-archive-section article>div:last-child{justify-content:flex-start}}

/* “Show on plan”: scale the mark and pulse its own status glow. */
.plan-stage .plan-point.is-focus-target {
  z-index: 25 !important;
  animation: focused-point-pulse .72s cubic-bezier(.4,0,.2,1) 6 !important;
  will-change: transform, box-shadow;
}
.plan-stage .plan-polygon.is-focus-target {
  animation: focused-polygon-pulse .78s cubic-bezier(.4,0,.2,1) 6 !important;
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform, filter, fill-opacity;
}
@keyframes focused-point-pulse {
  0%,100% {
    transform: translate(-50%,-50%) scale(1);
    box-shadow: 0 0 7px color-mix(in srgb,var(--status) 68%,transparent),0 0 15px color-mix(in srgb,var(--status) 34%,transparent);
  }
  50% {
    transform: translate(-50%,-50%) scale(1.38);
    box-shadow: 0 0 12px color-mix(in srgb,var(--status) 96%,transparent),0 0 30px color-mix(in srgb,var(--status) 70%,transparent);
  }
}
@keyframes focused-polygon-pulse {
  0%,100% {
    transform: scale(1);
    fill-opacity: .72;
    filter: drop-shadow(0 0 3px color-mix(in srgb,var(--status) 60%,transparent));
  }
  50% {
    transform: scale(1.085);
    fill-opacity: .96;
    filter: drop-shadow(0 0 12px color-mix(in srgb,var(--status) 96%,transparent));
  }
}
@media (prefers-reduced-motion: reduce) {
  .plan-stage .plan-point.is-focus-target,
  .plan-stage .plan-polygon.is-focus-target { animation: none !important; }
}

/* Detailed contractor analytics, aligned with the field Mini App. */
.contractor-analytics { display:grid; gap:14px; margin-top:22px; }
.contractor-analytics > h2,
.analytics-sections > h2 { margin:0 0 4px; font-size:20px; }
.contractor-analytics-card { padding:20px; border:1px solid var(--line); border-radius:18px; background:var(--panel); display:grid; gap:16px; }
.contractor-analytics-card:hover { background:var(--interactive-hover); border-color:var(--line); }
.contractor-analytics-card header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.contractor-analytics-card header div { display:grid; gap:4px; }
.contractor-analytics-card header strong { font-size:18px; }
.contractor-analytics-card header small { color:var(--muted); }
.contractor-analytics-card header > b { color:var(--accent); font-size:26px; }
.contractor-analytics-actions { display:flex; flex-wrap:wrap; gap:8px; }
.contractor-analytics-actions button,
.contractor-analytics-actions > span { min-height:34px; padding:7px 12px; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--text); font:inherit; }
.contractor-analytics-actions button { color:var(--accent); cursor:pointer; }
.contractor-analytics-actions button:hover { background:var(--interactive-hover); box-shadow:none; }
.contractor-analytics-metrics,
.contractor-finance { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.contractor-analytics-metrics > span,
.contractor-finance > span { padding:12px; border-radius:12px; background:color-mix(in srgb,var(--panel) 76%,var(--text) 4%); display:grid; gap:5px; }
.contractor-analytics-metrics small { color:var(--muted); }
.contractor-analytics-metrics strong { font-size:18px; }
.contractor-analytics-metrics .danger { color:#ef5b55; }
.contractor-progress i { display:block; height:6px; overflow:hidden; border-radius:999px; background:color-mix(in srgb,var(--text) 9%,transparent); }
.contractor-progress em { display:block; height:100%; border-radius:inherit; background:var(--accent); }
.contractor-finance b { color:var(--accent); margin-top:3px; }
.analytics-sections { margin-top:22px; }
@media (max-width:800px) {
  .contractor-analytics-metrics,
  .contractor-finance { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Offline queue states and conflict resolution. */
.offline-operation { align-items:flex-start !important; gap:14px; }
.offline-operation > div:first-child { min-width:0; flex:1; }
.offline-operation p { margin:5px 0 0; color:#ef7670; font-size:11px; }
.offline-operation.state-conflict { border-left:3px solid #9b5de5; }
.offline-operation.state-failed { border-left:3px solid #ef4f4f; }
.offline-operation.state-retry { border-left:3px solid #f6c62f; }
.offline-operation-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; flex-wrap:wrap; }
.offline-operation-actions button { min-height:32px; padding:6px 10px; border:1px solid var(--line); border-radius:9px; background:transparent; color:var(--accent); }
.offline-operation-actions button:hover { background:var(--interactive-hover); box-shadow:none; }

/* Photo preparation: real thumbnails, size and removal before upload. */
.chosen-photos { display:grid !important; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:10px !important; margin-top:12px; }
.chosen-photo-card { position:relative; min-width:0; margin:0; overflow:hidden; border:1px solid var(--line); border-radius:13px; background:var(--surface-2); }
.chosen-photo-card img { display:block; width:100%; height:104px; object-fit:cover; }
.chosen-photo-card figcaption { display:grid; gap:3px; padding:8px 10px; }
.chosen-photo-card figcaption strong { overflow:hidden; color:var(--text); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.chosen-photo-card figcaption small { color:var(--muted); font-size:9px; }
.chosen-photo-card > button { position:absolute; top:7px; right:7px; width:28px; height:28px; padding:0; border:0; border-radius:50%; background:rgba(14,14,14,.76); color:#fff; box-shadow:none; }
.chosen-photo-card > button:hover { background:rgba(14,14,14,.9); color:var(--accent); }
.chosen-photo-total { grid-column:1/-1; margin:0; color:var(--muted); font-size:10px; }
.camera-review img { display:block; width:100%; max-height:65vh; border-radius:16px; background:#000; object-fit:contain; }
.camera-review-actions[hidden],
.camera-live-actions[hidden] { display:none !important; }
.camera-review-actions { display:grid; grid-template-columns:1fr; gap:9px; margin-top:12px; }
.camera-review-actions>div { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.camera-review-actions button { min-height:46px; }
.camera-review-actions>.camera-use { width:100%; }
.camera-editor[hidden] { display:none!important; }
.camera-editor { display:grid; gap:10px; }
.camera-editor>canvas { display:block; width:100%; max-height:58vh; border-radius:16px; background:#000; object-fit:contain; touch-action:none; }
.camera-editor-tools { display:flex; align-items:center; gap:7px; overflow-x:auto; padding-bottom:3px; }
.camera-editor-tools button,.camera-editor-tools label,.camera-editor-text button { flex:0 0 auto; min-height:38px; padding:0 11px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--text); box-shadow:none; }
.camera-editor-tools button.active { background:var(--interactive-hover); color:var(--accent); }
.camera-editor-tools label { display:flex; align-items:center; gap:7px; font-size:11px; }
.camera-editor-tools input[type="color"] { width:30px; height:28px; padding:0; border:0; background:transparent; }
.camera-editor-tools input[type="range"] { width:88px; }
.camera-editor-text { display:grid; grid-template-columns:1fr auto; gap:8px; }
.camera-editor-text input { min-width:0; min-height:42px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); color:var(--text); }
.camera-editor-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
@media(max-width:600px){.camera-dialog{max-height:100svh!important}.camera-editor-tools{margin-inline:-4px}.camera-editor-text{grid-template-columns:1fr}.camera-editor-actions{grid-template-columns:1fr}.camera-editor>canvas{max-height:48vh}}

/* Guided customer/executive PDF builder. */
.export-builder { width:min(760px,calc(100vw - 28px)); }
.export-builder-form { display:grid; gap:20px; margin-top:20px; }
.export-kind { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.export-kind label { display:flex; align-items:center; gap:9px; min-height:50px; padding:0 15px; border:1px solid var(--line); border-radius:13px; background:var(--surface-2); color:var(--text); cursor:pointer; }
.export-kind label:has(input:checked) { background:var(--interactive-hover); color:var(--accent); }
.export-kind input { width:auto !important; margin:0 !important; }
.export-builder-summary { display:grid; gap:5px; padding:14px 16px; border-radius:13px; background:var(--surface-2); }
.export-builder-summary span { color:var(--muted); font-size:11px; }
.export-builder-loading { margin-top:20px; color:var(--muted); }
@media(max-width:600px){.export-kind{grid-template-columns:1fr}}

/* Dedicated equipment and cable registries. */
.page-head-actions { display:flex; align-items:center; gap:9px; }
.production-search { display:flex; align-items:center; gap:9px; margin:18px 0 12px; padding:0 14px; min-height:48px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--muted); }
.production-search input { width:100%; border:0; outline:0; background:transparent; color:var(--text); font:inherit; }

/* Compact plan hierarchy: object above, building and floor in one row. */
.plan-selects{display:grid!important;grid-template-columns:minmax(260px,408px);gap:8px!important}.plan-selects .plan-project-select{width:100%}.plan-location-selects{display:grid;grid-template-columns:1fr 1fr;gap:8px}.plan-location-selects select{width:100%;min-width:0}

/* Object dashboard summaries. */
.project-icon svg,.object-summary-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.object-overview-list{display:grid;gap:10px;margin-top:20px;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.object-overview-list>.card-head{margin-bottom:4px}.object-overview-list h2{margin:0}.object-overview-list details{border:1px solid var(--line);border-radius:14px;background:var(--surface-2);overflow:hidden}.object-overview-list summary{display:grid;grid-template-columns:36px minmax(140px,1fr) minmax(180px,auto) auto;align-items:center;gap:12px;padding:15px;cursor:pointer;list-style:none}.object-overview-list summary::-webkit-details-marker{display:none}.object-overview-list summary small{color:var(--muted)}.object-overview-list summary b{color:var(--brand-yellow)}.object-summary-icon{display:grid;place-items:center}.object-overview-list details>div{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:0 15px 15px}.object-overview-list details>div span{display:flex;justify-content:space-between;gap:8px;padding:12px;border-radius:10px;background:var(--surface);color:var(--muted)}.object-overview-list details>div strong{color:var(--text)}

/* Rooms are compact cards instead of a long unstructured line. */
.floor-card.floor-settings{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%;min-width:0}.rooms-settings{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%;min-width:0!important}.rooms-settings header{border:0!important}.rooms-settings .room-row{display:grid!important;grid-template-columns:minmax(52px,auto) minmax(100px,1fr) auto auto;min-width:0;padding:10px!important}.room-row>span,.room-row>strong{min-width:0!important;overflow-wrap:anywhere}.room-row button{white-space:nowrap}.project-archive-section article>div:first-child{min-width:0}.project-archive-section article h3,.project-archive-section article span,.project-archive-section article small{max-width:100%;overflow-wrap:anywhere}

@media(max-width:700px){
  .workspace>header{position:fixed!important;top:0;left:0;right:0;z-index:45;height:64px!important;background:color-mix(in srgb,var(--bg) 88%,transparent)!important;backdrop-filter:blur(16px) saturate(135%);transition:background .2s,box-shadow .2s,opacity .2s}.workspace{padding-top:64px}.mobile-header-scrolled .workspace>header{background:color-mix(in srgb,var(--bg) 58%,transparent)!important;box-shadow:0 8px 24px #0002;backdrop-filter:blur(22px) saturate(150%)}
  .plan-title{display:grid!important;gap:16px}.plan-selects{grid-template-columns:1fr!important;width:100%}.plan-location-selects{grid-template-columns:1fr 1fr}.plan-selects select{min-height:46px}
  .production-finance{grid-template-columns:1fr!important}.production-finance article{grid-template-columns:minmax(0,1fr) auto!important;gap:10px 14px!important}.production-finance article>small{line-height:1.25;overflow-wrap:anywhere}.production-finance article>strong{font-size:20px!important;white-space:nowrap}.production-section{padding:14px!important}.production-section>header{padding:15px!important}.production-table article,.price-table article{grid-template-columns:1fr!important;gap:10px!important;padding:15px!important}.production-table article>span{display:flex;justify-content:space-between;gap:10px;overflow-wrap:anywhere}.production-table article>button{width:100%;justify-self:stretch!important}.production-section>header{align-items:flex-start!important}.production-section>header button{flex:none}
  .object-overview-list{padding:14px}.object-overview-list summary{grid-template-columns:30px 1fr auto}.object-overview-list summary small{grid-column:2/-1}.object-overview-list details>div{grid-template-columns:1fr 1fr}.project-card{align-items:flex-start!important}.project-card>button{white-space:nowrap}
  .rooms-settings .room-row{grid-template-columns:52px minmax(0,1fr) auto}.room-row button:last-child{grid-column:3}.room-row button:not(:last-child){grid-column:1/-1;width:100%}
}
@media(max-width:420px){.object-overview-list details>div{grid-template-columns:1fr}.plan-location-selects{grid-template-columns:1fr 1fr}.production-finance article>small{font-size:11px!important}.production-finance article>strong{font-size:18px!important}}
.asset-registry { display:grid; gap:10px; }
.asset-registry > article { display:grid; grid-template-columns:minmax(240px,1.5fr) repeat(3,minmax(110px,.55fr)) minmax(120px,.6fr) auto; gap:16px; align-items:center; padding:16px 18px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.asset-registry > article:hover { background:var(--interactive-hover); }
.asset-registry article > div:first-child { display:grid; gap:4px; }
.asset-registry small { color:var(--muted); }
.asset-registry article > span { display:grid; gap:4px; color:var(--muted); font-size:10px; }
.asset-registry article > span b { color:var(--text); font-size:14px; }
.asset-registry article > i { height:6px; overflow:hidden; border-radius:99px; background:color-mix(in srgb,var(--text) 9%,transparent); }
.asset-registry article > i em { display:block; height:100%; border-radius:inherit; background:var(--accent); }
.asset-actions { display:flex; gap:7px; }
.asset-actions button { min-height:36px; padding:0 11px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--accent); }
.asset-actions button:hover { background:var(--interactive-hover); box-shadow:none; }
.asset-actions button:last-child { color:#ef7670; }
.production-editor .annotation-fields { margin-top:20px; }
@media(max-width:1100px){.asset-registry>article{grid-template-columns:minmax(220px,1fr) repeat(3,minmax(90px,.5fr));}.asset-registry article>i,.asset-actions{grid-column:1/-1}}
@media(max-width:650px){.page-head-actions{align-items:stretch;flex-direction:column}.asset-registry>article{grid-template-columns:1fr 1fr}.asset-registry article>div:first-child{grid-column:1/-1}}
.role-guest #registry-to-plan{display:none}
.role-guest #upload-document{display:none}
.document-delete{align-self:center;border:1px solid rgba(239,68,68,.35);border-radius:12px;padding:10px 14px;color:#ef6a6a;background:transparent}.document-delete:hover{background:rgba(239,68,68,.1);color:#ff8585}
.security-bar { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.security-bar > div:first-child { min-width:260px; }
.backup-actions { display:flex; flex-direction:row; align-items:center; justify-content:flex-end; flex-wrap:nowrap; gap:8px; }
.backup-actions button { width:auto; min-width:max-content; white-space:nowrap; }

@media (max-width: 1050px) {
  .security-bar { align-items:flex-start; flex-direction:column; }
  .backup-actions { width:100%; flex-wrap:wrap; justify-content:flex-start; }
}

/* Mobile workspace: phone-first layout without horizontal page scrolling. */
@media (max-width: 760px) {
  html,body,#app,.app-shell,.workspace { width:100%; max-width:100%; overflow-x:hidden; }
  body { min-width:0; }
  #content { width:100%; padding:18px 12px calc(96px + env(safe-area-inset-bottom)); }
  .workspace>header { padding:0 12px; }
  .page-head { display:block; margin-bottom:20px; }
  .page-head h1 { overflow-wrap:anywhere; }
  .page-head>.primary,.page-head>button { width:100%; justify-content:center; margin-top:14px; }

  .sidebar.open { left:0; right:0; bottom:0; top:auto; width:100%; max-height:72svh; overflow:auto; transform:none; padding:16px 10px calc(14px + env(safe-area-inset-bottom)); border-radius:20px 20px 0 0; box-shadow:0 -18px 55px #000b; }
  .sidebar.open nav { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .sidebar.open nav button { min-height:62px; padding:8px 5px; border-radius:12px; font-size:10px; line-height:1.15; }
  .sidebar.open nav button svg,.sidebar.open nav .nav-pictogram { width:22px; height:22px; font-size:20px; }
  .sidebar.open nav button.active { box-shadow:inset 3px 0 0 var(--brand-yellow); }

  .registry-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .registry-filters { display:grid; grid-template-columns:1fr 1fr; gap:8px; overflow:visible; }
  .registry-filters>* { min-width:0!important; width:100%; }
  .registry-filters>label:first-child { grid-column:1/-1; }
  .registry-table { min-width:0; overflow:visible; border:0; background:transparent; }
  .registry-header { display:none; }
  .registry-row { min-width:0!important; display:grid; grid-template-columns:1fr 1fr; gap:9px 12px; margin-bottom:9px; padding:15px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
  .registry-row>div:first-child { grid-column:1/-1; }
  .registry-row>span { min-width:0; font-size:11px; overflow-wrap:anywhere; }
  .registry-row>span:nth-child(2)::before { content:"Раздел · "; color:var(--muted); }
  .registry-row>span:nth-child(3)::before { content:"Ответственный · "; color:var(--muted); }
  .registry-row>span:nth-child(4)::before { content:"Срок · "; color:var(--muted); }
  .registry-row>span:nth-child(5)::before { content:"Статус · "; color:var(--muted); }
  .registry-actions { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; }
  .registry-actions button { min-height:42px; }
  .registry-pagination { justify-content:space-between; gap:7px; }
  .registry-pagination button { padding:0 10px; }
  .export-bar { display:grid; grid-template-columns:1fr 1fr; }
  .export-bar span { grid-column:1/-1; }

  .plan-toolbar { display:flex; flex-wrap:wrap; gap:8px; padding:10px; overflow:visible; }
  .plan-modes,.plan-tools { width:100%; display:flex; flex-wrap:wrap; gap:6px; }
  .plan-tools select { flex:1 1 150px; }
  .plan-stage { min-height:55svh; }
  .plan-legend { overflow-x:auto; padding-bottom:7px; }
  .plan-legend span { flex:0 0 auto; }

  .annotation-form { width:100%; height:auto; max-height:94svh; padding:20px 14px calc(18px + env(safe-area-inset-bottom)); border-radius:20px 20px 0 0; }
  .annotation-form-head h2 { font-size:26px; }
  .annotation-actions { display:grid; grid-template-columns:1fr; }
  .annotation-actions>* { width:100%!important; min-height:46px; justify-content:center; }
  .record-card-footer { grid-template-columns:1fr; }
  .record-card-footer .edit-from-card { grid-column:auto; }
  .report-photo-field { display:grid!important; grid-template-columns:1fr; gap:8px; }
  .report-photo-field .camera-button { width:100%; margin:0; }
  .material-row { min-width:0; }

  .project-admin>header>div:last-child,.building-head>div:last-child,.floor-card footer>div,.estimate-setting-actions { display:flex; flex-wrap:wrap; gap:7px; }
  .project-admin button { min-height:40px; margin-left:0; }
  .estimate-settings { align-items:flex-start; flex-direction:column; gap:12px; }
  .estimate-setting-actions { width:100%; }
  .estimate-setting-actions button { flex:1 1 140px; }
  .project-archive-section>header,.project-archive-section article { align-items:flex-start; flex-direction:column; }
  .project-archive-section article>div:last-child { width:100%; display:grid; grid-template-columns:1fr; }

  .security-bar { padding:15px; }
  .backup-actions { display:grid; grid-template-columns:1fr 1fr; }
  .backup-actions button { min-width:0; width:100%; }
  .team-list { overflow:visible; }
  .team-member { min-width:0; }
  .deletion-list>article,.export-center article { align-items:stretch; flex-direction:column; }
  .deletion-list>article>div:last-child { display:grid; grid-template-columns:1fr 1fr; width:100%; }
}

@media (max-width: 380px) {
  .registry-filters,.registry-row,.registry-actions,.backup-actions { grid-template-columns:1fr; }
  .registry-row>div:first-child,.registry-filters>label:first-child,.registry-actions { grid-column:auto; }
  .metrics,.registry-metrics { grid-template-columns:1fr 1fr; }
  .header-actions button { width:34px; height:34px; }
}

/* Brand assets: full lockup normally, standalone mark in collapsed navigation. */
.brand-logo-mark { display:none; }
.sidebar-collapsed .sidebar-brand .brand-logo-full { display:none!important; }
.sidebar-collapsed .sidebar-brand .brand-logo-mark {
  display:block!important;
  width:48px!important;
  height:48px!important;
  max-width:48px!important;
  object-fit:contain!important;
  object-position:center!important;
}
.sidebar-collapsed .sidebar-brand .brand { width:52px!important; flex-basis:52px!important; overflow:visible; }
.sidebar-collapsed .sidebar-brand { width:52px; overflow:visible; }
@media (max-width: 760px) {
  .sidebar .brand-logo-mark { display:none!important; }
  .sidebar .brand-logo-full { display:block!important; }
}

/* Mobile pull-to-refresh: refresh data in place without navigating to Dashboard. */
html::before {
  content:"Потяните вниз для обновления";
  position:fixed;
  z-index:2000;
  top:max(8px,env(safe-area-inset-top));
  left:50%;
  min-width:210px;
  padding:10px 16px;
  border-radius:999px;
  background:var(--surface,#191a18);
  color:var(--text,#fff);
  border:1px solid var(--line,#333);
  box-shadow:0 12px 30px rgba(0,0,0,.28);
  font:700 12px/1.2 Inter,"Segoe UI",sans-serif;
  text-align:center;
  opacity:0;
  transform:translate(-50%,calc(-130% + var(--pull-distance,0px)));
  pointer-events:none;
  transition:opacity .12s,transform .12s;
}
html.pull-ready::before{content:"Отпустите для обновления"}
html.pull-active::before{opacity:1}
html.pull-refreshing::before{content:"Синхронизация…";opacity:1;transform:translate(-50%,0)}
@media(min-width:901px){html::before{display:none}}

/* Compact in-app keypad for numeric fields on phones. */
.compact-number-keypad{display:none}
@media (max-width:900px){
  /* Prevent browser auto-zoom on focus while keeping user pinch-zoom available. */
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:16px!important}
}
@media (max-width:900px) and (pointer:coarse){
  body.compact-keypad-open{padding-bottom:calc(218px + env(safe-area-inset-bottom))}
  input.compact-keypad-active{background:color-mix(in srgb,var(--surface-2) 82%,var(--brand-yellow))!important;box-shadow:0 0 0 2px var(--brand-yellow)!important}
  .compact-number-keypad{
    position:fixed;z-index:5000;left:8px;right:8px;bottom:8px;
    display:block;padding:9px 10px calc(9px + env(safe-area-inset-bottom));
    border:1px solid var(--line);border-radius:18px;
    background:color-mix(in srgb,var(--surface) 94%,transparent);
    box-shadow:0 -12px 36px rgba(0,0,0,.32);backdrop-filter:blur(18px);
  }
  .compact-keypad-head{height:31px;display:flex;align-items:center;justify-content:space-between;padding:0 4px 7px;color:var(--muted);font-size:11px}
  .compact-keypad-head strong{max-width:65%;overflow:hidden;text-overflow:ellipsis;color:var(--text);font-size:17px}
  .compact-keypad-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}
  .compact-keypad-grid button{height:37px;min-height:37px;padding:0;border:0;border-radius:10px;background:var(--surface-2);color:var(--text);font-size:17px;font-weight:700;box-shadow:none!important}
  .compact-keypad-grid button:active{background:color-mix(in srgb,var(--surface-2) 82%,var(--brand-yellow))}
  .compact-keypad-grid .key-zero{grid-column:span 2}
  .compact-keypad-grid .key-done{background:var(--brand-yellow);color:#17171a}
}
