/* PMO-style auth pages for driver portal */
:root {
  --pmo-red: #E4002B;
  --pmo-red-dark: #C40024;
  --pmo-bg: #F5F5F5;
  --pmo-white: #FFFFFF;
  --pmo-text: #1A1A1A;
  --pmo-muted: #888888;
  --pmo-border: #E0E0E0;
  --pmo-radius: 10px;
  --pmo-max: 430px;
  --pmo-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body.driver-auth-body {
  font-family: var(--pmo-font);
  background: var(--pmo-bg);
  color: var(--pmo-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

@media (min-width: 431px) {
  html, body.driver-auth-body {
    display: flex;
    justify-content: center;
    background: #E8E8E8;
  }
  .pmo-auth-page {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
  }
}

.pmo-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--pmo-max);
  margin: 0 auto;
  background: var(--pmo-white);
}

.pmo-auth-hero {
  position: relative;
  flex: 0 0 42vh;
  min-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 32px;
  color: var(--pmo-white);
  text-align: center;
  background: linear-gradient(145deg, #E4002B 0%, #B8001F 45%, #1A1A1A 100%);
}

.pmo-auth-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.pmo-auth-hero > * { position: relative; z-index: 2; }

.pmo-auth-logo-img img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.pmo-auth-hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pmo-auth-hero p {
  font-size: 15px;
  opacity: 0.92;
  font-weight: 400;
  max-width: 280px;
}

.pmo-auth-form {
  flex: 1;
  padding: 28px 24px 32px;
  background: var(--pmo-white);
  border-radius: 24px 24px 0 0;
  margin-top: -20px;
  position: relative;
  z-index: 3;
}

.pmo-field { margin-bottom: 16px; }

.pmo-input-wrap { position: relative; }

.pmo-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--pmo-border);
  border-radius: var(--pmo-radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--pmo-text);
  background: var(--pmo-white);
  outline: none;
  transition: border-color 0.2s;
}

.pmo-input:focus { border-color: var(--pmo-red); }
.pmo-input::placeholder { color: #BBBBBB; }

.pmo-input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pmo-muted);
  padding: 4px;
  display: flex;
  align-items: center;
}

.pmo-input-toggle svg { width: 20px; height: 20px; }

.pmo-link {
  display: block;
  text-align: center;
  color: var(--pmo-red);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin: 12px 0 20px;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

.pmo-btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--pmo-red);
  color: var(--pmo-white);
  border: none;
  border-radius: var(--pmo-radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.pmo-btn-primary:hover { background: var(--pmo-red-dark); }
.pmo-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.pmo-btn-secondary {
  width: 100%;
  padding: 16px;
  background: var(--pmo-white);
  color: var(--pmo-red);
  border: 1.5px solid var(--pmo-red);
  border-radius: var(--pmo-radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.pmo-btn-secondary:hover { background: #FFF5F6; }
.pmo-btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

.pmo-auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--pmo-muted);
}

.pmo-auth-footer a {
  color: var(--pmo-red);
  font-weight: 700;
  text-decoration: none;
}

.pmo-error {
  background: #FFF0F0;
  color: var(--pmo-red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}

.pmo-error.show { display: block; }

.pmo-success {
  background: #F0FFF4;
  color: #166534;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
  display: none;
}

.pmo-success.show { display: block; }

/* Forgot password modal (OTP flow) */
.pmo-modal-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.45); align-items: center; justify-content: center; padding: 16px; }
.pmo-modal-overlay.open { display: flex; }
.pmo-forgot-modal { position: relative; max-width: 420px; width: calc(100% - 32px); background: #fff; border-radius: 12px; padding: 24px; }
.pmo-forgot-close { position: absolute; top: 12px; right: 12px; border: none; background: none; font-size: 24px; cursor: pointer; }
.pmo-forgot-sub { font-size: 14px; color: #888; line-height: 1.5; margin: 0 0 16px; }
.pmo-forgot-timer { font-size: 13px; color: #888; text-align: center; margin: 12px 0 0; }
.pmo-otp-row { display: flex; gap: 8px; justify-content: center; margin: 16px 0 8px; }
.pmo-otp-input { width: 48px; height: 52px; text-align: center; font-size: 20px; border: 1px solid #E0E0E0; border-radius: 8px; }
.pmo-modal h3 { margin: 0 0 8px; font-size: 18px; }

.pmo-auth-note {
  font-size: 12px;
  color: var(--pmo-muted);
  line-height: 1.5;
  margin-top: 12px;
  text-align: center;
}

.pmo-install-banner {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 406px;
  z-index: 9000;
  background: #1A1A1A;
  color: #fff;
  border-radius: 12px;
  padding: 12px 36px 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.pmo-install-banner p { margin: 0; }
.pmo-install-banner-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
