/* ===== استعادة كلمة المرور — كلين كار ===== */

.cc-recovery[hidden] {
  display: none;
}

.cc-recovery {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.cc-recovery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 36, 54, 0.62);
  backdrop-filter: blur(5px);
}

.cc-recovery-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 26px 26px 22px;
  border: 1px solid #e3e4e5;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 26px 70px -22px rgba(9, 35, 53, 0.55);
  color: #143f5c;
  text-align: start;
}

.cc-recovery-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cc-recovery-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(180deg, #1d5577 0%, #123a56 100%);
  color: #ffffff;
}

.cc-recovery-badge svg {
  width: 22px;
  height: 22px;
}

.cc-recovery-head-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.cc-recovery-head h2 {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 1.28rem;
  font-weight: 800;
  color: #143f5c;
}

.cc-recovery-head p {
  margin: 4px 0 0;
  color: #5c7488;
  font-size: 0.76rem;
  line-height: 1.7;
}

.cc-recovery-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #e3e4e5;
  border-radius: 50%;
  background: #f9f9f9;
  color: #143f5c;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cc-recovery-close:hover {
  background: #f1f2f2;
}

.cc-recovery-note {
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px solid #e5e6e7;
  border-radius: 12px;
  background: #f9fafa;
  color: #44607a;
  font-size: 0.73rem;
  line-height: 1.8;
}

.cc-recovery-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.7;
}

.cc-recovery-status[hidden] {
  display: none;
}

.cc-recovery-status.is-info {
  border: 1px solid #d2d4d6;
  background: #f4f5f5;
  color: #10344d;
}

.cc-recovery-status.is-error {
  border: 1px solid #e3b2b8;
  background: #f9e6e8;
  color: #7d2c35;
}

.cc-recovery-status.is-success {
  border: 1px solid #b9dcc4;
  background: #ecf8ef;
  color: #1e5b34;
}

.cc-recovery-step {
  margin-top: 16px;
}

.cc-recovery-step[hidden] {
  display: none;
}

.cc-recovery-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #143f5c;
}

.cc-recovery-field + .cc-recovery-label {
  margin-top: 14px;
}

.cc-recovery-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #d7d9db;
  border-radius: 12px;
  background: #fdfdfd;
}

.cc-recovery-field:focus-within {
  border-color: #1d5577;
  box-shadow: 0 0 0 3px rgba(29, 85, 119, 0.16);
}

.cc-recovery-field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  border: 0;
  background: transparent;
  color: #143f5c;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.cc-recovery-field input[dir='ltr'] {
  text-align: left;
}

.cc-recovery-hint {
  margin: 6px 0 0;
  color: #5c7488;
  font-size: 0.68rem;
  line-height: 1.7;
}

.cc-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cc-recovery-primary,
.cc-recovery-secondary,
.cc-recovery-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.cc-recovery-primary {
  flex: 1 1 160px;
  border-color: #164866;
  background: linear-gradient(180deg, #1d5577 0%, #123a56 100%);
  color: #ffffff;
  box-shadow: 0 2px 0 rgba(9, 35, 53, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.cc-recovery-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #27648a 0%, #174767 100%);
  transform: translateY(-1px);
}

.cc-recovery-secondary {
  border-color: #d2d4d6;
  background: linear-gradient(180deg, #fbfcfc 0%, #e7e9ea 100%);
  color: #123a56;
}

.cc-recovery-secondary:hover:not(:disabled) {
  border-color: #8fbcd9;
  background: linear-gradient(180deg, #ffffff 0%, #f0f1f1 100%);
}

.cc-recovery-link {
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #1b5478;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-recovery-primary:disabled,
.cc-recovery-secondary:disabled,
.cc-recovery-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cc-recovery-channel {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.cc-recovery-channel label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7d9db;
  border-radius: 13px;
  background: #fdfdfd;
  cursor: pointer;
}

.cc-recovery-channel label:has(input:checked) {
  border-color: #1d5577;
  background: #f6f7f7;
  box-shadow: 0 0 0 2px rgba(29, 85, 119, 0.12);
}

.cc-recovery-channel label:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.cc-recovery-channel input {
  width: 18px;
  height: 18px;
  accent-color: #1d5577;
}

.cc-recovery-channel strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: #143f5c;
}

.cc-recovery-channel small {
  display: block;
  margin-top: 2px;
  color: #5c7488;
  font-size: 0.68rem;
}

.cc-recovery-code {
  letter-spacing: 0.32em;
  font-size: 1.15rem !important;
  font-weight: 800;
  text-align: center !important;
}

.cc-recovery-setup {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #c98f96;
  border-radius: 14px;
  background: #f8f7f7;
}

.cc-recovery-setup[hidden] {
  display: none;
}

.cc-recovery-setup h3 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #7d2c35;
}

.cc-recovery-setup p,
.cc-recovery-setup li {
  color: #6d3d43;
  font-size: 0.7rem;
  line-height: 1.75;
}

.cc-recovery-setup ul {
  margin: 6px 0 0;
  padding-inline-start: 18px;
}

.cc-recovery-setup code {
  display: inline-block;
  margin: 2px 2px 2px 0;
  padding: 1px 6px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e3b2b8;
  color: #7d2c35;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  direction: ltr;
}

.cc-recovery-done {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px 6px 6px;
  text-align: center;
}

.cc-recovery-done span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e6f6ea;
  color: #1e7a3c;
  font-size: 30px;
  font-weight: 800;
}

.cc-recovery-done h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #143f5c;
}

.cc-recovery-done p {
  margin: 0;
  max-width: 340px;
  color: #5c7488;
  font-size: 0.76rem;
  line-height: 1.8;
}

.cc-recovery-foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed #e3e4e5;
  color: #6b8394;
  font-size: 0.66rem;
  line-height: 1.7;
}

/* رابط الدخول في صفحتي لوحة التحكم وإدارة السيارات */
.adm-forgot .cc-recovery-open-link,
.acc-forgot .cc-recovery-open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink, #143f5c);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.adm-forgot .cc-recovery-open-link:hover,
.acc-forgot .cc-recovery-open-link:hover {
  color: #1b5478;
}

.adm-forgot > p,
.acc-forgot > p {
  margin: 6px 0 0;
  color: var(--muted, #5c7488);
  font-size: 0.72rem;
  line-height: 1.75;
}

@media (max-width: 520px) {
  .cc-recovery {
    padding: 10px;
    align-items: end;
  }

  .cc-recovery-card {
    max-height: calc(100vh - 20px);
    padding: 20px 16px 16px;
    border-radius: 20px;
  }

  .cc-recovery-head h2 {
    font-size: 1.12rem;
  }

  .cc-recovery-actions {
    flex-direction: column;
  }

  .cc-recovery-primary,
  .cc-recovery-secondary {
    width: 100%;
    flex: 0 0 auto;
  }
}
