/* ===== Customer accounts — auth pages + /account area =====
   Self-contained; reuses the site's .field/.btn/.form-* classes and only adds
   layout, thread, tiles, pills and account-nav styling. */

:root{
  --acc-navy:#0d2a5e; --acc-navy2:#13357a; --acc-blue:#1256d6;
  --acc-green:#16a34a; --acc-amber:#f59e0b; --acc-muted:#667085;
  --acc-border:#e6eaf1; --acc-soft:#f5f7fb; --acc-ink:#1f2937;
}

/* ---------- Auth (login / register / forgot / reset) ---------- */
.auth-section{background:var(--acc-soft);}
.auth-card{
  max-width:440px;margin:0 auto;background:#fff;border:1px solid var(--acc-border);
  border-radius:16px;box-shadow:0 18px 50px rgba(13,42,94,.10);padding:34px 32px;
}
.auth-card-wide{max-width:620px;}
.auth-head{text-align:center;margin-bottom:20px;}
.auth-head h1{color:var(--acc-navy);font-size:26px;margin:0 0 6px;}
.auth-head .sub{color:var(--acc-muted);font-size:14.5px;margin:0;}
.auth-form .field{margin-bottom:16px;}
.auth-row{display:flex;justify-content:flex-end;margin:-4px 0 16px;font-size:13.5px;}
.auth-foot{text-align:center;margin-top:18px;padding-top:16px;border-top:1px solid var(--acc-border);color:var(--acc-muted);font-size:14px;}
.auth-foot a,.auth-row a{color:var(--acc-blue);font-weight:600;text-decoration:none;}
.auth-foot a:hover,.auth-row a:hover{text-decoration:underline;}
.input-group .cc{max-width:92px;flex:0 0 92px;}
.field .opt{color:var(--acc-muted);font-weight:400;font-size:12.5px;}

/* OTP verify */
.otp-field{text-align:center;}
.otp-input{text-align:center;font-size:30px;font-weight:700;letter-spacing:12px;padding:14px 10px;font-family:"Poppins",monospace;}
.auth-resend{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:14px;color:var(--acc-muted);font-size:14px;}
.auth-resend .linklike{background:none;border:none;color:var(--acc-blue);font-weight:600;font-size:14px;cursor:pointer;padding:0;font-family:inherit;}
.auth-resend .linklike:hover{text-decoration:underline;}

/* ---------- Account layout ---------- */
.account-section{background:var(--acc-soft);min-height:60vh;}
.account-head{margin-bottom:22px;}
.account-head h1{color:var(--acc-navy);font-size:27px;margin:0 0 4px;}
.account-head p{color:var(--acc-muted);margin:0;}
.account-head-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.link-back{color:var(--acc-blue);text-decoration:none;font-size:13.5px;font-weight:600;}
.link-back:hover{text-decoration:underline;}

/* One column: the account nav is a bar ABOVE the content (see _nav.ejs), so
   the tables and the consignment timeline get the full page width. */
.account-layout{display:flex;flex-direction:column;gap:20px;align-items:stretch;}

/* ---------- Account nav bar (horizontal, above the content) ---------- */
.acc-bar{
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  background:#fff;border:1px solid var(--acc-border);border-radius:14px;padding:8px 10px;
}
.acc-bar-links{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0;}
.acc-bar-links a{
  display:inline-flex;align-items:center;gap:8px;padding:10px 15px;border-radius:10px;
  color:var(--acc-ink);text-decoration:none;font-size:14.5px;font-weight:500;white-space:nowrap;
  transition:background .15s,color .15s;
}
.acc-bar-links a span[data-icon]{width:18px;height:18px;display:inline-flex;color:var(--acc-muted);}
.acc-bar-links a:hover{background:var(--acc-soft);}
.acc-bar-links a.active{background:var(--acc-navy);color:#fff;}
.acc-bar-links a.active span[data-icon]{color:#fff;}
.acc-bar-cta{
  display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:10px;
  background:var(--acc-green);color:#fff;text-decoration:none;font-size:14.5px;font-weight:600;white-space:nowrap;
  transition:filter .15s;
}
.acc-bar-cta:hover{filter:brightness(1.07);}
.acc-bar-cta span[data-icon]{width:17px;height:17px;display:inline-flex;}
.acc-badge{background:#e11d48;color:#fff;font-size:11px;font-weight:700;border-radius:999px;padding:1px 7px;min-width:18px;text-align:center;display:inline-block;}

/* Main content */
.acc-main{display:flex;flex-direction:column;gap:20px;min-width:0;}
.acc-card{background:#fff;border:1px solid var(--acc-border);border-radius:14px;padding:20px 22px;}
.acc-card-h{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap;}
.acc-card-h h2{color:var(--acc-navy);font-size:18px;margin:0;}
.acc-count{background:var(--acc-soft);color:var(--acc-muted);font-size:13px;font-weight:600;border-radius:999px;padding:2px 10px;margin-left:6px;}
.acc-empty{text-align:center;padding:26px 10px;color:var(--acc-muted);}
.acc-empty p{margin:0 0 14px;}

/* Stat tiles */
/* auto-fit rather than a fixed 4: the billing row gains a fifth tile when
   cargo is not ready, and a hard-coded count would leave it stranded alone on
   a second line. */
.stat-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:4px;}
.stat-tile{background:#fff;border:1px solid var(--acc-border);border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:2px;text-decoration:none;transition:transform .15s,box-shadow .15s;}
a.stat-tile:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(13,42,94,.10);}
.stat-tile .st-ic{width:26px;height:26px;color:var(--acc-blue);margin-bottom:6px;display:inline-flex;}
.stat-tile b{font-size:26px;color:var(--acc-navy);line-height:1;}
.stat-tile span{color:var(--acc-muted);font-size:13px;}
.stat-tile.tile-alert{border-color:#f5b9b0;background:#fdf3f2;}
.stat-tile.tile-alert .st-ic{color:#e11d48;}

/* Tables */
.table-wrap{overflow-x:auto;}
.quote-table{width:100%;border-collapse:collapse;font-size:14px;}
.quote-table th{text-align:left;color:var(--acc-muted);font-weight:600;font-size:12.5px;text-transform:uppercase;letter-spacing:.03em;padding:8px 12px;border-bottom:2px solid var(--acc-border);}
.quote-table td{padding:12px;border-bottom:1px solid var(--acc-border);color:var(--acc-ink);vertical-align:middle;}
.quote-table tr:last-child td{border-bottom:none;}
.link-arrow{color:var(--acc-blue);text-decoration:none;font-weight:600;white-space:nowrap;display:inline-flex;align-items:center;gap:5px;}
.link-arrow:hover{text-decoration:underline;}
.link-arrow span[data-icon]{width:15px;height:15px;}
.acc-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:16px;}
.acc-pager-info{color:var(--acc-muted);font-size:13.5px;}

/* Definition list */
.dl{display:grid;grid-template-columns:150px 1fr;gap:0;margin:0;}
.dl dt{color:var(--acc-muted);font-size:13.5px;padding:9px 0;border-bottom:1px solid var(--acc-border);}
.dl dd{color:var(--acc-ink);font-size:14px;padding:9px 0;margin:0;border-bottom:1px solid var(--acc-border);}

/* Message thread */
.thread{display:flex;flex-direction:column;gap:12px;margin-bottom:18px;}
.thread-empty{color:var(--acc-muted);text-align:center;padding:18px;background:var(--acc-soft);border-radius:10px;margin:0;}
.msg{display:flex;}
.msg-customer{justify-content:flex-end;}
.msg-bubble{max-width:78%;padding:11px 15px;border-radius:14px;font-size:14px;line-height:1.5;}
.msg-admin .msg-bubble{background:var(--acc-soft);border:1px solid var(--acc-border);border-top-left-radius:4px;color:var(--acc-ink);}
.msg-customer .msg-bubble{background:var(--acc-navy);color:#fff;border-top-right-radius:4px;}
.msg-body{white-space:pre-wrap;}
.msg-meta{font-size:11.5px;margin-top:5px;opacity:.7;}
.thread-form{border-top:1px solid var(--acc-border);padding-top:16px;}

/* Pills (site pages may not define these) */
.pill{display:inline-block;padding:3px 11px;border-radius:999px;font-size:12px;font-weight:600;line-height:1.5;}
.pill-amber{background:#fef3c7;color:#92600b;}
.pill-blue{background:#dbeafe;color:#1e40af;}
.pill-green{background:#dcfce7;color:#166534;}
.pill-gray{background:#eef1f6;color:#4b5563;}

/* Small button variants (admin-only classes reused on the site) */
.btn-light{background:#eef1f6;color:var(--acc-navy);border:1px solid var(--acc-border);}
.btn-light:hover{background:#e3e8f0;}
.btn-sm{padding:6px 12px;font-size:13px;}

/* Header account / login links */
.nav-login,.nav-account{display:inline-flex;align-items:center;gap:6px;color:var(--acc-navy);font-weight:600;text-decoration:none;font-size:14.5px;padding:8px 12px;border-radius:9px;}
.nav-login:hover,.nav-account:hover{background:rgba(13,42,94,.06);}
.nav-account span[data-icon]{width:17px;height:17px;}
.only-mobile{display:none;}

@media (max-width:900px){
  .stat-tiles{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:560px){
  /* The bar scrolls sideways rather than stacking into four full-width rows
     that push the actual content off the first screen. */
  .acc-bar{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;}
  .acc-bar-links{flex-wrap:nowrap;}
  .acc-bar-cta{margin-left:auto;}
}
@media (max-width:820px){
  .nav-links .only-mobile{display:block;}
  .nav-login,.nav-account{padding:6px 8px;}
}
@media (max-width:480px){
  .stat-tiles{grid-template-columns:1fr;}
  .dl{grid-template-columns:1fr;}
  .dl dt{padding-bottom:0;border-bottom:none;}
  .dl dd{padding-top:2px;}
  .auth-card{padding:26px 20px;}
}
.form-section-note{color:var(--acc-muted);font-size:13px;margin:-6px 0 12px}

/* ── Account form layout ──────────────────────────────
   .form-actions was styled in the admin panel but never on the public site,
   so the submit button sat flush against the last input with no separation. */
.acc-form .field,.auth-form .field{margin-bottom:18px}
.acc-form .form-actions,.auth-form .form-actions{display:flex;gap:10px;align-items:center;margin-top:24px;padding-top:20px;border-top:1px solid var(--acc-border)}
.acc-form .form-actions .btn,.auth-form .form-actions .btn{min-width:170px;justify-content:center}
/* The password checklist sits between the field and the button, so give the
   group a little more room than a plain field. */
.field:has(.pw-rules){margin-bottom:22px}
@media (max-width:560px){
  .acc-form .form-actions,.auth-form .form-actions{flex-direction:column;align-items:stretch}
  .acc-form .form-actions .btn,.auth-form .form-actions .btn{width:100%}
}

/* ── Show / hide password ─────────────────────────────
   The button sits inside the field's right edge; the input gets padding so the
   text never runs underneath it. */
.pw-wrap{position:relative;display:block;width:100%}
.pw-wrap input{width:100%;padding-right:66px}
.pw-toggle{position:absolute;top:50%;right:8px;transform:translateY(-50%);background:none;border:0;padding:6px 8px;font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;border-radius:6px;line-height:1}
.pw-toggle{color:#5b7a9d}
.pw-toggle:hover{background:rgba(30,99,208,.08);color:#1e63d0}
.pw-toggle:focus-visible{outline:2px solid #1e63d0;outline-offset:1px}

/* Table action cells: keep the links apart and on one line. */
.row-actions{display:flex;align-items:center;gap:12px;justify-content:flex-end;white-space:nowrap;}
.quote-table td:last-child{text-align:right;}

/* The invoice table gained a Consignment column, so the short columns are
   pinned to their content and Subject absorbs the slack — otherwise the
   browser spreads the width evenly and wraps "SRV-26-007" and each pill. */
.quote-table td,.quote-table th{white-space:nowrap;}
.quote-table td.col-wide,.quote-table th.col-wide{white-space:normal;width:99%;}
.quote-table .pill{display:inline-block;white-space:nowrap;}

/* Filters in a card header. */
.acc-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.acc-filters select{
  padding:8px 11px;border:1.5px solid var(--acc-border);border-radius:9px;
  font-size:13.5px;font-family:inherit;background:#fff;color:var(--acc-ink);cursor:pointer;
}
.acc-filters select:focus{outline:none;border-color:var(--acc-blue);box-shadow:0 0 0 3px rgba(18,86,214,.12);}
.acc-filter-clear{color:var(--acc-blue);font-size:13.5px;font-weight:600;text-decoration:none;}
.acc-filter-clear:hover{text-decoration:underline;}

/* Search box beside the filter selects. */
.acc-search{
  padding:8px 11px;border:1.5px solid var(--acc-border);border-radius:9px;
  font-size:13.5px;font-family:inherit;background:#fff;color:var(--acc-ink);min-width:200px;
}
.acc-search:focus{outline:none;border-color:var(--acc-blue);box-shadow:0 0 0 3px rgba(18,86,214,.12);}
