/* African Post Ghana — marketplace components (loaded after style.css). */

/* Notices */
.apg-notice { border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 18px; font-size: 14px; font-weight: 600; }
.apg-notice.ok { background: var(--green-50); color: var(--green-700); border: 1px solid rgba(0,107,63,.2); }
.apg-notice.err { background: rgba(206,17,38,.08); color: var(--red); border: 1px solid rgba(206,17,38,.2); }

/* Board filters */
.board-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.board-filters .select { width: auto; min-width: 170px; }
@media (max-width: 700px) { .board-filters .select { flex: 1 1 100%; min-width: 0; } }

/* Shipment card budget */
.shipment-card { gap: 10px; }
.budget-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.budget-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.budget-amount { font-size: 24px; font-weight: 800; color: var(--green); letter-spacing: -.02em; }
.offers-count { font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--bg-3); padding: 6px 10px; border-radius: 999px; }

/* Subscription banner */
.sub-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px; border-radius: var(--radius); border: 1px solid var(--line);
}
.sub-banner.ok { background: linear-gradient(135deg, var(--green-50), #fff); border-color: rgba(0,107,63,.2); }
.sub-banner.warn { background: rgba(252,209,22,.12); border-color: rgba(201,163,16,.3); }
.sub-banner .sub-state { font-weight: 800; font-size: 17px; }

/* Auth tabs */
.auth-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-3); margin-bottom: 22px; }
.auth-tab { padding: 10px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.apg-trial-note {
  background: rgba(252,209,22,.16); border: 1px solid rgba(201,163,16,.3);
  color: var(--gold-700); border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 14px; margin-bottom: 16px;
}

/* Textarea matches inputs */
textarea.input { resize: vertical; min-height: 84px; line-height: 1.5; }

/* Featured board on the homepage */
.board-feature-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

/* === Email confirmation bar === */
.apg-email-bar { background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.apg-email-bar button { background: var(--ink); color: #fff; padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; }

/* === Report form === */
.report-toggle { color: var(--red); font-size: 13px; font-weight: 600; cursor: pointer; }
.report-box { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }

/* === Name links + public profile hero === */
.apg-name-link { color: inherit; }
.apg-name-link:hover { color: var(--green); text-decoration: underline; }
.profile-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* === Verification gauge === */
.verif-gauge { height: 10px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.verif-gauge span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width .3s ease; }
.verif-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; color: var(--ink-2); }
.verif-steps li.done { color: var(--green-700); font-weight: 600; }
@media (max-width: 600px) { .verif-steps { grid-template-columns: 1fr; } }

/* === Shipment card tags === */
.ship-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ship-tag { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; }

/* === Account section nav === */
/* === Account area: header + sidebar shell === */
.account-top {
  background: linear-gradient(180deg, var(--green-50), #fff);
  border-bottom: 1px solid var(--line);
  padding: 30px 0 26px;
}
.account-id { display: flex; align-items: center; gap: 16px; }
.account-id .avatar { box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(16,24,40,.10); }
.account-id h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; }
.account-type-pill {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green-700);
  background: #fff;
  border: 1px solid var(--green-50);
  padding: 3px 11px;
  border-radius: 999px;
}
.account-signout-btn { margin-left: auto; }

.account-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.account-side { position: sticky; top: 84px; }
.account-menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.04);
}
.acct-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.acct-link .ai { width: 22px; text-align: center; font-size: 16px; flex: 0 0 auto; }
.acct-link:hover { background: var(--bg-3); color: var(--ink); }
.acct-link.active { background: var(--green-50); color: var(--green-700); }
.acct-link .acct-badge {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1;
}
.acct-divider { height: 1px; background: var(--line); margin: 7px 6px; }
.acct-signout { color: var(--red); }
.acct-signout:hover { background: #fef2f2; color: var(--red); }
.account-signout-btn { display: none; }

@media (max-width: 860px) {
  .account-shell { grid-template-columns: 1fr; gap: 18px; }
  .account-side { position: static; }
  .account-menu { flex-direction: row; overflow-x: auto; padding: 6px; gap: 2px; }
  .acct-link { padding: 10px 12px; }
  .acct-link .ai { width: auto; }
  .acct-divider, .acct-signout { display: none; }
  .account-signout-btn { display: inline-flex; }
}

.account-h { font-size: 22px; margin: 0 0 16px; letter-spacing: -.01em; scroll-margin-top: 90px; }

/* Fleet sub-headings + driver cards */
.fleet-sub { font-size: 16px; margin: 26px 0 4px; font-weight: 800; }
.fleet-sub:first-of-type { margin-top: 4px; }
.fleet-sub-desc { margin: 0 0 14px; font-size: 13px; color: var(--ink-2); }
.fleet-drivers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.driver-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.driver-card-head { display: flex; align-items: center; gap: 11px; }
.driver-name { font-weight: 700; font-size: 15px; }
.driver-meta { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.driver-tel { margin-left: auto; font-size: 15px; text-decoration: none; }

/* === Homepage: board "see all" foot + clickable type cards === */
.board-feature-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: 24px;
}
.board-foot-note { font-size: 13px; color: var(--ink-2); margin: 0; font-weight: 600; }
@media (max-width: 560px) {
  .board-feature-foot { align-items: stretch; text-align: center; }
  .board-feature-foot .btn { justify-content: center; }
}
.type-card { display: block; text-decoration: none; color: inherit; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.type-card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 12px 28px rgba(16,24,40,.10); }
.type-card .type-cta { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 14px; color: var(--green); }

/* === Reusable accordion (My account lists) === */
.apg-acc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  overflow: hidden;
}
.apg-acc > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
}
.apg-acc > summary::-webkit-details-marker { display: none; }
.apg-acc > summary::after {
  content: "⌄";
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--ink-3);
  transition: transform .18s ease;
  line-height: 1;
}
.apg-acc[open] > summary::after { transform: rotate(180deg); }
.apg-acc[open] > summary { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.apg-acc > summary:hover { background: var(--bg-2); }
.acc-ico { font-size: 18px; flex: 0 0 auto; }
.acc-title { font-weight: 700; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acc-sub { color: var(--ink-2); font-weight: 400; font-size: 13px; }
/* The icons + info cluster always hugs the right edge — never centered */
.acc-tags { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; margin-left: auto; }
/* Compact tracking strip shown on a collapsed summary, hidden once open */
.acc-track { display: inline-flex; align-items: center; gap: 4px; }
.apg-acc[open] .acc-track { display: none; }
.mini-step {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--line-2);
  font-size: 12px; line-height: 1;
  filter: grayscale(1); opacity: .3;
}
.mini-step.done { background: var(--green-50); filter: none; opacity: 1; box-shadow: inset 0 0 0 1.5px rgba(0,107,63,.4); }
.mini-step.now { background: #fff; filter: none; opacity: 1; box-shadow: 0 0 0 2px var(--green), 0 2px 6px rgba(0,107,63,.28); }
.acc-loc { font-size: 12px; color: var(--green-700); font-weight: 700; margin-left: 4px; white-space: nowrap; }
@media (max-width: 680px) {
  .acc-track .mini-step:not(.now):not(.done) { display: none; }
  .acc-tags { flex-wrap: wrap; }
}

.acc-body { padding: 16px 18px; }
.acc-body > .delivery-panel { margin: 0; border-left: none; box-shadow: none; border: none; padding: 0; }
.acc-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.acc-actions form { margin: 0; }

/* Missions header (Driving for, top-right) + sender carrier fiche */
.account-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.driving-for { font-size: 13px; text-align: right; line-height: 1.5; color: var(--ink-2); }
.driving-for b { font-size: 14px; color: var(--ink); }
.carrier-fiche { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.assign-row { scroll-margin-top: 96px; transition: box-shadow .2s ease, border-color .2s ease; }
.assign-row:target { border-color: var(--green) !important; box-shadow: 0 0 0 3px var(--green-50); }
@media (max-width: 520px) { .carrier-fiche { flex-wrap: wrap; } }

/* === Quick post card + budget slider === */
.post-card { border-top: 4px solid var(--green); }
.budget-pill { background: var(--green); color: #fff; font-weight: 800; padding: 2px 10px; border-radius: 999px; font-size: 14px; letter-spacing: 0; text-transform: none; }
.apg-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--green) 0%, var(--gold) 100%); outline: none; margin: 6px 0 4px; padding: 0; }
.apg-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--green); box-shadow: var(--shadow-md); cursor: pointer; }
.apg-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--green); box-shadow: var(--shadow-md); cursor: pointer; }
.range-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); font-weight: 600; }

/* === Ghana flag logo mark === */
.logo-flag { display: inline-block; border-radius: 9px; box-shadow: var(--shadow-sm); flex: 0 0 auto; }

/* === Brand "GH" mark (small, superscript like a TM) === */
.logo-gh { font-size: .58em; font-weight: 800; vertical-align: super; color: var(--green); letter-spacing: .03em; margin-left: 2px; }

/* === Header segmented switch (iOS style) === */
.seg-switch { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--bg-3); }
.seg-switch .seg {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--ink-2); white-space: nowrap; transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.seg-switch .seg:hover { color: var(--ink); }
.seg-switch .seg.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
@media (max-width: 860px) {
  .nav-inner { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .seg-switch { order: 3; width: 100%; justify-content: space-between; }
  .seg-switch .seg { flex: 1; text-align: center; padding: 9px 8px; font-size: 13px; }
}

/* === Apple on/off switch === */
.apg-switch-wrap { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.apg-switch-wrap .switch-label { font-weight: 700; color: var(--ink-3); font-size: 15px; transition: color .15s ease; cursor: pointer; }
.apg-switch-wrap .switch-label.active { color: var(--ink); }
.apg-switch {
  position: relative; width: 56px; height: 32px; border-radius: 999px;
  background: var(--ink-3); transition: background .2s ease; flex: 0 0 auto; padding: 0;
}
.apg-switch .knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s ease;
}
.apg-switch[aria-checked="true"] { background: var(--green); }
.apg-switch[aria-checked="true"] .knob { transform: translateX(24px); }

/* === Transporter card === */
.transporter-card { gap: 10px; }

/* === Gate card (locked transporters view) === */
.gate-card { background: linear-gradient(180deg, var(--bg-2), #fff); border-style: dashed; }

/* === Dashboard stats === */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-align: left; transition: box-shadow .14s ease, transform .14s ease; }
.stat:hover { box-shadow: 0 8px 20px rgba(16,24,40,.07); transform: translateY(-2px); }
.stat-num { font-size: 30px; font-weight: 800; color: var(--green); letter-spacing: -.02em; line-height: 1; }
.stat-lbl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-top: 8px; }

/* === Dashboard list rows === */
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; transition: background .12s ease; }
.row-item:first-child { border-top: none; }
.row-item:hover { background: var(--bg-2); }
.row-item form { margin: 0; }

/* === Contact options === */
.contact-options { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-options .contact-label { font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }

/* === Chat === */
.chat-panel { padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.chat-thread { padding: 22px; display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; }
.chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.chat-bubble .chat-time { font-size: 11px; opacity: .7; margin-top: 4px; }
.chat-bubble.mine { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--bg-3); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
.chat-form .input { flex: 1; }

/* === Ratings & verification === */
.apg-stars { color: var(--gold-700); letter-spacing: 1px; font-size: 13px; }
.apg-rating-num { font-weight: 700; font-size: 13px; color: var(--ink); }
.apg-rating-count { font-size: 12px; color: var(--ink-2); }
.badge.apg-verified { background: var(--green-50); color: var(--green-700); }

/* === Express moto band === */
.express-band {
  background: linear-gradient(135deg, var(--red) 0%, #9e0e1d 100%);
  border-radius: var(--radius-lg); padding: 48px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.express-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 80% at 90% 10%, rgba(252,209,22,.3), transparent 60%); pointer-events: none; }
.express-band > div { position: relative; }
.express-emoji { font-size: 120px; line-height: 1; flex: 0 0 auto; }
@media (max-width: 760px) { .express-emoji { display: none; } .express-band { padding: 36px 28px; } }

/* === Paginated market grid (9 / page, clearer separation) === */
.market-grid-9 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 1000px) { .market-grid-9 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .market-grid-9 { grid-template-columns: 1fr; } }

/* ===========================================================
 * Mobile polish (<=600px): centered, symmetric, full-width CTAs
 * =========================================================== */
@media (max-width: 600px) {
  .container { padding-left: 16px; padding-right: 16px; }

  /* Hero: center the text column + full-width buttons */
  .hero { padding: 46px 0 52px; }
  .hero-grid { gap: 26px; }
  .hero-grid > div:first-child { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .trust-row { justify-content: center; }

  /* Page heads + filters centered */
  .page-head { text-align: center; }
  .board-filters { justify-content: center; }

  /* Primary CTAs span the full width (even, symmetric) */
  .btn-lg { width: 100%; justify-content: center; }
  .section .center .btn { width: 100%; justify-content: center; }

  /* Even panels + section spacing */
  .section { padding-top: 44px; padding-bottom: 44px; }
  .panel { padding: 20px; }

  /* Section headings stay centered (most already are) */
  .section-head { text-align: center; }

  /* Footer: brand full-width on top, then Send / Earn / Company side by side */
  .site-footer { padding: 40px 0 28px; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 26px 10px; text-align: center; align-items: start; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-grid .logo { justify-content: center; }
  .footer-grid > div:first-child p { margin-left: auto; margin-right: auto; }
  .footer-grid h4 { margin-bottom: 9px; font-size: 12px; }
  .footer-grid ul { align-items: center; gap: 9px; }
  .footer-grid a { font-size: 12.5px; line-height: 1.35; }
  .fine-print { flex-direction: column; gap: 8px; text-align: center; align-items: center; margin-top: 26px; }

  /* Account header centered & stacked */
  .account-id { flex-wrap: wrap; justify-content: center; text-align: center; }
  .account-signout-btn { margin-left: 0; }
}

/* === Legal / content pages typography (.entry-content) === */
.entry-content h2 { font-size: 20px; margin: 26px 0 10px; letter-spacing: -.01em; }
.entry-content h2:first-child { margin-top: 0; }
.entry-content h3 { font-size: 16px; margin: 20px 0 8px; }
.entry-content p { margin: 0 0 14px; line-height: 1.7; color: var(--ink); }
.entry-content ul, .entry-content ol { margin: 0 0 16px; padding-left: 22px; line-height: 1.7; }
.entry-content li { margin-bottom: 7px; }
.entry-content a { color: var(--green); font-weight: 600; }
.entry-content a:hover { text-decoration: underline; }
.entry-content .muted { font-size: 13px; }

/* Lift each card so neighbours read as distinct objects, not a wall of boxes. */
.market-grid-9 > .trip,
.market-grid-9 > .shipment-card,
.market-grid-9 > .transporter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.market-grid-9 > .trip:hover,
.market-grid-9 > .shipment-card:hover,
.market-grid-9 > .transporter-card:hover {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: 0 10px 24px rgba(16, 24, 40, .10);
}

/* === Pager === */
.apg-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px 0 4px;
}
.apg-page {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.apg-page:hover { border-color: var(--green); color: var(--green); }
.apg-page.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  cursor: default;
}

/* === Delivery / fleet tracking panel === */
.delivery-panel { border-left: 3px solid var(--green); }
.delivery-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 16px 0 4px;
}
.delivery-track .dstep {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--line-2);
  font-size: 17px;
  filter: grayscale(1);
  opacity: .3;
  position: relative;
}
.delivery-track .dstep:not(:last-child)::after {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--line);
  margin-left: 6px;
}
.delivery-track .dstep.done { filter: none; opacity: 1; background: var(--green-50); box-shadow: inset 0 0 0 2px rgba(0,107,63,.4); }
.delivery-track .dstep.done:not(:last-child)::after { background: var(--green); }
.delivery-track .dstep.now {
  filter: none;
  opacity: 1;
  background: #fff;
  box-shadow: 0 0 0 3px var(--green), 0 3px 8px rgba(0,107,63,.3);
}
.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-top: 16px;
}
.delivery-actions form { margin: 0; }
.deliver-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}
.pin-box {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--green-50);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pin-code {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.delivery-map {
  height: 260px;
  margin-top: 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  z-index: 0;
}

/* === Account nav badge (red event dot) === */
.apg-account-link { position: relative; }
.apg-acct-ico { font-size: 15px; }
.apg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  box-shadow: 0 0 0 2px #fff;
}

/* === Failed-attempt callout === */
.delivery-fail {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.delivery-fail h4 { margin: 0 0 6px; color: var(--red); }
.delivery-fail .fail-line { font-size: 14px; color: var(--ink-2); margin: 2px 0; }
.fail-form { margin-top: 10px; }
.fail-form > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--red); font-size: 13px; font-weight: 700; list-style: none; }
.fail-form > summary::-webkit-details-marker { display: none; }
.fail-form > summary::before { content: "⚠"; }
.fail-form > summary:hover { text-decoration: underline; }
.fail-form[open] { margin-top: 12px; padding: 14px; border: 1px dashed #fecaca; border-radius: 12px; background: #fef2f2; }
.fail-form[open] > summary { margin-bottom: 6px; }
.needs-attention { border-left: 3px solid var(--red); }

