/** Captain register — captain app */
/* زر العودة للقائمة — نفس أسلوب الرجوع */
.t2-nav-home-btn,
.map-btn--home {
  color: #1e293b;
}

.t2-nav-home-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 18px rgba(15, 23, 42, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.t2-nav-home-btn .ui-icon {
  width: 22px;
  height: 22px;
}

.t2-nav-home-btn:active {
  transform: scale(0.94);
  background: rgba(243, 245, 247, 0.95);
}

.account-home {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f3f5f7;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #485465;
}

.account-home:active {
  transform: scale(0.94);
  background: #e8ecf0;
}

.captain-head--nav {
  direction: ltr;
}

.captain-head--nav .captain-head-text {
  flex: 1;
  direction: rtl;
}

.screen.captain {
  background: #fff;
  display: none;
  overflow: hidden;
  z-index: 6;
}

.screen.captain.on {
  display: flex;
  flex-direction: column;
}

.captain-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 12px;
  border-bottom: 1px solid #e8eaee;
  flex-shrink: 0;
}

.captain-back {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #f3f5f7;
  display: grid;
  place-items: center;
  color: #485465;
}

.captain-head-text strong {
  display: block;
  font-size: 18px;
}

.captain-head-text span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #747b86;
  font-weight: 700;
}

.captain-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 28px;
  -webkit-overflow-scrolling: touch;
}

.captain-intro {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.75;
  color: #747b86;
  font-weight: 700;
}

.captain-field {
  display: block;
  margin-bottom: 12px;
}

.captain-field > span,
.captain-field > legend {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #5c6672;
}

.captain-field input,
.captain-field select {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #e8eaee;
  background: #fafbfc;
  font-weight: 800;
  color: #121417;
  box-shadow: 0 6px 18px rgba(18, 20, 23, 0.04);
}

.captain-field input:focus,
.captain-field select:focus {
  border-color: #1769ff;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.1);
}

.captain-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}

.captain-vehicle-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cap-vehicle-opt {
  position: relative;
  display: block;
  cursor: pointer;
}

.cap-vehicle-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cap-vehicle-opt span {
  display: grid;
  place-items: center;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #e8eaee;
  background: #fafbfc;
  font-size: 13px;
  font-weight: 900;
  color: #485465;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.cap-vehicle-opt input:checked + span {
  border-color: #1769ff;
  background: #eef4ff;
  color: #1769ff;
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.08);
}

.captain-uploads {
  margin: 18px 0 12px;
}

.captain-uploads-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  color: #121417;
}

.captain-upload {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px dashed #d5dde8;
  background: #f9fafb;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.captain-upload:active {
  background: #f3f6fa;
  border-color: #1769ff;
}

.captain-upload.has-file {
  border-style: solid;
  border-color: rgba(23, 105, 255, 0.28);
  background: #f7faff;
}

.captain-upload-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eef4ff;
  color: #1769ff;
  display: grid;
  place-items: center;
}

.captain-upload-icon .ui-chip {
  width: 20px;
  height: 20px;
}

.captain-upload-text b {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.captain-upload-text em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: #9aa1a9;
  font-weight: 700;
}

.captain-upload-preview {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e8eaee;
}

.captain-legal {
  margin: 8px 0 14px;
  font-size: 11px;
  line-height: 1.6;
  color: #9aa1a9;
  font-weight: 700;
  text-align: center;
}

.captain-phone-gate {
  margin: 0 0 14px;
}

.captain-otp-send {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.18);
}

.captain-otp-send:disabled {
  opacity: 0.65;
}

.captain-otp-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

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

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

.captain-otp-hint.demo-code strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: 0.2em;
  color: #15803d;
}

.captain-phone-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.5;
}

.captain-otp-field {
  margin-bottom: 0;
}

.captain-otp-field input {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 18px;
}

.captain-submit {
  width: 100%;
  height: 54px;
  border-radius: 16px;
  background: #1769ff;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(23, 105, 255, 0.22);
}

.captain-submit:disabled {
  opacity: 0.65;
}

.captain-success-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 28px;
}

.captain-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #19a974;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.captain-success-icon .ui-icon {
  width: 36px;
  height: 36px;
}

.captain-success-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.captain-success-body > p {
  margin: 0;
  font-size: 15px;
  color: #485465;
  font-weight: 800;
  line-height: 1.7;
}

.captain-success-sub {
  margin: 12px 0 24px !important;
  font-size: 12px !important;
  color: #9aa1a9 !important;
  font-weight: 700 !important;
  max-width: 280px;
}

.captain-toast {
  position: absolute;
  z-index: 80;
  left: 20px;
  right: 20px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #121417;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.captain-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── شاشة انتظار اعتماد الكابتن ── */
.captain-pending-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px 36px;
}

.captain-pending-icon {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #16a34a;
  display: grid;
  place-items: center;
  font-size: 36px;
  margin-bottom: 20px;
}

.captain-pending-screen.is-rejected .captain-pending-icon {
  background: #fef2f2;
  color: #dc2626;
}

.captain-pending-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #121417;
}

.captain-pending-body > p {
  margin: 0;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.75;
  color: #64748b;
  font-weight: 700;
}

.captain-pending-phone {
  margin: 14px 0 22px !important;
  font-size: 13px !important;
  color: #94a3b8 !important;
  font-weight: 800 !important;
}

.captain-pending-body .captain-submit {
  max-width: 280px;
  margin-bottom: 12px;
}

.captain-pending-support {
  display: inline-block;
  margin-bottom: 16px;
  color: #15803d;
  font-weight: 900;
  text-decoration: none;
}

.captain-pending-logout {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 900;
  padding: 8px 12px;
}

/* ── بطاقة الدخول والحالة (نفس أسلوب بطاقات المركبات) ── */
.captain-choose-status,
.captain-entry-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border-radius: 24px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  text-align: right;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.14s ease;
}

.captain-entry-card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.captain-entry-card:active,
.captain-choose-status-btn:active {
  transform: scale(0.985);
}

.captain-choose-status.is-pending {
  border-color: #e8ecf0;
}

.captain-choose-status.is-rejected {
  border-color: #fecaca;
  background: #fff;
}

.captain-choose-status.is-approved {
  border-color: #19a974;
  box-shadow:
    0 0 0 1px rgba(25, 169, 116, 0.10),
    0 14px 30px rgba(25, 169, 116, 0.10);
}

.captain-choose-status-head {
  display: contents;
}

.captain-choose-status-icon,
.captain-entry-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #f6f8f9;
  color: #64748b;
  font-size: 17px;
  line-height: 1;
}

.captain-entry-card-icon {
  background: #eef9f2;
  color: #19a974;
}

.captain-choose-status.is-pending .captain-choose-status-icon {
  background: #fffbeb;
  color: #b45309;
}

.captain-choose-status.is-rejected .captain-choose-status-icon {
  background: #fef2f2;
  color: #dc2626;
}

.captain-choose-status.is-approved .captain-choose-status-icon {
  background: #19a974;
  color: #fff;
  box-shadow: 0 3px 10px rgba(25, 169, 116, 0.18);
}

.cap-status-check {
  display: block;
  width: 11px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.cap-icon-wheel {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.cap-icon-wheel::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 2px;
  height: 7px;
  margin-left: -1px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center 7px;
  transform: rotate(0deg);
  box-shadow:
    0 0 0 0 currentColor,
    0 0 0 0 currentColor;
}

.cap-icon-wheel::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.45;
}

.captain-choose-badge {
  display: none !important;
}

.captain-choose-status-copy,
.captain-entry-card-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.captain-choose-status-copy strong,
.captain-entry-card-body strong {
  font-size: 14px;
  font-weight: 900;
  color: #121417;
  line-height: 1.25;
}

.captain-choose-status.is-approved .captain-choose-status-copy strong {
  color: #121417;
}

.captain-choose-status-copy p,
.captain-entry-card-body small {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.45;
}

.captain-choose-status-btn {
  flex-shrink: 0;
  padding: 9px 13px;
  border-radius: 999px;
  border: none;
  background: #19a974;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(25, 169, 116, 0.16);
}

.captain-choose-status.is-pending .captain-choose-status-btn {
  background: #f6f8f9;
  color: #485465;
  box-shadow: none;
  border: 1px solid #e8ecf0;
}

.captain-choose-status.is-rejected .captain-choose-status-btn {
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: none;
  border: 1px solid #fecaca;
}

.captain-choose-status.is-approved .captain-choose-status-btn {
  padding: 9px 14px;
  font-size: 11px;
}

.captain-choose-status[hidden],
.captain-entry-card[hidden] {
  display: none !important;
}

.captain-entry-card:active {
  border-color: #19a974;
  box-shadow:
    0 0 0 1px rgba(25, 169, 116, 0.10),
    0 14px 30px rgba(25, 169, 116, 0.10);
}

.captain-entry-card-badge,
.captain-entry-card-cap,
.captain-entry-card-icon::before {
  display: none !important;
}

.captain-entry-card-body .cap-tplus {
  color: inherit;
}

.captain-entry-card-body .cap-tplus .cap-plus {
  color: #19a974;
}

/* Approved captain account card stays compact on the rider chooser. */
#choose .captain-zone .captain-choose-status,
#choose .captain-zone .captain-entry-card {
  width: calc(100% - 24px);
  max-width: 340px;
  margin-inline: auto;
}

.captain-entry-card-arrow {
  font-size: 20px;
  color: #94a3b8;
  font-weight: 800;
  line-height: 1;
}

.captain-entry-link {
  display: inline-block;
  width: auto;
  margin-top: 12px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #19a974;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  box-shadow: none;
}

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

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

#login .captain-entry-link--login {
  margin-top: 10px;
}

.captain-submit--outline {
  background: #fff !important;
  color: #1769ff !important;
  border: 1.5px solid #dce6f5 !important;
  box-shadow: none !important;
  max-width: 280px;
  margin-bottom: 12px;
}

.captain-welcome-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px 40px;
  min-height: 100%;
}

.screen.captain-welcome.on {
  display: flex;
  flex-direction: column;
}

.captain-welcome-brand {
  margin-bottom: 4px;
}

.captain-welcome-icon {
  font-size: 48px;
  margin: 8px 0 16px;
}

.captain-welcome-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.captain-welcome-copy {
  margin: 0 0 16px;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.75;
  color: #64748b;
  font-weight: 700;
}

.captain-welcome-body .captain-submit {
  max-width: 280px;
  margin-bottom: 10px;
}

#captainRegister .captain-scroll,
#captainWelcome .captain-scroll,
#captainPending .captain-scroll {
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

/* ── معالج التسجيل (راكب) ── */
.cap-wizard-screen .captain-scroll {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cap-wizard-progress {
  flex-shrink: 0;
  padding: 10px 20px 14px;
  border-bottom: 1px solid #eef2f4;
  background: #fafbfc;
}

.cap-wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.cap-wizard-step {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.cap-wizard-step i {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  background: #e8ecf0;
  color: #64748b;
  transition: background 0.2s, color 0.2s;
}

.cap-wizard-step em {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
}

.cap-wizard-step.is-active i,
.cap-wizard-step.is-done i {
  background: #1769ff;
  color: #fff;
}

.cap-wizard-step.is-active em {
  color: #1769ff;
}

.cap-wizard-bar {
  height: 4px;
  border-radius: 999px;
  background: #e8ecf0;
  overflow: hidden;
}

.cap-wizard-bar span {
  display: block;
  height: 100%;
  width: 33%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1769ff, #22c55e);
  transition: width 0.25s ease;
}

.cap-wizard-pane[hidden] {
  display: none !important;
}

.cap-wizard-nav {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.cap-wizard-prev,
.cap-wizard-next {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 900;
}

.cap-wizard-prev {
  background: #f3f5f7;
  color: #485465;
  border: 1px solid #e8eaee;
}

.cap-wizard-next {
  background: #1769ff;
  color: #fff;
  border: none;
  box-shadow: 0 10px 26px rgba(23, 105, 255, 0.22);
}

.cap-wizard-next:disabled {
  opacity: 0.55;
}

.cap-wizard-submit {
  margin-top: 0;
}

.cap-vehicle-pick--cards .cap-vehicle-card span {
  display: grid;
  gap: 2px;
  place-items: center;
  height: 72px;
  padding: 8px;
}

.cap-vehicle-pick--cards .cap-vehicle-card span b {
  font-size: 14px;
}

.cap-vehicle-pick--cards .cap-vehicle-card span em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
}

.cap-vehicle-opt input:checked + span em {
  color: #1769ff;
}

/* ── خط زمني — حالة الطلب ── */
.cap-status-timeline {
  list-style: none;
  margin: 18px 0 8px;
  padding: 0;
  width: 100%;
  max-width: 320px;
  display: grid;
  gap: 0;
  text-align: right;
}

.cap-status-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  position: relative;
  padding-bottom: 16px;
}

.cap-status-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.cap-status-step > span {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  background: #f1f5f9;
  color: #94a3b8;
  position: relative;
  z-index: 1;
}

.cap-status-step b {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.cap-status-step em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1.45;
}

.cap-status-step.is-done > span {
  background: #dcfce7;
  color: #15803d;
}

.cap-status-step.is-done:not(:last-child)::after {
  background: #bbf7d0;
}

.cap-status-step.is-active > span {
  background: #eef4ff;
  color: #1769ff;
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.12);
}

.cap-status-step.is-failed > span {
  background: #fef2f2;
  color: #dc2626;
}
