@font-face{font-family:FiraGO;src:url(/static/fonts/FiraGO-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:FiraGO;src:url(/static/fonts/FiraGO-500.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:FiraGO;src:url(/static/fonts/FiraGO-600.woff2) format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:FiraGO;src:url(/static/fonts/FiraGO-700.woff2) format("woff2");font-weight:700;font-display:swap}
:root{
  --bg:#f3f5f9;--card:#fff;--ink:#0f1b2d;--muted:#64748b;--line:#e4e9f0;
  --brand:#14325c;--brand-2:#1d4f91;--accent:#f5a524;--danger:#dc2626;--ok:#16a34a;
  --r:12px;--shadow:0 1px 2px rgba(16,24,40,.05),0 4px 16px rgba(16,24,40,.05);
}
*{box-sizing:border-box}
body{margin:0;font:14.5px/1.5 FiraGO,"Segoe UI",system-ui,sans-serif;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
.inline{display:inline}
.mono{font-family:ui-monospace,"SF Mono",Consolas,monospace;letter-spacing:.02em}
.muted{color:var(--muted);margin:4px 0 0}
.i{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}

/* buttons */
.btn{display:inline-flex;align-items:center;gap:7px;border:1px solid transparent;border-radius:9px;padding:8px 14px;font:inherit;font-weight:500;cursor:pointer;white-space:nowrap;transition:.15s;line-height:1.2}
.btn.primary{background:var(--brand);color:#fff}.btn.primary:hover{background:var(--brand-2)}
.btn.danger{background:var(--danger);color:#fff}.btn.danger:hover{filter:brightness(1.08)}
.btn.ghost{background:#fff;border-color:var(--line);color:var(--ink)}.btn.ghost:hover{border-color:#c8d2e0;background:#f8fafc}
.btn.block{width:100%;justify-content:center;padding:12px}
.btn.sm{padding:6px 11px;font-size:13px}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--muted);cursor:pointer}
.icon-btn:hover{color:var(--danger);border-color:#f3c2c2}

/* header */
.top{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.top-in{max-width:1560px;margin:0 auto;padding:10px 20px;display:flex;align-items:center;gap:22px}
.brand{display:flex;align-items:center;gap:10px}
.logo{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--brand);color:var(--accent);font-weight:700;font-size:13px;letter-spacing:.04em}
.logo.lg{width:58px;height:58px;font-size:18px;border-radius:14px}
.brand-t{display:flex;flex-direction:column;font-weight:700;font-size:16px;line-height:1.1}
.brand-t small{font-weight:500;color:var(--muted);font-size:12px}
.nav{display:flex;gap:4px;flex:1}
.nav-link{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:9px;color:var(--muted);font-weight:500}
.nav-link:hover{background:var(--bg);color:var(--ink)}
.top-right{display:flex;align-items:center;gap:10px}
.who{display:flex;align-items:center;gap:8px;padding:4px 10px 4px 6px;border-radius:9px;color:var(--ink)}
.who:hover{background:var(--bg)}
.who span{display:flex;flex-direction:column;line-height:1.15;font-weight:600;font-size:13.5px}
.who small{color:var(--muted);font-weight:400;font-size:11.5px}
.who .i{width:30px;height:30px;padding:6px;border-radius:50%;background:var(--bg)}

/* page */
.wrap{max-width:1560px;margin:0 auto;padding:22px 20px 90px}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:16px}
.page-head h1{margin:0;font-size:24px;font-weight:700;letter-spacing:-.01em}
.stats{display:flex;gap:8px;margin-top:6px;flex-wrap:wrap;align-items:center}
.stat{background:#fff;border:1px solid var(--line);border-radius:999px;padding:3px 11px;font-size:13px;color:var(--muted)}
.stat b{color:var(--ink)}
.toolbar{display:flex;flex-wrap:wrap;gap:8px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);margin-bottom:16px}
.flash{display:flex;gap:10px;align-items:flex-start;padding:11px 14px;border-radius:10px;margin-bottom:14px;font-weight:500}
.flash .i{margin-top:1px}
.flash.ok{background:#e9f8ef;color:#166534;border:1px solid #bfe8cd}
.flash.error{background:#fdecec;color:#991b1b;border:1px solid #f6c8c8}

/* filters */
.filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px}
.filters input,.filters select,.row-form input{height:38px;padding:0 11px;border:1px solid var(--line);border-radius:9px;font:inherit;background:#fff;color:var(--ink)}
.filters input:focus,.filters select:focus,.fld input:focus,.fld select:focus,.row-form input:focus{outline:none;border-color:var(--brand-2);box-shadow:0 0 0 3px rgba(29,79,145,.12)}
.search{position:relative;flex:1;min-width:240px}
.search .i{position:absolute;left:11px;top:10px;color:var(--muted)}
.search input{width:100%;padding-left:36px}
.date{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px}
.cols-panel{display:flex;flex-wrap:wrap;gap:8px 18px;padding:12px 16px;align-items:center}
.cols-panel[hidden]{display:none}
.chk{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
input[type=checkbox]{width:16px;height:16px;accent-color:var(--brand)}

/* tables */
.table-card{overflow:auto}
table.parcels,table.simple{width:100%;border-collapse:separate;border-spacing:0}
table.parcels th,table.simple th{position:sticky;top:0;background:#f8fafc;color:var(--muted);font-weight:600;font-size:12.5px;text-align:left;padding:11px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
table.parcels td,table.simple td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
table.parcels tbody tr:last-child td,table.simple tbody tr:last-child td{border-bottom:0}
table.parcels tbody tr:hover{background:#f8fbff}
table.parcels tr.checked{background:#eef5ff}
th.sel,td.sel{width:36px;padding-right:0!important}
.act-h{text-align:right!important}
.actions{white-space:nowrap;text-align:right}
.ic{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer;margin-left:4px;vertical-align:middle;color:var(--muted)}
.ic .i{width:16px;height:16px}
.ic.edit:hover{color:#b45309;border-color:#f5d49a;background:#fff8eb}
.ic.print:hover{color:var(--brand-2);border-color:#bcd0ee;background:#f0f6ff}
.ic.del:hover{color:var(--danger);border-color:#f3c2c2;background:#fff1f1}
.empty{text-align:center;color:var(--muted);padding:50px!important}
.empty .i{width:34px;height:34px;margin-bottom:6px;opacity:.6}
.hide-col{display:none!important}
table.simple input,table.simple select{height:34px;padding:0 9px;border:1px solid var(--line);border-radius:8px;font:inherit;max-width:180px;background:#fff}
.nowrap{white-space:nowrap}
.pager{display:flex;gap:10px;align-items:center;justify-content:center;margin:16px 0;color:var(--muted)}

/* status badges */
.badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.st-registered{background:#eef1f5;color:#475569}
.st-in_transit{background:#e6f0ff;color:#1d4ed8}
.st-arrived{background:#f1eaff;color:#6d28d9}
.st-courier{background:#fff4e0;color:#b45309}
.st-delivered{background:#e5f7ec;color:#15803d}
.st-returned{background:#fdecec;color:#b91c1c}

/* bulk bar */
.bulkbar{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:30;display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:center;background:var(--ink);color:#fff;padding:10px 12px 10px 18px;border-radius:14px;box-shadow:0 10px 30px rgba(15,27,45,.3);max-width:calc(100% - 24px)}
.bulkbar[hidden]{display:none}
.bulkbar select{height:36px;border-radius:9px;border:0;padding:0 10px;font:inherit}
.bulkbar .btn.primary{background:var(--accent);color:var(--ink)}
.bulkbar .btn.ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.25)}
.bulkbar .icon-btn{background:transparent;border-color:rgba(255,255,255,.25);color:#fff}

/* forms */
.form{max-width:760px;margin-left:auto;margin-right:auto;padding:22px 24px}
.form.narrow{max-width:460px}
.page-head + .form,.page-head + .flash{margin-top:0}
.wrap > .page-head:has(+ .form),.wrap > .page-head:has(+ .card.form){max-width:760px;margin-left:auto;margin-right:auto}
.h2{margin:0 0 14px;font-size:17px}
fieldset{border:0;padding:0;margin:0 0 18px}
legend{font-weight:700;font-size:15px;margin-bottom:10px;padding:0}
legend small{color:var(--muted);font-weight:500;font-size:12.5px;margin-left:4px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}
.fld{display:flex;flex-direction:column;gap:5px;margin-bottom:2px}
.fld span{font-size:12.5px;color:var(--muted);font-weight:500}
.fld input,.fld select,.form textarea{height:42px;padding:0 12px;border:1px solid var(--line);border-radius:9px;font:inherit;background:#fff;color:var(--ink);width:100%}
.form-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.row-form{display:flex;gap:8px;margin-bottom:14px}.row-form input{flex:1}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:3px 6px 3px 12px;font-size:12.5px;font-weight:500}
.chip button{border:0;background:none;color:var(--muted);cursor:pointer;font-size:15px;line-height:1}
.chip button:hover{color:var(--danger)}
.timeline{list-style:none;margin:0;padding:0}
.timeline li{display:flex;gap:12px;align-items:center;padding:8px 0;border-bottom:1px dashed var(--line)}
.timeline li:last-child{border-bottom:0}

/* scan */
.scan #scanInput{height:56px;font-size:20px;font-family:ui-monospace,Consolas,monospace;border:2px solid var(--brand-2)}
.scan-list-head{display:flex;justify-content:space-between;align-items:center;margin:16px 0 8px}
.scan-list{list-style:none;margin:0;padding:0;max-height:340px;overflow:auto;border:1px solid var(--line);border-radius:10px}
.scan-list:empty::before{content:"ჯერ არაფერია დასკანერებული";display:block;padding:18px;text-align:center;color:var(--muted)}
.scan-list li{display:flex;justify-content:space-between;align-items:center;padding:7px 12px;border-bottom:1px solid var(--line);font-family:ui-monospace,Consolas,monospace}
.scan-list li:last-child{border-bottom:0}
.scan-list li button{border:0;background:none;color:var(--muted);cursor:pointer;font-size:16px}
.scan-list li.dup{animation:flash .6s}
@keyframes flash{from{background:#fff4e0}to{background:transparent}}

/* login */
.login-bg{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:18px;background:radial-gradient(1200px 600px at 10% -10%,#1d4f91 0%,transparent 60%),radial-gradient(900px 500px at 110% 110%,#f5a52433 0%,transparent 60%),#0f1b2d}
.login{background:#fff;border-radius:18px;padding:34px 30px;width:100%;max-width:400px;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.login-logo{display:flex;justify-content:center;margin-bottom:14px}
.login h1{text-align:center;margin:0;font-size:21px}
.login .muted{text-align:center;margin:4px 0 20px}
.login .fld{margin-bottom:12px}
.login .btn{margin-top:8px}

/* mobile */
@media (max-width:900px){
  .top-in{flex-wrap:wrap;gap:10px;padding:10px 12px}
  .nav{order:3;flex-basis:100%;overflow-x:auto}
  .top-right{margin-left:auto}
  .top-right .btn.primary span{display:none}
  .who span{display:none}
  .wrap{padding:14px 10px 100px}
  .page-head h1{font-size:20px}
  .toolbar .btn span{display:none}
  .grid2{grid-template-columns:1fr}
  .form{padding:16px}
  .table-card{overflow:visible;background:transparent;border:0;box-shadow:none}
  table.parcels thead{display:none}
  table.parcels,table.parcels tbody,table.parcels tr,table.parcels td{display:block;width:100%}
  table.parcels tr{background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:10px;padding:8px 4px;position:relative;box-shadow:var(--shadow)}
  table.parcels td{display:flex;gap:8px;border:0;padding:4px 12px}
  table.parcels td[data-label]::before{content:attr(data-label);color:var(--muted);font-size:13px;flex:0 0 44%}
  table.parcels td.sel{position:absolute;right:8px;top:10px;width:auto;padding:0}
  table.parcels td.sel input{width:22px;height:22px}
  table.parcels td.actions{justify-content:flex-start;padding-top:8px}
  table.parcels td.actions::before{content:none!important}
  table.parcels td.empty::before{content:none}
  table.simple thead{display:none}
  table.simple,table.simple tbody,table.simple tr,table.simple td{display:block;width:100%}
  table.simple tr{border-bottom:1px solid var(--line);padding:8px 0}
  table.simple td{border:0;padding:4px 12px}
  table.simple td[data-label]::before{content:attr(data-label);display:block;font-size:12px;color:var(--muted)}
  table.simple input,table.simple select{max-width:none;width:100%}
  .bulkbar{bottom:10px;padding:10px}
}
@media (min-width:901px){table.parcels td{white-space:nowrap}.bulkbar{flex-wrap:nowrap;white-space:nowrap}}
.nav-link{white-space:nowrap}
@media (max-width:900px){.filters>*{flex:1 1 100%}.date input{flex:1}.filters .btn{justify-content:center}}

.h3{font-size:14px;margin:18px 0 8px}.row-form select{height:38px;border:1px solid var(--line);border-radius:9px;padding:0 9px;font:inherit;background:#fff}

/* searchable city picker */
.combo{position:relative}
.combo-list{position:absolute;z-index:40;left:0;right:0;top:calc(100% + 4px);max-height:300px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 30px rgba(16,24,40,.14);padding:4px}
.combo-g{position:sticky;top:-4px;background:#f8fafc;color:var(--muted);font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:7px 10px 5px;margin:0 -4px}
.combo-o{padding:8px 10px;border-radius:7px;cursor:pointer;font-weight:500}
.combo-o:hover{background:var(--bg)}
.combo-o.on{background:#e8f0fc;color:var(--brand)}
.combo-empty{padding:12px;color:var(--muted);text-align:center}
.combo-in{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.3-4.3'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:17px;padding-right:38px!important}

/* phone with country code */
.phone-fld{position:relative;display:flex;height:42px;border:1px solid var(--line);border-radius:9px;background:#fff}
.phone-fld:focus-within{border-color:var(--brand-2);box-shadow:0 0 0 3px rgba(29,79,145,.12)}
.cc-btn{display:flex;align-items:center;gap:6px;border:0;border-right:1px solid var(--line);background:#f8fafc;border-radius:8px 0 0 8px;padding:0 9px 0 11px;font:inherit;font-weight:600;cursor:pointer;color:var(--ink)}
.cc-btn img{width:22px;height:16px;border-radius:3px;object-fit:cover;box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.cc-btn svg{width:14px;height:14px;fill:none;stroke:var(--muted);stroke-width:2.5}
.fld .phone-fld input.cc-num{border:0!important;box-shadow:none!important;height:40px;flex:1;min-width:0;border-radius:0 9px 9px 0}
.cc-pop{position:absolute;z-index:40;left:-1px;top:calc(100% + 4px);width:320px;max-width:calc(100vw - 32px);background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 30px rgba(16,24,40,.14);padding:6px}
.cc-search{width:100%;height:38px;border:1px solid var(--line);border-radius:8px;padding:0 10px;font:inherit;margin-bottom:4px}
.cc-search:focus{outline:none;border-color:var(--brand-2)}
.cc-list{max-height:280px;overflow:auto}
.cc-o{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:7px;cursor:pointer}
.cc-o:hover{background:var(--bg)}.cc-o.on{background:#e8f0fc}
.cc-o img{width:22px;height:16px;border-radius:3px;object-fit:cover;box-shadow:0 0 0 1px rgba(0,0,0,.08);flex:none}
.cc-o span{flex:1;font-weight:500}.cc-o small{color:var(--muted);font-weight:400}
.cc-o b{color:var(--muted);font-weight:600}
.brand-logo{height:34px;width:auto;display:block}
.login-logo img{height:52px;width:auto;max-width:100%}
.login-logo{margin-bottom:22px}
@media (max-width:900px){.brand-logo{height:28px}}

.btn.accent{background:var(--accent);color:var(--ink)}.btn.accent:hover{filter:brightness(1.05)}
.h1-sub{font-size:15px;font-weight:500;color:var(--muted)}
.flight-open{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:16px 18px}
.flight-actions{display:flex;flex-direction:column;gap:10px}
.flight-actions .btn{justify-content:center}

.form textarea.ta{height:auto;padding:10px 12px;line-height:1.5;resize:vertical}

.grid2 .fld.wide{grid-column:1/-1}

.form .ka{font-style:normal;font-weight:400;font-size:.86em;opacity:.7}

/* custom select arrow */
select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 10px center!important;background-size:16px!important;padding-right:34px!important;cursor:pointer}
select:hover{border-color:#c8d2e0}
select[multiple]{background-image:none!important;padding-right:10px!important}

/* date picker */
.dp{position:relative;display:inline-flex;align-items:center}
.dp .dp-in{width:136px;padding-right:34px!important;cursor:pointer}
.dp-ic{position:absolute;right:10px;width:17px;height:17px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;cursor:pointer}
.dp-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:50;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(16,24,40,.16);padding:12px;width:268px;color:var(--ink)}
.dp-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.dp-head b{font-size:14px}
.dp-head button{width:30px;height:30px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:18px;line-height:1;cursor:pointer;color:var(--ink)}
.dp-head button:hover{background:#f1f5f9}
.dp-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;text-align:center}
.dp-dn{font-size:11.5px;color:var(--muted);padding:3px 0;font-weight:600}
.dp-grid button{height:32px;border:0;border-radius:8px;background:transparent;font:inherit;font-size:13.5px;cursor:pointer;color:var(--ink)}
.dp-grid button:hover{background:#eef3fa}
.dp-grid button.today{box-shadow:inset 0 0 0 1.5px var(--accent);font-weight:600}
.dp-grid button.sel{background:var(--brand);color:#fff;font-weight:600}
.dp-foot{display:flex;justify-content:space-between;margin-top:10px;padding-top:9px;border-top:1px solid var(--line)}
.dp-foot button{border:0;background:none;font:inherit;font-size:13px;color:var(--brand-2);cursor:pointer;font-weight:500;padding:4px 6px;border-radius:6px}
.dp-foot button:hover{background:#eef3fa}
@media (max-width:900px){.dp,.dp .dp-in{width:100%;flex:1}}
