@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* =========================================================
   CARGO & PARCEL MANAGEMENT SYSTEM
   Theme: Ivory #F8F7F2 · Yellow #FFD84D · Purple #7357D8
   ========================================================= */

*{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#F8F7F2;
  --card:#FFFFFF;
  --purple:#7357D8;
  --purple-dark:#5D43C7;
  --purple-deep:#4D38A8;
  --purple-soft:#EEE9FF;
  --yellow:#FFD84D;
  --yellow-soft:#FFF5CC;
  --navy:#17213F;
  --text:#24304F;
  --text2:#56617A;
  --muted:#7D879B;
  --border:#E8E5DD;
  --border-soft:#F0EEE8;
  --green:#16A878;
  --green-soft:#DDF6EB;
  --orange:#F59A05;
  --orange-soft:#FFF0D2;
  --red:#EF4444;
  --red-soft:#FDE5E5;
  --blue:#4D82E8;
  --radius:14px;
  --shadow:0 4px 18px rgba(42,34,94,.07);
  --shadow-hover:0 9px 26px rgba(72,56,150,.12);
}

html,body{height:100%;min-height:100%;overflow-x:hidden}
body{
  font-family:'Poppins','Segoe UI',system-ui,sans-serif;
  background:var(--bg);color:var(--text);
  font-size:13px;line-height:1.45;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea{font:inherit}
a{color:var(--purple);text-decoration:none}
a:hover{color:var(--purple-dark)}

/* ================= APP SHELL ================= */
.app{display:flex;min-height:100dvh}

.sidebar{
  position:fixed;z-index:100;left:0;top:0;
  width:196px;height:100dvh;
  padding:14px 10px 0;
  display:flex;flex-direction:column;
  overflow:hidden;
  color:#fff;
  background:linear-gradient(180deg,#4B35B5 0%,#533CC0 52%,#4932AD 100%);
  transition:transform .25s ease;
}
.sidebar .brand{
  flex:0 0 auto;
  display:flex;align-items:center;gap:8px;
  padding:1px 7px 18px;
}
.brand-mark{width:39px;height:39px;flex:0 0 39px}
.brand-txt{display:flex;flex-direction:column;line-height:1.13;min-width:0}
.brand-txt b{font-size:15px;font-weight:700;color:#fff;white-space:nowrap;letter-spacing:-.35px}
.brand-txt small{font-size:10px;font-weight:400;color:#EEE9FF;white-space:nowrap;margin-top:3px}

.sidebar nav{
  flex:0 0 auto;min-height:0;
  display:flex;flex-direction:column;gap:4px;
  overflow:hidden;
}
.nav-item{
  min-height:35px;
  display:flex;align-items:center;gap:12px;
  padding:7px 10px;border-radius:9px;
  color:#F4F1FF;font-size:11.5px;font-weight:500;
  letter-spacing:-.05px;
  transition:background .15s ease,color .15s ease,transform .15s ease;
}
.nav-item .ico{width:19px;height:19px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 19px}
.nav-item .ico svg{width:18px;height:18px;stroke-width:2.1}
.nav-item:hover{background:rgba(255,255,255,.085);color:#fff}
.nav-item.active{
  background:var(--yellow);color:#1e1b4b;
  font-weight:700;
  box-shadow:0 4px 12px rgba(39,25,107,.16);
}
.nav-item.active .ico{color:#5137B8}

.sb-art{
  flex:1 1 auto;
  min-height:125px;
  display:flex;align-items:flex-end;justify-content:center;
  margin:0 -10px;
  padding:0 0 7px;
  line-height:0;
  overflow:hidden;
}
.sb-art svg{width:148px;height:auto;display:block;margin:0 auto}

.main{
  flex:1 1 0;              /* take all remaining width next to the sidebar */
  margin-left:196px;min-width:0;min-height:100dvh;
  display:flex;flex-direction:column;
  transition:margin .25s ease;
}
.topbar{
  flex:0 0 auto;
  min-height:74px;
  padding:15px 25px 9px;
  display:flex;align-items:center;justify-content:space-between;
  background:var(--bg);
}
.tb-left{display:flex;align-items:center;gap:14px}
.hamburger{
  width:30px;height:30px;padding:3px;
  border:0;background:transparent;color:var(--navy);
  cursor:pointer;display:flex;align-items:center;justify-content:center
}
.hamburger svg{width:21px;height:21px}
.topbar h1{font-size:21px;font-weight:700;line-height:1.2;color:var(--navy);letter-spacing:-.3px}
.tb-sub{font-size:11px;color:var(--muted);margin-top:2px}
.tb-right{display:flex;align-items:center;gap:22px}
.bell{position:relative;color:var(--navy);display:flex}
.bell svg{width:21px;height:21px}
.badge-dot{
  position:absolute;top:-7px;right:-8px;
  min-width:16px;height:16px;padding:0 4px;border-radius:9px;
  display:flex;align-items:center;justify-content:center;
  background:var(--yellow);color:var(--navy);
  border:2px solid var(--bg);font-size:9px;font-weight:700
}
.user-chip{display:flex;align-items:center;gap:9px}
.user-chip strong{display:block;font-size:12.5px;color:var(--navy);line-height:1.2;font-weight:700}
.user-chip small{display:block;font-size:10.5px;color:var(--muted);margin-top:2px}
.user-chip .chev{width:14px;height:14px;color:var(--muted);display:flex}
.user-chip .chev svg{width:14px;height:14px}
.avatar{
  order:-1;width:40px;height:40px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--purple);color:#fff;font-size:15px;font-weight:600;
  box-shadow:0 4px 12px rgba(115,87,216,.25)
}
.content{flex:1;padding:7px 25px 15px;min-width:0}
.foot{padding:7px 25px 15px;color:#9AA1B0;font-size:10.5px;text-align:center}
body.sb-collapsed .sidebar{transform:translateX(-100%)}
body.sb-collapsed .main{margin-left:0}

/* ================= COMMON CARDS ================= */
.card{
  background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius);padding:17px 19px;
  box-shadow:var(--shadow);margin-bottom:17px
}
.card h3{font-size:14px;font-weight:700;color:var(--navy);margin-bottom:12px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}
.card-title{display:flex;align-items:center;gap:9px}
.card-title .ct-ico{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;color:var(--purple);background:var(--purple-soft)}
.card-title .ct-ico svg{width:17px;height:17px}
.card-title h3{margin:0;font-size:14px;color:var(--navy)}
.card-title small{display:block;font-size:10.5px;color:var(--muted);margin-top:1px}
.card-link{font-size:11.5px;font-weight:600;color:var(--purple)}

/* ================= KPI ================= */
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:17px}
.kpi{
  position:relative;overflow:hidden;min-height:91px;
  display:flex;align-items:center;gap:14px;
  padding:14px 16px 14px 20px;
  background:#fff;border:1px solid var(--border);border-radius:14px;
  box-shadow:var(--shadow);transition:.18s
}
.kpi:hover{transform:translateY(-2px);box-shadow:var(--shadow-hover)}
.kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--purple)}
.kpi.y:before{background:var(--yellow)}
.kpi-ico{
  width:52px;height:52px;flex:0 0 52px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--purple-soft);color:var(--purple)
}
.kpi.y .kpi-ico{background:var(--yellow-soft);color:#D39B00}
.kpi-ico svg{width:25px;height:25px}
.kpi-lbl{font-size:10.5px;color:var(--text2);font-weight:600;margin-bottom:2px}
.kpi-val{font-size:23px;line-height:1.15;font-weight:700;color:var(--navy)}
.kpi-trend{font-size:9.5px;font-weight:600;color:var(--green);margin-top:3px}
.kpi-trend.bad{color:var(--red)}
.kpi-trend span{display:block;color:var(--muted);font-weight:400}

/* ================= DASHBOARD ================= */
.dash-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(360px,1fr);gap:17px;margin-bottom:17px}
.dash-col{display:flex;flex-direction:column;gap:17px;min-width:0}
.dash-col .card{margin-bottom:0}
.range-pill{
  display:flex;align-items:center;gap:6px;
  padding:6px 10px;border:1px solid var(--border);
  border-radius:8px;background:#fff;color:var(--text2);
  font-size:10px;white-space:nowrap
}
.legend{display:flex;justify-content:flex-end;gap:16px;font-size:10px;color:var(--text2);margin-bottom:3px}
.legend i{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px}
#chart,#chart svg{width:100%;height:230px;display:block}

/* ================= QUICK ACTIONS ================= */
.qa-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.qa{
  min-height:82px;padding:10px 5px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  border-radius:10px;color:var(--navy);font-size:9.5px;font-weight:600;
  text-align:center;transition:.15s
}
.qa:hover{transform:translateY(-2px);box-shadow:var(--shadow-hover);color:var(--navy)}
.qa.p{background:#F0ECFF}.qa.y{background:#FFF6D6}
.qa .qi{width:30px;height:30px;display:flex;align-items:center;justify-content:center;color:var(--purple)}
.qa .qi svg{width:23px;height:23px}

/* ================= RECENT SHIPMENTS ================= */
.rs-tbl{width:100%;border-collapse:collapse;font-size:10px}
.rs-tbl th{
  padding:8px 9px;text-align:left;background:#F4F2EC;
  color:var(--muted);font-size:9.5px;font-weight:500
}
.rs-tbl th:first-child{border-radius:8px 0 0 8px}
.rs-tbl th:last-child{border-radius:0 8px 8px 0}
.rs-tbl td{padding:9px;border-bottom:1px solid var(--border-soft);color:var(--text2)}
.rs-tbl td:first-child{font-weight:600;color:var(--navy)}
.rs-tbl tr:last-child td{border-bottom:0}
.pill{display:inline-block;padding:3px 8px;border-radius:6px;font-size:9px;font-weight:600}
.pill.transit{background:#FFF0BF;color:#A36A00}
.pill.delivered{background:var(--green-soft);color:#087A55}
.pill.pending{background:var(--red-soft);color:#C52B2B}
.empty-note{text-align:center;color:var(--muted);padding:18px 0;font-size:11px}

/* ================= BANNER ================= */
.banner{
  position:relative;overflow:hidden;
  display:flex;align-items:center;gap:14px;
  min-height:83px;padding:13px 18px;border-radius:14px;
  background:linear-gradient(100deg,#FFF8D8 0%,#FFF0A9 100%);
  border:1px solid #F5E49A
}
.banner:after{
  content:"";position:absolute;width:180px;height:180px;border-radius:50%;
  right:-55px;bottom:-120px;background:rgba(255,216,77,.35)
}
.banner .bn-ico{width:45px;height:45px;display:flex;align-items:center;justify-content:center;color:var(--purple);z-index:1}
.banner .bn-ico svg{width:43px;height:43px}
.banner>div:nth-child(2){z-index:1}
.banner h4{font-size:15px;color:var(--purple);font-weight:700}
.banner p{font-size:10px;color:var(--text2);margin-top:2px}
.banner .btn{margin-left:auto;z-index:2}

/* ================= BUTTONS ================= */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  border:0;border-radius:8px;padding:9px 14px;
  font-size:11.5px;font-weight:600;cursor:pointer;white-space:nowrap;
  transition:.15s
}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--purple);color:#fff}
.btn-primary:hover{background:var(--purple-dark);color:#fff;box-shadow:0 5px 15px rgba(115,87,216,.28)}
.btn-ok{background:var(--green);color:#fff}.btn-ok:hover{background:#0D9368;color:#fff}
.btn-warn{background:var(--orange);color:#fff}.btn-warn:hover{background:#D98200;color:#fff}
.btn-err{background:var(--red);color:#fff}.btn-err:hover{background:#D93636;color:#fff}
.btn-info{background:var(--blue);color:#fff}
.btn-ghost{background:#F1EFE9;color:var(--text2)}.btn-ghost:hover{background:#E7E4DC;color:var(--navy)}
.btn-sm{padding:6px 10px;font-size:10.5px;border-radius:7px}
.btn.full{width:100%;margin-top:18px;padding:12px}

/* ================= FORMS ================= */
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.field label{display:block;font-size:10.5px;font-weight:600;color:var(--text2);margin-bottom:5px;text-transform:uppercase;letter-spacing:.25px}
.field input,.field select,.field textarea{
  width:100%;padding:9px 12px;border:1px solid var(--border);
  border-radius:8px;background:#fff;color:var(--text);font-size:12px
}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:0;border-color:var(--purple);box-shadow:0 0 0 3px rgba(115,87,216,.10)
}
.field textarea{resize:vertical;min-height:70px}
.span-2{grid-column:span 2}

/* ================= TABLES ================= */
.tbl{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden}
.tbl th{padding:10px 12px;background:#F3F1EB;color:var(--muted);font-size:9.5px;text-align:left;text-transform:uppercase;letter-spacing:.4px;border-bottom:1px solid var(--border)}
.tbl td{padding:10px 12px;border-bottom:1px solid var(--border-soft);font-size:12px;color:var(--text2)}
.tbl tr:last-child td{border-bottom:0}
.tbl tbody tr:hover td{background:#FAF8FF}

/* ================= BADGES / ALERTS / PENDING ================= */
.badge{padding:4px 10px;border-radius:18px;font-size:10px;font-weight:600;display:inline-block}
.b-ok{background:var(--green-soft);color:#087A55}.b-warn{background:#FFF0BF;color:#925E00}
.b-err{background:var(--red-soft);color:#A92323}.b-info{background:#E3EEFF;color:#275BB0}.b-gray{background:#F0F1F3;color:#596171}
.alert{padding:10px 14px;border-radius:9px;margin-bottom:14px;font-size:12px;display:flex;align-items:center;gap:9px}
.alert.err{background:var(--red-soft);color:#991B1B;border-left:4px solid var(--red)}
.alert.warn{background:#FFF6DD;color:#8A5A00;border-left:4px solid var(--orange)}
.alert.ok{background:var(--green-soft);color:#086C4E;border-left:4px solid var(--green)}

.pending-row{
  display:flex;justify-content:space-between;align-items:center;gap:14px;
  padding:12px 15px;margin-bottom:8px;border:1px solid var(--border);
  border-left:4px solid #D1D5DB;border-radius:10px;background:#fff
}
.pending-row:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
.pending-row.overdue{border-left-color:var(--red);background:#FFF8F8}
.pending-row.today{border-left-color:var(--orange);background:#FFFDF5}
.pending-row.future{border-left-color:var(--green)}
.pending-row .info strong{display:block;font-size:12.5px;color:var(--navy)}
.pending-row .info small{display:block;color:var(--muted);font-size:10.5px;margin-top:2px}
.pending-row .amt{font-size:17px;font-weight:700;color:var(--red)}

/* ================= AUTOCOMPLETE / RECEIPT / TABS / TOAST ================= */
.ac-wrap{position:relative}.ac-list{position:absolute;top:calc(100% + 4px);left:0;right:0;background:#fff;border:1px solid var(--border);border-radius:9px;max-height:260px;overflow-y:auto;z-index:100;box-shadow:0 12px 30px rgba(20,15,55,.15);display:none}
.ac-item{padding:9px 12px;cursor:pointer;font-size:12px;border-bottom:1px solid var(--border-soft)}
.ac-item:last-child{border-bottom:0}.ac-item:hover,.ac-item.hover{background:var(--purple-soft)}
.ac-item strong{display:block;color:var(--navy)}.ac-item small{display:block;color:var(--muted);font-size:10.5px}

.receipt{max-width:720px;margin:auto;background:#fff;padding:28px;border-radius:var(--radius);border:1px solid var(--border)}
.receipt h2{text-align:center;margin-bottom:6px;font-size:21px}.receipt .head-line{text-align:center;color:var(--muted);font-size:11.5px;margin-bottom:18px}
.receipt table{width:100%;margin-bottom:12px}.receipt td{padding:6px 0;font-size:12px}.receipt .totals{border-top:2px dashed #D1D5DB;padding-top:12px;margin-top:12px}.receipt .totals .row{display:flex;justify-content:space-between;padding:5px 0;font-size:13px}.receipt .totals .row.grand{font-size:17px;font-weight:700;color:var(--purple);border-top:1px solid var(--border);padding-top:9px;margin-top:5px}

.tabs{display:flex;gap:4px;border-bottom:2px solid var(--border);margin-bottom:18px}.tab{padding:9px 14px;cursor:pointer;font-size:12px;font-weight:600;color:var(--muted);border-bottom:3px solid transparent;margin-bottom:-2px}.tab:hover{color:var(--navy)}.tab.active{color:var(--purple);border-bottom-color:var(--purple)}.tab-pane{display:none}.tab-pane.active{display:block}

.toast{position:fixed;right:20px;bottom:20px;background:var(--navy);color:#fff;padding:12px 17px;border-radius:9px;box-shadow:0 12px 30px rgba(0,0,0,.18);font-size:12px;z-index:9999;animation:slideUp .3s ease}
.toast.ok{background:var(--green)}.toast.err{background:var(--red)}
@keyframes slideUp{from{transform:translateY(15px);opacity:0}to{transform:translateY(0);opacity:1}}

/* ================= AUTH ================= */
.auth-body{background:var(--bg);min-height:100vh;overflow-x:hidden}
.auth-shell{display:grid;grid-template-columns:42% 58%;min-height:100vh}
.auth-brand{background:linear-gradient(135deg,#7357D8,#563DB7);color:#fff;position:relative;overflow:hidden;display:flex;align-items:center;padding:40px}
.auth-brand:before{content:"";position:absolute;width:500px;height:500px;background:radial-gradient(circle,rgba(255,255,255,.1),transparent 70%);top:-180px;right:-180px;border-radius:50%}
.auth-brand:after{content:"";position:absolute;width:360px;height:360px;background:radial-gradient(circle,rgba(255,216,77,.14),transparent 70%);bottom:-120px;left:-120px;border-radius:50%}
.brand-inner{position:relative;z-index:2;width:100%;max-width:400px;margin:auto}
.brand-logo{width:68px;height:68px;border-radius:20px;background:rgba(255,255,255,.16);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;margin-bottom:22px}
.auth-brand h1{font-size:30px;font-weight:700;margin-bottom:6px}.brand-tag{font-size:14px;opacity:.85;margin-bottom:34px}
.brand-features{list-style:none;display:flex;flex-direction:column;gap:16px}.brand-features li{display:flex;gap:12px;align-items:center}
.bf-ico{width:42px;height:42px;border-radius:12px;background:rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;font-size:19px;flex-shrink:0}
.brand-features b{display:block;font-size:14px}.brand-features small{font-size:12px;opacity:.75}.brand-foot{margin-top:40px;font-size:12px;opacity:.65}
.auth-form-wrap{display:flex;align-items:center;justify-content:center;padding:30px 40px;overflow-y:auto;max-height:100vh;background:#fff}
.auth-form{width:100%;max-width:520px}.auth-form-center{max-width:420px}.auth-head{margin-bottom:22px}.auth-head h2{font-size:26px;color:var(--navy);margin-bottom:6px}.auth-head p{color:var(--muted);font-size:14px}
.auth-form .fld{position:relative;margin-bottom:4px}.auth-form .fld label{display:block;font-size:11px;font-weight:600;color:var(--text2);margin-bottom:6px}
.auth-form input[type=text],.auth-form input[type=email],.auth-form input[type=password]{width:100%;padding:10px 13px;border:1.5px solid #E5E7EB;border-radius:9px;font-size:13px;background:#fff;color:var(--navy)}
.auth-form input:focus{outline:0;border-color:var(--purple);box-shadow:0 0 0 4px rgba(115,87,216,.10)}
.err-txt{font-size:11px;color:var(--red);margin-top:4px}.role-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}
.role-opt{border:1.5px solid #E5E7EB;border-radius:11px;padding:11px 13px;cursor:pointer;display:flex;align-items:center;gap:10px;background:#fff}.role-opt input{display:none}.role-opt.active{border-color:var(--purple);background:var(--purple-soft)}
.ro-ico{font-size:19px}.ro-ttl{display:block;font-weight:600;font-size:12px;color:var(--navy)}.ro-sub{display:block;font-size:10px;color:var(--muted)}
.auth-form .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:11px 13px;margin-bottom:11px}
.agree{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--text2);margin-top:8px}.agree input{accent-color:var(--purple)}
.btn-block-lg{width:100%;padding:12px 17px;font-size:13px;border-radius:10px;margin-top:15px}.switch-link{text-align:center;font-size:12px;color:var(--muted);margin-top:16px}.switch-link a{font-weight:600}
.demo-box{margin-top:20px;padding:13px 15px;border-radius:11px;background:var(--bg);border:1px dashed #D6D1C4}.demo-lbl{font-size:10.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}.demo-row{display:flex;justify-content:space-between;font-size:12px;padding:3px 0}.demo-row span{color:var(--muted)}.demo-row b{color:var(--navy);font-family:monospace}

/* ================= RESPONSIVE ================= */
@media(max-width:1100px){
  .kpi-grid{grid-template-columns:repeat(2,1fr)}
  .dash-grid{grid-template-columns:1fr}
}
@media(max-width:900px){
  .sidebar{width:196px;transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0);box-shadow:0 0 40px rgba(0,0,0,.3)}
  .main{margin-left:0}.content{padding:8px 16px 15px}.topbar{padding:12px 16px 7px}.topbar h1{font-size:18px}
  .tb-sub,.user-chip>div:not(.avatar),.user-chip .chev{display:none}
  .tb-right{gap:15px}
  .banner{flex-wrap:wrap}.banner .btn{margin-left:auto}
  .auth-shell{grid-template-columns:1fr}.auth-brand{padding:28px 24px;min-height:auto}.brand-features,.brand-foot{display:none}.auth-brand h1{font-size:22px}.brand-logo{width:52px;height:52px;margin-bottom:12px}.brand-tag{margin-bottom:0;font-size:12px}.auth-form-wrap{padding:24px 20px 40px;max-height:none;overflow:visible}
}
@media(max-width:600px){
  .kpi-grid{grid-template-columns:1fr}.qa-grid{grid-template-columns:repeat(2,1fr)}.card-head{flex-wrap:wrap}.form-grid{grid-template-columns:1fr}.span-2{grid-column:span 1}
}
@media(max-width:480px){
  .auth-form .grid-2,.role-picker{grid-template-columns:1fr}.pending-row{align-items:flex-start;flex-direction:column}.pending-row>div:last-child{width:100%;justify-content:space-between}
}

/* Keep the desktop sidebar fully visible without its own scrollbar */
@media(min-width:901px) and (max-height:680px){
  .sidebar{padding-top:10px}
  .sidebar .brand{padding-bottom:12px}
  .brand-mark{width:35px;height:35px;flex-basis:35px}
  .brand-txt b{font-size:14px}.brand-txt small{font-size:9px}
  .nav-item{min-height:33px;padding:6px 10px;font-size:11px}
  .nav-item .ico{width:18px;height:18px;flex-basis:18px}.nav-item .ico svg{width:17px;height:17px}
  .sb-art{min-height:100px}.sb-art svg{width:132px}
  .topbar{min-height:64px;padding-top:10px}.content{padding-top:5px}.foot{padding-bottom:9px}
  .kpi{min-height:78px;padding:11px 14px 11px 18px}.kpi-ico{width:44px;height:44px;flex-basis:44px}.kpi-val{font-size:20px}
  #chart,#chart svg{height:200px}
}
@media(min-width:901px) and (max-height:560px){
  .sidebar .brand{padding-bottom:7px}
  .nav-item{min-height:29px;padding:4px 9px;font-size:10.5px}
  .sb-art{min-height:75px}.sb-art svg{width:112px}
  .topbar{min-height:58px;padding:8px 22px 5px}.topbar h1{font-size:19px}
  .content{padding:3px 22px 8px}.foot{padding:4px 22px 7px}
  .kpi-grid{gap:10px;margin-bottom:10px}.kpi{min-height:68px;padding:8px 12px 8px 15px}.kpi-ico{width:38px;height:38px;flex-basis:38px}.kpi-val{font-size:18px}
  .dash-grid{gap:10px}.dash-col{gap:10px}.card{padding:12px 14px;margin-bottom:10px}
  #chart,#chart svg{height:165px}.qa{min-height:65px}.banner{min-height:65px}
}

/* ================= PRINT ================= */
@media print{
  .sidebar,.topbar,.foot,.no-print{display:none!important}
  .main{margin-left:0}.content{padding:0}body{background:#fff}.card{box-shadow:none;border:0}
}


/* =========================================================
   FINAL DASHBOARD POLISH
   Keeps the supplied sidebar/theme intact.
   ========================================================= */

/* Dashboard icon consistency */
.kpi-body{min-width:0}
.kpi-ico svg,
.ct-ico svg,
.qa .qi svg,
.banner .bn-ico svg,
.alert.ok>svg,
.pending-meta svg,
.pending-buttons svg,
.empty-note>svg,
.empty-payment .success-icon svg{
  width:20px;
  height:20px;
  flex:0 0 auto;
  display:block;
}

.alert.ok>svg{width:18px;height:18px;color:var(--green)}
.alert.ok{padding:9px 13px}

.card-title .ct-ico.warning{
  color:var(--orange);
  background:var(--orange-soft);
}

.range-pill svg{
  width:14px;
  height:14px;
  color:var(--purple);
  flex:0 0 auto;
}
.range-arrow{
  color:var(--muted);
  font-size:13px;
  line-height:1;
  margin-left:1px;
}

/* KPI cards */
.kpi{
  min-width:0;
}
.kpi-body{
  overflow:hidden;
}
.kpi-lbl{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.kpi-trend{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}
.kpi-trend span{
  display:inline;
}

/* Chart / shipment panel */
.shipment-card{
  min-height:300px;
}
#chart{
  min-height:230px;
  overflow:hidden;
}
.legend{
  align-items:center;
}
.legend-dot{
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:50%;
  margin-right:5px;
}
.legend-dot.purple{background:var(--purple)}
.legend-dot.yellow{background:var(--yellow)}

/* Quick actions */
.quick-card .card-head{
  margin-bottom:13px;
}
.qa{
  border:1px solid transparent;
}
.qa.p{
  background:#F1EDFF;
  border-color:#E6DEFF;
}
.qa.y{
  background:#FFF7D9;
  border-color:#F6E7A8;
}
.qa .qi{
  width:38px;
  height:38px;
  border-radius:11px;
  background:#fff;
  box-shadow:0 3px 9px rgba(72,56,150,.08);
}
.qa.p .qi{color:var(--purple)}
.qa.y .qi{color:#B88400}

/* Banner */
.banner .bn-ico{
  width:50px;
  height:50px;
  border-radius:13px;
  background:rgba(255,255,255,.6);
  box-shadow:0 3px 10px rgba(91,63,217,.07);
}
.banner .bn-ico svg{
  width:29px;
  height:29px;
}
.banner .btn svg{
  width:14px;
  height:14px;
}
.banner .btn{
  gap:7px;
}

/* Recent shipments */
.table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.rs-tbl{
  min-width:440px;
}
.rs-tbl th,
.rs-tbl td{
  white-space:nowrap;
}
.rs-tbl td:nth-child(2){
  max-width:130px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.empty-note{
  min-height:135px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
}
.empty-note>svg{
  width:28px;
  height:28px;
  color:var(--purple);
  margin-bottom:4px;
}
.empty-note p{
  color:var(--navy);
  font-weight:600;
}
.empty-note small{
  color:var(--muted);
  font-size:10px;
}

/* Pending payments */
.pending-card .card-head{
  margin-bottom:13px;
}
.pending-row{
  transition:box-shadow .15s ease,transform .15s ease,border-color .15s ease;
}
.pending-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px 12px;
  margin-top:5px;
  color:var(--muted);
  font-size:10.5px;
}
.pending-meta span{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.pending-meta svg{
  width:13px;
  height:13px;
}
.pending-meta .due-label{
  font-weight:600;
}
.pending-row.overdue .due-label{color:var(--red)}
.pending-row.today .due-label{color:var(--orange)}
.pending-row.future .due-label{color:var(--green)}

.pending-actions{
  display:flex;
  align-items:center;
  gap:13px;
  flex:0 0 auto;
}
.pending-amount{
  font-size:19px;
  font-weight:800;
  color:var(--red);
  white-space:nowrap;
}
.pending-buttons{
  display:flex;
  align-items:center;
  gap:6px;
}
.pending-buttons .btn{
  min-height:31px;
}
.pending-buttons .btn-ghost{
  width:32px;
  padding:6px;
}
.pending-buttons .btn-ghost svg{
  width:15px;
  height:15px;
}
.pending-buttons .btn-ok svg{
  width:14px;
  height:14px;
}
.pending-footer{
  display:flex;
  justify-content:center;
  margin-top:13px;
}
.pending-footer .btn{
  min-width:190px;
}
.empty-payment{
  min-height:150px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  color:var(--muted);
}
.empty-payment .success-icon{
  width:48px;
  height:48px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--green-soft);
  color:var(--green);
  margin-bottom:3px;
}
.empty-payment .success-icon svg{
  width:25px;
  height:25px;
}
.empty-payment strong{
  color:var(--navy);
  font-size:13px;
}
.empty-payment span{
  font-size:10.5px;
}

/* Keep sidebar artwork and navigation exactly within one desktop viewport */
@media(min-width:901px){
  .sidebar{
    overflow:hidden;
  }
  .sidebar nav{
    overflow:hidden;
  }
}

/* Desktop dashboard fit */
@media(min-width:1101px){
  .content{
    padding-top:4px;
  }
  .kpi-grid{
    gap:13px;
    margin-bottom:13px;
  }
  .dash-grid{
    gap:13px;
    margin-bottom:13px;
  }
  .dash-col{
    gap:13px;
  }
  .card{
    margin-bottom:13px;
  }
  .shipment-card{
    min-height:292px;
  }
  .quick-card{
    min-height:132px;
  }
}

/* Medium desktop / laptop */
@media(min-width:901px) and (max-width:1200px){
  .dash-grid{
    grid-template-columns:minmax(0,1.45fr) minmax(320px,1fr);
  }
  .qa-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Mobile */
@media(max-width:900px){
  .content{
    padding-top:7px;
  }
  .kpi-grid{
    gap:11px;
  }
  .dash-grid{
    gap:12px;
  }
  .dash-col{
    gap:12px;
  }
  .shipment-card{
    min-height:0;
  }
  .pending-row{
    align-items:flex-start;
  }
  .pending-actions{
    width:100%;
    justify-content:space-between;
  }
  .pending-amount{
    font-size:18px;
  }
}

@media(max-width:600px){
  .qa-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .card{
    padding:14px;
  }
  .range-pill{
    width:100%;
    justify-content:flex-start;
  }
  .legend{
    justify-content:flex-start;
  }
  .banner{
    align-items:flex-start;
    padding:14px;
  }
  .banner .btn{
    width:100%;
    margin-left:0;
  }
  .pending-actions{
    flex-wrap:wrap;
    gap:8px;
  }
}

@media(max-width:480px){
  .qa{
    min-height:76px;
  }
  .qa .qi{
    width:34px;
    height:34px;
  }
  .pending-meta{
    gap:5px 9px;
  }
}

/* Short desktop screens: preserve the no-scroll sidebar requirement */
@media(min-width:901px) and (max-height:680px){
  .shipment-card{min-height:0}
  .quick-card{min-height:0}
  .pending-row{padding:10px 13px}
  .pending-meta{margin-top:3px}
  .pending-amount{font-size:17px}
}
