/* v69: спільна оболонка — єдина шапка, панель налаштувань, анімація «переїзду».
   Підключається ПІСЛЯ власного <style> сторінки, щоб перекрити фон активної вкладки. */

/* ---- вкладки з пілюлею, що переїжджає ---- */
.tabs { position: relative; }
.tabs .pill {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0;
  background: #fff; border-radius: 8px; z-index: 0;
  transition: transform .34s cubic-bezier(.34,.9,.3,1),
              width     .34s cubic-bezier(.34,.9,.3,1);
}
.tabs a { position: relative; z-index: 1; transition: color .22s; }
.tabs a.on { background: transparent; color: var(--navy); font-weight: 700; }

/* ---- панель налаштувань під шапкою ---- */
.toolbar {
  background: #fff; border-bottom: 1px solid var(--c3, #E2DFDA);
  padding: 9px 16px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(0,53,107,.06); position: relative; z-index: 900;
}
.toolbar .tlabel {
  font-size: 11px; font-weight: 800; color: #77736D;
  text-transform: uppercase; letter-spacing: .5px; margin-right: 2px;
}
.toolbar .sep { width: 1px; height: 24px; background: var(--c3, #E2DFDA); margin: 0 3px; }
.toolbar .tspacer { margin-left: auto; font-size: 12px; color: #77736D; }
.toolbar input[type=date], .toolbar select, .toolbar input[type=number], .toolbar input[type=text] {
  border: 1.5px solid var(--c3, #E2DFDA); border-radius: 9px; padding: 7px 10px;
  font: inherit; font-size: 13px; background: #fff; color: var(--text, #1D2B3A);
}
.toolbar > button {
  border: 0; border-radius: 9px; padding: 8px 14px;
  font: 700 13px 'Open Sans', system-ui, sans-serif; cursor: pointer;
  background: var(--navy, #00356B); color: #fff;
}
.toolbar > button.light { background: #fff; color: var(--navy, #00356B); border: 1.5px solid var(--c3, #E2DFDA); }
.toolbar > button.red { background: var(--red, #E82A2C); color: #fff; }

/* перемикачі (трек, звук) у світлій панелі */
.toolbar .trk {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: var(--text, #1D2B3A); cursor: pointer; background: #fff;
  border: 1.5px solid var(--c3, #E2DFDA); border-radius: 9px; padding: 6px 11px;
}
.toolbar .trk svg { width: 15px; height: 15px; }

/* ---- анімація «переїзду» контенту ---- */
.shell-inR  { animation: shellInR  .30s cubic-bezier(.22,.61,.36,1); }
.shell-inL  { animation: shellInL  .30s cubic-bezier(.22,.61,.36,1); }
.shell-outL { animation: shellOutL .20s cubic-bezier(.5,0,.9,.4) forwards; }
.shell-outR { animation: shellOutR .20s cubic-bezier(.5,0,.9,.4) forwards; }
@keyframes shellInR  { from { opacity: 0; transform: translateX(34px);  } to { opacity: 1; transform: none; } }
@keyframes shellInL  { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
@keyframes shellOutL { to { opacity: 0; transform: translateX(-26px); } }
@keyframes shellOutR { to { opacity: 0; transform: translateX(26px);  } }

@media (prefers-reduced-motion: reduce) {
  .tabs .pill { transition: none; }
  .shell-inR, .shell-inL, .shell-outL, .shell-outR { animation: none; }
}

/* ---- v75: пошук на карті ---- */
.msearch { position: absolute; left: 50px; top: 11px; z-index: 900; font-size: 13px;
           font-family: 'Open Sans', system-ui, sans-serif; }
.msearch .ms-btn { width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 0;
                   display: flex; align-items: center; justify-content: center;
                   color: var(--navy, #00356B); cursor: pointer;
                   box-shadow: 0 2px 8px rgba(0,20,50,.25); }
.msearch .ms-btn:hover { background: #F3F1EF; }
.msearch.open .ms-btn { display: none; }
.msearch .ms-box { display: none; background: #fff; border-radius: 11px;
                   box-shadow: 0 6px 26px rgba(0,20,50,.3); width: 330px; overflow: hidden; }
.msearch.open .ms-box { display: block; }
.msearch .ms-in { display: flex; align-items: center; gap: 8px; padding: 9px 11px;
                  border-bottom: 1px solid var(--c2, #EFEEEC); }
.msearch .ms-in > svg { color: #77736D; flex: none; }
.msearch .ms-in input { border: 0; outline: 0; font: inherit; font-size: 13.5px; flex: 1;
                        min-width: 0; color: var(--text, #1D2B3A); background: transparent; }
.msearch .ms-x { border: 0; background: transparent; color: #77736D; cursor: pointer;
                 font-size: 18px; line-height: 1; padding: 0 2px; }
.msearch .ms-res { max-height: 250px; overflow: auto; }
.msearch .ms-row { display: flex; align-items: center; gap: 9px; padding: 9px 11px;
                   cursor: pointer; border-bottom: 1px solid var(--c2, #EFEEEC); }
.msearch .ms-row:hover { background: var(--c2, #EFEEEC); }
.msearch .ms-row:last-child { border-bottom: 0; }
.msearch .ms-seq { width: 22px; height: 22px; border-radius: 50%; background: var(--navy, #00356B);
                   color: #fff; font-size: 11px; font-weight: 800; display: flex;
                   align-items: center; justify-content: center; flex: none; }
.msearch .ms-main { flex: 1; min-width: 0; }
.msearch .ms-main b { display: block; font-size: 12.5px; color: var(--navy, #00356B);
                      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msearch .ms-main > span { display: block; font-size: 11.5px; color: #77736D;
                           white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msearch .ms-tag { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; flex: none; }
.msearch .ms-hint { padding: 10px 12px; font-size: 11.5px; color: #77736D; line-height: 1.6; }
.msearch .ms-hint code { background: var(--c2, #EFEEEC); border-radius: 4px; padding: 1px 5px; font-size: 11px; }
.msearch .ms-act { display: flex; align-items: center; gap: 9px; padding: 10px 11px;
                   cursor: pointer; background: #F7FAFF; }
.msearch .ms-act:hover { background: #EEF4FC; }
.msearch .ms-act > svg { color: var(--navy, #00356B); flex: none; }
.msearch .ms-act b { font-size: 12.5px; color: var(--navy, #00356B); display: block; }
.msearch .ms-act span span { font-size: 11.5px; color: #77736D; }
.msearch .ms-found { padding: 10px 12px; background: #E1F5EE; border-top: 1px solid #b9e3d3; }
.msearch .ms-found b { font-size: 12.5px; color: #085041; display: block; }
.msearch .ms-found span { font-size: 11.5px; color: #0b6b52; }
/* v77: булавка має власний фіксований розмір (26x30), підпис висить над нею
   absolute і не впливає на габарити — інакше маркер зміщується при зумі */
.ms-tmp { position: relative; width: 26px; height: 30px; }
.ms-tmp .ms-tmp-lbl { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
               background: var(--navy, #00356B); color: #fff; font-size: 11px;
               font-weight: 700; border-radius: 6px; padding: 3px 8px; white-space: nowrap;
               box-shadow: 0 2px 8px rgba(0,20,50,.35);
               font-family: 'Open Sans', system-ui, sans-serif; pointer-events: none; }

/* v78: перенесення точки на знайдену адресу */
.msearch .ms-movehdr { padding: 9px 12px 5px; font-size: 11px; font-weight: 800; color: #77736D;
                       text-transform: uppercase; letter-spacing: .4px;
                       border-top: 1px solid var(--c2, #EFEEEC); }
.msearch .ms-dist { font-size: 11px; font-weight: 800; color: var(--blue, #285E96); flex: none; }
.msearch .ms-mbtn { font-size: 11px; font-weight: 800; color: #fff; background: var(--navy, #00356B);
                    border-radius: 7px; padding: 4px 9px; flex: none; white-space: nowrap; }
.msearch .ms-move:hover { background: #EEF4FC; }
/* v78: буферна заявка як перетягуваний маркер (circleMarker тягнути не можна) */
.buf-pin { display: block; width: 16px; height: 16px; border-radius: 50%;
           background: var(--red, #E82A2C); border: 2.5px solid #fff;
           box-shadow: 0 2px 5px rgba(0,0,0,.35); cursor: pointer; }
.buf-pin.dragging { box-shadow: 0 0 0 4px rgba(232,42,44,.25), 0 5px 12px rgba(0,0,0,.4); }

/* v79: маркер складу — залитий домик (стандарт: filled лише для маркерів карти) */
.depot-pin { display: flex; align-items: center; gap: 5px; }
.depot-pin i { width: 30px; height: 30px; border-radius: 8px; background: var(--navy, #00356B);
               display: flex; align-items: center; justify-content: center; flex: none;
               box-shadow: 0 0 0 2.5px #fff, 0 2px 7px rgba(0,20,50,.4); }
.depot-pin b { background: var(--navy, #00356B); color: #fff; font-size: 11px; font-weight: 700;
               border-radius: 6px; padding: 3px 8px; white-space: nowrap;
               box-shadow: 0 0 0 1.5px #fff; font-family: 'Open Sans', system-ui, sans-serif;
               pointer-events: none; }

/* v80: водій, підмінений на конкретний рейс */
.drv-repl { color: var(--amber, #B8860B); border-bottom: 1.5px dotted var(--amber, #B8860B); }

/* v83: додавання заправки логістом заднім числом */
.refadd { display: flex; align-items: center; gap: 7px; padding: 8px 0 2px; font-size: 12px; }
.refadd input[type=date] { border: 1.5px solid var(--c3, #E2DFDA); border-radius: 8px;
                           padding: 6px 8px; font: inherit; font-size: 12.5px; }
.refadd input[inputmode=decimal] { border: 1.5px solid var(--c3, #E2DFDA); border-radius: 8px;
                                   padding: 6px 8px; font: inherit; font-size: 12.5px; width: 80px; }
.refadd-btn { border: 1.5px dashed var(--navy, #00356B); background: #fff;
              color: var(--navy, #00356B); border-radius: 8px; padding: 6px 12px;
              font: 700 12px 'Open Sans', system-ui, sans-serif; cursor: pointer; margin-left: auto; }
.refadd-btn:hover { border-style: solid; background: #F7FAFF; }
