: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%; }
}

/* =====================================================
   V23 Partner Command / Shipment Pallet Experience
===================================================== */
body[data-portal="client"] .drawer.open {
  display: grid !important;
  place-items: center !important;
  padding: 22px !important;
  align-items: center !important;
  justify-content: center !important;
}
body[data-portal="client"] .drawer-panel {
  width: min(1180px, 94vw) !important;
  height: auto !important;
  max-height: 91vh !important;
  border-radius: 34px !important;
  padding: 28px !important;
  background:
    radial-gradient(circle at top left, rgba(12,115,255,.09), transparent 38%),
    #f8fbff !important;
  box-shadow: 0 34px 100px rgba(6,27,58,.34) !important;
  border: 1px solid rgba(217,231,248,.95) !important;
}
body[data-portal="client"] .drawer-content { max-width: 100%; }
body[data-portal="client"] .drawer-x {
  position: sticky;
  top: 0;
  float: right;
  border: 0;
  background: #eef5ff;
  border-radius: 999px;
  width: 46px;
  height: 46px;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  z-index: 4;
}
.partner-v23-hero,
.partner-shipping-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(12,115,255,.16);
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(18,191,208,.16), transparent 36%),
    linear-gradient(135deg, #fff, #eef7ff);
  box-shadow: 0 20px 60px rgba(6,27,58,.08);
  margin-bottom: 16px;
}
.partner-v23-hero h2,
.partner-shipping-hero h2 {
  margin: 7px 0 10px;
  font-size: clamp(34px, 4.8vw, 62px);
  line-height: .98;
  letter-spacing: -.04em;
}
.partner-v23-actions {
  min-width: 230px;
  display: grid;
  gap: 12px;
  justify-items: end;
}
.partner-v23-actions > button:not(.bell-btn) {
  border: 1px solid #d9e7f8;
  background: #fff;
  color: var(--navy);
  border-radius: 22px;
  padding: 16px 18px;
  box-shadow: 0 12px 34px rgba(6,27,58,.08);
  cursor: pointer;
  text-align: left;
}
.partner-v23-actions b { display:block; font-size: 32px; line-height: 1; }
.partner-v23-actions span { display:block; color: var(--muted); font-size: 12px; font-weight: 900; margin-top: 4px; }
.partner-v23-balloons,
.partner-shipment-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}
.partner-shipment-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.partner-v23-balloons button,
.partner-shipment-stats button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 22px;
  padding: 15px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 28px rgba(6,27,58,.05);
}
.partner-v23-balloons b,
.partner-shipment-stats b { display:block; font-size: 30px; line-height: 1; color: var(--navy); }
.partner-v23-balloons span,
.partner-shipment-stats span { color: var(--muted); font-size: 12px; font-weight: 900; }
.partner-v23-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.v23-search { margin-bottom: 12px; }
.partner-sea-journey {
  overflow: hidden;
  border: 1px solid rgba(20,124,255,.18);
  background:
    radial-gradient(circle at top right, rgba(12,115,255,.12), transparent 32%),
    linear-gradient(135deg, #ffffff, #f2f9ff);
  margin-bottom: 16px;
}
.sea-journey-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.sea-journey-head h2,
.sea-journey-head h3 { margin: 4px 0 6px; font-size: clamp(24px, 3vw, 38px); }
.sea-map-line {
  display: grid;
  grid-template-columns: 170px minmax(180px, 1fr) 170px;
  gap: 16px;
  align-items: center;
  margin: 12px 0 18px;
}
.sea-port {
  background: #fff;
  border: 1px solid #d9e7f8;
  border-radius: 20px;
  padding: 13px;
  box-shadow: 0 10px 24px rgba(6,27,58,.05);
}
.sea-port b,
.sea-port span { display:block; }
.sea-port span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.sea-port.right { text-align: right; }
.sea-route {
  height: 72px;
  position: relative;
  display: grid;
  align-items: center;
}
.sea-route:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 4px dotted #9fc4f6;
  transform: translateY(-50%);
}
.sea-route:after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(50% - 2px);
  width: var(--ship-progress, 0%);
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}
.sea-ship {
  position: absolute;
  left: clamp(2%, var(--ship-progress, 0%), 94%);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(6,27,58,.15);
  border: 1px solid #d9e7f8;
  z-index: 2;
  font-style: normal;
}
.partner-journey-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.partner-journey-meta span {
  background: #fff;
  border: 1px solid #d9e7f8;
  border-radius: 18px;
  padding: 12px;
  color: var(--navy);
  font-weight: 800;
}
.partner-journey-meta b {
  display:block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  margin-bottom: 5px;
}
.partner-no-sea,
.partner-simple-delivery-board {
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, #f8fbff);
}
.partner-delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.partner-delivery-pulse {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
  cursor: pointer;
  border-left: 6px solid var(--project-color, #0c73ff);
}
.delivery-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #eef5ff;
  font-size: 26px;
}
.delivery-icon + div h3 { margin: 2px 0 4px; }
.v23-shipment-card,
.partner-shipment-card {
  border-left: 6px solid var(--project-color, #0c73ff);
}
.v23-shipment-card .mini-route.non-sea i:after { width: 100%; }
.compact-meta { margin-top: 10px; }
.compact-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f7ff;
  font-size: 12px;
  font-weight: 900;
  color: #48617d;
}
.shipment-card-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}
.shipment-card-preview span {
  padding: 7px 10px;
  border: 1px solid #d9e7f8;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.partner-shipment-date-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  color: var(--muted);
}
.partner-shipment-date-row span { color: var(--blue); font-weight: 900; }
.partner-ship-accordion {
  margin: 18px 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(6,27,58,.05);
}
.partner-ship-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  font-weight: 900;
  color: var(--navy);
  background: linear-gradient(135deg, #fff, #f3f8ff);
}
.partner-ship-accordion summary::-webkit-details-marker { display: none; }
.partner-ship-accordion summary:after {
  content: "Open";
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #0b4a8d;
  font-size: 12px;
}
.partner-ship-accordion[open] summary:after { content: "Close"; }
.partner-ship-accordion summary b {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}
.partner-past-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}
.partner-past-columns section { display: grid; gap: 12px; align-content: start; }
.partner-past-columns h3 { margin: 0 0 2px; }
.partner-accordion-body { padding: 16px; }
.v23-shipment-detail .partner-sea-journey { margin: 12px 0 16px; }
.shipment-detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.shipment-detail-hero h2 { margin: 4px 0 6px; font-size: clamp(28px, 4vw, 48px); }
.v23-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}
.v23-detail-grid p {
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #d9e7f8;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
}
.v23-detail-grid b {
  display:block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  margin-bottom: 6px;
}
.shipment-note-card { margin-bottom: 14px; }
.partner-pallet-stack {
  display: grid;
  gap: 14px;
}
.partner-pallet-stack.compact { gap: 10px; }
.partner-pallet-summary {
  display: inline-grid;
  grid-template-columns: auto auto auto auto;
  gap: 8px;
  align-items: center;
  justify-content: start;
  background: #eef5ff;
  border: 1px solid #d9e7f8;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--navy);
  width: max-content;
  max-width: 100%;
}
.partner-pallet-summary b { font-size: 18px; }
.partner-pallet-summary span { color: var(--muted); font-size: 12px; font-weight: 900; }
.partner-pallet-card {
  background: #fff;
  border: 1px solid #d9e7f8;
  border-left: 7px solid var(--blue);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(6,27,58,.05);
}
.partner-pallet-card.loose { border-left-color: #94a3b8; }
.partner-pallet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e7effa;
}
.partner-pallet-head h3 { margin: 0; color: var(--navy); }
.partner-pallet-head span { color: var(--muted); font-weight: 900; font-size: 12px; }
.partner-pallet-items {
  display: grid;
  gap: 8px;
}
.partner-shipment-item-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 11px 13px;
  border: 1px solid #e1ebf8;
  background: #f9fcff;
  border-radius: 16px;
}
.partner-shipment-item-line b { color: var(--navy); overflow-wrap: anywhere; }
.partner-shipment-item-line span { color: #0b4a8d; font-weight: 900; text-align: right; }
.partner-shipment-item-line small { grid-column: 1 / -1; color: var(--muted); line-height: 1.45; }
@media(max-width: 1100px) {
  .partner-v23-grid { grid-template-columns: 1fr; }
  .partner-v23-actions { justify-items: stretch; }
  .partner-v23-actions > button:not(.bell-btn) { width: 100%; }
  .partner-v23-balloons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media(max-width: 900px) {
  body[data-portal="client"] .drawer-panel {
    width: 100vw !important;
    max-height: 94vh !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 20px !important;
  }
  .partner-v23-hero,
  .partner-shipping-hero,
  .sea-journey-head,
  .shipment-detail-hero { display: grid; }
  .partner-v23-balloons,
  .partner-shipment-stats {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }
  .partner-shipment-stats { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .sea-map-line { grid-template-columns: 1fr; }
  .sea-port.right { text-align: left; }
  .sea-route { height: 56px; }
  .partner-journey-meta,
  .v23-detail-grid,
  .partner-delivery-grid,
  .partner-past-columns { grid-template-columns: 1fr; }
  .partner-shipment-item-line { grid-template-columns: 1fr; }
  .partner-shipment-item-line span { text-align: left; }
}
@media(max-width: 560px) {
  .partner-v23-hero h2,
  .partner-shipping-hero h2 { font-size: 36px; }
  .partner-delivery-pulse { grid-template-columns: 1fr; }
  .delivery-icon { width: 46px; height: 46px; }
}


/* =====================================================
   V23FIX3 - Restore Admin/Partner Command Styling
   Fixes ugly default buttons/cards after CSS restore
===================================================== */

/* ---------- Shared command fixes ---------- */

button {
  appearance: none;
  -webkit-appearance: none;
}

.main {
  background:
    radial-gradient(circle at top left, rgba(12,115,255,.035), transparent 34%),
    var(--bg);
}

input,
select,
textarea {
  max-width: 100%;
}

/* ---------- Sidebar last updated quiet line ---------- */

.sidebar .brand {
  display: grid !important;
  grid-template-columns: 52px 1fr !important;
  column-gap: 12px !important;
  row-gap: 0 !important;
  align-items: center !important;
}

.sidebar .brand img {
  grid-row: 1 / span 2 !important;
}

.sidebar .brand > div {
  min-width: 0 !important;
}

.sidebar .brand .client-last-refresh {
  grid-column: 2 !important;
  grid-row: 2 !important;
  display: block !important;
  width: max-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(255,255,255,.52) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: left !important;
  cursor: pointer !important;
}

.sidebar .brand .client-last-refresh span {
  display: inline !important;
}

.sidebar .brand .client-last-refresh span::after {
  content: " ";
}

.sidebar .brand .client-last-refresh b {
  display: inline !important;
  font-size: inherit !important;
  color: inherit !important;
  font-weight: inherit !important;
}

.sidebar .brand .client-last-refresh:hover {
  color: rgba(255,255,255,.82) !important;
  text-decoration: underline !important;
}

/* ---------- Partner inline refresh button ---------- */

.refresh-inline {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin-top: 8px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.refresh-inline:hover {
  color: var(--blue) !important;
  text-decoration: underline;
}

/* ---------- Admin V21 Command Dashboard Restore ---------- */

.admin-v21-hero,
.admin-command-hero,
.admin-online-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 26px;
  margin-bottom: 18px;
  border-radius: 32px;
  border: 1px solid rgba(20,124,255,.16);
  background:
    radial-gradient(circle at top left, rgba(18,191,208,.14), transparent 38%),
    linear-gradient(135deg, #ffffff, #eef7ff);
  box-shadow: 0 20px 60px rgba(6,27,58,.08);
}

.admin-v21-hero h2,
.admin-command-hero h2,
.admin-online-hero h2 {
  margin: 6px 0 10px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.admin-v21-hero-actions,
.admin-command-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 18px;
}

.admin-kpi-card {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(12,115,255,.08), transparent 34%),
    #fff;
  border-radius: 24px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(6,27,58,.06);
  color: var(--navy);
  min-height: 126px;
  transition: .18s ease;
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(12,115,255,.32);
  box-shadow: 0 18px 46px rgba(6,27,58,.10);
}

.admin-kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.admin-kpi-card b {
  display: block;
  margin: 8px 0 5px;
  font-size: 38px;
  line-height: 1;
  color: var(--navy);
}

.admin-kpi-card small {
  color: var(--muted);
  font-weight: 800;
}

.admin-kpi-card.danger {
  border-left: 6px solid var(--red);
}

.admin-kpi-card.warning {
  border-left: 6px solid var(--amber);
}

.admin-kpi-card.money {
  border-left: 6px solid var(--green);
}

.admin-kpi-card.live {
  border-left: 6px solid var(--cyan);
}

.admin-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 22px;
}

.admin-search-panel,
.admin-next-panel {
  min-height: 190px;
}

.admin-search-panel input,
.partner-global-search input,
.v23-search input,
#adminGlobalSearch,
#partnerGlobalSearch {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 15px;
  background: #fbfdff;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.admin-search-panel input:focus,
.partner-global-search input:focus,
.v23-search input:focus,
#adminGlobalSearch:focus,
#partnerGlobalSearch:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(12,115,255,.10);
}

.admin-mini-row {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 18px;
  padding: 14px 15px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 5px;
  margin-top: 10px;
  box-shadow: 0 8px 22px rgba(6,27,58,.05);
}

.admin-mini-row b {
  font-size: 16px;
}

.admin-mini-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-compact-list {
  display: grid;
  gap: 12px;
}

.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Admin accordions/cards restore ---------- */

.admin-accordion {
  margin: 14px 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(6,27,58,.05);
}

.admin-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  color: var(--navy);
  background: linear-gradient(135deg, #fff, #f3f8ff);
}

.admin-accordion summary::-webkit-details-marker {
  display: none;
}

.admin-accordion summary::after {
  content: "Open";
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #0b4a8d;
  font-size: 12px;
}

.admin-accordion[open] summary::after {
  content: "Close";
}

.admin-accordion summary b {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}

.admin-accordion.pending summary b {
  background: var(--amber);
}

.admin-accordion.approved summary b {
  background: var(--green);
}

.admin-accordion.rejected summary b {
  background: var(--red);
}

.admin-accordion-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.admin-v21-entry-card,
.admin-v21-shipment-card,
.admin-v21-project-card {
  border-left: 6px solid var(--project-color, var(--blue));
}

.admin-v21-project-card .project-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--project-color, var(--blue));
  margin-right: 8px;
}

.admin-project-controls {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  margin-top: 12px;
}

.admin-project-controls select,
.admin-project-controls input {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #fbfdff;
}

.admin-stage-board {
  display: grid;
  gap: 18px;
}

.admin-stage-column {
  display: grid;
  gap: 12px;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.stage-head h3 {
  margin: 0;
  font-size: 22px;
  color: var(--navy);
}

.stage-head b {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue);
}

/* ---------- Partner V23 missing layout polish ---------- */

.partner-global-search,
.v23-search {
  margin-bottom: 14px;
}

.partner-global-search h3,
.v23-search h3 {
  margin: 4px 0 12px;
}

.partner-search-results,
.search-results {
  margin-top: 10px;
}

.partner-v23-grid .partner-side-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

/* ---------- Responsive ---------- */

@media(max-width: 1100px) {
  .admin-command-grid {
    grid-template-columns: 1fr;
  }

  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media(max-width: 900px) {
  .admin-v21-hero,
  .admin-command-hero,
  .admin-online-hero {
    display: grid;
    padding: 20px;
  }

  .admin-v21-hero-actions,
  .admin-command-actions {
    justify-content: flex-start;
  }

  .admin-project-controls {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 560px) {
  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .admin-v21-hero h2,
  .admin-command-hero h2,
  .admin-online-hero h2 {
    font-size: 34px;
  }
}

/* =====================================================
   V23Clean1 - Partner Portal Safety Polish
   Fixes oversized photos, raw file buttons, finance cards,
   project files, and live report fallback styling.
===================================================== */

/* Partner sidebar last updated line */
body[data-portal="client"] .sidebar .brand {
  display: grid !important;
  grid-template-columns: 52px 1fr !important;
  column-gap: 12px !important;
  row-gap: 0 !important;
  align-items: center !important;
}

body[data-portal="client"] .sidebar .brand img {
  grid-row: 1 / span 2 !important;
}

body[data-portal="client"] .sidebar .brand > div {
  min-width: 0 !important;
}

body[data-portal="client"] .sidebar .brand .client-last-refresh,
body[data-portal="client"] .sidebar .brand button:not(.mpd-logout-btn) {
  grid-column: 2 !important;
  grid-row: 2 !important;
  display: block !important;
  width: max-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(255,255,255,.52) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
  text-transform: none !important;
  text-align: left !important;
  cursor: pointer !important;
}

/* Partner home latest photos must never explode */
body[data-portal="client"] .mini-photo-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-portal="client"] .mini-photo-card,
body[data-portal="client"] .photo-gallery-card,
body[data-portal="client"] .gallery-card {
  display: block !important;
  border: 1px solid var(--line) !important;
  border-left: 6px solid var(--project-color, #147cff) !important;
  background: #fff !important;
  color: var(--ink) !important;
  border-radius: 18px !important;
  padding: 10px !important;
  cursor: pointer !important;
  text-align: left !important;
  box-shadow: 0 8px 24px rgba(6,27,58,.05) !important;
  overflow: hidden !important;
}

body[data-portal="client"] .photo-thumb,
body[data-portal="client"] .gallery-thumb {
  width: 100% !important;
  height: 118px !important;
  display: grid !important;
  place-items: center !important;
  background: #eaf2ff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  color: #6b85a5 !important;
}

body[data-portal="client"] .photo-thumb.large {
  height: 180px !important;
}

body[data-portal="client"] .photo-thumb img,
body[data-portal="client"] .gallery-thumb img,
body[data-portal="client"] .mini-photo-card img,
body[data-portal="client"] .photo-gallery-card img,
body[data-portal="client"] .gallery-card img {
  width: 100% !important;
  height: 100% !important;
  max-height: 180px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 14px !important;
}

/* If an image is inserted raw inside client main, keep it controlled */
body[data-portal="client"] .main img {
  max-width: 100%;
}

body[data-portal="client"] .partner-side-column img,
body[data-portal="client"] .mini-gallery img,
body[data-portal="client"] .latest-photos img {
  width: 100% !important;
  max-height: 180px !important;
  object-fit: cover !important;
  border-radius: 16px !important;
}

/* Gallery page */
body[data-portal="client"] .photo-gallery-grid,
body[data-portal="client"] .gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body[data-portal="client"] .photo-gallery-card .photo-thumb,
body[data-portal="client"] .gallery-card .gallery-thumb {
  height: 150px !important;
}

/* Partner file list */
body[data-portal="client"] .file-list {
  display: grid !important;
  gap: 12px !important;
}

body[data-portal="client"] .file-list-row {
  display: grid !important;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center !important;
  border: 1px solid var(--line) !important;
  border-left: 6px solid var(--project-color, #147cff) !important;
  background: #fff !important;
  border-radius: 20px !important;
  padding: 14px !important;
  box-shadow: 0 10px 28px rgba(6,27,58,.05) !important;
}

body[data-portal="client"] .file-open-link,
body[data-portal="client"] .file-chip,
body[data-portal="client"] .attached-files button {
  border: 1px solid #d9e7f8 !important;
  background: #f8fbff !important;
  color: var(--navy) !important;
  border-radius: 16px !important;
  padding: 10px 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  text-align: left !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

/* Partner finance cards */
body[data-portal="client"] .invoice-project-card,
body[data-portal="client"] .finance-card,
body[data-portal="client"] .partner-finance-card {
  border: 1px solid var(--line) !important;
  border-left: 6px solid var(--project-color, #08783b) !important;
  background: #fff !important;
  border-radius: 24px !important;
  padding: 18px !important;
  box-shadow: 0 10px 28px rgba(6,27,58,.05) !important;
  margin-bottom: 14px !important;
}

/* Partner live report fallback */
body[data-portal="client"] #partnerLiveReport,
body[data-portal="client"] .live-status-report {
  background: #fff !important;
  border: 1px solid #a9c5e8 !important;
  border-radius: 12px !important;
  padding: 10px !important;
  color: #06142b !important;
  box-shadow: 0 18px 50px rgba(6,27,58,.10) !important;
  overflow: hidden !important;
}

body[data-portal="client"] .report-title-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  background: #073763 !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 12px 18px !important;
  margin-bottom: 10px !important;
}

body[data-portal="client"] .report-title-bar h1 {
  margin: 0 !important;
  font-size: clamp(22px, 3.6vw, 38px) !important;
  letter-spacing: .02em !important;
}

body[data-portal="client"] .report-top-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, .95fr) !important;
  gap: 8px !important;
}

body[data-portal="client"] .report-panel,
body[data-portal="client"] .report-progress-panel {
  border: 1px solid #8fb4df !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #fafdff !important;
}

body[data-portal="client"] .report-panel-title {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: #073763 !important;
  color: #fff !important;
  padding: 8px 14px !important;
}

body[data-portal="client"] .report-card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 10px 10px !important;
}

body[data-portal="client"] .report-shipment-card,
body[data-portal="client"] .report-dispatch-card,
body[data-portal="client"] .report-courier-card {
  background: #fff !important;
  border: 1px solid #9fbee4 !important;
  border-radius: 10px !important;
  padding: 12px !important;
}

/* Responsive safety */
@media(max-width: 1100px) {
  body[data-portal="client"] .photo-gallery-grid,
  body[data-portal="client"] .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media(max-width: 900px) {
  body[data-portal="client"] .mini-photo-grid,
  body[data-portal="client"] .photo-gallery-grid,
  body[data-portal="client"] .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-portal="client"] .file-list-row {
    grid-template-columns: 1fr !important;
  }

  body[data-portal="client"] .report-top-grid,
  body[data-portal="client"] .report-card-grid {
    grid-template-columns: 1fr !important;
  }
}

@media(max-width: 520px) {
  body[data-portal="client"] .mini-photo-grid,
  body[data-portal="client"] .photo-gallery-grid,
  body[data-portal="client"] .gallery-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =====================================================
   V23Clean2 - Partner Live Report + Gallery Fix
   Scoped only to client portal
===================================================== */

/* ---------- Partner Live Report Proper Layout ---------- */

body[data-portal="client"] .live-report-toolbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px !important;
  margin-bottom: 16px !important;
  padding: 18px 20px !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(6,27,58,.05) !important;
}

body[data-portal="client"] .live-report-toolbar h2 {
  margin: 4px 0 !important;
  font-size: clamp(24px, 3vw, 38px) !important;
}

body[data-portal="client"] #partnerLiveReport,
body[data-portal="client"] .live-status-report {
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  background: #fff !important;
  border: 1px solid #a9c5e8 !important;
  border-radius: 12px !important;
  padding: 10px !important;
  color: #06142b !important;
  box-shadow: 0 18px 50px rgba(6,27,58,.10) !important;
  overflow: hidden !important;
  font-size: 14px !important;
}

body[data-portal="client"] .report-title-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  background: #073763 !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 12px 18px !important;
  margin-bottom: 10px !important;
}

body[data-portal="client"] .report-title-bar h1 {
  margin: 0 !important;
  font-size: clamp(24px, 3vw, 36px) !important;
  letter-spacing: .02em !important;
}

body[data-portal="client"] .report-date-pill {
  background: #fff !important;
  color: #073763 !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  font-size: 16px !important;
}

body[data-portal="client"] .report-top-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, .9fr) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

body[data-portal="client"] .report-panel,
body[data-portal="client"] .report-progress-panel {
  border: 1px solid #8fb4df !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #fafdff !important;
}

body[data-portal="client"] .report-panel-title {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: #073763 !important;
  color: #fff !important;
  padding: 10px 14px !important;
}

body[data-portal="client"] .report-panel-title span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  background: #fff !important;
  color: #073763 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  flex: 0 0 auto !important;
}

body[data-portal="client"] .report-panel-title h2 {
  margin: 0 !important;
  font-size: 22px !important;
}

body[data-portal="client"] .report-subtitle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 10px 10px 8px !important;
  padding: 7px 14px !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-weight: 900 !important;
}

body[data-portal="client"] .report-subtitle.blue {
  background: #0b4a8d !important;
}

body[data-portal="client"] .report-subtitle.green {
  background: #08783b !important;
}

body[data-portal="client"] .report-card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 10px 10px !important;
}

body[data-portal="client"] .report-shipment-card,
body[data-portal="client"] .report-dispatch-card,
body[data-portal="client"] .report-courier-card {
  background: #fff !important;
  border: 1px solid #9fbee4 !important;
  border-radius: 10px !important;
  padding: 12px !important;
  cursor: pointer !important;
}

body[data-portal="client"] .report-card-head {
  display: flex !important;
  gap: 12px !important;
  align-items: flex-start !important;
  margin-bottom: 10px !important;
}

body[data-portal="client"] .report-card-head h3 {
  margin: 0 0 3px !important;
  color: #0646a0 !important;
  font-size: 16px !important;
}

body[data-portal="client"] .report-card-head b {
  color: #0050c8 !important;
}

body[data-portal="client"] .report-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: #0b4a8d !important;
  color: #fff !important;
  display: grid !important;
  place-items: center !important;
  font-size: 22px !important;
  flex: 0 0 auto !important;
}

body[data-portal="client"] .report-item-list {
  display: grid !important;
  gap: 7px !important;
}

body[data-portal="client"] .report-item-list div {
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

body[data-portal="client"] .report-item-list b {
  font-weight: 900 !important;
  text-align: right !important;
}

body[data-portal="client"] .report-breakdown {
  border: 1px solid #c4d7ee !important;
  border-radius: 8px !important;
  margin-top: 12px !important;
  padding: 10px !important;
  background: #f8fbff !important;
}

body[data-portal="client"] .report-breakdown h4 {
  margin: 0 0 8px !important;
  color: #073763 !important;
  font-size: 14px !important;
}

body[data-portal="client"] .report-progress-panel {
  margin-top: 10px !important;
}

body[data-portal="client"] .report-progress-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 10px !important;
}

body[data-portal="client"] .progress-column {
  background: #fff !important;
  border: 1px solid #c4d7ee !important;
  border-radius: 10px !important;
  padding: 12px !important;
  min-height: 260px !important;
}

body[data-portal="client"] .progress-title {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding-bottom: 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid #b9cbe2 !important;
}

body[data-portal="client"] .progress-title span {
  font-size: 34px !important;
}

body[data-portal="client"] .progress-title h3 {
  margin: 0 !important;
  color: #0b4a8d !important;
  font-size: 17px !important;
}

body[data-portal="client"] .progress-update {
  width: 100% !important;
  display: block !important;
  text-align: left !important;
  border: 0 !important;
  border-top: 1px solid #cbdcf0 !important;
  background: transparent !important;
  padding: 10px 0 !important;
  cursor: pointer !important;
  color: #06142b !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body[data-portal="client"] .progress-update b {
  color: #0646a0 !important;
}

body[data-portal="client"] .progress-update p {
  margin: 5px 0 0 !important;
  color: #111827 !important;
  line-height: 1.35 !important;
}

/* ---------- Partner Gallery / Latest Photos Fix ---------- */

body[data-portal="client"] .mini-photo-grid,
body[data-portal="client"] .mini-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-portal="client"] .mini-photo-card,
body[data-portal="client"] .photo-gallery-card,
body[data-portal="client"] .gallery-card {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid var(--line) !important;
  border-left: 6px solid var(--project-color, #147cff) !important;
  background: #fff !important;
  color: var(--ink) !important;
  border-radius: 18px !important;
  padding: 10px !important;
  cursor: pointer !important;
  text-align: left !important;
  box-shadow: 0 8px 24px rgba(6,27,58,.05) !important;
  overflow: hidden !important;
}

body[data-portal="client"] .photo-thumb,
body[data-portal="client"] .gallery-thumb {
  width: 100% !important;
  height: 110px !important;
  display: grid !important;
  place-items: center !important;
  background: #eaf2ff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  color: #6b85a5 !important;
  margin: 0 0 8px !important;
}

body[data-portal="client"] .photo-thumb.large {
  height: 150px !important;
}

body[data-portal="client"] .photo-thumb img,
body[data-portal="client"] .gallery-thumb img,
body[data-portal="client"] .mini-photo-card img,
body[data-portal="client"] .photo-gallery-card img,
body[data-portal="client"] .gallery-card img {
  width: 100% !important;
  height: 100% !important;
  max-height: 150px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 14px !important;
}

body[data-portal="client"] .partner-side-column .photo-thumb,
body[data-portal="client"] .partner-side-column .gallery-thumb,
body[data-portal="client"] .partner-side-column img {
  width: 100% !important;
  height: 120px !important;
  max-height: 120px !important;
  object-fit: cover !important;
  border-radius: 16px !important;
}

body[data-portal="client"] .photo-gallery-grid,
body[data-portal="client"] .gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body[data-portal="client"] .photo-gallery-card .photo-thumb,
body[data-portal="client"] .gallery-card .gallery-thumb {
  height: 120px !important;
}

body[data-portal="client"] .photo-gallery-card b,
body[data-portal="client"] .gallery-card b {
  display: block !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  color: var(--navy) !important;
}

body[data-portal="client"] .photo-gallery-card span,
body[data-portal="client"] .gallery-card span,
body[data-portal="client"] .photo-gallery-card small,
body[data-portal="client"] .gallery-card small {
  display: block !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  color: var(--muted) !important;
  margin-top: 4px !important;
}

/* Project workspace files and finance should not look raw */
body[data-portal="client"] .file-list-row {
  display: grid !important;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center !important;
  border: 1px solid var(--line) !important;
  border-left: 6px solid var(--project-color, #147cff) !important;
  background: #fff !important;
  border-radius: 20px !important;
  padding: 14px !important;
  box-shadow: 0 10px 28px rgba(6,27,58,.05) !important;
  margin-bottom: 12px !important;
}

body[data-portal="client"] .file-open-link,
body[data-portal="client"] .file-chip,
body[data-portal="client"] .attached-files button {
  border: 1px solid #d9e7f8 !important;
  background: #f8fbff !important;
  color: var(--navy) !important;
  border-radius: 16px !important;
  padding: 10px 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  text-align: left !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

body[data-portal="client"] .invoice-project-card,
body[data-portal="client"] .finance-card,
body[data-portal="client"] .partner-finance-card {
  border: 1px solid var(--line) !important;
  border-left: 6px solid var(--project-color, #08783b) !important;
  background: #fff !important;
  border-radius: 24px !important;
  padding: 18px !important;
  box-shadow: 0 10px 28px rgba(6,27,58,.05) !important;
  margin-bottom: 14px !important;
}

/* Responsive */
@media(max-width: 1200px) {
  body[data-portal="client"] .photo-gallery-grid,
  body[data-portal="client"] .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media(max-width: 1000px) {
  body[data-portal="client"] .photo-gallery-grid,
  body[data-portal="client"] .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body[data-portal="client"] .report-top-grid,
  body[data-portal="client"] .report-progress-grid {
    grid-template-columns: 1fr !important;
  }
}

@media(max-width: 700px) {
  body[data-portal="client"] .mini-photo-grid,
  body[data-portal="client"] .mini-gallery,
  body[data-portal="client"] .photo-gallery-grid,
  body[data-portal="client"] .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-portal="client"] .file-list-row,
  body[data-portal="client"] .report-card-grid {
    grid-template-columns: 1fr !important;
  }
}

@media(max-width: 480px) {
  body[data-portal="client"] .mini-photo-grid,
  body[data-portal="client"] .mini-gallery,
  body[data-portal="client"] .photo-gallery-grid,
  body[data-portal="client"] .gallery-grid {
    grid-template-columns: 1fr !important;
  }
}

