/* ============================================================
   sheet.css — шторки, тосты, action-bar, панели гидов/техники
   ============================================================ */
#sheetBackdrop{ position:fixed; inset:0; z-index:60; background:var(--backdrop); opacity:0; pointer-events:none; transition:opacity .22s; touch-action:none; /* v9mvp-UI-ZOOM-MODAL-FIX */ }
#sheetBackdrop.show{ opacity:1; pointer-events:auto; }

.sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:65;
  max-width:560px; margin:0 auto;
  background:var(--surface-modal); border:1px solid var(--line-modal); border-bottom:0;
  border-radius:20px 20px 0 0; padding:10px 16px calc(18px + env(safe-area-inset-bottom));
  transform:translateY(105%); transition:transform .3s cubic-bezier(.22,.9,.28,1);
  box-shadow:0 -18px 50px var(--shadow-modal);
  touch-action:pan-y; /* v9mvp-UI-ZOOM-MODAL-FIX: скролл внутри шторки работает, pinch-zoom запрещён */
}
.sheet.open{ transform:none; }
.sheet-handle{ width:44px; height:4px; border-radius:8px; background:var(--line-strong); margin:2px auto 12px; }

.sheet-title{ font-family:var(--disp); font-size:17px; font-weight:700; color:var(--accent-light); text-align:center; letter-spacing:.03em; }
.sheet-sub{ text-align:center; font-size:12px; color:var(--text-muted); margin:4px 0 12px; }

.sheet-btn{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:13px 14px; margin-top:8px; border-radius:12px;
  background:var(--surface-control); border:1px solid var(--line);
  font-size:14.5px; font-weight:600; text-align:left;
  transition:border-color .15s, background .15s, transform .12s;
}
.sheet-btn:hover{ border-color:var(--accent); background:var(--surface-control-hover); }
.sheet-btn:active{ transform:scale(.985); }
.sheet-btn:disabled{ opacity:.45; cursor:not-allowed; }
.sheet-btn.danger{ background:var(--danger-bg); border-color:var(--danger-line); color:var(--danger-text); }
.sheet-btn.danger:hover{ background:var(--danger-bg-hover); border-color:var(--danger-line-4); }
.sheet-note{ display:block; text-align:center; font-size:11.5px; color:var(--text-faint); margin-top:5px; }
.sheet-back{ color:var(--text-muted); font-size:13px; margin-bottom:6px; padding:4px 2px; transition:color .15s; }
.sheet-back:hover{ color:var(--accent-light); }

.guide-list{ max-height:40vh; overflow:auto; }
.guide-loading{ color:var(--text-muted); font-size:13px; padding:12px 4px; text-align:center; }

.sheet-close{ width:100%; margin-top:14px; padding:10px; border-radius:12px; color:var(--text-muted); font-size:13px; border:1px solid var(--line); transition:color .15s, border-color .15s; }
.sheet-close:hover{ color:var(--text-primary); border-color:var(--line-strong); }

.toast{
  position:fixed; left:50%; bottom:calc(86px + env(safe-area-inset-bottom)); transform:translate(-50%, 20px); z-index:100;
  background:var(--surface-toast); border:1px solid var(--line); border-left:3px solid var(--danger);
  color:var(--text-primary); font-size:13.5px; padding:11px 16px; border-radius:12px;
  box-shadow:0 14px 34px var(--shadow-menu); opacity:0; transition:opacity .25s, transform .25s;
  max-width:min(92vw, 420px);
}
.toast.ok{ border-left-color:var(--ok); }
.toast.in{ opacity:1; transform:translate(-50%, 0); }

/* ============================================================
   НИЖНЯЯ ПАНЕЛЬ ДЕЙСТВИЙ (action-bar)
   ============================================================ */
.action-bar{
  position:fixed; bottom:0; left:0; right:0; z-index:45;
  display:flex; align-items:center; gap:10px;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background:var(--bar-bg); backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
}
.action-bar .btn-add{ flex:1; }

/* Сдержанные вторичные кнопки (+ Гид, + Техника) */
.btn-add.btn-secondary{
  background:var(--surface-control); color:var(--text-muted); border:1px solid var(--line); box-shadow:none;
  transition:border-color .15s, color .15s, background .15s, transform .14s;
}
.btn-add.btn-secondary:hover{
  border-color:var(--accent); color:var(--accent-light); background:var(--surface-nav-hover); box-shadow:none;
}
.btn-add.btn-secondary:active{ transform:scale(.93); }

/* ============================================================
   ШТОРКА ГИДОВ — дополнительные стили
   ============================================================ */
#guidesBackdrop{ position:fixed; inset:0; z-index:60; background:var(--backdrop); opacity:0; pointer-events:none; transition:opacity .22s; touch-action:none; /* v9mvp-UI-ZOOM-MODAL-FIX */ }
#guidesBackdrop.show{ opacity:1; pointer-events:auto; }

/* ============================================================
   ШТОРКА ТЕХНИКИ
   ============================================================ */
#fleetBackdrop{ position:fixed; inset:0; z-index:60; background:var(--backdrop); opacity:0; pointer-events:none; transition:opacity .22s; touch-action:none; /* v9mvp-UI-ZOOM-MODAL-FIX */ }
#fleetBackdrop.show{ opacity:1; pointer-events:auto; }

input[type="checkbox"]{ width:auto; accent-color:var(--accent); }
.check-row{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-primary); }
.guide-filter{ display:flex; align-items:center; gap:8px; margin:10px 4px; font-size:12.5px; color:var(--text-muted); }
.sheet-btn.inactive{ opacity:.5; }
.guide-state{ margin-left:auto; font-size:11px; color:var(--text-muted); }

/* ============================================================
   ПАНЕЛЬ «ГИДЫ В ПУЛЕ» / «ТЕХНИКА В ПУЛЕ» — строки и мини-кнопки
   ============================================================ */
.trip-guide-row{ display:flex; align-items:center; gap:8px; padding:10px 12px; margin-top:8px; border-radius:12px; background:var(--surface-control); border:1px solid var(--line); }
.trip-guide-name{ font-size:14px; font-weight:600; color:var(--text-row); }
.trip-guide-name.lead{ color:var(--text-lead); }
.trip-guide-name.down{ color:var(--danger-text); }
.tg-actions{ margin-left:auto; display:flex; gap:6px; }
.mini-btn{ padding:6px 10px; border-radius:8px; font-size:12px; font-weight:600; background:var(--surface-mini); border:1px solid var(--line); color:var(--text-primary); transition:border-color .15s, color .15s; }
.mini-btn:hover{ border-color:var(--accent); color:var(--accent-light); }
.mini-btn.danger{ background:var(--danger-bg); border-color:var(--danger-line); color:var(--danger-text); }

/* ============================================================
   КНОПКА ЗАКРЫТИЯ В ПАНЕЛИ «ТЕХНИКА В ПУЛЕ»
   ============================================================ */
.sheet-close-x{ position:absolute; top:10px; right:12px; z-index:6; width:34px; height:34px; border-radius:10px; background:var(--surface-control); border:1px solid var(--line); color:var(--text-muted); font-size:15px; display:grid; place-items:center; transition:color .15s, border-color .15s; }
.sheet-close-x:hover{ color:var(--accent-light); border-color:var(--accent); }

@media (max-width:700px){
  :root{ --gutter:50px; }
  .brand{ display:none; }
  .app{ gap:10px; padding:10px 12px; }
  .date-box{ min-width:0; }
  .btn-add{ padding:10px 14px; }
  main{ padding:10px 2px 130px; }
}

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
}
