:root{--navy:#061b3a;--navy2:#0a3264;--blue:#0c73ff;--cyan:#12bfd0;--green:#08783b;--amber:#f59e0b;--red:#dc2626;--ink:#0f172a;--muted:#64748b;--line:#dbe7f5;--bg:#f4f8fc;--card:#fff;--shadow:0 18px 50px rgba(6,27,58,.14);--radius:22px}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--ink)}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}#app{min-height:100vh}.landing-body{min-height:100vh;background:radial-gradient(circle at top,#eaf7ff,#f8fbff 45%,#e7eef8)}.landing-shell{min-height:100vh;display:grid;place-items:center;padding:24px}.glass-card{background:rgba(255,255,255,.82);border:1px solid rgba(255,255,255,.7);box-shadow:var(--shadow);backdrop-filter:blur(16px)}.landing-card{width:min(860px,100%);border-radius:32px;padding:42px;text-align:center}.landing-logo{width:130px;border-radius:28px}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.18em;color:var(--cyan);font-weight:900}.landing-card h1{font-size:clamp(32px,5vw,64px);line-height:1;margin:12px 0}.muted{color:var(--muted);line-height:1.6}.login-form{display:grid;gap:14px;max-width:460px;margin:24px auto 0;text-align:left}.login-form label,.form-row label{font-size:13px;color:var(--muted);font-weight:900;display:grid;gap:8px}.login-form input,.form-row input,.form-row select,.form-row textarea,.drawer-form input,.drawer-form select,.drawer-form textarea{width:100%;border:1px solid var(--line);border-radius:16px;padding:13px;background:#fbfdff;color:var(--ink);outline:none}.login-form input:focus,.form-row input:focus,.form-row textarea:focus,.form-row select:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(12,115,255,.1)}.primary-btn,.btn{border:none;border-radius:16px;padding:12px 16px;font-weight:900;cursor:pointer}.primary-btn,.btn.primary{background:linear-gradient(135deg,var(--blue),var(--cyan));color:#fff}.btn.dark{background:var(--navy);color:#fff}.btn.ghost{background:#eef5ff;color:var(--navy)}.btn.green{background:var(--green);color:#fff}.btn.red{background:#fee2e2;color:#991b1b}.btn:disabled{opacity:.6;cursor:not-allowed}.form-message{min-height:20px;font-size:13px}.form-message.error{color:#b91c1c}.form-message.success{color:#166534}.portal-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:28px}.portal-choice{padding:22px;border-radius:22px;background:#fff;border:1px solid var(--line);text-align:left}.portal-choice span{font-size:22px;font-weight:900;display:block}.portal-choice small{color:var(--muted)}.admin{border-top:5px solid var(--blue)}.client{border-top:5px solid var(--green)}.staff{border-top:5px solid var(--cyan)}.app-shell{display:grid;grid-template-columns:280px 1fr;min-height:100vh}.sidebar{background:var(--navy);color:#fff;padding:22px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}.brand img{width:52px;height:52px;border-radius:14px;background:#fff}.brand strong{font-size:18px}.nav{display:grid;gap:8px}.nav button{background:transparent;color:#cfe0f5;border:1px solid transparent;text-align:left;padding:13px 14px;border-radius:15px;cursor:pointer;font-weight:800}.nav button.active,.nav button:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.15);color:#fff}.mpd-portal-footer{margin-top:auto;padding-top:18px;border-top:1px solid rgba(255,255,255,.08)}.mpd-logout-btn{width:100%;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:rgba(255,255,255,.88);padding:11px 12px;border-radius:14px;cursor:pointer;font-weight:900;margin-bottom:12px}.obsidian-credit{font-size:11px;line-height:1.4;color:rgba(255,255,255,.45);text-align:center;letter-spacing:.03em}.obsidian-credit strong{display:block;color:rgba(255,255,255,.72);font-size:12px;margin-top:2px}.main{padding:24px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}.topbar h1{margin:0;font-size:30px}.pill{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:#edf5ff;color:#0b4a8d;font-size:12px;font-weight:900}.pill.green{background:#dcfce7;color:#166534}.pill.amber{background:#fef3c7;color:#92400e}.pill.red{background:#fee2e2;color:#991b1b}.grid{display:grid;gap:16px}.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:0 10px 30px rgba(6,27,58,.06)}.metric h3{font-size:34px;margin:4px 0}.metric p{margin:0;color:var(--muted);font-weight:800}.project-card{border-left:7px solid var(--blue)}.project-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.project-head h3{margin:0}.timeline{display:grid;gap:12px}.update-card{border-left:5px solid var(--blue)}.update-card h3{margin:0 0 8px}.meta-row,.mini-stat-row,.update-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.mini-stat-row span,.meta-row span{padding:7px 10px;border-radius:12px;background:#f1f7ff;color:#48617d;font-size:12px;font-weight:800}.section-title{display:flex;align-items:center;justify-content:space-between;margin:26px 0 12px;gap:12px}.section-title h2,.subsection-title{margin:0}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;background:#fff;border-radius:18px;overflow:hidden}.data-table th,.data-table td{padding:13px;border-bottom:1px solid var(--line);text-align:left;font-size:14px}.data-table th{background:#f0f6ff;color:#0b3264}.drawer{position:fixed;inset:0;background:rgba(6,27,58,.45);display:none;align-items:flex-end;z-index:50}.drawer.open{display:flex}.drawer-panel{background:#fff;width:100%;max-height:88vh;overflow:auto;border-radius:26px 26px 0 0;padding:22px}.drawer-form{display:grid;gap:14px}.action-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.live-dot{width:10px;height:10px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 6px rgba(34,197,94,.14);display:inline-block}.priority-control{display:grid;gap:8px;margin-top:12px}.empty{padding:30px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:18px;background:#fff}.two-col-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.checkbox-row{display:flex!important;gap:10px;align-items:center;color:var(--muted);font-size:14px;margin:6px 0}.checkbox-row input{width:18px!important;height:18px!important}.staff-check-list{display:grid;gap:8px;padding:10px;border-radius:16px;background:#f8fbff;border:1px solid var(--line)}.warning-card{border-color:rgba(245,158,11,.3);background:#fff7ed}.next-action{margin-top:12px;padding:10px;border-radius:14px;background:#f8fbff;border:1px solid var(--line)}.next-action.danger{background:#fff1f2;color:#b91c1c}.client-hero-dashboard{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:24px;border-radius:28px;margin-bottom:16px;background:radial-gradient(circle at top left,rgba(12,115,255,.18),transparent 35%),linear-gradient(135deg,#fff,#f2f8ff);border:1px solid var(--line);box-shadow:0 10px 30px rgba(6,27,58,.06)}.client-hero-dashboard h1{margin:4px 0 8px;font-size:clamp(28px,4vw,46px);line-height:1.05}.live-pill{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;border:1px solid rgba(8,120,59,.2);color:#166534;background:#dcfce7;padding:10px 14px;border-radius:999px;font-weight:900;font-size:13px}.client-dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;margin-top:16px}.featured-update-card,.featured-shipment{border-color:rgba(12,115,255,.25);background:radial-gradient(circle at top right,rgba(12,115,255,.08),transparent 35%),#fff}.clickable-card{cursor:pointer;transition:.18s}.clickable-card:hover{transform:translateY(-2px);border-color:rgba(12,115,255,.28)}.comment-form{display:grid;gap:10px;margin-top:14px}.comment-form textarea{min-height:110px;resize:vertical}.comment-card.mine{border-color:rgba(12,115,255,.25);background:#f8fbff}.mobile-bottom{display:none}@media(max-width:900px){.portal-grid,.grid.cols-2,.grid.cols-3,.grid.cols-4,.client-dashboard-grid,.two-col-form{grid-template-columns:1fr}.app-shell{grid-template-columns:1fr}.sidebar{display:none}.main{padding:16px 16px 86px}.topbar{align-items:flex-start}.topbar h1{font-size:24px}.mobile-bottom{position:fixed;left:10px;right:10px;bottom:10px;display:grid;grid-template-columns:repeat(5,1fr);gap:5px;background:#061b3a;padding:8px;border-radius:24px;z-index:40}.mobile-bottom button{border:0;background:transparent;color:#cfe0f5;font-size:16px;font-weight:900;padding:8px 4px;border-radius:16px}.mobile-bottom button small{display:block;font-size:9px;margin-top:2px}.mobile-bottom button.active{background:rgba(255,255,255,.16);color:#fff}.landing-card{padding:26px}.landing-logo{width:100px}}

/* === V11 Partner/Admin upgrades === */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(4, 16, 35, 0.58);
  backdrop-filter: blur(6px);
}
.drawer.open { display: flex; justify-content: flex-end; }
.drawer-panel {
  width: min(760px, 96vw);
  height: 100vh;
  overflow-y: auto;
  background: #f7fbff;
  color: #06142b;
  padding: 24px;
  box-shadow: -20px 0 60px rgba(0,0,0,0.22);
}
.drawer-panel .card { background: #fff; color: #06142b; }
.drawer-panel .muted { color: #50627c; }
.drawer-panel input,
.drawer-panel textarea,
.drawer-panel select {
  width: 100%;
  border: 1px solid #c9d9ee;
  background: #fff;
  color: #06142b;
  border-radius: 12px;
  padding: 11px 12px;
}
.drawer-form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 7px; }
.two-col-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.staff-check-list { display: grid; gap: 8px; max-height: 250px; overflow: auto; padding: 10px; border: 1px solid #d8e4f4; border-radius: 16px; background: #f2f7ff; }
.checkbox-row { display: flex; gap: 9px; align-items: center; }
.checkbox-row input { width: auto !important; }
.drawer-close-row { position: sticky; bottom: 0; background: linear-gradient(transparent, #f7fbff 22%); padding-top: 20px; }

.partner-command-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(11,120,255,0.12), rgba(6,182,212,0.05));
  border: 1px solid rgba(32, 130, 255, 0.18);
  margin-bottom: 16px;
}
.partner-command-strip h2 { margin: 3px 0 0; font-size: clamp(22px, 3.4vw, 38px); }
.notification-pill {
  border: 1px solid rgba(24, 201, 114, 0.25);
  background: rgba(24, 201, 114, 0.1);
  color: #06371f;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.notification-pill span { display: inline-flex; min-width: 24px; height: 24px; align-items: center; justify-content: center; background: #19c66f; color: white; border-radius: 999px; margin-right: 6px; }
.partner-dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; }
.clean-list { display: grid; gap: 10px; }
.update-list-item, .mini-shipment {
  width: 100%;
  text-align: left;
  border: 1px solid #d9e7f8;
  background: #fff;
  color: #06142b;
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(6, 27, 58, 0.05);
}
.update-list-item h3 { margin: 3px 0 6px; }
.update-list-item p { margin: 0; color: #546782; }
.update-list-item .unread-dot { width: 9px; height: 9px; border-radius: 99px; background: transparent; margin-top: 7px; }
.update-list-item.unread { border-left: 5px solid #147cff; }
.update-list-item.unread .unread-dot { background: #147cff; box-shadow: 0 0 14px #147cff; }
.mini-shipment { grid-template-columns: 1fr; margin-bottom: 8px; }
.mini-shipment span { color: #546782; font-size: 13px; }
.shipment-timeline {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0 18px;
  margin-bottom: 10px;
}
.timeline-node {
  min-width: 190px;
  text-align: left;
  border: 1px solid #d8e5f7;
  background: #fff;
  color: #06142b;
  border-radius: 18px;
  padding: 12px 14px;
  cursor: pointer;
}
.timeline-node span { display: block; color: #147cff; font-weight: 900; font-size: 13px; }
.timeline-node b { display: block; margin: 6px 0; }
.timeline-node small { color: #536986; }
.timeline-node.delayed { border-color: #ffb4b4; background: #fff7f7; }
.timeline-node.delivered { border-color: #b9f4ca; background: #f4fff7; }
.project-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compact-timeline .update-card { margin-bottom: 10px; }
.muted-card { opacity: 0.68; }

@media (max-width: 900px) {
  .partner-command-strip { flex-direction: column; align-items: flex-start; }
  .partner-dashboard-grid { grid-template-columns: 1fr; }
  .partner-side-column { order: -1; }
  .two-col-form, .project-section-grid { grid-template-columns: 1fr; }
  .drawer-panel { width: 100vw; }
}

/* === V12 Partner Solid Dashboard === */
.topbar #topLogoutBtn { display:none !important; }
.v12-command {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--blue), transparent 84%), transparent 42%),
    linear-gradient(135deg, #edf7ff, #f9fcff 70%);
  padding: 22px 24px;
  min-height: 130px;
}
.v12-command .command-copy h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.02; margin: 6px 0 8px; }
.notification-wrap { position: relative; margin-left: auto; align-self: flex-start; }
.bell-btn {
  border: 1px solid rgba(20, 124, 255, .18);
  background: #fff;
  color: #06142b;
  min-width: 58px;
  height: 50px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 12px 34px rgba(6,27,58,.08);
}
.bell-icon { font-size: 21px; line-height: 1; }
.bell-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #18c974;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}
.notification-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 58px;
  width: min(380px, 88vw);
  max-height: 460px;
  overflow: auto;
  background: #fff;
  border: 1px solid #d9e7f8;
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 24px 70px rgba(6,27,58,.2);
  z-index: 30;
}
.notification-panel.open { display: grid; gap: 8px; }
.notification-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding: 4px 4px 8px; }
.btn.tiny { padding: 7px 9px; border-radius: 12px; font-size: 12px; }
.notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  text-align: left;
  border: 1px solid #e1ebf8;
  border-radius: 16px;
  background: #f9fcff;
  padding: 11px;
  cursor: pointer;
}
.notification-item > span { width: 8px; height: 100%; min-height: 36px; border-radius: 99px; background: var(--project-color, #147cff); }
.notification-item b { display:block; color:#06142b; margin-bottom: 3px; }
.notification-item small { color:#60748f; }
.small-empty { padding: 18px; }

.project-card,
.update-card,
.update-list-item.unread,
.featured-shipment,
.shipment-card,
.project-workspace .card {
  border-left-color: var(--project-color, #147cff) !important;
}
.project-card { border-left-color: var(--project-color, #147cff); }
.update-list-item { border-left: 5px solid transparent; }
.update-list-item.unread { border-left-color: var(--project-color, #147cff); }
.update-list-item.unread .unread-dot { background: var(--project-color, #147cff); box-shadow: 0 0 14px var(--project-color, #147cff); }
.project-dot { width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:8px; vertical-align:middle; }

.project-workspace {
  background: linear-gradient(135deg, color-mix(in srgb, var(--project-color, #147cff), white 92%), #fff);
  border: 1px solid color-mix(in srgb, var(--project-color, #147cff), white 72%);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 14px 45px rgba(6,27,58,.08);
}
.workspace-header {
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:16px;
  align-items:start;
  border-bottom:1px solid rgba(6,27,58,.08);
  padding-bottom:16px;
  margin-bottom:14px;
}
.workspace-header h2 { margin: 4px 0 6px; font-size: clamp(26px, 3vw, 42px); }
.project-tabbar {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin: 14px 0 18px;
}
.project-tabbar button {
  border:1px solid #d9e7f8;
  background:#fff;
  padding:10px 13px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
  color:#35506f;
}
.project-tabbar button.active {
  background: var(--project-color, #147cff);
  border-color: var(--project-color, #147cff);
  color:#fff;
}
.project-tab-content { min-height: 320px; }
.project-history { position:relative; }
.timeline-line { display:grid; grid-template-columns: 18px 1fr; gap:10px; align-items:start; }
.timeline-line > span { width:12px; height:12px; background:var(--project-color,#147cff); border-radius:50%; margin-top:18px; box-shadow:0 0 0 6px color-mix(in srgb, var(--project-color,#147cff), transparent 84%); }

@media(max-width:900px){
  .workspace-header { grid-template-columns:1fr; }
  .notification-wrap { width:100%; }
  .notification-panel { left:0; right:auto; width:100%; }
  .bell-btn { justify-content:flex-start; padding:0 14px; width:100%; }
}


/* === V13 Staff Mobile Upload App === */
.staff-hero{
  border:1px solid #d9e7f8;
  border-radius:28px;
  padding:22px;
  margin-bottom:16px;
  background:radial-gradient(circle at top left, rgba(18,191,208,.18), transparent 38%), linear-gradient(135deg,#fff,#f3fbff);
  box-shadow:0 14px 40px rgba(6,27,58,.07);
}
.staff-hero h2{font-size:clamp(28px,4vw,48px);line-height:1.02;margin:5px 0 8px;}
.staff-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:14px 0 18px;}
.staff-quick-card{border:1px solid #d9e7f8;background:#fff;color:#06142b;border-radius:22px;padding:18px;text-align:left;cursor:pointer;box-shadow:0 12px 32px rgba(6,27,58,.06);}
.staff-quick-card b{display:block;font-size:18px;margin-bottom:8px;}
.staff-quick-card span{color:#64748b;line-height:1.45;}
.mobile-form{max-width:900px;}
.big-mobile-btn{width:100%;padding:15px 18px;font-size:16px;}
.smart-extra{border:1px solid #d9e7f8;border-radius:18px;padding:12px;background:#fbfdff;}
.smart-extra summary{font-weight:900;cursor:pointer;color:#0b3264;}
.smart-extra[open] summary{margin-bottom:12px;}
.upload-zone{border:1px dashed #9fc4f6;border-radius:20px;padding:14px;background:#f8fbff;}
.upload-zone small{color:#64748b;}
.attached-files{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #e3edf9;}
.attached-files>b{width:100%;font-size:13px;color:#50627c;}
.file-chip{border:1px solid #d9e7f8;background:#fff;border-radius:999px;padding:8px 11px;cursor:pointer;font-weight:800;color:#0b3264;}
.file-chip:hover{border-color:#147cff;background:#f0f7ff;}
.file-card h3{margin-top:0;}
.staff-workspace .project-tab-content{min-height:260px;}
.admin-files{background:#f8fbff;border-radius:16px;padding:12px;margin-top:12px;}
@media(max-width:900px){
  .staff-quick-grid{grid-template-columns:1fr;}
  .staff-metrics.grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr));}
  .staff-entry-form{padding:16px;border-radius:22px;}
  .staff-entry-form h2{font-size:24px;}
  .upload-zone input[type="file"]{font-size:14px;}
}
@media(max-width:520px){
  .staff-metrics.grid.cols-4{grid-template-columns:1fr;}
}

/* =====================================================
   V14 App Command Upgrade
   Staff field app + compact partner + admin search
===================================================== */
.app-topbar { padding: 4px 0 8px; }
.global-search-card input,
.entry-filter-bar input,
.entry-filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fbfdff;
  color: var(--ink);
}
.entry-filter-bar { display: grid; grid-template-columns: 1fr 220px; gap: 12px; margin-bottom: 14px; }
.search-results { display: grid; gap: 8px; margin-top: 10px; }
.search-hit { text-align: left; border: 1px solid var(--line); background: #f8fbff; border-radius: 14px; padding: 10px 12px; cursor: pointer; font-weight: 800; color: var(--navy); }

.staff-app-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border-radius: 28px;
  margin-bottom: 16px;
  border: 1px solid rgba(18,191,208,.18);
  background: radial-gradient(circle at top left, rgba(18,191,208,.18), transparent 40%), #fff;
  box-shadow: 0 14px 38px rgba(6,27,58,.08);
}
.staff-app-hero h2 { font-size: clamp(30px,4vw,48px); line-height: 1.02; margin: 6px 0 10px; }
.staff-bell { border: 1px solid #b9f4ca; background: #e7fff0; color: #075c2d; border-radius: 18px; padding: 12px 14px; font-weight: 900; cursor: pointer; }
.staff-action-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 14px 0 18px; }
.staff-action-btn { text-align: left; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 16px; border-radius: 22px; box-shadow: 0 10px 28px rgba(6,27,58,.06); cursor: pointer; }
.staff-action-btn b { display: block; font-size: 17px; margin-bottom: 5px; }
.staff-action-btn small { color: var(--muted); }
.staff-mini-balloons { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.staff-mini-balloons div { background:#fff; border:1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 8px 24px rgba(6,27,58,.05); }
.staff-mini-balloons b { display:block; font-size: 28px; line-height: 1; }
.staff-mini-balloons span { color: var(--muted); font-size: 12px; font-weight: 800; }
.mobile-form { max-width: 860px; }
.smart-extra { border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; background: #f8fbff; }
.smart-extra summary { cursor: pointer; font-weight: 900; color: var(--navy); }
.upload-zone { border: 1px dashed #b8cbe4; background: #f8fbff; border-radius: 18px; padding: 14px; }
.big-mobile-btn { padding: 15px 18px; font-size: 16px; }
.sea-pallet-box { display: none; border: 1px solid #d8e4f4; background: #f8fbff; border-radius: 18px; padding: 14px; }
.pallet-fields { display: grid; gap: 10px; margin-top: 10px; }
.attached-files { display: grid; gap: 8px; margin-top: 12px; }
.file-chip { border: 1px solid var(--line); background: #f8fbff; border-radius: 999px; padding: 8px 10px; text-align: left; cursor: pointer; }
.profile-panel { max-width: 760px; }
.mobile-credit { margin-top: 22px; color: var(--muted); font-size: 13px; text-align: center; }
.mobile-credit strong { display: block; color: var(--navy); }

.partner-compact-top {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 14px;
  padding: 16px 18px;
  border:1px solid rgba(20,124,255,.16);
  border-radius:24px;
  background:linear-gradient(135deg,#edf7ff,#fff);
  margin-bottom: 12px;
}
.partner-compact-top h2 { margin: 4px 0; font-size: clamp(26px,3vw,38px); }
.partner-balloons { display:grid; grid-template-columns: repeat(4,1fr); gap:10px; margin: 12px 0 14px; }
.partner-balloons button { border:1px solid var(--line); background:#fff; border-radius:20px; padding:13px; cursor:pointer; text-align:left; box-shadow:0 8px 24px rgba(6,27,58,.05); }
.partner-balloons b { display:block; font-size:24px; }
.partner-balloons span { color: var(--muted); font-size:12px; font-weight:800; }
.compact-partner-grid { margin-top: 10px; }
.small-shipment-list .mini-shipment { padding: 11px 13px; }
.mini-gallery { display:grid; gap:8px; }
.mini-gallery button { border:1px solid var(--line); background:#fff; border-radius:14px; padding:10px; text-align:left; cursor:pointer; }
.gallery-grid { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:14px; }
.gallery-card { border:1px solid var(--line); background:#fff; border-left:6px solid var(--project-color,#147cff); border-radius:20px; padding:14px; text-align:left; cursor:pointer; box-shadow:0 8px 24px rgba(6,27,58,.05); }
.gallery-thumb { height:120px; display:grid; place-items:center; background:#eef5ff; border-radius:16px; font-size:32px; margin-bottom:10px; }
.gallery-card b,.gallery-card span { display:block; }
.gallery-card span { color:var(--muted); font-size:12px; margin-top:4px; }
.invoice-project-card { margin-bottom: 14px; border-left: 6px solid var(--project-color,#147cff); }

@media(max-width:900px){
  .main { padding: 14px 14px 96px; }
  .topbar h1 { font-size: 22px; }
  .topbar .muted { font-size: 13px; }
  .staff-app-hero { padding: 18px; }
  .staff-app-hero h2 { font-size: 34px; }
  .staff-action-strip { grid-template-columns: repeat(2,1fr); }
  .staff-action-btn { padding: 14px; min-height: 86px; }
  .staff-mini-balloons { grid-template-columns: repeat(4, minmax(70px,1fr)); overflow-x:auto; }
  .entry-filter-bar { grid-template-columns: 1fr; }
  .partner-compact-top { padding: 14px; }
  .partner-balloons { grid-template-columns: repeat(4, minmax(120px,1fr)); overflow-x:auto; }
  .partner-balloons button { min-width: 120px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .mobile-bottom {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(76px,1fr);
    overflow-x: auto;
    padding: 10px;
    border-radius: 28px;
  }
  .mobile-bottom button { min-height: 58px; }
  .mobile-bottom button small { font-size: 10px; }
}

@media(max-width:520px){
  .staff-action-strip { grid-template-columns: 1fr; }
  .staff-action-btn { min-height: auto; }
}


/* =====================================================
   V14c User Permission Matrix
===================================================== */
.permission-grid {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbff;
}
.permission-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(6, minmax(105px, .8fr));
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  background: #fff;
}
.permission-project b,
.permission-project small {
  display: block;
}
.permission-project small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.permission-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #35506f;
}
.permission-row input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
}
@media(max-width:900px){
  .permission-row {
    grid-template-columns: 1fr 1fr;
  }
  .permission-project {
    grid-column: 1 / -1;
  }
}


/* =====================================================
   V15 Partner Live Status Report
   Adds printable live report without replacing dashboard
===================================================== */
.live-report-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:16px;
  padding:16px 18px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:0 10px 28px rgba(6,27,58,.05);
}
.live-report-toolbar h2 { margin:4px 0; font-size:clamp(24px,3vw,38px); }
.live-status-report {
  background:#fff;
  border:1px solid #a9c5e8;
  border-radius:10px;
  padding:8px;
  color:#06142b;
  box-shadow:0 18px 50px rgba(6,27,58,.10);
}
.report-title-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#073763;
  color:#fff;
  border-radius:8px;
  padding:12px 18px;
  margin-bottom:10px;
}
.report-title-bar h1 { margin:0; font-size:clamp(22px,3.6vw,38px); letter-spacing:.02em; }
.report-date-pill {
  background:#fff;
  color:#073763;
  padding:10px 14px;
  border-radius:8px;
  font-weight:900;
  white-space:nowrap;
  font-size:18px;
}
.report-top-grid {
  display:grid;
  grid-template-columns:minmax(0, 2.15fr) minmax(280px, .95fr);
  gap:8px;
}
.report-panel,
.report-progress-panel {
  border:1px solid #8fb4df;
  border-radius:8px;
  overflow:hidden;
  background:#fafdff;
}
.report-panel-title {
  display:flex;
  align-items:center;
  gap:12px;
  background:#073763;
  color:#fff;
  padding:8px 14px;
}
.report-panel-title span {
  width:36px;
  height:36px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#fff;
  color:#073763;
  font-size:24px;
  font-weight:900;
}
.report-panel-title h2 { margin:0; font-size:24px; }
.report-subtitle {
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin:10px 10px 8px;
  padding:7px 14px;
  color:#fff;
  border-radius:6px;
  font-weight:900;
}
.report-subtitle.blue { background:#0b4a8d; }
.report-subtitle.green { background:#08783b; }
.report-card-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  padding:0 10px 10px;
}
.report-shipment-card,
.report-dispatch-card,
.report-courier-card {
  background:#fff;
  border:1px solid #9fbee4;
  border-radius:10px;
  padding:12px;
  cursor:pointer;
}
.report-dispatch-list { padding:0 10px 12px; }
.report-dispatch-card { border-color:#96c6a7; background:#fbfffc; }
.report-card-head { display:flex; gap:12px; align-items:flex-start; margin-bottom:10px; }
.report-card-head h3 { margin:0 0 3px; color:#0646a0; font-size:16px; }
.report-card-head b { color:#0050c8; }
.report-icon {
  width:48px;
  height:48px;
  border-radius:50%;
  background:#0b4a8d;
  color:#fff;
  display:grid;
  place-items:center;
  font-size:24px;
  flex:0 0 auto;
}
.green-icon { background:#08783b; }
.report-item-list { display:grid; gap:7px; }
.report-item-list div {
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:14px;
  line-height:1.35;
}
.report-item-list b { font-weight:800; text-align:right; }
.report-breakdown {
  border:1px solid #c4d7ee;
  border-radius:8px;
  margin-top:12px;
  padding:10px;
  background:#f8fbff;
}
.report-breakdown h4 { margin:0 0 8px; color:#073763; font-size:14px; }
.report-donut-wrap { display:grid; grid-template-columns:86px 1fr; gap:10px; align-items:center; }
.report-donut {
  width:76px;
  height:76px;
  border-radius:50%;
  background:conic-gradient(#4285d4 0 32%, #ff8a18 32% 62%, #9ca3af 62% 76%, #4da63a 76% 100%);
  position:relative;
}
.report-donut:after {
  content:"";
  position:absolute;
  inset:22px;
  background:#fff;
  border-radius:50%;
}
.report-breakdown p { margin:5px 0; font-size:12px; }
.legend-dot { display:inline-block; width:11px; height:11px; border-radius:3px; margin-right:7px; vertical-align:-1px; }
.legend-dot.d1 { background:#4285d4; }
.legend-dot.d2 { background:#ff8a18; }
.legend-dot.d3 { background:#9ca3af; }
.legend-dot.d4, .legend-dot.d5 { background:#4da63a; }
.report-courier-panel { background:#f8fcff; }
.report-courier-card { margin:0 10px 12px; }
.report-courier-card.delivered { border-color:#8ec89a; background:#f8fff8; }
.report-courier-card.moving { border-color:#9fbee4; background:#f7fbff; }
.courier-row { display:flex; gap:12px; align-items:flex-start; }
.courier-icon {
  width:50px;
  height:50px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#08783b;
  color:#fff;
  font-size:23px;
  flex:0 0 auto;
}
.report-courier-card.moving .courier-icon { background:#0b4a8d; }
.courier-row h3 { margin:0; color:#08783b; }
.report-courier-card.moving h3 { color:#0b4a8d; }
.courier-row p { margin:0; line-height:1.45; }
.tracking { text-align:center; font-size:13px; }
.courier-item { margin:10px 0 0; line-height:1.45; }
.report-progress-panel { margin-top:8px; }
.report-progress-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:10px;
  padding:10px;
}
.progress-column {
  background:#fff;
  border:1px solid #c4d7ee;
  border-radius:8px;
  padding:12px;
  min-height:260px;
}
.progress-column.green { border-color:#b7d4bd; background:#fbfffb; }
.progress-column.purple { border-color:#c7bfea; background:#fbfaff; }
.progress-title {
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:10px;
  margin-bottom:12px;
  border-bottom:1px solid #b9cbe2;
}
.progress-title span { font-size:38px; }
.progress-title h3 { margin:0; color:#0b4a8d; font-size:17px; }
.progress-column.green .progress-title h3 { color:#08783b; }
.progress-column.purple .progress-title h3 { color:#4c2daa; }
.progress-project { margin-bottom:12px; }
.progress-project-head {
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:8px;
}
.progress-project-head span {
  width:48px;
  height:48px;
  border-radius:50%;
  background:color-mix(in srgb, var(--project-color,#147cff), white 80%);
  border:1px solid color-mix(in srgb, var(--project-color,#147cff), white 60%);
  flex:0 0 auto;
}
.progress-project-head h4 { margin:0; color:#0b4a8d; }
.progress-update {
  width:100%;
  text-align:left;
  border:0;
  border-top:1px solid #cbdcf0;
  background:transparent;
  padding:9px 0;
  cursor:pointer;
}
.progress-update b { color:#0646a0; }
.progress-update p { margin:5px 0 0; color:#111827; line-height:1.35; }
.report-note {
  display:flex;
  gap:12px;
  align-items:center;
  border:1px solid #bdd3ee;
  border-radius:8px;
  padding:8px 12px;
  margin-top:8px;
  font-size:13px;
}
.report-note b { color:#0050c8; }
.report-empty {
  border:1px dashed #bdd3ee;
  border-radius:8px;
  padding:18px;
  color:#64748b;
  background:#fff;
}
@media(max-width:1100px){
  .report-top-grid { grid-template-columns:1fr; }
  .report-card-grid { grid-template-columns:1fr; }
  .report-progress-grid { grid-template-columns:1fr; }
}
@media(max-width:700px){
  .live-report-toolbar, .report-title-bar { flex-direction:column; align-items:flex-start; }
  .report-title-bar h1 { font-size:22px; }
  .report-date-pill { font-size:15px; }
  .report-panel-title h2 { font-size:19px; }
  .report-card-head { align-items:flex-start; }
  .report-item-list div { flex-direction:column; gap:2px; }
  .report-item-list b { text-align:left; }
}
@media print {
  body { background:#fff !important; }
  body * { visibility:hidden !important; }
  #partnerLiveReport, #partnerLiveReport * { visibility:visible !important; }
  #partnerLiveReport {
    position:absolute;
    left:0;
    top:0;
    width:100%;
    box-shadow:none !important;
    border:0 !important;
    padding:0 !important;
  }
  .no-print, .sidebar, .topbar, .mobile-bottom, .drawer { display:none !important; }
  .report-top-grid { grid-template-columns:2.15fr .95fr !important; }
  .report-card-grid { grid-template-columns:repeat(2, minmax(0,1fr)) !important; }
  .report-progress-grid { grid-template-columns:repeat(3, minmax(0,1fr)) !important; }
  .report-title-bar, .report-panel-title, .report-subtitle, .progress-update { break-inside:avoid; }
  .report-shipment-card, .report-courier-card, .progress-column { break-inside:avoid; }
}
