/* ConsultDesk — Auth & Profile module styles (extends consultdesk-public.css) */

.cd-account-pill { display: inline-flex; align-items: center; gap: 10px; }
.cd-button--account { background: #0f4c5c; }
.cd-account-pill__logout { font-size: 0.85rem; color: #6b7280; text-decoration: underline; }
.cd-button--secondary { background: #6b7280; }
.cd-button--full { width: 100%; text-align: center; }

.cd-auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid #e5e7eb; }
.cd-auth-tab {
	flex: 1; background: none; border: none; padding: 10px 0; font-weight: 600;
	color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent;
}
.cd-auth-tab.is-active { color: #0f4c5c; border-bottom-color: #0f4c5c; }

.cd-field { margin-bottom: 14px; }
.cd-field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; color: #1f2933; }
.cd-field input[type="text"],
.cd-field input[type="email"],
.cd-field input[type="password"] {
	width: 100%; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.95rem;
}
.cd-field input:disabled { background: #f3f4f6; color: #6b7280; }
.cd-field--checkbox label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.cd-field__hint { font-size: 0.8rem; color: #6b7280; }

.cd-auth-feedback { display: none; padding: 10px 12px; border-radius: 6px; margin-bottom: 14px; font-size: 0.9rem; }
.cd-auth-feedback.is-error { background: #fee2e2; color: #b91c1c; display: block; }
.cd-auth-feedback.is-success { background: #d1fae5; color: #047857; display: block; }


/* Profile page */
.cd-profile__header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.cd-profile__avatar img { border-radius: 50%; }
.cd-profile__name { margin: 0; }
.cd-profile__email { margin: 2px 0 0; color: #6b7280; }
.cd-profile__logout { margin-left: auto; }

.cd-profile__layout { display: flex; gap: 28px; flex-wrap: wrap; }
.cd-profile__nav { display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.cd-profile__nav-item {
	text-align: left; background: none; border: none; padding: 10px 14px; border-radius: 6px;
	cursor: pointer; font-weight: 600; color: #475569;
}
.cd-profile__nav-item.is-active { background: #e6f3f1; color: #0f4c5c; }
.cd-profile__content { flex: 1; min-width: 260px; }
.cd-profile__panel { display: none; }
.cd-profile__panel.is-active { display: block; }
.cd-profile-guest { text-align: center; padding: 40px 20px; }


/* ======================================================================
   Login / Register popup (FAHE Global look). High-specificity on purpose:
   site themes restyle every <button>, <input> and <label>.
   ====================================================================== */
#cd-modal-root { padding: 16px; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); background: rgba(11, 37, 69, .55); box-sizing: border-box; }
#cd-modal-root .cd-modal { position: relative; box-sizing: border-box; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border: 0; border-radius: 16px; padding: 28px; box-shadow: 0 24px 60px rgba(11, 37, 69, .35); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1E293B; }
#cd-modal-root .cd-modal:has(.cd-auth-box) { padding: 0; }
html:has(#cd-modal-root.is-open), body:has(#cd-modal-root.is-open) { overflow: hidden; }

#cd-modal-root .cd-auth-box { position: relative; padding: 32px 30px 28px; }
#cd-modal-root .cd-auth-box *, #cd-modal-root .cd-auth-box *::before, #cd-modal-root .cd-auth-box *::after { box-sizing: border-box; }
#cd-modal-root .cd-auth-title { margin: 0 34px 4px 0; padding: 0; font-size: 22px; line-height: 1.25; font-weight: 800; color: #0B2545; letter-spacing: 0; text-transform: none; }
#cd-modal-root .cd-auth-sub { margin: 0 0 20px; padding: 0; font-size: 14px; line-height: 1.5; color: #64748B; }

#cd-modal-root .cd-modal__close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; min-width: 0; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; background: #F0F6FF; border: 0; border-radius: 50%; box-shadow: none; font-size: 22px; line-height: 1; font-weight: 400; color: #0B2545; cursor: pointer; text-transform: none; }
#cd-modal-root .cd-modal__close:hover, #cd-modal-root .cd-modal__close:focus { background: #E2E8F0; color: #0B2545; outline: 0; }

#cd-modal-root .cd-auth-tabs { display: flex; gap: 0; margin: 0 0 20px; padding: 4px; background: #F0F6FF; border: 0; border-radius: 10px; }
#cd-modal-root .cd-auth-tab { flex: 1 1 0; width: auto; min-width: 0; margin: 0; padding: 10px 8px; background: transparent; border: 0; border-radius: 8px; box-shadow: none; font-family: inherit; font-size: 14.5px; line-height: 1.2; font-weight: 600; color: #64748B; text-transform: none; letter-spacing: 0; cursor: pointer; }
#cd-modal-root .cd-auth-tab:hover { background: transparent; color: #0B2545; }
#cd-modal-root .cd-auth-tab.is-active { background: #fff; color: #0B2545; box-shadow: 0 1px 4px rgba(11, 37, 69, .14); }

#cd-modal-root .cd-field { margin: 0 0 14px; padding: 0; }
#cd-modal-root .cd-field label { display: block; margin: 0 0 6px; padding: 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: #1E293B; text-transform: none; }
#cd-modal-root .cd-field input[type="text"], #cd-modal-root .cd-field input[type="email"], #cd-modal-root .cd-field input[type="password"] { display: block; width: 100%; height: 44px; margin: 0; padding: 0 12px; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 8px; box-shadow: none; font-family: inherit; font-size: 15px; color: #1E293B; transition: border-color .15s, box-shadow .15s; }
#cd-modal-root .cd-field input:focus { outline: 0; border-color: #1565C0; box-shadow: 0 0 0 3px rgba(21, 101, 192, .18); }
#cd-modal-root .cd-field--checkbox label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; color: #475569; }
#cd-modal-root .cd-field--checkbox input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #0B2545; }

#cd-modal-root .cd-button.cd-button--full { display: block; width: 100%; height: 46px; margin: 6px 0 0; padding: 0 16px; background: #F9A825; color: #0B2545; border: 0; border-radius: 8px; box-shadow: none; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 46px; text-align: center; text-transform: none; letter-spacing: 0; cursor: pointer; transition: background .15s; }
#cd-modal-root .cd-button.cd-button--full:hover { background: #f0a500; color: #0B2545; }
#cd-modal-root .cd-button.cd-button--full:disabled { opacity: .6; cursor: wait; }

#cd-modal-root .cd-auth-feedback { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; font-size: 14px; line-height: 1.4; }

@media (max-width: 480px) {
	#cd-modal-root { padding: 10px; align-items: flex-end; }
	#cd-modal-root .cd-modal { max-height: calc(100vh - 20px); border-radius: 16px; }
	#cd-modal-root .cd-auth-box { padding: 26px 20px 22px; }
	#cd-modal-root .cd-field input[type="text"], #cd-modal-root .cd-field input[type="email"], #cd-modal-root .cd-field input[type="password"] { font-size: 16px; }
}

/* ======================================================================
   Onboarding steps (inside the popup)
   ====================================================================== */
#cd-modal-root .cd-auth-box.cd-onboarding > .cd-auth-tabs,
#cd-modal-root .cd-auth-box.cd-onboarding > .cd-auth-feedback,
#cd-modal-root .cd-auth-box.cd-onboarding > .cd-auth-form,
#cd-modal-root .cd-auth-box.cd-onboarding > .cd-auth-title,
#cd-modal-root .cd-auth-box.cd-onboarding > .cd-auth-sub { display: none !important; }
#cd-modal-root .cd-auth-box.cd-onboarding [data-cd-auth-step] .cd-auth-title { margin-right: 34px; }
#cd-modal-root .cd-auth-feedback[data-cd-step-msg] { display: none; }
#cd-modal-root .cd-auth-feedback[data-cd-step-msg].is-error,
#cd-modal-root .cd-auth-feedback[data-cd-step-msg].is-success { display: block; }

#cd-modal-root .cd-choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 6px; }
#cd-modal-root .cd-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; width: auto; height: auto; margin: 0; padding: 20px 12px; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 12px; box-shadow: none; font-family: inherit; text-align: center; text-transform: none; color: #0B2545; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
#cd-modal-root .cd-choice:hover { background: #fff; color: #0B2545; border-color: #F9A825; box-shadow: 0 6px 18px rgba(11,37,69,.12); transform: translateY(-1px); }
#cd-modal-root .cd-choice__icon { font-size: 30px; line-height: 1; }
#cd-modal-root .cd-choice strong { font-size: 15px; line-height: 1.3; font-weight: 700; color: #0B2545; }
#cd-modal-root .cd-choice small { font-size: 12.5px; line-height: 1.35; color: #64748B; font-weight: 400; }
#cd-modal-root .cd-auth-skip { margin: 14px 0 0; text-align: center; font-size: 13.5px; }
#cd-modal-root .cd-auth-skip a { color: #64748B; text-decoration: underline; }

#cd-modal-root .cd-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; max-height: 46vh; overflow-y: auto; padding: 2px; }
#cd-modal-root .cd-type { display: block; margin: 0; padding: 0; cursor: pointer; }
#cd-modal-root .cd-type input { position: absolute; opacity: 0; pointer-events: none; }
#cd-modal-root .cd-type__card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 12px; transition: border-color .15s, background .15s, box-shadow .15s; }
#cd-modal-root .cd-type__icon { font-size: 22px; line-height: 1; }
#cd-modal-root .cd-type__card strong { font-size: 13.5px; line-height: 1.3; font-weight: 700; color: #0B2545; }
#cd-modal-root .cd-type__card small { font-size: 12px; line-height: 1.35; color: #64748B; }
#cd-modal-root .cd-type:hover .cd-type__card { border-color: #1565C0; }
#cd-modal-root .cd-type input:checked + .cd-type__card { border-color: #F9A825; background: #FFF8E6; box-shadow: 0 0 0 2px rgba(249,168,37,.35); }
#cd-modal-root .cd-type input:focus-visible + .cd-type__card { outline: 2px solid #1565C0; outline-offset: 2px; }

/* ======================================================================
   My Account: dashboard, roles, student profile
   ====================================================================== */
.cd-profile { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #1E293B; }
.cd-profile .cd-profile__nav-item { width: 100%; background: transparent; border: 0; box-shadow: none; text-transform: none; font-family: inherit; font-size: 14.5px; }
.cd-profile .cd-profile__nav-item:hover { background: #F0F6FF; color: #0B2545; }
.cd-profile .cd-profile__nav-item.is-active { background: #0B2545; color: #fff; }
.cd-profile .cd-button { background: #0B2545; color: #fff; text-decoration: none; border: 0; border-radius: 8px; font-family: inherit; }
.cd-profile .cd-button:hover { background: #081A33; color: #fff; }
.cd-profile .cd-button.cd-button--ghost { background: transparent; color: #0B2545; border: 1.5px solid #E2E8F0; }
.cd-profile .cd-button.cd-button--ghost:hover { border-color: #0B2545; background: transparent; color: #0B2545; }
.cd-muted { color: #64748B; }

.cd-dash__h { margin: 0 0 12px; font-size: 18px; font-weight: 800; color: #0B2545; }
.cd-dash__nudge { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 22px; padding: 16px 18px; background: #FFF8E6; border: 1.5px solid #F9A825; border-radius: 12px; }
.cd-dash__nudge p { margin: 2px 0 0; font-size: 14px; color: #475569; }

.cd-role-grid { display: grid; gap: 12px; margin: 0 0 14px; }
.cd-role { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 12px; }
.cd-role__icon { flex: 0 0 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: #F0F6FF; border-radius: 10px; }
.cd-role__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cd-role__body strong { font-size: 15px; color: #0B2545; }
.cd-role__body small { font-size: 12.5px; color: #64748B; line-height: 1.35; }
.cd-role .cd-button { flex: 0 0 auto; white-space: nowrap; padding: 10px 14px; font-size: 13.5px; }
.cd-role__rm { position: absolute; top: 4px; right: 8px; font-size: 18px; line-height: 1; color: #94A3B8; text-decoration: none; }
.cd-role__rm:hover { color: #B91C1C; }

.cd-student-form { margin: 0 0 28px; }
.cd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cd-profile .cd-field select { width: 100%; height: 42px; padding: 0 10px; border: 1.5px solid #E2E8F0; border-radius: 8px; background: #fff; font-family: inherit; font-size: 15px; color: #1E293B; }
.cd-profile .cd-field input[type="text"] { height: 42px; border: 1.5px solid #E2E8F0; border-radius: 8px; font-family: inherit; }

.cd-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cd-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1.5px solid #E2E8F0; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; color: #0B2545; transition: border-color .15s, box-shadow .15s; }
.cd-tile:hover { border-color: #F9A825; box-shadow: 0 4px 14px rgba(11,37,69,.1); color: #0B2545; }
.cd-tile__icon { font-size: 20px; }

@media (max-width: 600px) {
	#cd-modal-root .cd-choice-row, #cd-modal-root .cd-type-grid { grid-template-columns: 1fr; }
	.cd-grid2 { grid-template-columns: 1fr; }
	.cd-role { flex-wrap: wrap; }
	.cd-role .cd-button { width: 100%; text-align: center; }
}

/* ---- v1.2 dashboard design ---- */
.cd-profile__header { padding: 18px 20px; background: linear-gradient(135deg,#0B2545,#13315C); border-radius: 16px; color: #fff; }
.cd-profile__header .cd-profile__name { color: #fff; font-size: 20px; }
.cd-profile__header .cd-profile__email { color: #BFD0EA; }
.cd-profile__avatar img { border: 3px solid #F9A825; }
.cd-profile .cd-profile__header .cd-button--secondary { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); }
.cd-profile__nav { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 8px; align-self: flex-start; }
.cd-profile__content { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 22px; }
.cd-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px; margin: 0 0 20px; background: #F0F6FF; border: 1px solid #DCE8FA; border-left: 4px solid #F9A825; border-radius: 14px; }
.cd-hero__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748B; }
.cd-hero__title { margin: 4px 0 4px; font-size: 22px; line-height: 1.2; color: #0B2545; }
.cd-hero__sub { margin: 0; font-size: 14px; color: #475569; max-width: 440px; }
.cd-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.cd-stat { min-width: 84px; padding: 10px 14px; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; text-align: center; }
.cd-stat strong { display: block; font-size: 18px; color: #0B2545; }
.cd-stat span { font-size: 11.5px; color: #64748B; }
.cd-role-grid--cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cd-role--card { border: 1.5px solid #E2E8F0; border-radius: 14px; transition: box-shadow .15s, border-color .15s; }
.cd-role--card:hover { border-color: #F9A825; box-shadow: 0 6px 18px rgba(11,37,69,.1); }
.cd-dash__h--gap { margin-top: 26px; }
@media (max-width: 640px) { .cd-profile__layout { flex-direction: column; } .cd-profile__nav { flex-direction: row; overflow-x: auto; min-width: 0; width: 100%; } .cd-profile__nav-item { white-space: nowrap; } .cd-profile__content { padding: 16px; } .cd-hero__title { font-size: 19px; } }
