/* Carrier portal styles (production site).
   Replaces the staging repository's assets/carrier-portal.css, which used its own palette
   (--teal/--deep/--line/--paper) and its own header/footer. Carrier pages now use the site's
   standard header, footer and shared style blocks (no hero band - the live carrier pages go
   straight from the account bar into content, and Stage 14 deliberately kept it that way rather
   than introducing one); this file only styles the carrier-specific content, using the site's
   design tokens from /assets/site.css (--df-ink, --df-muted, --df-line,
   --df-soft, --df-soft-2, --df-radius, --df-shadow) and the site's button colour (--df-teal).
   Class names (portal-*) are kept from staging because the page scripts generate them. */

/* Stage 14 visual refresh (2026-11-28): the owner asked for the carrier account to feel "fun,
   interactive, like a video game" while staying recognizably Dragonfly Delivery - and pointed at
   /dragonfly-drop (the site's existing mini-game) as the reference. --df-gold below is lifted
   directly from that game's own palette (its --gold:#f4b942), scoped to carrier pages only, the
   same way the game itself scopes its palette to its own page rather than touching site.css. The
   pressable pill button (shadow that compresses on click) and the dark HUD stat strip are the same
   two ideas, reapplied to real account data - nothing here is a score or a stat that isn't real:
   every number and status shown comes straight from the carrier-portal/marketplace APIs. */
:root{--df-gold:#f4b942;--df-gold-ink:#6b4a05}

body.df-carrier [hidden]{display:none!important}

/* Carrier account bar: sits directly under the site header. A div with role=navigation is used on
   purpose: the shared header styles apply layout rules to every bare <nav> element. */
.df-carrier-bar{background:#00f2f6;border-bottom:1px solid var(--df-line)}
.df-carrier-bar-inner{max-width:var(--df-wide);width:calc(100% - 40px);margin:0 auto;padding:10px 0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.df-carrier-bar-title{font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--df-muted);margin-right:6px}
.df-carrier-bar a,.df-carrier-bar button{display:inline-flex;align-items:center;min-height:36px;padding:8px 14px;border:1px solid transparent;border-radius:999px;background:none;color:var(--df-ink);font:inherit;font-size:14px;font-weight:800;line-height:1;text-decoration:none;cursor:pointer}
.df-carrier-bar a:hover,.df-carrier-bar a[aria-current="page"],.df-carrier-bar button:hover{background:#fff;border-color:var(--df-line)}
.df-carrier-bar .df-carrier-bar-end{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
@media (max-width:700px){.df-carrier-bar-inner{width:calc(100% - 28px)}.df-carrier-bar .df-carrier-bar-end{margin-left:0}}

/* Content */
body.df-carrier main{padding:36px 0 56px}
body.df-carrier main .container{max-width:var(--df-rail)}
.portal-narrow{max-width:620px;margin-left:auto;margin-right:auto}
.portal-panel{background:var(--df-paper);border:1px solid var(--df-line);border-radius:var(--df-radius);box-shadow:var(--df-shadow);padding:clamp(20px,3vw,30px);margin:0 0 22px}
.portal-panel h2{font-size:clamp(21px,2vw,25px);line-height:1.25;margin:0 0 12px;text-align:left}
.portal-panel p{line-height:1.6}
.portal-lead{color:var(--df-muted);font-size:17px;line-height:1.6;margin:0 0 18px}
.portal-muted{color:var(--df-muted);font-size:14px;line-height:1.55}
.portal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}

/* Forms */
.portal-label{display:block;font-weight:800;font-size:14px;margin:14px 0 6px;color:var(--df-ink)}
.portal-input{display:block;width:100%;min-height:46px;margin:0 0 6px;padding:12px 14px;border:1px solid #b9c6c3;border-radius:10px;background:#fff;color:var(--df-ink);font:inherit}
textarea.portal-input{min-height:96px;resize:vertical}
.portal-input:focus{outline:3px solid rgba(36,122,115,.25);outline-offset:1px;border-color:var(--df-teal,#009c9e)}
/* Pressable pill, same idea as the game's DROP PARCEL button: a solid "shadow" underneath that the
   button compresses into on click, instead of a plain CSS box-shadow blur. */
.portal-btn,body.df-carrier main form button[type=submit]{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:12px 26px;border:0;border-radius:999px;background:var(--df-teal,#009c9e);color:#fff;font:inherit;font-size:16px;font-weight:800;line-height:1.2;text-decoration:none;cursor:pointer;box-shadow:0 4px 0 var(--df-teal-dark,#00787a);transition:transform .08s ease,box-shadow .08s ease}
.portal-btn:hover,.portal-btn:focus-visible{background:var(--df-teal,#009c9e);filter:brightness(1.05)}
.portal-btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--df-teal-dark,#00787a)}
.portal-btn.secondary{background:#fff;color:var(--df-teal-dark,#00787a);box-shadow:0 4px 0 var(--df-line);border:2px solid var(--df-teal,#009c9e)}
.portal-btn.secondary:hover{background:#eef5f3;color:var(--df-teal-dark,#00787a)}
.portal-btn:disabled,body.df-carrier main form button[type=submit]:disabled{opacity:.55;cursor:wait;transform:none;box-shadow:0 4px 0 var(--df-teal-dark,#00787a)}
.portal-btn-block{width:100%}
@media (prefers-reduced-motion:reduce){.portal-btn{transition:none}.portal-btn:active{transform:none}}

/* Status messages (same palette as the site's .callout and error notices) */
.portal-status{margin:14px 0;padding:14px 16px;border:1px solid #cfe0dc;border-left:5px solid var(--df-teal,#009c9e);border-radius:12px;background:#e7efec;color:var(--df-ink);line-height:1.55;white-space:pre-wrap}
.portal-status.ok{border-left-color:#1f7a4d}
.portal-status.error{background:#fff1ee;border-color:#ebc4bb;border-left-color:#b4473a;color:#7d2d26}
.portal-status:empty{display:none}
.portal-status strong{display:block;margin-bottom:4px}
.portal-status p{margin:0}

/* HUD stat strip - the dashboard's "Score / Best / Combo" bar, built from real account fields
   (application stage, document counts, account status) rather than anything invented. */
.df-hud{display:flex;flex-wrap:wrap;gap:4px 22px;align-items:center;background:var(--df-ink);color:#fff;border-radius:var(--df-radius);padding:16px 22px;margin:0 0 22px;box-shadow:var(--df-shadow)}
.df-hud-stat{display:flex;flex-direction:column;gap:2px;min-width:0}
.df-hud-stat .l{font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;opacity:.72}
.df-hud-stat .v{font-size:19px;font-weight:900;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.df-hud-stat.featured .v{color:var(--df-gold)}

/* Route milestone tracker - the dashboard's onboarding progress, styled like the game's "every 5
   deliveries you move to a new stretch" route. Every stage shown is a real onboarding_stage/status
   value from the carrier-portal API; "blocked" renders for rejected/suspended, which is shown
   plainly rather than hidden or glossed over. */
.df-route{display:flex;align-items:flex-start;gap:0;margin:4px 0 24px;overflow-x:auto;padding-bottom:4px}
.df-route-step{flex:1;min-width:92px;text-align:center;position:relative;padding-top:22px}
.df-route-step::before{content:'';position:absolute;top:8px;left:0;right:0;height:3px;background:var(--df-line)}
.df-route-step:first-child::before{left:50%}
.df-route-step:last-child::before{right:50%}
.df-route-step::after{content:'';position:absolute;top:2px;left:50%;transform:translateX(-50%);width:15px;height:15px;border-radius:50%;background:#fff;border:3px solid var(--df-line)}
.df-route-step .t{font-size:12px;font-weight:800;color:var(--df-muted);line-height:1.3}
.df-route-step.done::before{background:var(--df-teal,#009c9e)}
.df-route-step.done::after{background:var(--df-teal,#009c9e);border-color:var(--df-teal,#009c9e)}
.df-route-step.done .t{color:var(--df-ink)}
.df-route-step.current::after{background:var(--df-gold);border-color:var(--df-gold);box-shadow:0 0 0 4px rgba(244,185,66,.3)}
.df-route-step.current .t{color:var(--df-ink);font-weight:900}
.df-route-step.blocked::after{background:#b4473a;border-color:#b4473a}
.df-route-step.blocked .t{color:#b4473a}
@media (max-width:620px){.df-route{gap:18px}.df-route-step{min-width:74px}}

/* Dashboard mission cards: bigger tiles with an icon badge and a hover lift, same four links as
   before (My documents / My application / Marketplace / Sign-in), just styled as destinations on
   a map rather than a plain link list. */
.portal-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 22px}
a.portal-card{display:flex;gap:14px;align-items:flex-start;padding:22px;background:var(--df-paper);border:1px solid var(--df-line);border-radius:var(--df-radius);box-shadow:var(--df-shadow);color:var(--df-ink);text-decoration:none;transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease}
a.portal-card:hover,a.portal-card:focus-visible{border-color:var(--df-teal,#009c9e);transform:translateY(-3px);box-shadow:0 14px 28px rgba(20,32,36,.14)}
a.portal-card .df-card-icon{flex:none;width:42px;height:42px;border-radius:50%;background:var(--df-soft-2);display:flex;align-items:center;justify-content:center;font-size:20px}
a.portal-card strong{display:block;font-size:19px;margin-bottom:6px}
a.portal-card span{display:block;color:var(--df-muted);font-size:14px;font-weight:400;line-height:1.55}
@media (prefers-reduced-motion:reduce){a.portal-card{transition:none}a.portal-card:hover{transform:none}}

.portal-dl{display:grid;grid-template-columns:200px 1fr;gap:10px 16px;margin:0}
.portal-dl dt{font-weight:800}
.portal-dl dd{margin:0;overflow-wrap:anywhere;color:var(--df-muted)}
.portal-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:16px}

/* Documents list / marketplace opportunity list - same markup and IDs the page scripts already
   build (unchanged), restyled as a left-accented "route card" instead of a flat row. */
.portal-list{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.portal-doc{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:16px 18px 16px 20px;border:1px solid var(--df-line);border-left:5px solid var(--df-teal,#009c9e);border-radius:14px;background:var(--df-soft)}
.portal-doc strong{display:block;overflow-wrap:anywhere}
.portal-doc .portal-btn{margin:10px 10px 0 0!important;min-height:40px;padding:8px 18px;font-size:14px}
.portal-pill{display:inline-block;padding:5px 11px;border:1px solid var(--df-line);border-radius:999px;background:var(--df-soft-2);color:var(--df-ink);font-size:12px;font-weight:800;vertical-align:middle;white-space:nowrap}
/* Gold "earned it" pill for a verified document or a bid already placed - reuses the same gold as
   the HUD's featured stat and the route tracker's current/active step, so it reads as one system. */
.portal-pill.df-pill-gold{background:var(--df-gold);border-color:var(--df-gold);color:var(--df-gold-ink)}
.portal-empty{padding:22px;border:1px dashed #c9d5d2;border-radius:14px;background:var(--df-soft);color:var(--df-muted)}

/* Two side-by-side panels on the Loads page (opportunities | completed deliveries) - Alex,
   2026-11-28: wants the two SECTIONS as columns, not the completed-deliveries list itself
   turned into a 2-up grid (that was tried first and reverted - too cramped since each card's
   width also had to make room for the opportunities list's bid-update form next to it). */
.portal-cols-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}

@media (max-width:900px){
  .portal-cols-2{grid-template-columns:1fr}
}
@media (max-width:700px){
  .portal-grid,.portal-cards{grid-template-columns:1fr}
  .portal-list-2col{grid-template-columns:1fr}
  .portal-doc{grid-template-columns:1fr}
  .portal-dl{grid-template-columns:1fr;gap:2px}
  .portal-dl dd{margin-bottom:10px}
}
