/* WOW Логістика: the layout of a modern logistics dashboard in the colours and the font of wow-yalynka.ua */
@font-face { font-family: "Formular"; src: url("/fonts/Formular-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Formular"; src: url("/fonts/Formular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Formular"; src: url("/fonts/Formular-Medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Formular"; src: url("/fonts/Formular-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
:root {
	--g: #015046; --g2: #02675a; --g-lt: #cfe3df; --g-xlt: #e8f2f0; --y: #F9B233; --y-lt: #fdf0d3; --ink: #141414; --grey: #6b7280; --bg: #eef1f0; --card: #fff; --line: #e6ebe9; --red: #c0392b; --red-lt: #fde8e6; --ok: #1f8f4e;
	--tblr-font-sans-serif: "Formular", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --tblr-primary: #015046; --tblr-primary-rgb: 1, 80, 70; --tblr-body-bg: #eef1f0;
}
body { font-family: var(--tblr-font-sans-serif); background: var(--bg); color: var(--ink); }
.cur { font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.shell { max-width: none; margin: 0 auto; padding: 18px 26px 40px; }
@media (max-width: 768px) { .shell { padding: 12px 12px 30px; } }

/* the top bar: logo, the pill navigation, search, bell, the person */
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.logo .mark { width: 38px; height: 38px; border-radius: 50%; background: var(--g); display:.lg-grid; place-items: center; color: var(--y); font-size: 1.2rem; }
.logo b { color: var(--y); margin: 0 1px; }
.pillnav { display: flex; gap: 4px; background: var(--card); border-radius: 999px; padding: 5px; margin: 0 auto; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); overflow-x: auto; max-width: 100%; }
.pillnav a { padding: 9px 18px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.pillnav a:hover { background: var(--g-xlt); }
.pillnav a.active { background: var(--g); color: #fff; }
.pillnav a .badge { margin-left: 6px; background: var(--red); color: #fff; border-radius: 999px; }
.round { width: 46px; height: 46px; border-radius: 50%; background: var(--card); display:.lg-grid; place-items: center; border: 0; color: var(--ink); font-size: 1.2rem; position: relative; text-decoration: none; }
.round:hover { background: var(--g-xlt); }
.round .dot { position: absolute; top: 11px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.me { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px; padding: 5px 14px 5px 5px; }
.me .av { width: 36px; height: 36px; border-radius: 50%; background: var(--y); display:.lg-grid; place-items: center; font-weight: 700; color: var(--g); }
.me .n { font-weight: 600; line-height: 1.1; } .me .r { font-size: .75rem; color: var(--grey); }

/* the greeting and the actions */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hello .sm { font-size: 1.05rem; color: var(--ink); }
.hello h1 { font-size: 2.6rem; font-weight: 500; margin: 2px 0 0; letter-spacing: -.5px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; background: var(--card); border-radius: 999px; padding: 6px; }
.btn-pill { border-radius: 999px; padding: 10px 18px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; }
.btn-pill:hover { border-color: var(--g); color: var(--g); }
.btn-pill.dark { background: var(--g); color: #fff; border-color: var(--g); }
.btn-pill.dark:hover { background: var(--g2); color: #fff; }
.btn-pill.yellow { background: var(--y); border-color: var(--y); color: var(--ink); }
.dat.lg-box { display: flex; align-items: center; gap: 10px; padding: 4px 14px; }
.dat.lg-box .t { font-size: .72rem; color: var(--grey); } .dat.lg-box input { border: 0; font-weight: 600; padding: 0; background: transparent; }

/* the cards */
.lg-grid { display:.lg-grid; gap: 18px; }
.lg-box { background: var(--card); border-radius: 22px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); min-width: 0; }
.lg-box h3 { font-size: 1.02rem; font-weight: 600; margin: 0; }
.lg-box .sub { font-size: .78rem; color: var(--grey); margin-top: 2px; }
.lg-box-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.more { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); border: 0; display:.lg-grid; place-items: center; color: var(--ink); text-decoration: none; }
.lg.lg-kpis { display:.lg-grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lg-kpi { background: var(--card); border-radius: 999px; padding: 10px 18px 10px 10px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.lg-kpi:hover { box-shadow: 0 0 0 2px var(--g-lt); }
.lg-kpi .ic { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; border: 1px solid var(--line); display:.lg-grid; place-items: center; font-size: 1.35rem; color: var(--g); }
.lg-kpi .v { font-size: 1.7rem; font-weight: 500; line-height: 1; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.lg-kpi .d { font-size: .78rem; font-weight: 600; }
.lg-kpi .l { font-size: .8rem; color: var(--grey); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up { color: var(--ok); } .down { color: var(--red); }
.lg-kpi.alert .ic { background: var(--red-lt); color: var(--red); border-color: var(--red-lt); }
.lg-kpi.warn .ic { background: var(--y-lt); color: #a46b00; border-color: var(--y-lt); }
.big-num { font-size: 2.3rem; font-weight: 500; line-height: 1.05; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.select-pill { border-radius: 999px; border: 0; background: var(--bg); padding: 8px 14px; font-weight: 500; }

/* tracking */
.track-map { height: 120px; border-radius: 16px; background: linear-gradient(135deg, #e6efed 0%, #f4f7f6 100%); position: relative; overflow: hidden; margin-bottom: 14px; }
.track-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tl { list-style: none; padding: 0; margin: 0; }
.tl li { display: flex; gap: 12px; padding: 6px 0; position: relative; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: -6px; border-left: 2px dashed var(--line); }
.tl li:last-child::before { display: none; }
.tl .p { width: 12px; height: 12px; border-radius: 50%; background: var(--line); flex: 0 0 12px; margin-top: 4px; }
.tl .p.on { background: var(--red); } .tl .p.ok { background: var(--ok); }
.tl .w { font-size: .75rem; color: var(--grey); } .tl .s { font-weight: 500; font-size: .88rem; }
.status-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--g-xlt); color: var(--g); white-space: nowrap; }
.status-pill.transit { background: #e3ecfb; color: #2457a6; } .status-pill.delivered { background: #e2f3e8; color: var(--ok); } .status-pill.processing { background: var(--y-lt); color: #8a5a00; }
.status-pill.ready { background: var(--g-xlt); color: var(--g); } .status-pill.problem { background: var(--red-lt); color: var(--red); } .status-pill.cancelled { background: #eee; color: #777; }

/* the table with the pill tabs */
.tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 999px; padding: 4px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.tabs button.active { background: var(--g); color: #fff; }
.tabs button .c { margin-left: 6px; font-size: .75rem; opacity: .7; }
.tbl-wrap { border: 1px solid var(--line); border-radius: 18px; overflow: auto; margin-top: 14px; max-height: 70vh; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
.tbl th { position: sticky; top: 0; background: #fff; font-weight: 500; color: var(--grey); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; z-index: 1; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; } .tbl tbody tr:hover td { background: #f6faf9; }
.tbl .mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .wrap { white-space: normal; min-width: 180px; }
.muted { color: var(--grey); } .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .form-control, .filters .form-select { border-radius: 999px; border-color: var(--line); }
.pager { display: flex; align-items: center; gap: 8px; }

/* the card of a delivery */
.offcanvas.side { width: min(620px, 100vw) !important; border-radius: 22px 0 0 22px; }
.side .offcanvas-header { padding: 20px 24px 8px; }
.side .offcanvas-body { padding: 8px 24px 24px; }
.kv { display:.lg-grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: .9rem; }
.kv .k { color: var(--grey); }
.sec { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); margin: 20px 0 8px; font-weight: 600; }

/* route sheet, print */
.route-group { break-inside: avoid; margin-bottom: 18px; }
@media print {
	.topbar, .hello .actions, .no-print, .pillnav { display: none !important; }
	body { background: #fff; } .lg-box { box-shadow: none; border: 1px solid #ddd; }
	.tbl-wrap { max-height: none; overflow: visible; }
}
@media (max-width: 1200px) { .lg.lg-kpis { grid-template-columns: 1fr; } }
.min-w-0 { min-width: 0; }

/* the map */
.track-map .leaflet-control-container { display: none; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); display: grid; place-items: center; }
.pin span { transform: rotate(45deg); color: #fff; font-weight: 700; font-size: 12px; font-family: Formular, sans-serif; }
.pin.approx { opacity: .75; border-style: dashed; }
.pin.done { filter: grayscale(.6); opacity: .6; }
.pp { font-family: Formular, sans-serif; font-size: 13px; min-width: 220px; }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.mc { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; background: var(--bg); color: var(--ink); text-decoration: none; min-width: 0; }
.mc.on { background: var(--g); color: #fff; }
.mc .sw { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; border: 2px solid #fff; }
.stops { list-style: none; padding: 0; margin: 0; }
.stops li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: .86rem; }
.stops li.grp { font-weight: 600; color: var(--c); border-bottom: 0; padding-top: 12px; cursor: default; }
.stops .no { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
