/* Customer account — aligned workspace */
.account-page {
  --acc-navy: #16324f;
  --acc-teal: #006b70;
  --acc-ink: #1d2939;
  --acc-muted: #64748b;
  --acc-line: #e2e8f0;
  --acc-soft: #f1f5f5;
  --acc-paper: #ffffff;
  --acc-radius: 14px;
  padding: 36px 0 72px;
  background: #f5f8f8;
  color: var(--acc-ink);
  font-family: Manrope, Segoe UI, sans-serif;
}

.account-shell {
  max-width: 1100px;
  margin: 0 auto;
}

/* Top bar */
.account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: var(--acc-paper);
  border: 1px solid var(--acc-line);
  border-radius: var(--acc-radius);
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  background: var(--acc-teal);
  overflow: hidden;
  position: relative;
}

.account-avatar.has-photo {
  background: #e2e8f0;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  font-size: 26px;
}

.account-photo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 20px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--acc-line);
}

.account-photo-copy strong {
  display: block;
  font-size: 14px;
  color: var(--acc-navy);
  margin-bottom: 2px;
}

.account-photo-copy p {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--acc-muted);
}

.account-photo-btn {
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
}

.account-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.account-identity-text {
  min-width: 0;
}

.account-identity-text h1 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--acc-navy);
  font-weight: 800;
}

.account-identity-text p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--acc-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}

.account-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
}

.account-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.account-top-actions form {
  margin: 0;
}

/* Buttons */
.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  font: 700 13px/1 Manrope, Segoe UI, sans-serif;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.account-btn-primary {
  background: var(--acc-teal);
  color: #fff !important;
}

.account-btn-primary:hover {
  background: #00565a;
  color: #fff !important;
}

.account-btn-ghost {
  background: #fff;
  color: #7a3b32 !important;
  border: 1px solid #e7c2bb;
}

.account-btn-ghost:hover {
  background: #fff5f2;
}

.account-btn-track {
  background: var(--acc-navy);
  color: #fff !important;
  min-width: 132px;
}

.account-btn-track:hover {
  background: #10263c;
  color: #fff !important;
}

/* Flash */
.account-flash {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.account-flash.is-ok {
  background: #eaf7f2;
  border: 1px solid #c7e6da;
  color: #21624f;
}

.account-flash.is-error {
  background: #fff1ee;
  border: 1px solid #ecc6bf;
  color: #8f3d31;
}

/* Stats */
.account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.account-stat {
  padding: 14px 16px;
  border-radius: var(--acc-radius);
  background: var(--acc-paper);
  border: 1px solid var(--acc-line);
}

a.account-stat.is-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.account-stat.is-link:hover {
  border-color: color-mix(in srgb, var(--acc-teal) 35%, var(--acc-line));
  box-shadow: 0 8px 18px rgba(22, 50, 79, 0.06);
  transform: translateY(-1px);
}

a.account-stat.is-link.is-active {
  border-color: var(--acc-teal);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc-teal) 35%, transparent);
}

.account-stat span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b8090;
}

.account-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--acc-navy);
}

/* Layout: nav + content */
.account-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--acc-paper);
  border: 1px solid var(--acc-line);
  border-radius: var(--acc-radius);
  position: sticky;
  top: 16px;
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #40566a;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
}

.account-nav-item i {
  font-size: 16px;
  width: 18px;
  text-align: center;
  color: #7b8f9e;
}

.account-nav-item em {
  font-style: normal;
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--acc-soft);
  color: var(--acc-navy);
  font-size: 11px;
}

.account-nav-item.is-active {
  background: color-mix(in srgb, var(--acc-teal) 10%, #fff);
  color: var(--acc-teal);
}

.account-nav-item.is-active i {
  color: var(--acc-teal);
}

.account-nav-item:hover:not(.is-active) {
  background: #f8fafb;
}

.account-nav-logout {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--acc-line);
}

.account-nav-logout .account-nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.account-nav-item.is-logout {
  color: #9a4034;
}

.account-nav-item.is-logout i {
  color: #9a4034;
}

.account-nav-item.is-logout:hover {
  background: #fff5f2;
}

.account-main {
  min-width: 0;
}

.account-panel {
  background: var(--acc-paper);
  border: 1px solid var(--acc-line);
  border-radius: var(--acc-radius);
  padding: 22px 22px 20px;
}

.account-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--acc-line);
}

.account-panel-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--acc-navy);
  font-weight: 800;
}

.account-panel-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--acc-muted);
}

/* Forms */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-form-narrow {
  max-width: 640px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
}

.account-field-full {
  grid-column: 1 / -1;
}

.account-field label {
  font-size: 12px;
  font-weight: 700;
  color: #395268;
}

.account-field input {
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  border: 1px solid #ccd9df;
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: var(--acc-ink);
  font: 500 14px/1.4 Manrope, Segoe UI, sans-serif;
}

.account-field input:focus-visible {
  outline: 3px solid #b0dbd7;
  outline-offset: 1px;
  border-color: var(--acc-teal);
}

.account-field small {
  font-size: 11px;
  color: #708190;
}

.account-field-error {
  color: #923a2e !important;
}

.account-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--acc-line);
}

.account-meta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0;
}

.account-meta-inline > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-meta-inline dt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b8090;
}

.account-meta-inline dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--acc-navy);
}

.account-tips {
  margin: 0;
  padding-left: 18px;
  color: #526778;
  font-size: 12.5px;
  line-height: 1.7;
  max-width: 42ch;
}

/* Journeys */
.account-journey-list {
  display: grid;
  gap: 12px;
}

.account-journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 20px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 12px;
  background: #fafcfc;
  border: 1px solid var(--acc-line);
}

.account-journey-body {
  min-width: 0;
}

.account-journey-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.account-journey-ref {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--acc-teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.account-journey-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}

.account-journey-point {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a9aaa;
  margin-bottom: 2px;
}

.account-journey-route strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--acc-navy);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.account-journey-arrow {
  padding-top: 16px;
  color: #94a3b8;
  font-weight: 700;
}

.account-journey-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: #6c8090;
}

.account-journey-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.account-journey-meta i {
  color: var(--acc-teal);
  font-size: 13px;
}

.account-driver {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8eef2;
}

.account-driver[hidden] {
  display: none !important;
}

.account-driver-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #16324f;
}

.account-driver-facts {
  margin: 0;
  display: grid;
  gap: 0;
}

.account-driver-facts > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #eef3f6;
  font-size: 13px;
}

.account-driver-facts > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-driver-facts dt {
  margin: 0;
  color: #7d91a2;
  font-weight: 650;
}

.account-driver-facts dd {
  margin: 0;
  font-weight: 750;
  color: #16324f;
  overflow-wrap: anywhere;
}

.account-driver-facts a {
  color: var(--acc-teal, #006b70);
  text-decoration: none;
}

.account-journey-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.account-quote-form {
  margin: 0;
  display: inline-flex;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.account-badge-live {
  background: #e8f3ff;
  color: #1d4f91;
}

.account-badge-action {
  background: #fff4e5;
  color: #9a5b00;
}

.account-badge-ok {
  background: #e8f7ef;
  color: #147a45;
}

.account-badge-muted {
  background: #eef2f4;
  color: #5b6b78;
}

.account-empty {
  padding: 40px 24px;
  border-radius: 12px;
  background: #fafcfc;
  border: 1px dashed #c9d7da;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.account-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--acc-teal) 12%, #fff);
  color: var(--acc-teal);
  font-size: 24px;
  margin-bottom: 12px;
}

.account-empty h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--acc-navy);
}

.account-empty p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--acc-muted);
  max-width: 36ch;
}

.account-pager {
  margin-top: 16px;
}

@media (max-width: 991px) {
  .account-layout {
    grid-template-columns: 1fr;
  }

  .account-nav {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
    gap: 6px;
  }

  .account-nav-item {
    flex: 1 1 calc(50% - 6px);
  }

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

@media (max-width: 720px) {
  .account-top {
    flex-direction: column;
    align-items: stretch;
  }

  .account-top-actions {
    width: 100%;
  }

  .account-top-actions .account-btn,
  .account-top-actions form {
    flex: 1;
  }

  .account-top-actions form .account-btn {
    width: 100%;
  }

  .account-form-grid {
    grid-template-columns: 1fr;
  }

  .account-form-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .account-form-foot .account-btn {
    width: 100%;
  }

  .account-journey {
    grid-template-columns: 1fr;
  }

  .account-journey-actions {
    justify-content: stretch;
  }

  .account-journey-actions .account-btn,
  .account-quote-form {
    width: 100%;
  }

  .account-btn-track {
    width: 100%;
  }

  .account-journey-route {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .account-journey-arrow {
    display: none;
  }
}

@media (max-width: 640px) {
  .account-page {
    padding: 24px 0 48px;
  }

  .account-panel {
    padding: 16px;
  }

  .account-stat strong {
    font-size: 22px;
  }
}

/* Auth / driver / admin portal shell */
.portal-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f2f7f6;
  color: #1d2939;
  font-family: Manrope, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.portal-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.portal-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-header .spg-brand {
  flex-shrink: 0;
}

.portal-back {
  font-family: Manrope, Segoe UI, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--site-navy, #16324f) !important;
  text-decoration: none !important;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.portal-back:hover {
  background: #f1f5f5;
  color: var(--site-primary, #006b70) !important;
}

.portal-main {
  flex: 1 0 auto;
  width: 100%;
}

.portal-footer {
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.portal-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  font-family: Manrope, Segoe UI, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}

/* Legacy hooks used by auth/login pages */
.account-section {
  padding: 64px 24px 80px;
  background: #f2f7f6;
  color: #1d2939;
  font-family: Manrope, Segoe UI, sans-serif;
}

.account-section .account-shell {
  max-width: 1060px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 72px;
  align-items: start;
  margin: 0 auto;
}

.account-intro {
  padding-top: 24px;
}

.account-intro > p {
  color: #617588;
  font-size: 15px;
  line-height: 1.9;
  margin: 0;
  max-width: 470px;
}

.account-card {
  background: #fff;
  border: 1px solid #dce6e7;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 6px 24px #16324f05;
}

.account-card h2 {
  font-size: 22px;
  color: var(--site-navy, #16324f);
  margin: 0 0 8px;
}

.account-card-note {
  color: #708190;
  font-size: 12px;
  margin: 0 0 24px;
}

.account-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--site-primary, #006b70);
  color: #fff !important;
  border: 0;
  border-radius: 10px;
  font: 700 13px/1.6 Manrope, Segoe UI, sans-serif;
  cursor: pointer;
  text-decoration: none !important;
}

.account-button:hover {
  filter: brightness(0.94);
}

.account-message,
.account-error {
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.account-message {
  background: #eaf6f2;
  color: #256251;
  border: 1px solid #c9e4d9;
}

.account-error {
  background: #fff0ec;
  color: #923a2e;
  border: 1px solid #eccdc4;
}

.account-link {
  font-weight: 700;
  color: var(--site-primary, #006b70);
  text-decoration: none;
}

.account-eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--site-primary, #006b70);
}

.account-intro h1 {
  font-size: 40px;
  line-height: 1.2;
  color: var(--site-navy, #16324f);
  letter-spacing: -1px;
  margin: 14px 0 20px;
}

.account-alternative {
  font-size: 12px;
  color: #687e8d;
  text-align: center;
  margin: 24px 0 0;
  line-height: 1.8;
}

.account-alternative a {
  color: var(--site-primary, #006b70);
  font-weight: 700;
  text-decoration: none;
}

.account-alternative a:hover {
  text-decoration: underline;
}

.account-section .account-field {
  margin-bottom: 16px;
}

.account-check {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  color: #617588;
  margin: 4px 0 24px;
}

.account-assurance {
  margin-top: 36px;
  border-top: 1px solid #d5e5e2;
  padding-top: 24px;
}

.account-assurance strong {
  font-size: 15px;
  color: var(--site-navy, #16324f);
}

.account-assurance p {
  font-size: 13px;
  color: #6b7f8b;
  line-height: 1.8;
  max-width: 420px;
}

@media (max-width: 767px) {
  .account-section {
    padding: 32px 16px 48px;
  }

  .account-intro h1 {
    font-size: 30px;
  }

  .account-section .account-shell {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
