/* غلاف تسجيل الدخول — متناسق مع لوحة زائر المنصة */
body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--font, "Cairo", system-ui, sans-serif);
  background: var(--bg, #f8f4ee);
  color: var(--brown, #3d2213);
}

.auth-page__main {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px 24px;
  box-sizing: border-box;
}

.auth-login-page {
  min-height: 100dvh;
}

.auth-login-page .auth-page__main {
  max-width: min(520px, 100%);
  padding: 0 max(14px, env(safe-area-inset-left, 14px)) clamp(24px, 4vw, 36px)
    max(14px, env(safe-area-inset-right, 14px));
}

.auth-hero-wrap {
  margin: 0 0 20px;
  border-radius: clamp(12px, 2.5vw, 18px);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(45, 26, 14, 0.22);
  border: 1px solid rgba(185, 135, 47, 0.25);
}

.auth-hero {
  position: relative;
  min-height: clamp(200px, 48vw, 300px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fffdf8;
  background: #2b170d;
}

.auth-hero__bg {
  position: absolute;
  inset: 0;
  background: url("/assets/ervenow-delivery-hero.png") center 18% / cover no-repeat;
}

@media (min-width: 640px) {
  .auth-hero__bg {
    background-position: center 42%;
  }
}

.auth-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 12, 8, 0.35) 0%, rgba(45, 26, 14, 0.55) 45%, rgba(45, 26, 14, 0.92) 100%),
    linear-gradient(115deg, rgba(45, 26, 14, 0.25) 0%, transparent 50%);
  pointer-events: none;
}

.auth-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  padding: clamp(14px, 3vw, 22px) clamp(12px, 3vw, 20px) clamp(16px, 3vw, 22px);
  box-sizing: border-box;
}

.auth-hero__logo {
  height: clamp(36px, 8vw, 48px);
  width: auto;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.auth-hero__title {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 4.2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.auth-hero__sub,
.auth-hero__note {
  margin: 0 auto;
  max-width: 520px;
  font-size: clamp(0.82rem, 2.8vw, 0.92rem);
  line-height: 1.55;
  font-weight: 600;
  color: rgba(255, 253, 248, 0.96);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.auth-hero__note {
  margin-top: 6px;
  font-size: clamp(0.78rem, 2.5vw, 0.84rem);
  opacity: 0.95;
}

.auth-pickup-tip {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(185, 135, 47, 0.45);
  background: linear-gradient(180deg, #fff9ee 0%, #fffdf8 100%);
  color: #5b371d;
  font-size: 0.9rem;
  line-height: 1.55;
  font-weight: 600;
}

.auth-pickup-tip strong {
  color: #3d2213;
}

.auth-card {
  background: #fffefb;
  border: 1px solid var(--border, rgba(61, 34, 19, 0.12));
  border-radius: clamp(16px, 3vw, 22px);
  padding: clamp(18px, 4vw, 26px);
  box-shadow: 0 10px 40px rgba(45, 26, 14, 0.08);
}

.auth-form-intro {
  margin: 0 0 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted, #5c4a3d);
  line-height: 1.55;
}

.auth-join-link {
  display: block;
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(61, 34, 19, 0.04);
  border: 1px dashed rgba(61, 34, 19, 0.15);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold, #b9872f);
  text-decoration: none;
}

.auth-join-link:hover {
  background: rgba(185, 135, 47, 0.1);
}

.auth-card label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--brown, #3d2213);
}

.auth-card input {
  width: 100%;
  box-sizing: border-box;
}

.auth-otp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.auth-otp-actions .btn {
  flex: 1 1 160px;
  min-height: 48px;
}

.auth-otp-actions--single {
  display: block;
  margin-top: 16px;
}

.auth-otp-actions--single .btn {
  width: 100%;
  flex: none;
  min-height: 50px;
  font-size: 1rem;
  font-weight: 800;
}

.auth-login-core {
  margin-bottom: 18px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(61, 34, 19, 0.08);
}

.auth-portal-links {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted, #5c4a3d);
}

.auth-portal-links a {
  color: var(--gold, #b9872f);
  text-decoration: none;
}

.auth-portal-links a:hover {
  text-decoration: underline;
}

.auth-portal-nav {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(61, 34, 19, 0.1);
}

.auth-portal-nav__title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted, #5c4a3d);
}

.auth-portal-nav__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 420px) {
  .auth-portal-nav__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.auth-portal-nav__link {
  display: block;
  padding: 9px 8px;
  border-radius: 11px;
  border: 1px solid rgba(185, 135, 47, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--brown, #3d2213);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-portal-nav__link:hover {
  background: rgba(185, 135, 47, 0.12);
  border-color: rgba(185, 135, 47, 0.45);
}

.auth-portal-nav__link.is-current {
  background: linear-gradient(135deg, rgba(61, 34, 19, 0.92), rgba(92, 61, 40, 0.95));
  border-color: rgba(185, 135, 47, 0.5);
  color: #fffef8;
  pointer-events: none;
}

.auth-dev-panel {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px dashed rgba(185, 135, 47, 0.55);
  background: linear-gradient(180deg, rgba(255, 249, 238, 0.98), rgba(248, 244, 238, 0.95));
  box-shadow: 0 4px 16px rgba(45, 26, 14, 0.06);
}

.auth-dev-panel[hidden] {
  display: none !important;
}

.auth-dev-panel__label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8f6420;
}

.auth-dev-panel__hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  color: #6b5344;
}

.auth-dev-direct {
  display: block;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(185, 135, 47, 0.55);
  background: linear-gradient(180deg, #fffefb 0%, #f5ede2 100%);
  color: #3d2213;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.auth-dev-direct:hover {
  border-color: rgba(185, 135, 47, 0.85);
  background: #fffefb;
  transform: translateY(-1px);
}

.auth-dev-direct[hidden] {
  display: none !important;
}

.auth-code-group[hidden] {
  display: none !important;
}

.auth-card .msg {
  margin-top: 14px;
}

/* ——— دخول المندوب: فوتر ملاصق + بانر عريض بدون صورة ——— */
body.driver-auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: linear-gradient(180deg, #f8f4ee 0%, #f0e8dc 48%, #f8f4ee 100%);
}

body.driver-auth-page .dash-site-header {
  flex-shrink: 0;
}

body.driver-auth-page .driver-auth-footer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}

body.driver-auth-page .auth-page__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: min(480px, 100%);
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left, 16px)) max(20px, env(safe-area-inset-bottom, 20px))
    max(16px, env(safe-area-inset-right, 16px));
  box-sizing: border-box;
}

body.driver-auth-page .auth-page__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 3vw, 24px) 0;
}

.driver-auth-banner {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  text-align: center;
  padding: clamp(22px, 5vw, 44px) clamp(16px, 4vw, 36px);
  box-sizing: border-box;
  color: var(--brown, #3d2213);
  background:
    radial-gradient(ellipse 90% 70% at 82% 55%, rgba(185, 135, 47, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 60% 50% at 18% 20%, rgba(255, 255, 255, 0.9) 0%, transparent 70%),
    linear-gradient(168deg, #fffdf9 0%, #f8f4ee 42%, #efe4d4 100%);
  border-bottom: 1px solid rgba(185, 135, 47, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 28px rgba(61, 34, 19, 0.06);
}

.driver-auth-banner__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 100% 80% at 50% -10%, rgba(255, 253, 249, 0.75) 0%, transparent 55%);
}

@media (min-width: 1024px) {
  .driver-auth-banner {
    padding-block: clamp(28px, 3.5vw, 48px);
  }
  .driver-auth-banner__inner {
    max-width: 720px;
  }
}

.driver-auth-banner__inner {
  position: relative;
  z-index: 1;
  max-width: min(640px, 100%);
  margin: 0 auto;
}

.driver-auth-banner__eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8f6020;
}

.driver-auth-banner__logo {
  height: clamp(38px, 8vw, 50px);
  width: auto;
  margin-bottom: 8px;
}

.driver-auth-banner__title {
  margin: 0 0 8px;
  font-size: clamp(1.22rem, 4.2vw, 1.62rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #3d2213;
  line-height: 1.25;
}

.driver-auth-banner__sub {
  margin: 0 auto;
  max-width: 420px;
  font-size: clamp(0.84rem, 2.5vw, 0.95rem);
  line-height: 1.65;
  font-weight: 600;
  color: #5c4a3d;
}

.driver-auth-banner__sub strong {
  color: #3d2213;
  font-weight: 800;
}

.driver-auth-banner__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #5a3d12;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 236, 218, 0.9));
  border: 1px solid rgba(185, 135, 47, 0.45);
  box-shadow: 0 4px 14px rgba(185, 135, 47, 0.12);
}

body.driver-auth-page .auth-card .driver-auth-card-title {
  margin: 0 0 clamp(14px, 3vw, 18px);
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  text-align: center;
  font-size: clamp(1.05rem, 3.2vw, 1.2rem);
  font-weight: 900;
  color: #3d2213;
  line-height: 1.4;
}

body.driver-auth-page .auth-card {
  box-shadow: 0 16px 48px rgba(45, 26, 14, 0.1);
  border: 1px solid rgba(185, 135, 47, 0.2);
}

body.driver-auth-page .auth-code-group {
  margin-top: 4px;
}

body.driver-auth-page .auth-otp-actions .btn-primary {
  background: linear-gradient(180deg, #c99a3f, #8f6020);
  border-color: transparent;
}

@media (min-width: 900px) {
  body.driver-auth-page .auth-page__main {
    max-width: min(440px, 92vw);
  }
}
