.signup-page .top {
  justify-content: space-between;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-deep);
  text-decoration: none;
}

.signup-main {
  position: relative;
  z-index: 1;
  padding: 1rem clamp(1rem, 4vw, 2.5rem) 3rem;
  display: flex;
  justify-content: center;
}

.signup-card {
  width: min(820px, 100%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(11, 122, 43, 0.12);
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 20px 50px rgba(6, 56, 22, 0.08);
}

.signup-logo {
  display: block;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(11, 122, 43, 0.18);
}

.signup-card h1 {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
}

.signup-lead {
  text-align: center;
  color: rgba(18, 32, 24, 0.65);
  margin: 0.5rem 0 1.5rem;
  font-size: 0.98rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .signup-main {
    padding: 0.5rem 0.85rem 2.5rem;
  }

  .signup-card {
    border-radius: 1.15rem;
    padding: 1.15rem 1rem 1.35rem;
  }

  .signup-logo {
    width: 72px;
    height: 72px;
  }

  .signup-card h1 {
    font-size: 1.45rem;
  }

  .signup-lead {
    font-size: 0.92rem;
    margin-bottom: 1.15rem;
  }

  .form-grid input,
  .form-grid select,
  .login-form input,
  .otp-input {
    font-size: 16px; /* avoid iOS zoom on focus */
    min-height: 48px;
    padding: 0.8rem 0.9rem;
  }

  .submit-btn {
    min-height: 48px;
    margin-top: 1rem;
  }

  .driver-home-head {
    flex-direction: column;
    align-items: stretch;
  }

  .driver-home-head h1 {
    font-size: 1.35rem;
  }

  .refresh-btn {
    align-self: flex-start;
    min-height: 40px;
  }

  .booking-card {
    padding: 0.9rem;
  }

  .booking-card-top {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .booking-actions {
    grid-template-columns: 1fr;
  }

  .accept-btn,
  .decline-btn,
  .start-btn,
  .complete-btn {
    min-height: 48px;
    width: 100%;
  }

  .profile-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .profile-row strong {
    text-align: left;
  }
}

.form-grid label,
.cities-field,
.vehicle-category-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

/* display:flex on labels otherwise ignores the HTML hidden attribute */
.form-grid label[hidden],
.vehicle-category-wrap label[hidden],
.vehicle-category-wrap.is-collapsed {
  display: none !important;
}

.vehicle-category-wrap:not(.is-collapsed) {
  display: flex;
}

.form-grid label span,
.field-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 32, 24, 0.55);
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(18, 32, 24, 0.12);
  border-radius: 0.75rem;
  background: #f7faf5;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 122, 43, 0.12);
}

.cities-box {
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(18, 32, 24, 0.12);
  border-radius: 0.75rem;
  background: #f7faf5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: rgba(18, 32, 24, 0.45);
  font-size: 0.9rem;
}

.city-chip {
  border: 1px solid rgba(18, 32, 24, 0.12);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.city-chip.selected {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.hint {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(18, 32, 24, 0.45);
}

.submit-btn {
  margin-top: 1.25rem;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(11, 122, 43, 0.22);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alert {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #fff1f1;
  border: 1px solid #ffd0d0;
  color: #9f1d1d;
  font-size: 0.9rem;
}

.success {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 1rem;
  background: #edf9e8;
  border: 1px solid #c6ebba;
  color: var(--green-deep);
}

.success[hidden],
.alert[hidden] {
  display: none !important;
}

.success a {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--green);
  font-weight: 700;
}

.login-card {
  width: min(440px, 100%);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.login-form label span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 32, 24, 0.55);
}

.login-form input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(18, 32, 24, 0.12);
  border-radius: 0.75rem;
  background: #f7faf5;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
}

.login-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 122, 43, 0.12);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 4.25rem;
}

.password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--green-deep);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.auth-switch {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: rgba(18, 32, 24, 0.6);
}

.auth-switch a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.nav-button {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.driver-profile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(18, 32, 24, 0.08);
  text-align: left;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 32, 24, 0.55);
}

.profile-row strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.status-pill[data-status='approved'] {
  color: var(--green-deep);
}

.status-pill[data-status='pending'] {
  color: #9a6700;
}

.status-pill[data-status='blocked'] {
  color: #9f1d1d;
}

.driver-main {
  padding-bottom: 4rem;
}

.driver-home-card {
  width: min(720px, 100%);
}

.duty-toggle-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 0 1.35rem;
}

.duty-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: min(100%, 340px);
  min-height: 4.25rem;
  border: 2px solid rgba(18, 32, 24, 0.14);
  background: #eef1ee;
  color: rgba(18, 32, 24, 0.72);
  border-radius: 1.25rem;
  padding: 0.85rem 1.25rem;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(18, 32, 24, 0.08);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.duty-toggle:hover:not(:disabled),
.duty-toggle:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 14px 28px rgba(18, 32, 24, 0.12);
}

.duty-toggle:disabled {
  opacity: 0.6;
  cursor: wait;
}

.duty-toggle-track {
  position: relative;
  width: 3.6rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(18, 32, 24, 0.28);
  flex-shrink: 0;
  transition: background 0.22s ease;
}

.duty-toggle-knob {
  position: absolute;
  top: 0.22rem;
  left: 0.22rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease;
}

.duty-toggle-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: left;
  min-width: 0;
}

.duty-toggle-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.duty-toggle-hint {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.72;
  line-height: 1.2;
}

.duty-toggle[aria-pressed='true'] {
  background: linear-gradient(165deg, #1fa64a 0%, #0b7a2b 78%);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 14px 30px rgba(11, 122, 43, 0.32);
}

.duty-toggle[aria-pressed='true']:hover:not(:disabled),
.duty-toggle[aria-pressed='true']:focus-visible:not(:disabled) {
  box-shadow: 0 18px 34px rgba(11, 122, 43, 0.4);
}

.duty-toggle[aria-pressed='true'] .duty-toggle-track {
  background: rgba(255, 255, 255, 0.28);
}

.duty-toggle[aria-pressed='true'] .duty-toggle-knob {
  transform: translateX(1.55rem);
}

.duty-toggle[aria-pressed='true'] .duty-toggle-hint {
  opacity: 0.88;
}

.duty-off-note {
  margin: 1rem 0 0;
  padding: 1rem;
  border-radius: 0.9rem;
  background: #f7faf5;
  border: 1px dashed rgba(18, 32, 24, 0.12);
  color: rgba(18, 32, 24, 0.6);
  font-size: 0.92rem;
  text-align: center;
}

.driver-home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.driver-home-head h1 {
  margin: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.driver-home-head .signup-lead {
  text-align: left;
  margin: 0.35rem 0 0;
}

.refresh-btn {
  flex-shrink: 0;
  border: 1px solid rgba(11, 122, 43, 0.25);
  background: #fff;
  color: var(--green-deep);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.driver-section {
  margin-top: 1.5rem;
}

.driver-section h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.section-hint {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: rgba(18, 32, 24, 0.55);
}

.booking-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.empty-note {
  margin: 0;
  padding: 1rem;
  border-radius: 0.9rem;
  background: #f7faf5;
  border: 1px dashed rgba(18, 32, 24, 0.12);
  color: rgba(18, 32, 24, 0.5);
  font-size: 0.9rem;
  text-align: center;
}

.booking-card {
  border: 1px solid rgba(11, 122, 43, 0.12);
  border-radius: 1rem;
  padding: 1rem;
  background: #fff;
  text-align: left;
}

.booking-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.booking-card-top strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.booking-fare {
  font-weight: 700;
  color: var(--green-deep);
}

.booking-route {
  margin: 0.25rem 0;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.35;
}

.booking-route span {
  display: inline-block;
  min-width: 2.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(18, 32, 24, 0.45);
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: rgba(18, 32, 24, 0.6);
}

.booking-receiver {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(26, 77, 58, 0.08);
  border: 1px solid rgba(26, 77, 58, 0.12);
}

.booking-receiver-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a4d3a;
}

.booking-receiver .booking-meta {
  margin-top: 0.35rem;
  color: rgba(18, 32, 24, 0.75);
  font-weight: 600;
}

.booking-otp {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: #edf9e8;
  color: var(--green-deep);
  font-size: 0.9rem;
}

.booking-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.accept-btn,
.decline-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.accept-btn {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 122, 43, 0.18);
}

.accept-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.decline-btn {
  background: #fff1f1;
  color: #9f1d1d;
  border: 1px solid #ffd0d0;
}

.accepted-badge {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-deep);
}

.booking-status-line {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: rgba(18, 32, 24, 0.55);
}

.booking-status-line strong {
  color: var(--green-deep);
}

.booking-type-line {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: rgba(18, 32, 24, 0.55);
}

.booking-type-line strong {
  color: var(--green-deep);
}

.ride-step-hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: rgba(18, 32, 24, 0.6);
  line-height: 1.4;
}

.otp-start-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: end;
  margin-top: 0.85rem;
}

.otp-start-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.otp-start-row label span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 32, 24, 0.55);
}

.otp-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(18, 32, 24, 0.12);
  border-radius: 0.75rem;
  background: #f7faf5;
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--ink);
  outline: none;
}

.otp-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 122, 43, 0.12);
}

.start-btn,
.complete-btn {
  white-space: nowrap;
  min-width: 7.5rem;
}

.booking-actions-single {
  grid-template-columns: 1fr;
}

.payment-actions {
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.pay-option-hint {
  margin-top: 0.75rem;
  font-weight: 600;
}

.pay-cash-btn,
.pay-company-btn {
  border-radius: 999px;
  min-height: 2.75rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(18, 32, 24, 0.14);
}

.pay-cash-btn {
  background: #1f9d55;
}

.pay-cash-btn:hover,
.pay-cash-btn:focus-visible {
  background: #188a49;
}

.pay-company-btn {
  background: #1a4d3a;
}

.pay-company-btn:hover,
.pay-company-btn:focus-visible {
  background: #143d2e;
}

.company-pay-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 56, 22, 0.45);
  backdrop-filter: blur(4px);
}

.company-pay-modal[hidden] {
  display: none;
}

.company-pay-sheet {
  width: min(420px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  background: #eef2f6;
  border-radius: 1.25rem;
  padding: 1.15rem 1rem 1.25rem;
  box-shadow: 0 18px 48px rgba(6, 56, 22, 0.28);
  text-align: center;
}

.company-pay-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--green-deep);
}

.company-pay-amount {
  margin: 0.35rem 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.company-pay-qr-wrap {
  background: #fff;
  border-radius: 1rem;
  padding: 0.65rem;
  box-shadow: 0 2px 10px rgba(18, 32, 24, 0.08);
}

.company-pay-qr {
  display: block;
  width: 100%;
  height: auto;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 0.65rem;
  background: #fff;
}

.company-pay-hint {
  margin: 0.9rem 0 1rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(18, 32, 24, 0.62);
}

.company-pay-received-btn {
  width: 100%;
  min-height: 3rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(18, 32, 24, 0.14);
}

.company-pay-back-btn {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  border: none;
  background: transparent;
  color: rgba(18, 32, 24, 0.55);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.55rem;
}

.company-pay-back-btn:hover,
.company-pay-back-btn:focus-visible {
  color: var(--green-deep);
}

.arrived-btn {
  border-radius: 999px;
  min-height: 2.75rem;
  font-weight: 700;
  background: #0f6fbf;
  box-shadow: 0 4px 12px rgba(15, 111, 191, 0.22);
}

.arrived-btn:hover,
.arrived-btn:focus-visible {
  background: #0c5c9f;
}

@media (max-width: 520px) {
  .otp-start-row {
    grid-template-columns: 1fr;
  }
}

.profile-details {
  margin-top: 1.75rem;
  border-top: 1px solid rgba(18, 32, 24, 0.08);
  padding-top: 1rem;
}

.profile-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--green-deep);
  font-size: 0.95rem;
}

.profile-details .driver-profile {
  margin-top: 0.75rem;
}

.driver-doc-upload {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.driver-doc-upload label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.driver-doc-upload a {
  font-size: 0.78rem;
  font-weight: 700;
}
