/**
 * 2T — شاشة تسجيل الدخول · Login pro
 */

#login.screen.login {
  padding: 0 !important;
  background: #ffffff !important;
}

#login.screen.login.on {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  animation: none;
}

#login .login-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 22px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

#login .login-brand {
  text-align: center;
  margin: 0 0 22px;
  line-height: 1;
}

#login .login-brand--pro {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.08),
    0 4px 12px rgba(25, 169, 116, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  isolation: isolate;
}

#login .login-brand--pro::after {
  content: '';
  position: absolute;
  inset: 11px;
  z-index: -1;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(25, 169, 116, 0.10), rgba(214, 161, 29, 0.10));
  filter: blur(14px);
}

#login .login-brand--pro img {
  width: 82px;
  height: 82px;
  display: block;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.08));
}

#login .login-brand--pro span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

#login .login-brand--splash {
  position: relative;
  width: min(240px, 70vw);
  height: 96px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 14px 34px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

#login .login-brand--splash::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 92px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #19a974, transparent);
  opacity: 0.24;
}

#login .login-brand--splash img {
  width: min(218px, 62vw);
  height: auto;
  display: block;
  object-fit: contain;
}

#login .login-brand--splash span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

#login .login-brand b {
  display: inline-flex;
  align-items: baseline;
  font-family: Cairo, system-ui, sans-serif;
  font-size: clamp(48px, 13vw, 58px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

#login .login-brand .brand-wordmark {
  display: inline-block;
  color: #16a34a !important;
  -webkit-text-fill-color: #16a34a !important;
  background: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  animation: none !important;
  filter: none !important;
}

#login .login-brand .brand-wordmark .brand-plus {
  display: inline;
  font-size: 0.76em;
  font-weight: 900;
  color: #eab308 !important;
  -webkit-text-fill-color: #eab308 !important;
  vertical-align: baseline;
}

#login .login-captain-tag {
  margin: 0 0 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: #15803d;
}

#login .brand::before,
#login .brand::after,
#login .brand b::after {
  display: none !important;
  content: none !important;
  animation: none !important;
}

#login .login-copy {
  text-align: center;
  margin: 0 0 18px;
}

#login .login-copy strong {
  display: block;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #0f172a;
}

#login .login-copy p {
  margin: 8px auto 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  color: #64748b;
  max-width: 30ch;
}

#login .login-form {
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid #e8ecf1;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

#login .login-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 0 12px;
}

#login .login-step-pill {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#login .login-step-pill.is-active {
  color: #fff;
  background: #19a974;
  border-color: #19a974;
  box-shadow: 0 4px 12px rgba(25, 169, 116, 0.16);
}

#login .login-step-pill.is-done {
  color: #0f7a53;
  background: #f0fbf6;
  border-color: rgba(25, 169, 116, 0.10);
}

#login .login-step-line {
  width: 36px;
  height: 2px;
  margin: 0 8px;
  border-radius: 999px;
  background: #e2e8f0;
}

#login .login-form.is-otp-sent .login-step-line {
  background: linear-gradient(90deg, #19a974, #0f7a53);
}

#login .login-step {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-align: center;
}

#login .login-form.is-otp-sent .login-step {
  color: #0f7a53;
}

#login .field,
#login .login-field {
  display: grid !important;
  align-items: stretch;
  height: auto !important;
  min-height: 0;
  gap: 6px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #eef2f6;
  background: #f8fafc;
  box-shadow: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

#login .field:focus-within,
#login .login-field:focus-within {
  border-color: rgba(25, 169, 116, 0.28);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(25, 169, 116, 0.08);
}

#login .field span,
#login .login-field span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

#login .field input,
#login .login-field input {
  display: block;
  width: 100%;
  min-width: 0;
  flex: none !important;
  padding: 0;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.03em;
  direction: ltr;
  text-align: left;
  background: transparent;
}

#login .field input::placeholder,
#login .login-field input::placeholder {
  color: #cbd5e1;
  font-weight: 700;
}

#login .login-form.is-otp-sent .login-phone-field {
  display: none !important;
}

#login .login-otp-mount {
  display: grid;
  gap: 0;
}

#login .otp-block {
  display: grid;
  gap: 10px;
  margin: 0;
}

#login .login-otp-panel {
  display: grid;
  gap: 10px;
}

#login .login-otp-panel[hidden] {
  display: none !important;
}

#login .otp-send[hidden],
#login .login-resend[hidden],
#login .login-submit[hidden] {
  display: none !important;
}

#login .otp-send {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: none;
  background: var(--2t-btn-primary, linear-gradient(145deg, #19a974 0%, #0f7a53 100%));
  color: #fff !important;
  font-family: Cairo, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--2t-btn-primary-shadow, 0 8px 20px rgba(25, 169, 116, 0.18));
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#login .otp-send:active:not(:disabled) {
  transform: scale(0.985);
}

#login .otp-send:disabled {
  opacity: 0.6;
}

#login .login-otp-panel:not([hidden]) {
  animation: loginOtpIn 0.28s ease both;
}

#login .otp-field {
  margin-bottom: 0;
}

#login #otpInput {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 20px;
}

#login .login-resend {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  font-family: Cairo, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

#login .login-resend:active:not(:disabled) {
  color: #0f7a53;
}

#login .login-resend:disabled {
  opacity: 0.55;
}

#login .otp-hint:not([hidden]) {
  animation: loginOtpIn 0.28s ease both;
}

#login .login-submit:not([hidden]) {
  animation: loginOtpIn 0.28s ease both;
  margin-top: 10px;
}

@keyframes loginOtpIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#login .otp-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.5;
}

#login .login-dev-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

#login .login-dev-banner strong {
  display: inline-block;
  margin: 0 4px;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #b45309;
}

#login .login-dev-banner--phone {
  background: linear-gradient(180deg, #f8fbf9 0%, #ffffff 100%);
  border-color: rgba(25, 169, 116, 0.10);
  color: #0f7a53;
  padding: 14px 12px;
}

#login .login-dev-banner--phone b {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  color: #0f7a53;
}

#login .login-dev-banner--phone strong {
  display: block;
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: 0.14em;
  color: #0f7a53;
}

#login .otp-hint.demo-code {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbf9 0%, #ffffff 100%);
  border: 1px solid rgba(25, 169, 116, 0.10);
  color: #475569;
}

#login .otp-hint.demo-code b {
  display: block;
  font-size: 10px;
  margin-bottom: 4px;
  color: #64748b;
  font-weight: 700;
}

#login .otp-hint.demo-code strong {
  display: block;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 5px;
  color: #0f7a53;
  direction: ltr;
  line-height: 1.1;
}

#login .otp-hint.demo-code small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
}

#login .otp-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

#login .otp-error[hidden] {
  display: none !important;
}

#login .primary,
#login .login-submit {
  width: 100%;
  height: 50px;
  margin-top: 0;
  border-radius: 12px;
  font-family: Cairo, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  background: var(--2t-btn-primary, linear-gradient(145deg, #19a974 0%, #0f7a53 100%));
  color: #fff;
  border: none;
  box-shadow: var(--2t-btn-primary-shadow, 0 8px 20px rgba(25, 169, 116, 0.12));
  transition: transform 0.15s ease;
}

#login .primary:disabled,
#login .login-submit:disabled {
  background: var(--2t-btn-primary-disabled, #e2e8f0);
  color: var(--2t-btn-primary-disabled-text, #94a3b8);
  opacity: 1;
  box-shadow: none;
}

#login .primary:active:not(:disabled),
#login .login-submit:active:not(:disabled) {
  transform: scale(0.985);
}

#login .login-secondary {
  margin-top: 14px;
  text-align: center;
}

#login .login-legal-notice {
  margin: 12px auto 0;
  max-width: 310px;
  color: #7a8799;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.8;
  text-align: center;
}

#login .login-legal-notice a {
  color: #11845f;
  font-weight: 800;
  text-decoration: none;
}

#login .captain-entry-link {
  display: inline-block;
  margin: 10px auto 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #19a974;
  font-family: Cairo, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
}

#login .captain-entry-link::before {
  display: none;
}

#login .captain-entry-link:active {
  transform: none;
  color: #15803d;
}

#login .login-foot {
  flex-shrink: 0;
  margin: 0;
  padding: 10px 22px max(14px, env(safe-area-inset-bottom, 14px));
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
  user-select: none;
  pointer-events: none;
  line-height: 1.35;
}

#login .login-foot.app-credit {
  border-top: 1px solid #eef2f4;
  background: #fff;
  padding: 12px 22px max(14px, env(safe-area-inset-bottom, 14px));
}

.app-credit {
  user-select: none;
}

.app-credit-line {
  display: block;
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.55;
  color: #94a3b8;
  text-align: center;
}

.app-credit-name {
  font-weight: 500;
  color: #64748b;
}

.app-credit-sep {
  margin: 0 0.4em;
  opacity: 0.5;
  font-weight: 300;
}

.app-credit-rights {
  font-weight: 400;
  color: #94a3b8;
}

.app-credit-line--about {
  font-size: 11px;
  line-height: 1.6;
}

.app-credit-line--about .app-credit-name {
  font-weight: 600;
  color: #475569;
}

.app-credit--compact {
  flex-shrink: 0;
  border-top: 1px solid #eef2f4;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  padding: 11px 16px max(12px, env(safe-area-inset-bottom, 12px));
}

.about-legal {
  margin: 0 0 14px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f4;
  text-align: center;
}

#login .brand,
#login .note {
  display: none !important;
}

#app .otp-toast {
  left: 50%;
  right: auto;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%) translateY(8px);
  bottom: max(52px, calc(env(safe-area-inset-bottom, 0px) + 40px));
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #bbf7d0;
  color: #15803d;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  font-size: 12px;
  font-weight: 700;
}

#app .otp-toast.show {
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  #login.screen.login.on,
  #login .otp-field:not([hidden]),
  #login .otp-hint:not([hidden]),
  #login .login-submit:not([hidden]) {
    animation: none !important;
  }
}

/* About screen — shared (captain + rider fallback) */
.screen.account {
  background: #fff;
  overflow: auto;
  z-index: 5;
}

.account-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 20px 16px 12px;
  border-bottom: 1px solid #e8eaed;
  direction: ltr;
}

.account-head strong {
  text-align: center;
  font-size: 16px;
}

.account-back {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f3f5f7;
  display: grid;
  place-items: center;
  color: #485465;
  border: none;
  cursor: pointer;
}

.account-body {
  padding: 20px 20px 32px;
}

.account-note {
  text-align: center;
  font-size: 11px;
  color: #9aa1a9;
  font-weight: 700;
  margin: 0;
}

.about-hero {
  text-align: center;
  padding: 8px 0 18px;
}

.about-brand {
  font-size: 34px;
  line-height: 1;
}

.about-tagline {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
}

.about-meta {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #e8eaed;
  background: #fff;
}

.about-meta div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.about-meta dt {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.about-meta dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.about-copy {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 700;
  color: #475569;
}

.about-credit {
  margin-bottom: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.about-links {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.about-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  background: rgba(236, 253, 245, 0.86);
  color: #11845f;
  font-family: Cairo, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.about-link-btn--ghost {
  background: #fff;
  border-color: #e8eaed;
  color: #334155;
}

.about-link-btn:active {
  transform: scale(0.99);
}
