/* Shared SynApps auth shell — DoctorLogin / PatientLogin / PatientRegister / DoctorRegister */

:root {
  --dr-teal: #0f766e;
  --dr-teal-deep: #115e59;
  --dr-teal-bright: #14b8a6;
  --dr-sky: #0284c7;
  --dr-sky-bright: #38bdf8;
  --dr-green: #00cc61;
  --dr-ink: #0f172a;
  --dr-muted: #64748b;
  --dr-line: rgba(15, 118, 110, 0.14);
  --dr-surface: #ffffff;
  --dr-soft: #f0fdfa;
  --dr-radius: 20px;
  --dr-font: Vazirmatn, Tahoma, sans-serif;
  --dr-accent: var(--dr-teal);
  --dr-accent-2: var(--dr-teal-bright);
  --dr-aside-grad: linear-gradient(155deg, #0e7490 0%, #0f766e 48%, #115e59 100%);
}

.dr-body--patient {
  --dr-accent: var(--dr-sky);
  --dr-accent-2: var(--dr-sky-bright);
  --dr-line: rgba(2, 132, 199, 0.16);
  --dr-soft: #f0f9ff;
  --dr-aside-grad: linear-gradient(155deg, #0369a1 0%, #0284c7 48%, #0c4a6e 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

html,
body.dr-body {
  margin: 0;
}

.dr-body {
  font-family: var(--dr-font);
  color: var(--dr-ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(20, 184, 166, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(56, 189, 248, 0.16), transparent 45%),
    linear-gradient(160deg, #ecfeff 0%, #f8fafc 45%, #e0f2fe 100%);
  min-height: 100dvh;
  height: 100dvh;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
}

.dr-body--patient {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(56, 189, 248, 0.2), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(20, 184, 166, 0.12), transparent 45%),
    linear-gradient(160deg, #f0f9ff 0%, #f8fafc 45%, #e0f2fe 100%);
}

.dr-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.3fr);
  width: min(1180px, 100%);
  height: auto;
  max-height: min(900px, calc(100dvh - 32px));
  margin: 0;
  padding: 0;
  gap: 18px;
  align-items: stretch;
}

.dr-shell--auth {
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 1.05fr);
  width: min(980px, 100%);
  max-height: none;
  align-items: stretch;
  gap: 18px;
}

.dr-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 26px 22px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.22), transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(0, 204, 97, 0.22), transparent 38%),
    var(--dr-aside-grad);
  box-shadow: 0 22px 50px rgba(15, 118, 110, 0.26);
  min-height: 0;
  height: auto;
  align-self: stretch;
}

.dr-shell--auth .dr-aside {
  align-self: stretch;
  height: auto;
  width: 100%;
  min-height: 480px;
}

.dr-aside::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 40% 60% 55% 45%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  bottom: -40px;
  left: -30px;
  pointer-events: none;
}

.dr-aside__brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.08rem;
}

.dr-aside__brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 6px;
}

.dr-aside__badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.25rem;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  font-weight: 700;
  width: fit-content;
}

.dr-aside__copy {
  position: relative;
  z-index: 1;
}

.dr-aside__copy h1 {
  margin: 1rem 0 0.55rem;
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  font-weight: 800;
  line-height: 1.35;
}

.dr-aside__copy p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.7;
}

.dr-aside__copy ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.dr-aside__copy li {
  position: relative;
  padding-inline-start: 1.2rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.94);
}

.dr-aside__copy li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.45em;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: #99f6e4;
  box-shadow: 0 0 0 3px rgba(153, 246, 228, 0.2);
}

.dr-body--patient .dr-aside__copy li::before {
  background: #7dd3fc;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.25);
}

.dr-aside__link {
  position: relative;
  z-index: 1;
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0.94;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  width: fit-content;
}

.dr-aside__link:hover {
  opacity: 1;
}

/* Attractive CTA on marketing panel (new doctor / new patient) */
.dr-aside__cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a !important;
  background: linear-gradient(135deg, #ffffff 0%, #ecfeff 55%, #d1fae5 100%);
  border: 0;
  box-shadow:
    0 14px 32px rgba(2, 20, 24, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.dr-body--patient .dr-aside__cta {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 55%, #bae6fd 100%);
}

.dr-aside__cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow:
    0 18px 36px rgba(2, 20, 24, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #0f172a !important;
}

.dr-aside__cta-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--dr-accent-2), var(--dr-accent));
  color: #fff;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--dr-accent) 35%, transparent);
}

.dr-aside__cta-text {
  display: grid;
  gap: 1px;
  text-align: right;
  line-height: 1.25;
}

.dr-aside__cta-text strong {
  font-size: 0.98rem;
  font-weight: 800;
}

.dr-aside__cta-text small {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

.dr-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  background: var(--dr-surface);
  border: 1px solid var(--dr-line);
  border-radius: 24px;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  align-self: stretch;
}

.dr-shell--auth .dr-main {
  align-self: stretch;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  height: auto;
  min-height: 480px;
}

.dr-main__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  flex-shrink: 0;
  background: linear-gradient(180deg, #fff 0%, #f8fffe 100%);
}

.dr-body--patient .dr-main__head {
  background: linear-gradient(180deg, #fff 0%, #f8fcff 100%);
}

.dr-main__head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.dr-main__head p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--dr-muted);
}

.dr-main__home {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dr-accent);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--dr-line);
  background: var(--dr-soft);
}

.dr-main__home:hover {
  filter: brightness(0.98);
}

.dr-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dr-form--auth {
  overflow: visible;
  padding: 22px 24px 20px;
  gap: 14px;
  justify-content: center;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  flex: 1 1 auto;
}

.dr-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 4px;
}

.dr-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--dr-soft);
  border: 1px solid var(--dr-line);
  color: var(--dr-accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.dr-step span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--dr-accent);
  color: #fff;
  font-size: 0.65rem;
}

.dr-section {
  position: relative;
  padding: 10px 10px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.55), rgba(255, 255, 255, 0.2));
  border: 1px solid rgba(15, 118, 110, 0.08);
}

.dr-body--patient .dr-section {
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.7), rgba(255, 255, 255, 0.2));
  border-color: rgba(2, 132, 199, 0.1);
}

.dr-section h3 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--dr-accent);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dr-section h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--dr-accent-2), var(--dr-accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dr-accent) 18%, transparent);
}

.dr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dr-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dr-grid--1 {
  grid-template-columns: 1fr;
}

.dr-field {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.dr-field--wide {
  grid-column: span 2;
}

.dr-field > span:first-child,
.dr-field-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.dr-field input,
.dr-field select,
.dr-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--dr-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dr-field input:hover,
.dr-field select:hover,
.dr-input:hover {
  border-color: #94a3b8;
}

.dr-field input:focus,
.dr-field select:focus,
.dr-input:focus {
  outline: none;
  border-color: var(--dr-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dr-accent) 16%, transparent);
}

.dr-input-wrap {
  position: relative;
}

.dr-input-wrap .dr-input {
  padding-inline-start: 2.4rem;
}

.dr-input-icon {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.7;
  pointer-events: none;
}

.dr-err,
.dr-form-error {
  font-size: 0.7rem;
  color: #b91c1c;
  line-height: 1.25;
}

.dr-alert {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.dr-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.dr-alert--info {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0e7490;
}

.dr-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-top: 4px;
  flex-shrink: 0;
}

.dr-form--auth .dr-actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: 2px;
}

.dr-submit {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-height: 52px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--dr-accent-2), var(--dr-accent));
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 14px 32px color-mix(in srgb, var(--dr-accent) 32%, transparent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.dr-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #fff;
}

.dr-submit--ghost {
  background: transparent;
  color: var(--dr-accent);
  border: 1.5px solid color-mix(in srgb, var(--dr-accent) 45%, transparent);
  box-shadow: none;
}

.dr-submit--ghost:hover {
  background: var(--dr-soft);
  color: var(--dr-accent);
  filter: none;
}

.dr-submit--soft {
  background: linear-gradient(135deg, #ecfeff, #ccfbf1);
  color: var(--dr-teal-deep);
  border: 1px solid color-mix(in srgb, var(--dr-accent) 22%, transparent);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.12);
}

.dr-body--patient .dr-submit--soft {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #075985;
  border-color: rgba(2, 132, 199, 0.28);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.14);
}

.dr-submit--soft:hover {
  filter: brightness(1.03);
  color: inherit;
}

.dr-login-link,
.dr-text-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--dr-sky);
  text-decoration: none;
  text-align: center;
}

.dr-text-link:hover {
  text-decoration: underline;
}

.dr-links {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.dr-footer-note {
  margin: 4px 0 0;
  padding-top: 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.68rem;
}

.dr-demo {
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--dr-accent) 35%, transparent);
  background: var(--dr-soft);
  padding: 10px 12px;
  font-size: 0.8rem;
}

.dr-demo strong {
  display: block;
  margin-bottom: 6px;
  color: var(--dr-accent);
}

.dr-demo__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  color: #334155;
}

.form-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.78rem;
}

.form-error-banner__title {
  font-weight: 800;
  margin-bottom: 4px;
}

.form-error-banner ul {
  margin: 0;
  padding-inline-start: 1.1rem;
}

/* OTP digits */
.otp-digit-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  direction: ltr;
}

.otp-digit-input {
  width: 48px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: inherit;
  color: var(--dr-ink);
  background: #fff;
}

.otp-digit-input:focus {
  outline: none;
  border-color: var(--dr-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dr-accent) 16%, transparent);
}

@media (max-width: 1100px) {
  .dr-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dr-field--wide {
    grid-column: span 3;
  }
}

@media (max-width: 900px) {
  .dr-body {
    place-items: start center;
    padding: 12px;
  }

  .dr-shell,
  .dr-shell--auth {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    min-height: 0;
    width: min(480px, 100%);
  }

  .dr-shell--auth .dr-aside,
  .dr-shell--auth .dr-main,
  .dr-aside,
  .dr-main {
    align-self: stretch;
    max-width: none;
    width: 100%;
    min-height: 0 !important;
    height: auto;
  }

  .dr-form--auth {
    max-width: none;
    justify-content: flex-start;
    padding: 18px 16px;
  }

  .dr-aside {
    padding: 16px;
  }

  .dr-aside__copy ul {
    display: none;
  }

  .dr-aside__copy h1 {
    margin-top: 0.5rem;
    font-size: 1.2rem;
  }

  .dr-aside__badge {
    margin-top: 0.75rem;
  }

  .dr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dr-field--wide {
    grid-column: span 2;
  }

  .dr-form {
    overflow: visible;
  }

  .dr-form--auth {
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .dr-body {
    padding: 8px;
  }

  .dr-shell,
  .dr-shell--auth {
    gap: 8px;
    width: 100%;
  }

  .dr-grid,
  .dr-grid--2 {
    grid-template-columns: 1fr;
  }

  .dr-field--wide {
    grid-column: auto;
  }

  .dr-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dr-submit {
    width: 100%;
  }

  .dr-form--auth {
    padding: 14px 12px;
  }

  .dr-main__head {
    padding: 12px 12px 10px;
  }

  .otp-digit-input {
    width: 42px;
    height: 48px;
  }
}

@media (max-height: 820px) and (min-width: 901px) {
  .dr-field input,
  .dr-field select {
    min-height: 32px;
    font-size: 0.8rem;
  }

  .dr-section {
    padding: 8px;
  }

  .dr-grid {
    gap: 6px;
  }

  .dr-form:not(.dr-form--auth) {
    padding: 8px 14px 10px;
    gap: 6px;
  }

  .dr-main__head {
    padding: 10px 14px;
  }

  .dr-aside {
    padding: 16px;
  }

  .dr-submit {
    min-height: 38px;
  }
}

@media (max-height: 700px) and (min-width: 901px) {
  .dr-form:not(.dr-form--auth) {
    overflow: auto;
  }

  .dr-aside__copy ul {
    display: none;
  }
}
