/* ── Arrow Oils portal theme ──────────────────────────────────────────────
   Palette lifted from the Arrow Oils / Arrow Nationwide logo: green wordmark,
   orange/amber oil-drop icon. */

:root {
  --green: #4caf50;
  --green-deep: #2e7d32;
  --orange: #f5a623;
  --orange-soft: rgba(245, 166, 35, 0.16);
  --paper: #f4f7f2;
  --ink: #333;
  --muted: #6b7280;
  --faint: #9ca3af;
  --card-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(46, 125, 50, 0.08),
    0 32px 64px rgba(46, 125, 50, 0.06);

  /* Sign-in split-screen: deep forest ground for the brand panel, amber reserved
     as the one glowing accent behind the logo (the logo's own droplet mark). */
  --forest: #12271e;
  --forest-2: #1c3a2c;
  --amber-glow: #ffcf7a;
  --line-on-forest: rgba(255, 255, 255, 0.1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.app-header {
  background: #fff;
  padding: 16px 32px 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.app-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { text-decoration: none; display: block; }
.brand-logo { display: block; height: 44px; width: auto; }
.header-stripe { height: 3px; background: linear-gradient(90deg, var(--green), var(--orange)); margin: 16px -32px 0; }

.account {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.account .cust { color: var(--green-deep); font-weight: 600; }
.nav-link { color: var(--green-deep); font-weight: 600; font-size: 13px; text-decoration: none; }
.nav-link:hover { text-decoration: underline; }
.btn-logout {
  background: var(--orange-soft);
  color: #9a5b00;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-logout:hover { background: rgba(245, 166, 35, 0.28); }

@media (max-width: 640px) {
  .app-header { padding: 14px 16px 0; }
  .header-stripe { margin: 14px -16px 0; }
  .app-header-row { flex-wrap: wrap; row-gap: 10px; }
  .account { flex-wrap: wrap; row-gap: 8px; width: 100%; }
  .account .cust { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account form { margin-left: auto; }
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
main { flex: 1; padding: 32px 16px 64px; }
body.full-bleed main { padding: 0; }
.container-wide { max-width: 1180px; margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.page-head h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--green-deep);
}
.page-head .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }

.btn-link { color: var(--green-deep); font-weight: 600; text-decoration: none; font-size: 13px; }
.btn-link:hover { text-decoration: underline; }

.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f4f7f2; color: var(--green-deep); border: 1px solid #d7dbd3;
  border-radius: 10px; padding: 9px 16px; font-weight: 700; font-size: 13px; text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-back:hover { background: var(--orange-soft); border-color: var(--orange); }

/* ── Jobs list (FleetWizard-style) ────────────────────────────────────────── */
.fw-datebar {
  background: #fff;
  padding: 14px 24px;
  border-bottom: 1px solid #eee;
}
.fw-datebar { display: flex; align-items: center; justify-content: space-between; }
.fw-daterange { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.fw-daterange input[type=date] {
  border: 1px solid #d7dbd3; border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13px; background: #f4f7f2;
}
.fw-datebar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-new-job {
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
}
.btn-new-job:hover { background: var(--green-deep); }

.btn-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #d7dbd3;
  background: #fff;
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-refresh svg { width: 19px; height: 19px; display: block; transition: transform 0.4s ease; }
.btn-refresh:hover { background: var(--orange-soft); color: var(--green-deep); border-color: var(--orange); }
.btn-refresh:hover svg { transform: rotate(180deg); }

@media (max-width: 640px) {
  .fw-datebar { flex-wrap: nowrap; gap: 8px; padding: 12px 16px; }
  .fw-daterange { flex-wrap: nowrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
  .fw-daterange label { display: none; }
  .fw-daterange input[type=date] { min-width: 0; flex: 1 1 0; width: auto; padding: 7px 6px; font-size: 12px; }
  .fw-datebar-actions { gap: 8px; }
  .btn-new-job { flex-shrink: 0; padding: 0; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-new-job-icon { font-size: 20px; line-height: 1; }
  .btn-new-job-label { display: none; }
}
.fw-banner-success {
  background: #ecfdf3; color: #15803d; border: 1px solid #86efac; border-radius: 10px; padding: 12px 18px; font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.fw-banner-info {
  background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 10px; padding: 12px 18px; font-size: 13px; font-weight: 600; margin-bottom: 16px;
}

.fw-tabbar {
  background: linear-gradient(180deg, #43474b 0%, #34383c 100%);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 3px solid var(--orange);
  border-bottom: 3px solid var(--orange);
}
.fw-pill {
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--orange);
  text-decoration: none;
  margin-right: 4px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.fw-pill:hover { box-shadow: 0 2px 10px rgba(245, 166, 35, 0.35); }
.fw-pill.active { background: var(--orange); color: #fff; border-color: #fff; }

.fw-icon-btn {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e7c48a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
.fw-icon-btn svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.fw-icon-label { white-space: nowrap; }
.fw-icon-btn:hover {
  background: rgba(245, 166, 35, 0.18);
  color: #ffd79a;
  transform: translateY(-1px);
}
.fw-icon-btn.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.45);
}
#focusSearchBtn { margin-left: auto; }

/* On narrow screens, collapse back to icon-only to save space. */
@media (max-width: 1100px) {
  .fw-icon-label { display: none; }
  .fw-icon-btn { padding: 0; width: 42px; justify-content: center; }
}

/* On phones, the tab row still won't fit icon-only on one line — wrap it onto
   multiple rows instead of scrolling. */
@media (max-width: 640px) {
  .fw-tabbar { flex-wrap: wrap; row-gap: 10px; }
  #focusSearchBtn { margin-left: 0; }
  .fw-pill { height: 42px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 12px; margin-right: 0; }
  .fw-toolbar-actions { flex-wrap: wrap; }
}

.fw-toolbar {
  background: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid #eee;
}
.fw-search { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fw-search input[type=search] {
  border: 1px solid #d7dbd3; border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13px; min-width: 240px;
}
.fw-toolbar-actions { display: flex; gap: 8px; }
.btn-chip {
  background: #f4f7f2;
  border: 1px solid #d7dbd3;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-chip:hover { background: var(--orange-soft); }
.btn-chip.disabled { opacity: 0.45; cursor: default; pointer-events: none; }

.fw-pagination {
  background: #fff;
  padding: 14px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid #eee;
}
.fw-pagination-info { font-size: 13px; color: var(--muted); }
.fw-pagination-controls { display: flex; align-items: center; gap: 10px; }
.fw-pagination-page { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
#pageSizeForm { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
#pageSizeSelect {
  border: 1px solid #d7dbd3; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--ink);
}

.fw-table-wrap { background: #fff; padding: 0 24px 24px; overflow-x: auto; }
.fw-table-wrap table { font-size: 13px; }
.fw-table-wrap th.sortable { cursor: pointer; user-select: none; }
.fw-table-wrap th.sortable:hover { color: var(--green-deep); }
.fw-table-wrap th.chk, .fw-table-wrap td.chk { width: 32px; }
.job-no-box {
  display: inline-block;
  border: 1px solid #d7dbd3;
  border-radius: 6px;
  padding: 5px 10px;
  background: #fcfdfb;
  font-weight: 600;
}
.status-cell { white-space: nowrap; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.status-glyph { font-size: 13px; line-height: 1; }
.status-text { line-height: 1; }

.st-pending   { background: #fff7ed; color: #b45309; border-color: #fed7aa; }
.st-progress  { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.st-complete  { background: #ecfdf3; color: #15803d; border-color: #86efac; }
.st-cancelled { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.st-noorder   { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.st-unknown   { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.flag-btn, .pod-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #d7dbd3;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.flag-btn svg, .pod-icon-btn svg { width: 17px; height: 17px; display: block; }
.flag-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.pod-icon-btn:hover { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.fw-table-wrap th.actions-col { text-align: center; }
.actions-cell { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-wtn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-wtn:hover { background: var(--green-deep); }

/* ── Admin: manage logins ─────────────────────────────────────────────────── */
.admin-grid { grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-actions { display: flex; flex-direction: column; gap: 6px; }
.reset-form { display: flex; gap: 4px; }
.reset-form input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid #d7dbd3; border-radius: 8px; font: inherit; font-size: 12px; }
.admin-select {
  width: 100%; padding: 12px 14px; border: 1px solid #d7dbd3; border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.admin-grid .field label { color: var(--green-deep); }
.empty-row { text-align: center; color: var(--muted); padding: 32px 0 !important; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(245, 166, 35, 0.14);
  padding: 22px 24px;
}
.card h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-deep);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.grid { display: grid; gap: 20px; }
.grid > .card { min-width: 0; }
.detail-head { grid-template-columns: 1fr 1fr; margin-bottom: 20px; }
.products-card { margin-top: 4px; }

@media (max-width: 900px) {
  .detail-head { grid-template-columns: 1fr; }
}

/* Key/value list */
.kv { display: grid; gap: 10px; }
.kv > div { display: flex; justify-content: space-between; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 600; color: var(--ink); text-align: right; }
.kv dd .depot-email-link { font-weight: 400; color: var(--green-deep); text-decoration: none; }
.kv dd .depot-email-link:hover { text-decoration: underline; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--faint); padding: 8px 10px; border-bottom: 2px solid #eef0ea; }
td { padding: 10px; border-bottom: 1px solid #f1f3ee; color: var(--ink); }
td.num, th.num { text-align: right; }
tbody tr:last-child td { border-bottom: none; }
tfoot td { border-bottom: none; border-top: 2px solid #eef0ea; font-weight: 700; padding-top: 14px; }
.total-label { color: var(--muted); font-weight: 600; }
.total-value { color: var(--green-deep); font-size: 15px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--orange-soft); color: #9a5b00; }
.pill.status { align-self: flex-end; }

/* ── Sign in (immersive glass) ───────────────────────────────────────────────
   One continuous deep-forest scene: chevron texture, breathing amber droplet
   glow, slow-rising oil-droplet particles. The form floats in a frosted-glass
   card with an amber gradient CTA. Everything dark-glass is scoped under
   .auth-card so the admin page's .field/.btn-primary keep their light styling. */
.auth-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 88% 112%, rgba(28, 58, 44, 0.95), transparent 62%),
    linear-gradient(160deg, #0c1d15 0%, var(--forest) 48%, var(--forest-2) 100%);
}

.auth-brand-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M6 6 L18 22 L6 38' stroke='white' stroke-opacity='0.06' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 44px 44px;
}
.auth-brand-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--amber-glow) 0%, var(--orange) 38%, transparent 70%);
  filter: blur(14px);
  opacity: 0.28;
  animation: brand-breathe-center 7s ease-in-out infinite;
}
.auth-glow-2 {
  position: absolute;
  bottom: -18%;
  right: -8%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 175, 80, 0.5) 0%, rgba(28, 58, 44, 0.25) 45%, transparent 70%);
  filter: blur(30px);
  opacity: 0.5;
  animation: brand-breathe 11s ease-in-out infinite reverse;
}
@keyframes brand-breathe-center {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.26; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 0.38; }
}
@keyframes brand-breathe {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.08); opacity: 0.42; }
}

/* Slow-rising oil droplets */
.auth-drops span {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--amber-glow), var(--orange) 65%, transparent 100%);
  filter: blur(1px);
  opacity: 0;
  animation: drop-rise linear infinite;
}
.auth-drops span:nth-child(1) { left: 8%;  width: 7px;  height: 7px;  animation-duration: 22s; animation-delay: 0s; }
.auth-drops span:nth-child(2) { left: 23%; width: 5px;  height: 5px;  animation-duration: 28s; animation-delay: 6s; }
.auth-drops span:nth-child(3) { left: 38%; width: 9px;  height: 9px;  animation-duration: 19s; animation-delay: 11s; }
.auth-drops span:nth-child(4) { left: 57%; width: 4px;  height: 4px;  animation-duration: 30s; animation-delay: 3s; }
.auth-drops span:nth-child(5) { left: 74%; width: 6px;  height: 6px;  animation-duration: 24s; animation-delay: 14s; }
.auth-drops span:nth-child(6) { left: 90%; width: 8px;  height: 8px;  animation-duration: 21s; animation-delay: 8s; }
@keyframes drop-rise {
  0%   { transform: translateY(0);      opacity: 0; }
  8%   { opacity: 0.5; }
  85%  { opacity: 0.15; }
  100% { transform: translateY(-108vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-brand-glow, .auth-glow-2 { animation: none; }
  .auth-drops { display: none; }
}

.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  padding: 64px;
}
.auth-brand-content { position: relative; max-width: 440px; }
.auth-logo { height: 76px; width: auto; display: block; margin-bottom: 32px; filter: drop-shadow(0 6px 20px rgba(0,0,0,0.4)); }
.auth-eyebrow {
  color: var(--amber-glow);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 40px;
}
.auth-headline {
  color: #fff;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.auth-sub { color: rgba(255,255,255,0.66); font-size: 15px; line-height: 1.65; max-width: 380px; }

body.full-bleed .auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 48px;
}

.auth-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

/* Frosted-glass card */
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: card-in 0.5s ease-out both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
}

.auth-card h2 { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.auth-card .intro { font-size: 14px; color: rgba(255,255,255,0.62); margin: 8px 0 28px; line-height: 1.6; }

/* Generic light form styles (admin page etc.) */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--green-deep); margin-bottom: 6px; }
.field input[type=email], .field input[type=password], .field input[type=text] {
  width: 100%; padding: 12px 14px; border: 1px solid #d7dbd3; border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }

/* Dark-glass field overrides, sign-in card only */
.auth-card .field label { color: rgba(255, 255, 255, 0.82); }
.auth-card .field input[type=email], .auth-card .field input[type=password], .auth-card .field input[type=text] {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.auth-card .field input::placeholder { color: rgba(255, 255, 255, 0.35); }
.auth-card .field input:focus {
  border-color: var(--amber-glow);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.22);
}
.auth-card .field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #1c3a2c inset;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px !important; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 8px; color: var(--faint); cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.password-toggle:hover { color: var(--green-deep); background: var(--orange-soft); }
.password-toggle .icon-eye-off { color: var(--green-deep); }
.password-toggle svg[hidden] { display: none !important; }
.auth-card .password-toggle { color: rgba(255, 255, 255, 0.5); }
.auth-card .password-toggle:hover { color: var(--amber-glow); background: rgba(245, 166, 35, 0.16); }
.auth-card .password-toggle .icon-eye-off { color: var(--amber-glow); }

.btn-spinner[hidden] { display: none !important; }

.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.auth-card .check { color: rgba(255, 255, 255, 0.68); }
.auth-card .check input[type=checkbox] { accent-color: var(--orange); }

.btn-primary {
  width: 100%; background: var(--green-deep); color: #fff; border: none; border-radius: 10px; padding: 13px;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { background: #245e28; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(46, 125, 50, 0.25); }
.btn-primary:disabled { opacity: 0.85; cursor: default; transform: none; }

/* Amber gradient CTA with shine sweep, sign-in card only */
.auth-card .btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange) 0%, var(--amber-glow) 100%);
  color: #12271e;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.3);
}
.auth-card .btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.auth-card .btn-primary:hover {
  background: linear-gradient(135deg, var(--orange) 0%, var(--amber-glow) 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(245, 166, 35, 0.45);
}
.auth-card .btn-primary:hover::after { left: 120%; }
@media (prefers-reduced-motion: reduce) {
  .auth-card .btn-primary::after { display: none; }
}

.btn-spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 1.6s; }
}

.page-loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(255, 255, 255, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.page-loading-overlay[hidden] { display: none !important; }
.page-loading-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid rgba(46, 125, 50, 0.2);
  border-top-color: var(--green-deep);
  animation: spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .page-loading-spinner { animation-duration: 1.6s; }
}

.error-summary { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13px; border-radius: 12px; padding: 6px 14px; margin-bottom: 18px; }
.error-summary ul { list-style: none; margin: 0; padding: 0; }
.error-summary li { margin: 0; }
.auth-card .error-summary { background: rgba(220, 38, 38, 0.16); border-color: rgba(252, 165, 165, 0.4); color: #fecaca; }
.hint { font-size: 12px; color: var(--faint); text-align: center; margin-top: 22px; line-height: 1.6; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { padding: 44px 28px 8px; }
  .auth-logo { height: 54px; margin-bottom: 20px; }
  .auth-headline { font-size: 26px; }
  .auth-sub { display: none; }
  .auth-brand-glow { width: 300px; height: 300px; }
  body.full-bleed .auth-panel { padding: 28px 20px 56px; }
  .auth-card { padding: 32px 24px; }
}

/* ── Create Job form ───────────────────────────────────────────────────────── */
.cj-card { margin-bottom: 20px; }
.cj-error { display: block; color: #b91c1c; font-size: 12px; margin-top: 4px; }

/* Uniform aligned field grid — every input the same size, laid out in columns. */
.cj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
.cj-fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cj-fld.cj-span2 { grid-column: span 2; }
.cj-fld.cj-span3 { grid-column: 1 / -1; }
.cj-fld label { font-size: 12px; font-weight: 600; color: var(--green-deep); text-transform: uppercase; letter-spacing: 0.4px; }
.cj-req { color: #b3261e; }
.cj-fld input, .cj-fld select {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d7dbd3; border-radius: 10px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cj-fld input:focus, .cj-fld select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.cj-fld input[readonly] { background: #f4f7f2; color: var(--muted); }
.cj-rate-inline, .cj-time-inline { display: flex; gap: 8px; }
.cj-rate-inline select { flex: 0 0 110px; }
.cj-rate-inline input { flex: 1; }
.cj-time-inline input { flex: 1; }

@media (max-width: 900px) { .cj-grid { grid-template-columns: repeat(2, 1fr); } .cj-fld.cj-span2 { grid-column: span 2; } }
@media (max-width: 560px) { .cj-grid { grid-template-columns: 1fr; } .cj-fld.cj-span2 { grid-column: span 1; } }

/* Tabs */
.cj-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 2px solid #eef0ea; }
.cj-tab {
  background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  padding: 8px 18px; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.cj-tab.active { color: var(--green-deep); border-bottom-color: var(--orange); }
.cj-products-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cj-notes { width: 100%; padding: 12px 14px; border: 1px solid #d7dbd3; border-radius: 10px; font: inherit; font-size: 14px; }
.cj-notes:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.cj-muted { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

.cj-site-mode { display: flex; gap: 20px; margin-bottom: 18px; }
.cj-site-mode label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cj-site-mode input[type=radio] { accent-color: var(--green-deep); }

/* New-site / existing-site wrappers exist only to show or hide each path as a unit — display:contents
   keeps their fields laying out in the parent .cj-grid exactly as if the wrapper weren't there. */
.cj-site-block { display: contents; }
.cj-site-block[hidden] { display: none; }

.btn-add-product { background: var(--green); color: #fff; border: none; border-radius: 8px; padding: 9px 16px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-add-product:hover { background: var(--green-deep); }

.cj-products-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cj-products-table th { background: #f4f7f2; color: var(--green-deep); padding: 8px 6px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid #eef0ea; }
.cj-products-table td { padding: 6px; border-bottom: 1px solid #f1f3ee; }
.cj-products-table input, .cj-products-table select { width: 100%; padding: 7px 8px; border: 1px solid #d7dbd3; border-radius: 8px; font: inherit; font-size: 13px; }
/* The item column is auto-sized by an 8-column table and ends up too narrow for the longest
   code (UCO-120): its text alone fits, but the native dropdown arrow then clips it. */
.cj-products-table .descr { min-width: 110px; }
.cj-products-table input:focus, .cj-products-table select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-soft); }
.cj-products-table input[readonly] { background: #f4f7f2; color: var(--muted); }
.btn-remove-row { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 13px; }
.btn-remove-row:hover { background: #dc2626; color: #fff; }

.cj-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.btn-save { background: var(--green); color: #fff; border: none; border-radius: 10px; padding: 11px 24px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-save:hover { background: var(--green-deep); }
.btn-clear { background: var(--orange-soft); color: #9a5b00; border: none; border-radius: 10px; padding: 11px 22px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-clear:hover { background: rgba(245, 166, 35, 0.28); }
.btn-close { background: #f3f4f6; color: var(--muted); border-radius: 10px; padding: 11px 22px; font-size: 14px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; }
.btn-close:hover { background: #e5e7eb; }
.btn-save { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-save:disabled { opacity: 0.75; cursor: progress; }

/* ── Address lookup (Google Places, proxied via the page handlers) ──────────── */
.cj-lookup { position: relative; }
.cj-lookup-results {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  box-shadow: var(--card-shadow); max-height: 260px; overflow-y: auto; display: none;
}
.cj-lookup-results.show { display: block; }
.cj-lookup-results .opt {
  padding: 11px 14px; cursor: pointer; font-size: 13.5px; border-bottom: 1px solid #f1f3f5;
}
.cj-lookup-results .opt:last-child { border-bottom: none; }
.cj-lookup-results .opt:hover,
.cj-lookup-results .opt.active { background: var(--orange-soft); }
.cj-lookup-results .opt .cj-opt-pc { float: right; margin-left: 12px; color: var(--muted); font-size: 12.5px; }
.cj-lookup-results .opt.muted { color: var(--muted); cursor: default; }
.cj-lookup-results .opt.muted:hover { background: none; }
.cj-link-toggle {
  background: none; border: none; color: var(--green-deep); text-decoration: underline;
  cursor: pointer; font: inherit; font-size: 12.5px; padding: 8px 0 0; align-self: flex-start;
}
/* The manual address fields: one full-width block with its own grid, so Address 1/2 get a
   wide row and Town/County/Postcode sit together underneath — never split across the
   parent grid's columns alongside Date or the contact fields. */
.cj-addr-block {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px;
}
.cj-addr-block[hidden] { display: none; }
.cj-addr-block .cj-fld.cj-addr-wide { grid-column: span 3; }

/* Confirmation of the address captured by the lookup, shown instead of expanding the fields. */
.cj-addr-picked {
  font-size: 12.5px; color: var(--muted); margin-top: 8px;
  padding-left: 12px; border-left: 3px solid var(--green);
}
.cj-addr-picked[hidden] { display: none; }
.cj-addr-picked .cj-picked-name { display: block; font-weight: 700; color: var(--ink); }
.cj-addr-picked .cj-picked-addr { display: block; margin-top: 2px; }
.cj-addr-picked .cj-picked-addr:empty { display: none; }
.cj-addr-picked .cj-link-toggle { display: inline-block; padding: 6px 0 0; font-size: 12px; }

@media (max-width: 900px) {
  .cj-addr-block { grid-template-columns: repeat(2, 1fr); }
  .cj-addr-block .cj-fld.cj-addr-wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .cj-addr-block { grid-template-columns: 1fr; }
  .cj-addr-block .cj-fld.cj-addr-wide { grid-column: span 1; }
}

/* ── Saving overlay: the brand oil-drop filling while the order is written ──── */
.cj-saving {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(244, 247, 242, 0.82);
  backdrop-filter: blur(3px);
  animation: cj-saving-in 0.2s ease both;
}
.cj-saving[hidden] { display: none; }
@keyframes cj-saving-in { from { opacity: 0; } to { opacity: 1; } }

.cj-saving-box {
  background: #fff; border-radius: 18px; padding: 34px 44px 28px;
  box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: calc(100vw - 40px);
}
.cj-saving-title { font-size: 16px; font-weight: 700; color: var(--green-deep); margin-top: 18px; }
.cj-saving-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

.cj-drop { animation: cj-drop-bob 2.4s ease-in-out infinite; }
.cj-drop-outline { fill: var(--orange-soft); stroke: var(--orange); stroke-width: 3; }
/* The rect rides up through the clipped droplet, so the drop reads as filling with oil. */
.cj-drop-fill {
  fill: var(--orange);
  transform: translateY(88px);
  animation: cj-drop-fill 1.9s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes cj-drop-fill {
  0%   { transform: translateY(88px); opacity: 0.9; }
  70%  { transform: translateY(0); opacity: 0.9; }
  100% { transform: translateY(-6px); opacity: 0; }
}
@keyframes cj-drop-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
  .cj-saving { animation: none; }
  .cj-drop { animation: none; }
  .cj-drop-fill { animation-duration: 3.8s; }
}

/* ── Proof of Delivery ──────────────────────────────────────────────────────── */
.pod-cta { margin-top: 20px; }
.btn-pod {
  display: inline-flex;
  align-items: center;
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.btn-pod:hover { background: #ede9fe; box-shadow: 0 4px 12px rgba(109, 40, 217, 0.18); }

.pod-wrap { max-width: 760px; }
.pod-doc {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(245, 166, 35, 0.14);
  padding: 36px 40px;
}
.pod-doc-head { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 2px solid #eef0ea; }
.pod-logo { height: 40px; width: auto; }
.pod-doc-title { font-size: 20px; font-weight: 700; color: var(--green-deep); }
.pod-doc-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.pod-meta { grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-bottom: 28px; }
.pod-meta > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed #eef0ea; padding-bottom: 6px; }
.pod-meta dt { color: var(--muted); }
.pod-meta dd { font-weight: 600; color: var(--ink); text-align: right; }

.pod-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 28px; }
.pod-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--faint); padding: 8px 10px; border-bottom: 2px solid #eef0ea; }
.pod-table td { padding: 10px; border-bottom: 1px solid #f1f3ee; color: var(--ink); }
.pod-table td.num, .pod-table th.num { text-align: right; }

.pod-statement { font-size: 14px; color: var(--ink); line-height: 1.6; margin-bottom: 32px; }

.pod-signoff { display: flex; flex-direction: column; align-items: flex-start; max-width: 320px; }
.pod-signature {
  font-family: 'Segoe Script', 'Brush Script MT', 'Lucida Handwriting', cursive;
  font-size: 40px;
  color: #1c3a2c;
  line-height: 1;
  margin-bottom: 6px;
}
.pod-signature-line { width: 100%; border-top: 2px solid #333; margin-bottom: 6px; }
.pod-signed-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--faint); margin-bottom: 4px; }
.pod-signed-meta { font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .pod-doc { padding: 24px 20px; }
  .pod-meta { grid-template-columns: 1fr; }
}
