/* БИЗНЕС ТРАК — новый интерфейс */
:root{
  color-scheme:light;
  --page:#f4f7f5;--surface:#fff;--surface-2:#f8faf9;--surface-3:#edf3ef;
  --text:#18251e;--muted:#75847b;--line:#e5ece7;
  --green:#16764f;--green-2:#20875e;--green-soft:#e8f4ed;--green-dark:#10583b;
  --amber:#b7791f;--amber-soft:#fff5df;--red:#c34b4b;
  --shadow:0 8px 28px rgba(27,57,40,.055);--sidebar:264px;
  font-family:Inter,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--page);color:var(--text)}
body{font-family:Inter,Arial,sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}
button,input{font:inherit}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
svg{width:20px;height:20px;display:block}
#app{min-height:100vh}
.bt-app{min-height:100vh}
.sidebar{position:fixed;z-index:20;inset:0 auto 0 0;width:var(--sidebar);padding:27px 18px 18px;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:12px;padding:2px 9px 34px}
.brand-symbol{width:43px;height:43px;border-radius:14px;background:var(--green);color:#fff;display:grid;place-items:center;box-shadow:0 7px 16px rgba(22,118,79,.2)}
.brand-symbol svg{width:27px;height:27px}
.brand-copy{display:flex;flex-direction:column;gap:4px}
.brand-copy b{font:800 18px Manrope,Inter,sans-serif;letter-spacing:-.6px}
.brand-copy small{font-size:9px;letter-spacing:1.1px;color:var(--muted);font-weight:700}
.sidebar-caption,.eyebrow,.section-kicker{font-size:10px;letter-spacing:1.15px;font-weight:800;color:#91a097}
.sidebar-caption{padding:0 11px 12px}
.side-nav{display:grid;gap:6px}
.side-nav-item{height:49px;width:100%;border:0;border-radius:12px;background:transparent;color:#68786e;display:flex;align-items:center;gap:12px;padding:0 12px;text-align:left;font-weight:600;transition:.18s}
.side-nav-item:hover{background:var(--surface-2);color:var(--text)}
.side-nav-item.active{background:var(--green-soft);color:var(--green-dark);font-weight:700}
.nav-icon{width:23px;display:grid;place-items:center}
.nav-icon svg{width:20px;height:20px}
.nav-count{margin-left:auto;min-width:24px;padding:4px 7px;border-radius:20px;background:rgba(22,118,79,.1);color:var(--green);font-size:11px;text-align:center;font-weight:700}
.sidebar-bottom{margin-top:auto}
.sidebar-help{display:flex;align-items:center;gap:10px;padding:13px 11px;margin-bottom:15px;border:1px solid var(--line);border-radius:13px}
.help-icon{width:32px;height:32px;border-radius:10px;background:var(--surface-3);color:var(--green);display:grid;place-items:center}
.sidebar-help>div{display:grid;gap:3px;flex:1}
.sidebar-help b{font-size:11px}.sidebar-help small{font-size:10px;color:var(--muted)}
.sidebar-help>a{font-size:17px;color:var(--green);font-weight:700}
.user-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--green-soft);color:var(--green-dark);font-weight:800;font-size:12px}
.sidebar-user{border-top:1px solid var(--line);padding:16px 5px 2px;display:flex;align-items:center;gap:10px}
.user-copy{display:grid;gap:3px;min-width:0}.user-copy b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-copy small{font-size:10px;color:var(--muted)}
.main-area{margin-left:var(--sidebar);min-height:100vh}
.topbar{position:relative;z-index:5;padding:30px clamp(24px,4vw,58px) 18px;background:var(--surface);border-bottom:1px solid var(--line)}
.topbar-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.eyebrow{margin-bottom:9px;color:var(--green);font-size:9px}
.topbar h1{margin:0;font:800 clamp(23px,2.3vw,30px) Manrope,Inter,sans-serif;letter-spacing:-1.1px}
.topbar-heading p{margin:7px 0 0;color:var(--muted);font-size:12px}
.topbar-tools{display:flex;align-items:center;gap:9px}
.icon-button,.help-top-button,.refresh-button{height:41px;border:1px solid var(--line);background:var(--surface);border-radius:11px;color:#5f7066;display:flex;align-items:center;justify-content:center;gap:8px}
.icon-button{width:41px}.icon-button svg{width:18px;height:18px}
.help-top-button{padding:0 13px;font-size:12px;font-weight:600}.help-top-button svg{width:17px;height:17px}
.toolbar{display:flex;gap:10px;margin-top:23px}
.search-box{height:46px;max-width:650px;flex:1;display:flex;align-items:center;gap:11px;padding:0 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:#9aa69f}
.search-box>svg{width:18px;height:18px;flex:none}
.search-box input{width:100%;border:0;outline:0;background:transparent;color:var(--text);font-size:12px}
.search-box input::placeholder{color:#9aa69f}
.search-box button{border:0;background:transparent;color:var(--muted);font-size:21px;padding:0 2px}
.refresh-button{padding:0 15px;color:var(--green);font-size:12px;font-weight:700;border-color:#dce9e0}
.refresh-button svg{width:17px;height:17px}
.refresh-button:hover{background:var(--green-soft)}
.refresh-button.is-disabled{opacity:.5;cursor:not-allowed}
.filter-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:15px}
.filter-label{font-size:10px;color:var(--muted);font-weight:700;margin-right:4px}
.filter-chip{border:1px solid var(--line);border-radius:30px;background:var(--surface);color:#75847b;padding:7px 12px;font-size:10px;font-weight:600;transition:.15s}
.filter-chip:hover{border-color:#b9d7c4;color:var(--green)}
.filter-chip.active{background:var(--green-soft);border-color:#cce5d5;color:var(--green-dark)}
.content-wrapper{min-height:calc(100vh - 185px);padding:27px clamp(24px,4vw,58px) 60px;overflow:visible}
.content{max-width:1320px;margin:0 auto}
.section-toolbar{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:21px}
.section-kicker{color:var(--green);font-size:9px}
.section-toolbar h2{font:800 19px Manrope,Inter,sans-serif;letter-spacing:-.45px;margin:6px 0 0}
.results-count{padding:7px 11px;background:var(--surface);border:1px solid var(--line);border-radius:30px;color:var(--muted);font-size:10px;font-weight:700}
.date-section{margin-bottom:24px}
.date-heading{display:flex;align-items:center;gap:9px;margin:20px 0 10px;color:#65766b;font-size:12px;font-weight:800;text-transform:capitalize}
.date-marker{width:7px;height:7px;border-radius:50%;background:var(--green)}
.region-section{margin-bottom:13px}
.region-heading{width:100%;display:flex;align-items:center;justify-content:space-between;border:0;background:transparent;padding:9px 2px;color:var(--text);text-align:left}
.region-heading-left{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:800}
.region-heading-left svg{width:17px;height:17px;color:var(--green)}
.region-heading-left small{font-size:10px;color:var(--muted);font-weight:700;background:var(--surface-3);padding:3px 7px;border-radius:20px}
.chevron{width:17px;height:17px;color:#91a097;transition:transform .2s}
.chevron.rotated{transform:rotate(180deg)}
.request-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.request-card{position:relative;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:17px 18px 15px;box-shadow:var(--shadow);cursor:pointer;transition:transform .18s,border-color .18s,box-shadow .18s;outline:none}
.request-card:hover{transform:translateY(-2px);border-color:#c8dfd0;box-shadow:0 12px 30px rgba(27,57,40,.09)}
.request-card:focus-visible{outline:3px solid rgba(32,135,94,.25)}
.card-topline{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.request-kind{display:inline-flex;align-items:center;gap:7px;color:var(--green);font-size:9px;letter-spacing:.65px;font-weight:800}
.status-dot{width:7px;height:7px;border-radius:50%;background:#36a56f;box-shadow:0 0 0 3px rgba(54,165,111,.12)}
.auction-kind{color:#a66a17}.auction-kind .status-dot{background:#d69a3b;box-shadow:0 0 0 3px rgba(214,154,59,.14)}
.request-id{font-size:10px;color:#87948c;font-weight:700}
.card-route{padding:17px 0 15px;display:grid;gap:17px}
.route-line{display:flex;gap:11px;align-items:flex-start;min-width:0}
.route-pin{position:relative;flex:none;width:10px;height:10px;margin:3px 0 0 1px;border-radius:50%;border:2px solid var(--green);background:var(--surface)}
.route-line:first-child .route-pin:after{content:"";position:absolute;top:8px;left:2px;width:2px;height:28px;background:#d9e8de}
.route-pin.unload-pin{border-color:#d19a43}
.route-line>div{display:grid;gap:5px;min-width:0}
.route-line small{font-size:9px;letter-spacing:.45px;color:#5f6762;font-weight:800}
.route-line b{font-size:13px;line-height:1.35;font-weight:700;overflow-wrap:anywhere}
.card-bottom{border-top:1px solid var(--line);padding-top:13px;display:flex;align-items:flex-end;justify-content:space-between;gap:10px}
.card-bottom>div{display:grid;gap:4px}
.card-bottom small{font-size:8px;letter-spacing:.6px;color:#97a39b;font-weight:800}
.card-bottom strong{font:800 22px Manrope,Inter,sans-serif;letter-spacing:-.8px;color:var(--green-dark);white-space:nowrap}
.card-bottom strong i{font-style:normal;font-size:14px}
.card-bottom span:not(.card-open){font: 500 13px Manrope, Inter, sans-serif;color:var(--muted)}
.card-open{display:flex;align-items:center;gap:7px;color:var(--green);font-size:10px;font-weight:800;white-space:nowrap}
.card-open b{font-size:17px}
.auction-deadline{display:flex;align-items:center;gap:6px;margin:12px 0 -5px;color:#a66a17;font-size:10px;font-weight:700}
.auction-deadline svg{width:14px;height:14px}
.auction-card .card-bottom strong{color:#9b681f}
.state-card{min-height:190px;padding:30px 20px;border:1px dashed #d9e4dc;border-radius:16px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;color:var(--text)}
.state-card>b{font-size:14px}.state-card>small{font-size:11px;color:var(--muted)}
.state-card button{margin-top:8px;padding:9px 15px;border:0;border-radius:9px;background:var(--green);color:white;font-size:11px;font-weight:700}
.error-state>b{color:var(--red)}
.loader{width:23px;height:23px;border:2px solid #dce9e0;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite;margin-bottom:4px}
@keyframes spin{to{transform:rotate(360deg)}}
.refresh-button.spin svg,.pull-inner.spin svg{animation:spin .8s linear infinite}
.pull-indicator{overflow:hidden;display:flex;justify-content:center;align-items:flex-start;transition:height .15s}
.pull-inner{display:flex;align-items:center;gap:8px;padding:9px;color:var(--green);font-size:11px;font-weight:700}
.pull-inner svg{width:17px;height:17px}
.modal-overlay{position:fixed;z-index:1000;inset:0;background:rgba(12,25,18,.56);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:22px;overflow-y:auto}
.details-modal{position:relative;width:min(100%,650px);max-height:min(88vh,900px);overflow:auto;background:var(--surface);border-radius:20px;box-shadow:0 24px 80px rgba(0,0,0,.25);overscroll-behavior:contain}
.modal-header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;gap:18px;padding:23px 25px 18px;background:var(--surface);border-bottom:1px solid var(--line)}
.modal-kicker{font-size:9px;letter-spacing:.8px;color:var(--green);font-weight:800}
.modal-header h2{margin:7px 0 5px;font:800 21px Manrope,Inter,sans-serif;letter-spacing:-.6px}
.modal-header p{margin:0;color:var(--muted);font-size:11px;line-height:1.5}
.modal-close{flex:none;width:35px;height:35px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:#66766c;font-size:24px;line-height:1}
.modal-prices{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:15px 25px;background:var(--green-soft)}
.modal-prices>div{display:grid;gap:5px}.modal-prices small{font-size:9px;color:#63806e;font-weight:700}.modal-prices strong{font:800 19px Manrope,Inter,sans-serif;color:var(--green-dark)}
.modal-body{padding:20px 25px 25px}
.modal-body h3{margin:0 0 17px;font:800 13px Manrope,Inter,sans-serif}
.modal-route-point{display:flex;gap:13px;position:relative;padding:0 0 18px}
.modal-route-point:not(:last-of-type):before{content:"";position:absolute;left:5px;top:13px;bottom:0;width:1px;background:#dce9e0}
.modal-route-dot{position:relative;z-index:1;flex:none;width:11px;height:11px;margin-top:2px;border-radius:50%;background:var(--surface);border:3px solid var(--green)}
.modal-route-dot.finish{border-color:#d19a43}
.modal-route-point>div{display:grid;gap:5px;min-width:0}
.modal-route-point b{font-size:13px}
.modal-route-point small{font-size:10px;color:var(--muted)}
.modal-route-point p{margin:0;font-size:10px;line-height:1.5;color:#85938a}
.cargo-specs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 19px 23px;padding:11px 12px;background:var(--surface-2);border:1px solid var(--line);border-radius:11px}
.cargo-specs span{font-size:10px;color:var(--muted);padding-right:10px;border-right:1px solid var(--line)}
.cargo-specs span:last-child{border:0}.cargo-specs b{color:var(--text);font-size:12px}
.contact-panel{display:flex;align-items:center;gap:11px;margin-top:8px;padding:13px;border:1px solid var(--line);border-radius:12px}
.contact-avatar{width:34px;height:34px;border-radius:10px;background:var(--surface-3);color:var(--green);display:grid;place-items:center;font-weight:800}
.contact-panel>div{display:grid;gap:4px}.contact-panel small{font-size:8px;letter-spacing:.7px;color:var(--muted);font-weight:800}.contact-panel b{font-size:11px}
.map-toggle{display:flex;align-items:center;gap:8px;margin-top:14px;padding:10px 12px;border:1px solid #d4e7da;border-radius:10px;background:var(--green-soft);color:var(--green-dark);font-size:11px;font-weight:700}
.map-toggle svg{width:17px;height:17px}
.mini-map{height:270px;margin-top:12px;border-radius:12px;overflow:hidden;border:1px solid var(--line)}
.mini-map iframe{width:100%;height:100%;border:0}
.auction-timer-panel{display:grid;grid-template-columns:1fr auto;gap:5px 12px;padding:13px 25px;background:var(--amber-soft);color:#98651b}
.auction-timer-panel span{font-size:10px;font-weight:700}.auction-timer-panel b{font-size:12px}.auction-timer-panel small{grid-column:1/-1;font-size:9px;opacity:.8}
.mobile-nav{display:none}
.max-notification{position:fixed;z-index:1200;right:22px;top:18px;width:min(440px,calc(100vw - 32px));display:flex;align-items:center;gap:12px;padding:14px 43px 14px 14px;border:1px solid #d7e8dc;border-radius:15px;background:var(--surface);box-shadow:0 14px 45px rgba(14,46,28,.18)}
.max-notification.hide{opacity:0;transform:translateY(-8px);transition:.25s}
.max-notification-icon{width:39px;height:39px;flex:none;border-radius:12px;background:var(--green-soft);color:var(--green);display:grid;place-items:center}
.max-notification-copy{display:grid;gap:4px;flex:1}.max-notification-copy strong{font-size:11px}.max-notification-copy span{font-size:9px;line-height:1.4;color:var(--muted)}
.max-notification-button{padding:8px 10px;border-radius:9px;background:var(--green);color:#fff;font-size:9px;font-weight:700;white-space:nowrap}
.max-notification-close{position:absolute;right:9px;top:8px;border:0;background:transparent;color:#8a978f;font-size:19px}
.toast-message{position:fixed;z-index:1500;bottom:25px;left:50%;transform:translateX(-50%);padding:11px 16px;border-radius:10px;background:#1d3025;color:white;font-size:12px;box-shadow:var(--shadow)}
.fade-slide-enter-active,.fade-slide-leave-active{transition:all .18s ease;transform-origin:top}
.fade-slide-enter-from,.fade-slide-leave-to{opacity:0;transform:translateY(-5px)}
.modal-fade-enter-active,.modal-fade-leave-active{transition:opacity .2s}
.modal-fade-enter-from,.modal-fade-leave-to{opacity:0}
.notice-enter-active,.notice-leave-active{transition:.25s}
.notice-enter-from,.notice-leave-to{opacity:0;transform:translateY(-8px)}
.toast-enter-active,.toast-leave-active{transition:.2s}.toast-enter-from,.toast-leave-to{opacity:0;transform:translate(-50%,8px)}
body.modal-open{overflow:hidden}

/* Тёмная тема — переключается существующим toggleTheme() */
body.dark-theme{
  color-scheme:dark;--page:#111a15;--surface:#18231c;--surface-2:#1d2a22;--surface-3:#24352a;
  --text:#e8f0ea;--muted:#9aa99f;--line:#2a3a30;--green:#54bd86;--green-2:#62c993;--green-soft:#203d2d;--green-dark:#8ad5aa;
  --amber:#e5b25e;--amber-soft:#3b3020;--red:#ef8585;--shadow:0 8px 28px rgba(0,0,0,.16)
}
.dark-theme .favorite-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: #3b4654;
    color: #d1d5db;
}

.dark-theme .favorite-btn.active {
    background: rgba(34, 197, 94, 0.12);
    border-color: #22c55e;
    color: #4ade80;
}

.dark-theme .favorite-btn:active {
    transform: scale(0.98);
}
body.dark-theme .side-nav-item{color:#a7b5ab}
body.dark-theme .side-nav-item.active{color:#9bdfb7}
body.dark-theme .filter-chip{color:#a5b3a9}
body.dark-theme .filter-chip.active{color:#9bdfb7}
body.dark-theme .request-card:hover{border-color:#426b52}
body.dark-theme .route-line:first-child .route-pin:after{background:#3c5b47}
body.dark-theme .modal-route-point:not(:last-of-type):before{background:#3c5b47}
body.dark-theme .max-notification{border-color:var(--line)}
body.dark-theme .brand-symbol{color:#10251a}
body.dark-theme .cargo-specs{background:var(--surface-2)}
body.dark-theme .search-box{background:var(--surface-2)}
body.dark-theme .auction-timer-panel{color:#f0c77f}
body.dark-theme .modal-prices small{color:#a8c8b3}

@media(max-width:1100px){:root{--sidebar:230px}.request-grid{grid-template-columns:1fr}.content-wrapper{padding-left:28px;padding-right:28px}}
@media(max-width:760px){
  :root{--sidebar:0px}
  .sidebar{display:none}
  .main-area{margin-left:0;padding-bottom:72px}
  .topbar{padding:19px 16px 13px}
  .topbar-heading{align-items:center}
  .topbar h1{font-size:22px}
  .topbar-heading p{max-width:270px;font-size:10px;line-height:1.4}
  .eyebrow{font-size:8px}
  .help-top-button{width:39px;padding:0;font-size:0;gap:0}
  .help-top-button svg{width:19px;height:19px}
  .topbar-tools{gap:7px}
  .toolbar{margin-top:17px;gap:8px}
  .search-box{height:43px;padding:0 11px}
  .search-box input{font-size:11px}
  .refresh-button{width:43px;height:43px;padding:0}
  .refresh-button span{display:none}
  .filter-row{gap:6px;margin-top:12px}
  .filter-label{width:100%;margin:0 0 1px}
  .filter-chip{padding:7px 10px;font-size:9px}
  .content-wrapper{min-height:calc(100vh - 180px);padding:18px 14px 25px}
  .section-toolbar{margin-bottom:14px}
  .section-toolbar h2{font-size:17px}
  .results-count{font-size:9px;padding:6px 9px}
  .date-heading{margin:17px 0 8px;font-size:11px}
  .region-heading{padding:9px 1px}
  .request-grid{gap:10px}
  .request-card{padding:14px 14px 13px;border-radius:14px}
  .card-topline{padding-bottom:11px}
  .card-route{padding:14px 0;gap:15px}
  .route-line b{font-size:12px}
  .card-bottom strong{font-size:20px}
  .card-open{font-size:9px}
  .mobile-nav {
        position: fixed;
        z-index: 50;
        left: 0;
        right: 0;
        bottom: 0;
        justify-content: space-evenly;
        display: flex;
        grid-template-columns: 1fr 1fr;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
        background: var(--surface);
        border-top: 1px solid var(--line);
        box-shadow: 0 -7px 25px rgba(25, 50, 34, .06);
    }
  .mobile-nav button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:49px;border:0;border-radius:10px;background:transparent;color:#87958c;font-size:9px;font-weight:700}
  .mobile-nav button svg{width:19px;height:19px}
  .mobile-nav button.active{color:var(--green)}
  .mobile-nav button.active:before{content:"";position:absolute;top:-8px;width:25px;height:3px;border-radius:0 0 4px 4px;background:var(--green)}
  .mobile-nav button small{position:absolute;top:0;left:calc(50% + 29px);font-size:8px;color:var(--green)}
  .modal-overlay{align-items:flex-end;padding:0;z-index:2000}
  .details-modal{width:100%;max-height:calc(100dvh - 12px - env(safe-area-inset-top));border-radius:20px 20px 0 0;padding-bottom:env(safe-area-inset-bottom)}
  .modal-header{padding:19px 18px 14px}
  .modal-header h2{font-size:19px}
  .modal-header p{font-size:10px}
  .modal-prices{padding:13px 18px}
  .modal-prices strong{font-size:17px}
  .modal-body{padding:18px 18px 22px}
  .mini-map{height:230px}
  .max-notification{top:calc(9px + env(safe-area-inset-top));right:9px;width:calc(100vw - 18px);gap:9px;padding:11px 36px 11px 11px}
  .max-notification-icon{width:34px;height:34px}
  .max-notification-copy strong{font-size:10px}
  .max-notification-copy span{font-size:8px}
  .max-notification-button{font-size:8px;padding:8px}
  .toast-message{bottom:calc(85px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 30px)}
}
@media(max-width:390px){
  .topbar h1{font-size:20px}
  .topbar-heading p{max-width:220px}
  .request-id{font-size:9px}
  .card-bottom strong{font-size:18px}
  .card-open{gap:3px}
  .max-notification-button{max-width:92px;white-space:normal;text-align:center}
}
.card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.favorite-btn {
    width: 100%;
    margin-top: 12px;
    padding: 7px 14px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 10px;
    background: transparent;
    color: var(--text-color, #374151);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.favorite-btn.active {
    background: rgba(34, 197, 94, 0.10);
    border-color: #22c55e;
    color: #16a34a;
}

.favorite-btn:active {
    transform: scale(0.98);
}