:root{
  --bg:#070b10;
  --panel:#0f1622;
  --panel2:#0b111b;
  --text:rgba(240,245,255,.92);
  --muted:rgba(240,245,255,.62);
  --border:rgba(255,255,255,.10);
  --accent:#48D1CC;
  --brand:#ff8a00;
  --shadow: 0 12px 34px rgba(0,0,0,.55);
  --radius:16px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);}

/* App layout */
.app{min-height:100%;display:flex;}
.sidebar{
  width:220px;flex:0 0 220px;
  background:linear-gradient(180deg, rgba(15,22,34,.98), rgba(11,17,27,.98));
  border-right:1px solid var(--border);
  padding:16px 14px 16px 14px;
  position:sticky; top:0; height:100vh;
  /* footer sticks to bottom via flex */
  display:flex;
  flex-direction:column;
}
.brand{
  display:flex;align-items:center;gap:10px;
  text-decoration:none;
  padding:10px 10px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:12px;
}
.brand img{width:22px;height:22px;object-fit:contain;border-radius:6px;}

/* Brand */
.brand-name{
  font-weight:900;
  letter-spacing:.9px;
  color:var(--brand);
  text-transform:uppercase;
  font-size:16px;
  line-height:1;
  text-shadow:0 8px 22px rgba(0,0,0,.55);
}


/* Sidebar menu (tiles) */
.menu{display:flex;flex-direction:column;gap:10px;margin-top:12px;flex:1 1 auto;}
.menu a{
  display:block;
  text-decoration:none;
  color:#fff;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  font-weight:800;
  font-size:15px;
  letter-spacing:.2px;
}
.menu a:hover{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14)}
.menu a.active{background:rgba(72,209,204,.14);border-color:rgba(72,209,204,.30)}

.main{flex:1 1 auto;min-width:0;padding:18px 18px 28px 18px;}
.topbar{display:flex;align-items:center;justify-content:flex-start;gap:12px;margin-bottom:14px;}
.topbar-title{font-weight:900;font-size:20px;letter-spacing:.2px;}

.hamburger{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:8px 10px;
  border-radius:12px;
  font-weight:900;
  cursor:pointer;
}
.hamburger:hover{background:rgba(255,255,255,.06)}
.lang{display:flex;gap:6px;flex-wrap:wrap;}
.lang button{
  cursor:pointer;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-weight:800;
  font-size:12px;
}
.lang button.active{border-color:rgba(72,209,204,.55);background:rgba(72,209,204,.12)}

.sidebar-footer{
  margin-top:auto;
  padding-top:12px;
}

.card{border:1px solid var(--border);border-radius:var(--radius);background:rgba(15,22,34,.70);box-shadow:var(--shadow);overflow:hidden;}
.card .card-body{padding:16px;}
.muted{color:var(--muted)}

/* Page helpers */
.sub{margin:6px 0 0 0;color:var(--muted)}
.hr{height:1px;background:rgba(255,255,255,.08);margin:14px 0;}
.grid2{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:14px;}
.grid-2{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:14px;}
@media (max-width: 980px){.grid2{grid-template-columns:1fr;} .grid-2{grid-template-columns:1fr;}}
.panel{border:1px solid rgba(255,255,255,.10);border-radius:16px;background:rgba(0,0,0,.16);padding:14px;}
.panel h2{margin:0 0 10px 0;font-size:16px;}
.list{margin:0;padding-left:18px;color:var(--text)}
.list li{margin:8px 0;color:rgba(240,245,255,.86)}

/* Calculator embed */
.iframe-wrap{border:1px solid rgba(255,255,255,.10);border-radius:14px;overflow:hidden;background:transparent;}
.iframe-wrap iframe{
    width:100%;
    min-height:1200px;
    height:1200px;
    border:0;
    display:block;
}


/* Calculator page: embed without any page frame/wrapper */
.page-calculator .main{padding:0;}
.page-calculator .topbar{margin:0;padding:10px;position:sticky;top:0;z-index:50;background:transparent;pointer-events:none;}
.page-calculator .topbar .hamburger{pointer-events:auto;}
.calc-embed{border:0;display:block;transform-origin:top left;transform:scale(1.08);width:calc(100% / 1.08);
min-height:1200px;height:1200px;}

/* Shared controls (used by tracking app.js) */
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.input{
  flex: 1 1 280px;
  padding:12px 12px;
  font-size:15px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,0.25);
  color:var(--text);
  outline:none;
}
.input:focus{border-color: rgba(72,209,204,0.70);box-shadow:0 0 0 3px rgba(72,209,204,.14)}

/* Chrome autofill on dark UI: keep inputs dark (prevents white/yellow fields) */
input.input:-webkit-autofill,
input.input:-webkit-autofill:hover,
input.input:-webkit-autofill:focus,
textarea.input:-webkit-autofill,
textarea.input:-webkit-autofill:hover,
textarea.input:-webkit-autofill:focus,
select.input:-webkit-autofill,
select.input:-webkit-autofill:hover,
select.input:-webkit-autofill:focus{
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 999999s ease-in-out 0s;
  box-shadow: 0 0 0px 1000px rgba(0,0,0,0.35) inset !important;
  border: 1px solid rgba(255,255,255,.12);
}

/* Staff auth layout: align labels/fields neatly */
.staff-auth .row{align-items:flex-start}
.staff-auth .label{min-width:84px; padding-top:10px}
.staff-auth .row.actions{padding-left:84px}

@media (max-width: 520px){
  .staff-auth .label{min-width:0; padding-top:0}
  .staff-auth .row.actions{padding-left:0}
}
.btn{
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(72,209,204,0.65);
  background: rgba(72,209,204,0.12);
  color:var(--text);
  cursor:pointer;
  font-size:14px;
  font-weight:800;
}
.btn:hover{background: rgba(72,209,204,0.18)}
.btn[disabled]{opacity:.45;cursor:not-allowed}

/* ZIP buttons must stand out (yellow/orange) */
.btn.zipBtn{
  border-color: rgba(255,165,0,0.85);
  background: rgba(255,165,0,0.14);
  color: var(--text);
}
.btn.zipBtn:hover{
  background: rgba(255,165,0,0.22);
}

/* Album buttons (Pick up / Received) should match the main button style */
.albums{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.albumBtn{
  padding:12px 14px; /* same as .btn */
  min-width:120px;
  justify-content:center;
}
.albumBtn.active{
  background: rgba(72,209,204,0.22);
  border-color: rgba(72,209,204,0.95);
  box-shadow: 0 0 0 3px rgba(72,209,204,.10);
}

/* ZIP download feedback (preparing / downloading) */
.btn.is-loading{
  position: relative;
  padding-left: 40px;
  cursor: progress;
  opacity: .95;
}
.btn.is-loading::before{
  content:"";
  position:absolute;
  left:14px;
  top:50%;
  width:16px;
  height:16px;
  margin-top:-8px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.25);
  border-top-color: rgba(255,255,255,.90);
  animation:pvspin 0.9s linear infinite;
}

/* Strong visible loading line (used in Tracking) */
.loadingline{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,0.22);
  color: var(--muted);
  font-weight:800;
}
.loadingline::before{
  content:"";
  width:16px;height:16px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.25);
  border-top-color: rgba(255,255,255,.85);
  animation:pvspin 0.9s linear infinite;
}

/* Inline preview: drag cursor when zoomed */
.photo-preview .pvViewport{cursor:default; touch-action: pan-y;}
.photo-preview.pvZoomed .pvViewport{cursor:grab;}
.photo-preview.pvZoomed .pvViewport.is-dragging{cursor:grabbing;}

.small{font-size:12px}
.status{margin-top:10px}

.kv{display:grid;grid-template-columns:160px 1fr;gap:10px 12px;margin-top:14px}
.k{color:var(--muted);font-size:12px}
.v{font-weight:800;word-break:break-word}
.kv .v a.link{display:inline;padding:0;border:0;background:transparent;color:var(--accent);text-decoration:underline;font-weight:800}
.kv .v a.link:hover{opacity:.9}

.subcard{border:1px solid rgba(255,255,255,0.10);border-radius:16px;background:rgba(0,0,0,0.15);padding:14px;margin-top:14px}
.subttl{margin:0 0 6px 0;font-size:15px}

.gallery{display:grid;grid-template-columns: repeat(3, minmax(0, 1fr));gap:10px;margin-top:12px}
@media (max-width: 900px){.gallery{grid-template-columns: repeat(2, minmax(0, 1fr));}}
@media (max-width: 520px){.gallery{grid-template-columns: 1fr;}}
.gallery a{display:block;border-radius:14px;overflow:hidden;border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.20)}
.gallery img{width:100%;height:210px;object-fit:cover;display:block}

.albums{display:flex;gap:8px;flex-wrap:wrap}
.album-tab{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  font-weight:800;
  font-size:13px;
}
.album-tab.active{border-color:rgba(72,209,204,.55);background:rgba(72,209,204,.12)}

.timeline-block{grid-column:1 / -1;margin-top:10px}

.timeline-progress{margin-top:10px; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; -ms-overflow-style:none;}
.timeline-progress::-webkit-scrollbar{height:0}
.timeline-progress .bar{height:10px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;position:relative}
.timeline-progress .bar .fill{height:100%;width:0%;background:rgba(72,209,204,.55);border-radius:999px}

/* dots: always one row, auto-count slots */
.timeline-progress .dots{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(140px, 1fr);
  gap:10px;
  margin-top:10px;
  align-items:center;
  justify-items:center;
}
.timeline-progress .dot{
  width:10px;height:10px;border-radius:999px;
  background:rgba(255,255,255,.18);
  box-shadow:0 0 0 2px rgba(0,0,0,.35);
  justify-self:center;
}
.timeline-progress .dot.done{background:rgba(72,209,204,.35)}
.timeline-progress .dot.current{background:rgba(72,209,204,.85)}

/* labels: always one row, auto-count slots */
.timeline-list{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(140px, 1fr);
  gap:10px;
  margin-top:10px;
  overflow-x:auto;
  justify-items:center;
}
.timeline-item{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:10px;
  background:rgba(0,0,0,.18);
  min-width:140px;
  text-align:center;
  justify-self:center;
}
.timeline-item .t{font-weight:900;font-size:13px;white-space:nowrap}
.timeline-item .d{margin-top:6px;color:var(--muted);font-size:12px;white-space:nowrap}
.timeline-item.done{border-color:rgba(72,209,204,.35);background:rgba(72,209,204,.08)}

/* Timeline rows (JS currently renders .trow items into .timeline-list) */
.trow{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:10px;
  background:rgba(0,0,0,.18);
  min-width:140px;
  text-align:center;
  justify-self:center;
}
.trow .tname{font-weight:900;font-size:13px;white-space:nowrap}
.trow .tdate{margin-top:6px;color:var(--muted);font-size:12px;white-space:nowrap}
.trow.small{min-width:auto;padding:8px;border-radius:12px}


/* "Previous statuses" tile (acts like a status card) */
button.trow{
  appearance:none;
  -webkit-appearance:none;
  border:none;
  color:inherit;
  font:inherit;
}
button.trow:focus{outline:2px solid rgba(72,209,204,.45);outline-offset:2px}
button.trow.trow-more{min-width:170px;cursor:pointer}
button.trow.trow-more .tname{white-space:nowrap}
button.trow.trow-more .tdate{margin-top:6px;font-size:12px}

/* first dot (for hidden statuses) is informational */
.timeline-progress .dot.info{background:rgba(72,209,204,.25)}

/* Hidden statuses popover */
.timeline-more{position:relative;min-width:44px;justify-self:center}
.timeline-more > summary{list-style:none}
.timeline-more > summary::-webkit-details-marker{display:none}
.timeline-more-btn{
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  width:44px;height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  user-select:none;
}
.timeline-more-btn:hover{border-color:rgba(72,209,204,.35)}
.timeline-more[open] .timeline-more-btn{border-color:rgba(72,209,204,.55);background:rgba(72,209,204,.08)}

.timeline-more-pop{
  position:absolute;
  left:0;
  bottom:calc(100% + 10px);
  top:auto;
  width:min(420px, calc(100vw - 24px));
  min-width:240px;
  max-width:420px;
  max-height:none;
  overflow:visible;
  box-sizing:border-box;
  z-index:50;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(10,10,10,.95);
  box-shadow:0 12px 30px rgba(0,0,0,.55);
}
.timeline-more-title{font-weight:900;margin-bottom:10px}
.timeline-more-list{display:flex;flex-direction:column;gap:8px}
.timeline-more-pop .trow{min-width:auto;text-align:left}
.timeline-more-pop .trow .tname{white-space:normal}




/* Inline photo preview (used in Tracking: open clicked photo near the top) */
.photo-preview{border:1px solid rgba(255,255,255,.10);border-radius:16px;background:rgba(0,0,0,.22);padding:10px;margin-top:12px}
.photo-preview .pvHead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.photo-preview .pvTitle{font-weight:900;font-size:13px;color:var(--muted)}
.photo-preview .pvActions{display:flex;align-items:center;gap:8px}
.photo-preview .pvNav{background:rgba(255,138,0,.32);border:1px solid rgba(255,138,0,.75);color:#fff;border-radius:14px;padding:8px 14px;cursor:pointer;min-width:44pxfont-size:18px;line-height:1;}
.photo-preview .pvNav:hover{background:rgba(255,138,0,.45);border-color:rgba(255,138,0,.95)}
.photo-preview .pvNav:focus-visible{outline:2px solid rgba(255,138,0,.9);outline-offset:2px}
.photo-preview .pvNav{box-shadow:0 6px 16px rgba(0,0,0,.35)}
.photo-preview .pvClose{background:transparent;border:1px solid rgba(255,255,255,.14);color:var(--text);border-radius:12px;padding:6px 10px;cursor:pointer}
.photo-preview .pvClose:hover{border-color:rgba(255,255,255,.22)}
.photo-preview .pvViewport{position:relative;border-radius:12px;overflow:hidden;max-height:70vh;display:flex;align-items:center;justify-content:center}
.photo-preview .pvImg{max-width:100%;max-height:100%;width:auto;height:auto;display:block;transform:scale(1.08);transition:transform .08s ease;will-change:transform}
.photo-preview .pvSpinner{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;background:rgba(0,0,0,.35);backdrop-filter:blur(2px);z-index:2}
.photo-preview .pvSpin{width:32px;height:32px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:rgba(255,255,255,.85);animation:pvspin 0.9s linear infinite}
.photo-preview .pvSpinText{font-size:12px;color:var(--muted)}
.photo-preview .pvHint{margin-top:8px;font-size:12px;color:var(--muted)}
@keyframes pvspin{to{transform:rotate(360deg)}}


.footer{margin-top:18px;color:var(--muted);font-size:12px}

/* Responsive sidebar */
@media (max-width: 980px){
  .sidebar{position:fixed;left:0;top:0;bottom:0;transform:translateX(-100%);transition:transform .18s ease;z-index:50;}
  body.nav-open .sidebar{transform:translateX(0)}
  .main{padding:16px}
  .hamburger{display:inline-flex}
}
@media (min-width: 981px){
  .hamburger{display:none}
}


.backdrop{display:none}
body.nav-open .backdrop{display:block;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:40}


/* Photo preview fullscreen (double click) */
body.pvLockScroll{overflow:hidden !important;}
.photo-preview.pvFullscreen{
  position:fixed;
  left:16px; right:16px; top:16px; bottom:16px;
  z-index:9999;
  margin:0 !important;
  border-radius:18px;
  background:rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
  padding:12px;
  box-shadow: 0 24px 80px rgba(0,0,0,.75);
}
.photo-preview.pvFullscreen .pvViewport{
  height: calc(100% - 84px);
  max-height: none;
}
.photo-preview.pvFullscreen .pvClose{
  /* In fullscreen mode we close by double click (so we don't hit the "scroll lock" edge cases) */
  display:none;
}
.photo-preview.pvFullscreen .pvImg{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
@media (max-width: 720px){
  .photo-preview.pvFullscreen{left:8px; right:8px; top:8px; bottom:8px;}
  .photo-preview.pvFullscreen .pvViewport{height: calc(100% - 92px);}
}
/* Fix: prevent iframe flicker on calculator page */
.page-calculator .calc-embed{
  transform: none !important;
  width: 100% !important;
}

.calc-hidden{opacity:0}
.calc-embed{opacity:1; transition:opacity .12s linear}

/* Calculator: prevent layout jump / flicker */
.page-calculator .calc-frame-wrap{

  height:1200px;
  border-radius:14px;
  overflow:hidden;
  background:transparent;
  position:relative;
}

.page-calculator .calc-frame-wrap iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  display:block;
}

html{overflow-y:scroll; scrollbar-gutter:stable;}

/* Fix: avoid iframe compositing flicker on calculator page */
.page-calculator .panel,
.page-calculator .card,
.page-calculator .glass,
.page-calculator .backdrop,
.page-calculator .main{
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Calculator page must not scroll (prevents 2-3px jump/flicker) */
.page-calculator,
.page-calculator body{
  overflow: hidden !important;
}

.page-calculator .main{
  overflow: hidden !important;
}



/* Previous statuses tooltip (portal in <body>) */
.exsa-tip-backdrop{
  position:fixed; inset:0;
  background:transparent;
  z-index:9998;
}
.exsa-tooltip{
  position:fixed;
  z-index:9999;
  width:min(420px, calc(100vw - 24px));
  min-width:240px;
  box-sizing:border-box;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(10,10,10,.95);
  box-shadow:0 12px 30px rgba(0,0,0,.55);
}
.exsa-tooltip-title{font-weight:900;margin-bottom:10px}
.exsa-tooltip-list{display:flex;flex-direction:column;gap:8px}


/* Timeline: info dot button (first dot when previous statuses exist) */
.timeline-more-dot{
  width:28px;height:28px;
  border-radius:10px;
  border:1px solid rgba(72,209,204,.55);
  background:rgba(0,0,0,.25);
  color:#9ff7f2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 0 0 2px rgba(0,0,0,.35);
}
.timeline-more-dot:hover{background:rgba(0,0,0,.35)}
.timeline-more-dot:active{transform:translateY(1px)}
.timeline-more-dot:focus{outline:none; box-shadow:0 0 0 2px rgba(72,209,204,.25), 0 0 0 4px rgba(0,0,0,.35);}

/* Empty first column to keep cards aligned with the info dot */
.trow.trow-spacer{
  min-height:54px;
  background:transparent;
  border:0;
  box-shadow:none;
}

.timeline-progress .timeline-inner{width:max-content; min-width:100%;}

/* STAFF page */
.staff-auth{max-width:920px}
.staff-login-grid{max-width:420px}
.staff-auth .row{display:flex; align-items:center; gap:14px; margin-bottom:12px}
.staff-auth .label{width:84px; min-width:84px; padding-top:0}
.staff-auth .input{max-width:220px; width:100%; background:#07111f; color:#fff; border:1px solid rgba(99,124,165,.35); border-radius:14px; min-height:42px}
.staff-auth .input:-webkit-autofill,
.staff-auth .input:-webkit-autofill:hover,
.staff-auth .input:-webkit-autofill:focus{
  -webkit-text-fill-color:#fff;
  -webkit-box-shadow:0 0 0 1000px #07111f inset;
  box-shadow:0 0 0 1000px #07111f inset;
  transition:background-color 9999s ease-in-out 0s;
}
.staff-auth .row.actions{padding-left:98px; gap:10px; margin-bottom:0}
.staff-status{margin-top:12px}
.staff-panel{margin-top:16px}
.staff-panel-title{font-weight:700; margin-bottom:6px; font-size:28px; line-height:1.15}
.staff-panel-sub{margin-bottom:12px; max-width:720px}
.staff-panel-actions{padding-left:0; flex-wrap:wrap}
.staff-block-title{margin:18px 0 10px; font-weight:700; font-size:28px; line-height:1.15}
.staff-create-row{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:10px}
.staff-create-row .input{max-width:180px}
.staff-list{margin-top:6px}
.staff-dealer-card{display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:14px 0; border-bottom:1px solid rgba(255,255,255,.08)}
.staff-dealer-main{min-width:0; flex:1}
.staff-dealer-name{font-weight:700; font-size:18px; line-height:1.2; margin-bottom:4px}
.staff-dealer-meta{font-size:12px}
.staff-dealer-actions{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end}
.staff-edit-box{margin-top:12px; padding:14px; border:1px solid rgba(68,208,222,.32); border-radius:16px; background:rgba(8,17,34,.55)}
.staff-edit-title{font-weight:700; margin-bottom:10px}
.staff-edit-grid{display:grid; grid-template-columns: minmax(120px,150px) minmax(180px,260px); gap:10px 12px; align-items:center}
.staff-edit-grid label{color:#cfd6e6; font-size:14px}
.staff-edit-grid .input{max-width:none}
.staff-edit-actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px}
.staff-activity-row{padding:8px 0; border-bottom:1px solid rgba(255,255,255,.08); display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap}
.staff-activity-main{min-width:0}
.staff-activity-time{font-size:12px}
@media (max-width: 760px){
  .staff-login-grid{max-width:none}
  .staff-auth .row{display:block}
  .staff-auth .label{display:block; width:auto; min-width:0; margin-bottom:6px}
  .staff-auth .input{max-width:100%}
  .staff-auth .row.actions{padding-left:0}
  .staff-create-row .input{max-width:100%}
  .staff-dealer-card{display:block}
  .staff-dealer-actions{justify-content:flex-start; margin-top:10px}
  .staff-edit-grid{grid-template-columns:1fr}
}


.staff-block-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}
.staff-activity-hint{margin:6px 0 10px}
.staff-link-btn{background:none;border:none;color:#7fdff3;padding:0;cursor:pointer;font:inherit;text-decoration:underline}
.staff-create-row{display:grid;grid-template-columns:1.1fr 1fr 1fr auto;gap:12px;align-items:center}
@media (max-width: 900px){.staff-create-row{grid-template-columns:1fr}}

/* STAFF admin improvements */
.staff-filter-chips{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 12px}
.staff-chip{padding:8px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:var(--text);font-weight:700;cursor:pointer}
.staff-chip.is-active{border-color:rgba(72,209,204,.65);background:rgba(72,209,204,.14)}
.staff-activity-scroll{border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(0,0,0,.10);height:460px;overflow-y:auto;padding:6px 0}
.staff-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px}
.staff-page-info{font-size:13px}
.staff-inline-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.staff-filter-chips .btn.is-active{border-color:rgba(72,209,204,.65);background:rgba(72,209,204,.14)}
.staff-status-action{display:flex;align-items:center;justify-content:flex-end;gap:0;min-width:0;flex:0 0 auto}
.staff-status-action-label{display:none}
.staff-status-action .staff-badge--action{justify-content:center;white-space:nowrap}
.staff-modal{position:fixed;inset:0;z-index:3000;display:flex;align-items:center;justify-content:center;padding:20px}
.staff-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.58)}
.staff-modal-card{position:relative;z-index:1;width:min(100%,420px);padding:18px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(10,18,34,.96);box-shadow:0 18px 50px rgba(0,0,0,.45)}
@media (max-width: 760px){
  .staff-inline-actions{justify-content:flex-start}
  .staff-status-action{align-items:center;justify-content:flex-start;min-width:0}
  .staff-status-action-label{display:none}
  .staff-modal{padding:14px}
}
.staff-link-btn{background:none;border:0;color:var(--accent);cursor:pointer;padding:0;text-decoration:underline;font:inherit}
.staff-dealer-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:14px 0;border-bottom:1px solid rgba(255,255,255,.08)}
.staff-dealer-card:last-child{border-bottom:0}
.staff-dealer-name{font-size:18px;font-weight:800;margin-bottom:4px}
.staff-dealer-actions{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap}
.staff-edit-box{margin-top:12px;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.03)}
.staff-edit-title{font-weight:800;margin-bottom:10px}
.staff-edit-grid{display:grid;grid-template-columns:160px minmax(0,1fr);gap:10px 12px;align-items:center}
.staff-edit-actions{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.staff-create-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:10px;align-items:center;margin-bottom:10px}
.staff-block-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px}
.staff-activity-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.06)}
.staff-activity-row:last-child{border-bottom:0}
.staff-activity-main{line-height:1.35}
.staff-activity-time{white-space:nowrap;font-size:13px}
.staff-list{min-height:32px}
.staff-more-wrap{display:flex;justify-content:center;margin-top:12px}
.staff-dealer-meta--telegram-on{color:#57d38c;font-weight:700}
.staff-dealer-meta--telegram-off{color:#ff6b6b;font-weight:700}
@media (max-width: 980px){
  .staff-dealer-card{grid-template-columns:1fr}
  .staff-create-row{grid-template-columns:1fr}
  .staff-edit-grid{grid-template-columns:1fr}
  .staff-activity-row{grid-template-columns:1fr}
  .staff-pager{flex-wrap:wrap}
}


.staff-manual-wrap{margin:12px 0 18px;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.03)}
.staff-manual-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
.staff-manual-row{margin-bottom:12px}
.staff-manual-label{font-size:13px;font-weight:700;margin-bottom:6px;color:var(--text)}
.staff-manual-textarea{min-height:116px;resize:vertical;padding-top:10px;padding-bottom:10px}
.staff-manual-upload-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
.staff-manual-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
@media (max-width: 980px){.staff-manual-grid,.staff-manual-upload-grid{grid-template-columns:1fr}}


.staff-vin-wrap{margin:12px 0 18px;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.03)}
.staff-vin-grid{display:grid;grid-template-columns:1.2fr 1fr auto auto auto;gap:10px;align-items:center;margin-bottom:10px}
.staff-vin-status{margin:6px 0 12px}
.staff-invoice-table{display:grid;gap:10px;margin-bottom:12px}
.staff-invoice-row{display:grid;grid-template-columns:minmax(180px,220px) 150px minmax(220px,1fr) minmax(0,1fr);gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.staff-invoice-row:last-child{border-bottom:0}
.staff-invoice-title{font-weight:800}
.staff-vin-meta{font-size:12px;margin-top:4px}
.staff-badges{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.staff-badge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04)}
.staff-badge.is-paid{border-color:rgba(72,209,204,.45);background:rgba(72,209,204,.16)}
.staff-badge.is-unpaid{border-color:rgba(255,159,67,.35);background:rgba(255,159,67,.12)}
.staff-badge--action{cursor:pointer;color:#fff;font:inherit;line-height:1.2;appearance:none;-webkit-appearance:none}
.staff-badge--action:focus{outline:2px solid rgba(72,209,204,.35);outline-offset:2px}
.staff-inline-links{display:flex;gap:8px;flex-wrap:wrap}
.staff-inline-link{font-size:12px;color:var(--accent);text-decoration:underline}

.staff-dealer-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.staff-vehicle-title{font-size:14px;font-weight:700;color:var(--accent);text-align:right}
.staff-invoice-drop{display:flex;align-items:center;gap:10px;min-height:54px;padding:8px 12px;border:1px dashed rgba(72,209,204,.35);border-radius:14px;background:rgba(255,255,255,.02);cursor:pointer;transition:border-color .15s ease, background .15s ease, box-shadow .15s ease}
.staff-invoice-drop:hover{border-color:rgba(72,209,204,.65);background:rgba(72,209,204,.06)}
.staff-invoice-drop.is-dragover{border-color:rgba(72,209,204,.95);background:rgba(72,209,204,.12);box-shadow:0 0 0 3px rgba(72,209,204,.12)}
.staff-invoice-drop.is-filled{border-style:solid}
.staff-invoice-file{max-width:240px}
.staff-invoice-drop-text{font-size:12px;line-height:1.35;color:var(--text-dim)}
@media (max-width: 1100px){.staff-dealer-head{align-items:flex-start}.staff-vehicle-title{text-align:left}.staff-invoice-drop{flex-direction:column;align-items:flex-start}.staff-invoice-file{max-width:100%;width:100%}}
@media (max-width: 1100px){.staff-vin-grid{grid-template-columns:1fr}.staff-invoice-row{grid-template-columns:1fr}}

.staff-manual-drop{flex-direction:column;align-items:flex-start;justify-content:center;padding:10px 12px}
.staff-manual-drop .staff-invoice-file{max-width:100%;width:100%}
.staff-manual-drop .staff-invoice-drop-text{width:100%}


.staff-manual-drop{
  min-height:72px !important;
  height:auto !important;
  padding:8px 10px !important;
  justify-content:center !important;
}
.staff-manual-drop .staff-invoice-file{
  width:auto !important;
  max-width:100% !important;
}
.staff-manual-drop .staff-invoice-drop-text{
  width:auto !important;
  line-height:1.2 !important;
  font-size:12px !important;
}



/* compact manual photo dropzones like invoice blocks */
.staff-manual-upload-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
}
.staff-manual-upload-grid > div{
  min-width:0 !important;
}
.staff-manual-upload-grid .staff-manual-drop{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  min-height:72px !important;
  height:72px !important;
  padding:10px 12px !important;
  width:100% !important;
  box-sizing:border-box !important;
}
.staff-manual-upload-grid .staff-manual-drop .staff-invoice-file{
  width:140px !important;
  min-width:140px !important;
  max-width:140px !important;
  flex:0 0 140px !important;
}
.staff-manual-upload-grid .staff-manual-drop .staff-invoice-drop-text{
  width:auto !important;
  max-width:none !important;
  flex:1 1 auto !important;
  line-height:1.15 !important;
  font-size:12px !important;
  white-space:normal !important;
}


.staff-vin-meta--arrival{
  font-size:14.4px !important;
  color:#ff9f43 !important;
  font-weight:800 !important;
}


/* === TRACKING: restore normal style for "Previous statuses" tile === */
.timeline-list .trow-more,
.timeline-list button.trow-more{
  -webkit-appearance:none;
  appearance:none;
  background:rgba(7,12,26,.92) !important;
  border:1px solid rgba(255,255,255,.09) !important;
  color:#fff !important;
  border-radius:16px !important;
  box-shadow:none !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:2px !important;
  min-height:56px !important;
  padding:10px 12px !important;
  font:inherit !important;
  line-height:1.2 !important;
  cursor:pointer !important;
  text-align:center !important;
}
.timeline-list .trow-more .tname{
  color:#fff !important;
  font-weight:700 !important;
}
.timeline-list .trow-more .tdate{
  color:#9fb3c8 !important;
}
.timeline-list .trow-more:hover{
  border-color:rgba(72,209,204,.65) !important;
  box-shadow:0 0 0 1px rgba(72,209,204,.18) inset !important;
}
.exsa-tooltip{
  z-index:9999 !important;
}

.staff-auth--cabinet{max-width:none}
.staff-admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
.staff-admin-col{min-width:0}
@media (max-width: 1200px){.staff-admin-grid{grid-template-columns:1fr}}
.staff-admin-col--right{padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.03)}
.staff-dealer-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
.staff-dealer-col{min-width:0;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.03)}
.staff-dealer-col--right{min-height:100%}
@media (max-width: 1200px){.staff-dealer-grid{grid-template-columns:1fr}}

#vin{
  flex: 0 1 360px;
  max-width: 360px;
}
@media (max-width: 640px){
  #vin{
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.staff-action-stack{display:flex;flex-direction:column;align-items:flex-start;gap:10px;flex:0 0 auto}
.staff-action-stack .staff-status-action{justify-content:flex-start}
.staff-action-stack .staff-status-action .staff-badge--action{white-space:nowrap}

@media (max-width: 760px){
  .staff-invoice-table .staff-invoice-row{
    gap:8px;
    padding:8px 0;
  }
  .staff-invoice-table .staff-invoice-drop{
    min-height:0;
    padding:8px 10px;
    gap:6px;
    align-items:flex-start;
    border-radius:12px;
  }
  .staff-invoice-table .staff-invoice-file{
    width:100%;
    max-width:100%;
  }
  .staff-invoice-table .staff-invoice-drop-text{
    font-size:11px;
    line-height:1.2;
  }
}

/* MOBILE_INVOICE_FILE_ONLY */
@media (max-width: 760px){
  .staff-invoice-table .staff-invoice-drop{
    display:block !important;
    min-height:0 !important;
    height:auto !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    cursor:default !important;
  }
  .staff-invoice-table .staff-invoice-drop:hover,
  .staff-invoice-table .staff-invoice-drop.is-dragover,
  .staff-invoice-table .staff-invoice-drop.is-filled{
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }
  .staff-invoice-table .staff-invoice-drop-text{
    display:none !important;
  }
  .staff-invoice-table .staff-invoice-file{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
  }
}

.track-refresh-note{
  color:#f59e0b !important;
  font-weight:700;
}

.track-refresh-note.is-refreshing{
  animation:track-refresh-pulse 1.8s ease-in-out infinite;
}

@keyframes track-refresh-pulse{
  0%{ opacity:.45; }
  50%{ opacity:1; }
  100%{ opacity:.45; }
}

.staff-dealer-name .staff-vin-link,
.staff-dealer-name .staff-vin-link:link,
.staff-dealer-name .staff-vin-link:visited,
.staff-dealer-name .staff-vin-link:active,
.staff-dealer-name .staff-vin-link:hover,
.staff-dealer-name .staff-vin-link:focus{
  color:var(--accent) !important;
  text-decoration:none;
}
.staff-dealer-name .staff-vin-link:hover,
.staff-dealer-name .staff-vin-link:focus{
  color:var(--accent) !important;
  text-decoration:underline;
}
.staff-dealer-name .staff-vin-link:focus{
  outline:none;
}


.staff-vin-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
.staff-vin-col{min-width:0;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.03)}
.staff-vin-wrap--inner{margin:14px 0 0}
.staff-vin-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.staff-vin-grid-2--cards{align-items:stretch}
.staff-vin-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.staff-vin-kv{min-width:0;padding:12px 14px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(7,12,26,.45)}
.staff-vin-kv-label{font-size:12px;line-height:1.2;color:#9fb3c8;margin-bottom:6px;font-weight:700;text-transform:uppercase;letter-spacing:.02em}
.staff-vin-kv-value{font-size:14px;line-height:1.35;color:#fff;font-weight:700;word-break:break-word}
.staff-vin-mini-card{margin-top:10px;padding:12px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.03)}
.staff-vin-stage-card{min-height:140px;padding:14px;border:1px dashed rgba(72,209,204,.32);border-radius:16px;background:rgba(7,12,26,.45);display:flex;flex-direction:column;gap:10px;justify-content:flex-start}
.staff-vin-stage-card.is-placeholder{box-shadow:inset 0 0 0 1px rgba(72,209,204,.08)}
.staff-vin-stage-title{font-size:14px;line-height:1.25;color:#fff;font-weight:800}
.staff-vin-stage-body{font-size:13px;line-height:1.45;color:#9fb3c8}
.staff-vin-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
@media (max-width: 1200px){
  .staff-vin-layout{grid-template-columns:1fr}
}
@media (max-width: 900px){
  .staff-vin-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 640px){
  .staff-vin-grid-2,.staff-vin-grid-3{grid-template-columns:1fr}
  .staff-vin-stage-card{min-height:0}
}


.staff-vin-kv--doc{display:flex;flex-direction:column;justify-content:flex-start;min-height:132px}
.staff-vin-doc-body{display:flex;flex-direction:column;gap:10px}
.staff-vin-doc-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:8px;border-top:1px solid rgba(255,255,255,.08)}
.staff-vin-doc-row:first-child{padding-top:0;border-top:0}
.staff-vin-doc-key{font-size:12px;line-height:1.2;color:#9fb3c8;font-weight:700;text-transform:uppercase}
.staff-vin-doc-val{font-size:14px;line-height:1.35;color:#fff;font-weight:700;word-break:break-word;text-align:right}
.staff-vin-kv--placeholder .staff-vin-stage-body{margin-top:2px}


#vinPageTitle{display:flex;flex-wrap:wrap;align-items:baseline;gap:12px}
#vinPageTitle .staff-vin-title-main{display:inline-block}
#vinPageTitle .staff-vin-title-meta{display:inline-block;font-size:16px;line-height:1.3;color:#9fb3c8;font-weight:600}
.staff-vin-inline-meta{margin-top:4px;font-size:13px;line-height:1.35;color:#9fb3c8;font-weight:600}
.staff-vin-inline-link{margin-top:6px}
@media (max-width: 640px){
  #vinPageTitle .staff-vin-title-meta{font-size:14px}
}


.staff-vin-wrap--timeline-top{padding-top:6px}
.staff-vin-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:4px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  font-size:13px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
}
.staff-vin-pill.is-paid{
  color:var(--accent);
  background:rgba(72,209,204,.12);
  border-color:rgba(72,209,204,.55);
}
.staff-vin-pill.is-unpaid{
  color:#d9b08c;
  background:rgba(165,97,42,.12);
  border-color:rgba(165,97,42,.55);
}
.staff-vin-timeline-track{
  position:relative;
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(180px,1fr);
  gap:18px;
  overflow-x:auto;
  padding:8px 0 4px;
}
.staff-vin-timeline-track::before{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  top:24px;
  height:8px;
  border-radius:999px;
  background:rgba(72,209,204,.55);
}
.staff-vin-timeline-step{
  position:relative;
  min-width:0;
  padding-top:10px;
}
.staff-vin-timeline-dot{
  position:absolute;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--accent);
  border:3px solid rgba(7,12,26,.98);
  z-index:1;
}
.staff-vin-timeline-card{
  position:relative;
  margin-top:22px;
  min-height:86px;
  padding:14px 14px 12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(7,12,26,.45);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  text-align:center;
}
.staff-vin-timeline-name{
  color:#fff;
  font-size:15px;
  line-height:1.25;
  font-weight:800;
}
.staff-vin-timeline-date{
  color:#d6e2f0;
  font-size:13px;
  line-height:1.25;
  font-weight:600;
}
@media (max-width: 900px){
  .staff-vin-timeline-track{
    grid-auto-columns:minmax(160px,220px);
  }
}


#vinPageLot{
  margin-top:2px !important;
  font-size:clamp(22px, 2.2vw, 28px) !important;
  line-height:1.15 !important;
  color:#dbe7f5 !important;
  font-weight:700 !important;
}
.staff-vin-timeline-track--compact{
  grid-auto-columns:minmax(160px,190px) !important;
}
.staff-vin-timeline-step--btn{
  appearance:none;
  -webkit-appearance:none;
  background:transparent;
  border:0;
  padding:0;
  margin:0;
  cursor:pointer;
  min-width:0;
}
.staff-vin-prevtip{
  position:fixed;
  z-index:9999;
  width:min(340px, calc(100vw - 24px));
  max-height:min(60vh, 480px);
  overflow:auto;
  padding:12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  background:rgba(7,12,26,.98);
  box-shadow:0 18px 48px rgba(0,0,0,.38);
}
.staff-vin-prevtip-title{
  color:#fff;
  font-size:14px;
  line-height:1.25;
  font-weight:800;
  margin-bottom:10px;
}
.staff-vin-prevtip-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.staff-vin-prevtip-row{
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.03);
}
.staff-vin-prevtip-name{
  color:#fff;
  font-size:13px;
  line-height:1.25;
  font-weight:700;
}
.staff-vin-prevtip-date{
  color:#9fb3c8;
  font-size:12px;
  line-height:1.25;
  font-weight:600;
  margin-top:4px;
}
