.medic-auth.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 50%, #fff 100%);
  padding: 2rem 1rem;
}
.medic-auth .auth-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 960px;
  width: 100%;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}
.medic-auth .auth-brand {
  background: linear-gradient(160deg, #0284c7 0%, #0ea5e9 55%, #e11d48 140%);
  color: #fff;
  padding: 2.5rem 2rem;
  flex-direction: column;
  justify-content: center;
}
.medic-auth .auth-brand-logo {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1.5rem; font-weight: 800; font-size: 1.15rem;
}
.medic-auth .auth-brand-logo .logo-mark {
  width: 36px; height: 36px; background: rgba(255,255,255,0.2);
  border-radius: 10px; display: grid; place-items: center;
}
.medic-auth .auth-brand-title { font-size: 1.6rem; font-weight: 800; line-height: 1.25; margin-bottom: 0.75rem; }
.medic-auth .auth-brand-title span, .medic-auth .auth-brand-title .edu-auth-brand-highlight { color: #fef08a; }
.medic-auth .auth-brand-desc { opacity: 0.9; font-size: 0.95rem; margin-bottom: 1.75rem; }
.medic-auth .auth-brand-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.medic-auth .auth-brand-features li { display: flex; gap: 0.75rem; align-items: flex-start; }
.medic-auth .auth-brand-features i { font-size: 1.25rem; margin-top: 0.15rem; }
.medic-auth .auth-brand-features strong { display: block; font-size: 0.95rem; }
.medic-auth .auth-brand-features span { font-size: 0.8rem; opacity: 0.85; }
.medic-auth .auth-card { padding: 2rem 1.75rem; }
.medic-auth .auth-card .btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border: none; border-radius: 999px; font-weight: 600;
}
.medic-auth .input-group-text { background: #f1f5f9; border-color: #e2e8f0; color: #0284c7; }
.medic-auth .form-control:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15); }
@media (max-width: 991px) {
  .medic-auth .auth-content { grid-template-columns: 1fr; max-width: 420px; }
}
.medic-auth.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 50%, #fff 100%);
  padding: 2rem 1rem;
}
.medic-auth .auth-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 960px;
  width: 100%;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}
.medic-auth .auth-brand {
  background: linear-gradient(160deg, #0284c7 0%, #0ea5e9 55%, #e11d48 140%);
  color: #fff;
  padding: 2.5rem 2rem;
  flex-direction: column;
  justify-content: center;
}
.medic-auth .auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  font-size: 1.15rem;
}
.medic-auth .auth-brand-logo .logo-mark {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: grid; place-items: center;
}
.medic-auth .auth-brand-logo .logo-text span { font-weight: 600; opacity: 0.95; }
.medic-auth .auth-brand-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.medic-auth .auth-brand-title .edu-auth-brand-highlight,
.medic-auth .auth-brand-title span {
  color: #fef08a;
}
.medic-auth .auth-brand-desc {
  opacity: 0.9;
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}
.medic-auth .auth-brand-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.medic-auth .auth-brand-features li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.medic-auth .auth-brand-features i {
  font-size: 1.25rem;
  margin-top: 0.15rem;
  opacity: 0.95;
}
.medic-auth .auth-brand-features strong {
  display: block;
  font-size: 0.95rem;
}
.medic-auth .auth-brand-features span {
  font-size: 0.8rem;
  opacity: 0.85;
}
.medic-auth .auth-card {
  padding: 2rem 1.75rem;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.medic-auth .auth-card .btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border: none;
  border-radius: 999px;
  font-weight: 600;
}
.medic-auth .auth-card .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}
.medic-auth .input-group-text {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0284c7;
}
.medic-auth .form-control:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.medic-auth .specialties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.75rem;
}
@media (max-width: 991px) {
  .medic-auth .auth-content {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .medic-auth .auth-card { max-height: none; }
}










.medic-auth-container {
  --ma-primary: var(--color-primary, #0ea5e9);
  --ma-primary-dark: var(--color-primary-dark, #0284c7);
  --ma-primary-surface: var(--color-primary-surface, #e0f2fe);
  --ma-gradient: var(--color-primary-gradient, linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%));
  --ma-text: var(--color-text, #0f172a);
  --ma-text-secondary: var(--color-text-secondary, #475569);
  --ma-text-muted: var(--color-text-muted, #94a3b8);
  --ma-bg: var(--color-bg, #ffffff);
  --ma-bg-alt: var(--color-bg-alt, #f8fafc);
  --ma-card: var(--color-bg-card, #ffffff);
  --ma-border: var(--color-border, #e2e8f0);
  --ma-danger: var(--color-danger, #dc2626);
  --ma-success: var(--color-success, #059669);
  --ma-success-bg: var(--color-success-bg, #d1fae5);
  --ma-shadow: var(--shadow-xl, 0 20px 60px rgba(15, 23, 42, 0.16));
  --ma-ease: cubic-bezier(0.4, 0, 0.2, 1);

  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  font-family: var(--font-primary, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  color: var(--ma-text);
  line-height: 1.5;
  background:
    radial-gradient(circle at 15% 10%, rgba(14, 165, 233, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(2, 132, 199, 0.10) 0%, transparent 45%),
    var(--ma-bg-alt);
}

/* Used when the page renders inside the dashboard layout (verify-email) */
.medic-auth-container--embedded {
  min-height: 70vh;
  background: transparent;
  padding: 1rem;
}

.medic-auth-container *,
.medic-auth-container *::before,
.medic-auth-container *::after {
  box-sizing: border-box;
}

.medic-auth-grid {
  width: 100%;
  max-width: 460px;
}

/* ---- Card ------------------------------------------------------------ */
.medic-auth-form-side {
  position: relative;
  overflow: hidden;
  background: var(--ma-card);
  border: 1px solid var(--ma-border);
  border-radius: 24px;
  box-shadow: var(--ma-shadow);
  padding: 2.5rem 2.25rem;
  animation: medic-auth-rise 0.5s var(--ma-ease) both;
}

.medic-auth-form-side::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--ma-gradient);
}

@keyframes medic-auth-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.medic-auth-form-container {
  width: 100%;
}

.medic-auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.medic-auth-brand img {
  height: 40px;
  width: auto;
  max-width: 100%;
}

/* ---- Header ---------------------------------------------------------- */
.medic-auth-form-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.medic-auth-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ma-primary-surface);
  color: var(--ma-primary-dark);
}
.medic-auth-icon .medic-auth-svg {
  width: 28px;
  height: 28px;
}

.medic-auth-recovery-title {
  font-family: var(--font-display, 'Outfit', 'Inter', sans-serif);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  color: var(--ma-text);
}

.medic-auth-recovery-desc {
  font-size: 0.95rem;
  color: var(--ma-text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ---- SVG icons (inline sprite) --------------------------------------- */
.medic-auth-svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---- Form ------------------------------------------------------------ */
.medic-auth-form {
  display: grid;
  gap: 1.25rem;
}

.medic-auth-input-group {
  display: grid;
  gap: 0.45rem;
}

.medic-auth-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ma-text);
}
.medic-auth-label .medic-auth-svg {
  width: 16px;
  height: 16px;
  color: var(--ma-primary);
}

.medic-auth-input {
  width: 100%;
  padding: 0.8rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ma-text);
  background: var(--ma-bg);
  border: 1.5px solid var(--ma-border);
  border-radius: 10px;
  transition: border-color 0.2s var(--ma-ease), box-shadow 0.2s var(--ma-ease);
}
.medic-auth-input::placeholder {
  color: var(--ma-text-muted);
}
.medic-auth-input:hover {
  border-color: var(--ma-text-muted);
}
.medic-auth-input:focus {
  outline: none;
  border-color: var(--ma-primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}
.medic-auth-input.is-error {
  border-color: var(--ma-danger);
}
.medic-auth-input.is-error:focus {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

.medic-auth-error {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ma-danger);
}

.medic-auth-hint {
  font-size: 0.78rem;
  color: var(--ma-text-muted);
  margin: 0;
}

/* Password field with show/hide toggle */
.medic-auth-password-wrapper {
  position: relative;
}
.medic-auth-password-wrapper .medic-auth-input {
  padding-right: 3rem;
}
.medic-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ma-text-muted);
  cursor: pointer;
  transition: color 0.2s var(--ma-ease), background 0.2s var(--ma-ease);
}
.medic-auth-password-toggle:hover {
  color: var(--ma-primary-dark);
  background: var(--ma-primary-surface);
}
.medic-auth-password-toggle:focus-visible {
  outline: 2px solid var(--ma-primary);
  outline-offset: 1px;
}
.medic-auth-password-toggle .medic-auth-svg {
  width: 18px;
  height: 18px;
}
.medic-auth-password-toggle .icon-eye-off { display: none; }
.medic-auth-password-toggle[aria-pressed="true"] .icon-eye { display: none; }
.medic-auth-password-toggle[aria-pressed="true"] .icon-eye-off { display: block; }

/* ---- Buttons --------------------------------------------------------- */
.medic-auth-btn {
  position: relative;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: var(--ma-gradient);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(14, 165, 233, 0.65);
  transition: transform 0.2s var(--ma-ease), box-shadow 0.2s var(--ma-ease), opacity 0.2s var(--ma-ease);
}
.medic-auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(14, 165, 233, 0.7);
  color: #fff;
}
.medic-auth-btn:active {
  transform: translateY(0);
}
.medic-auth-btn:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.4);
  outline-offset: 2px;
}
.medic-auth-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}
.medic-auth-btn .medic-auth-svg {
  width: 18px;
  height: 18px;
}

.medic-auth-btn--ghost {
  color: var(--ma-text-secondary);
  background: transparent;
  box-shadow: none;
  border: 1.5px solid var(--ma-border);
}
.medic-auth-btn--ghost:hover {
  color: var(--ma-text);
  background: var(--ma-bg-alt);
  border-color: var(--ma-text-muted);
  box-shadow: none;
}

/* Loading state: label stays, spinner replaces the icon */
.medic-auth-btn.is-loading .medic-auth-svg { display: none; }
.medic-auth-btn.is-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: medic-auth-spin 0.7s linear infinite;
}
@keyframes medic-auth-spin {
  to { transform: rotate(360deg); }
}

/* ---- Links ----------------------------------------------------------- */
.medic-auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ma-text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ma-ease);
}
.medic-auth-back-link:hover {
  color: var(--ma-primary-dark);
}
.medic-auth-back-link .medic-auth-svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ma-ease);
}
.medic-auth-back-link:hover .medic-auth-svg {
  transform: translateX(-3px);
}

.medic-auth-footer-links {
  text-align: center;
  margin-top: 1.5rem;
}

.medic-auth-link,
.medic-auth-link-btn {
  font: inherit;
  font-weight: 600;
  color: var(--ma-primary-dark);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.medic-auth-link:hover,
.medic-auth-link-btn:hover {
  text-decoration: underline;
}
.medic-auth-link-btn:focus-visible,
.medic-auth-link:focus-visible {
  outline: 2px solid var(--ma-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Alerts ---------------------------------------------------------- */
.medic-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 10px;
  border: 1px solid transparent;
}
.medic-auth-alert .medic-auth-svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.medic-auth-alert--success {
  color: #065f46;
  background: var(--ma-success-bg);
  border-color: rgba(5, 150, 105, 0.25);
}
.medic-auth-alert--danger {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
}
[data-theme="dark"] .medic-auth-alert--success { color: #a7f3d0; }
[data-theme="dark"] .medic-auth-alert--danger  { color: #fecaca; }

/* ---- verify-email extras --------------------------------------------- */
.medic-auth-email-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ma-primary-dark);
  background: var(--ma-primary-surface);
  border-radius: 999px;
  overflow-wrap: anywhere;
}
.medic-auth-email-chip .medic-auth-svg {
  width: 16px;
  height: 16px;
}

.medic-auth-meta {
  font-size: 0.9rem;
  color: var(--ma-text-secondary);
  text-align: center;
  margin-bottom: 1.5rem;
}
.medic-auth-inline-form {
  display: inline;
  margin: 0;
}

.medic-auth-actions {
  display: grid;
  gap: 0.75rem;
}

.medic-auth-icon--pulse {
  position: relative;
}
.medic-auth-icon--pulse::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--ma-primary);
  opacity: 0;
  animation: medic-auth-pulse 2.4s ease-out infinite;
}
@keyframes medic-auth-pulse {
  0%   { opacity: 0.5; transform: scale(0.9); }
  100% { opacity: 0;   transform: scale(1.25); }
}

/* ---- Small screens / accessibility ----------------------------------- */
@media (max-width: 480px) {
  .medic-auth-container { padding: 1rem 0.75rem; }
  .medic-auth-form-side { padding: 2rem 1.35rem; border-radius: 20px; }
  .medic-auth-recovery-title { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .medic-auth-form-side,
  .medic-auth-icon--pulse::after,
  .medic-auth-btn.is-loading::after {
    animation: none;
  }
  .medic-auth-btn,
  .medic-auth-input,
  .medic-auth-back-link .medic-auth-svg {
    transition: none;
  }
}