/* MyoMed Prep — Student Diagnostics (Faculty Dashboard).
 *
 * Shell styles only. Layered over brand.css + app.css so cards, tables,
 * buttons and the faculty panels look exactly as they do across the family;
 * this file adds the sidebar/topbar chassis and the sign-in gate. */

.diag-body { min-height: 100vh; background: var(--bg); }

/* ---------- lockup ---------- */
.diag-lockup { display: flex; flex-direction: column; gap: 0.1rem; text-decoration: none; color: inherit; }
.diag-lockup-brand { font-weight: 800; letter-spacing: -0.01em; font-size: 1.05rem; color: var(--heading); }
.diag-lockup-brand span { color: var(--teal); }
.diag-lockup-product { font-weight: 700; font-size: 1.2rem; line-height: 1.15; color: var(--heading); }
.diag-lockup-role { font-size: 0.72rem; font-weight: 700; letter-spacing: var(--tracking-wide, 0.08em); text-transform: uppercase; color: var(--muted); }

/* ---------- sign-in gate ---------- */
.diag-auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem;
  background:
    radial-gradient(60vw 50vh at 85% -10%, var(--teal-light), transparent 70%),
    radial-gradient(50vw 40vh at -10% 110%, var(--surface-2), transparent 70%),
    var(--bg);
}
.diag-auth-card { width: 100%; max-width: 420px; padding: 1.6rem 1.7rem 1.4rem; }
.diag-auth-sub { margin: 0.9rem 0 0.4rem; font-weight: 600; color: var(--heading); }
.diag-auth-card .form-error:empty { display: none; }
.diag-auth-aux { font-size: 0.85rem; margin: 1.1rem 0 0; line-height: 1.5; }
.diag-auth-card .btn-primary { min-width: 8rem; }

/* ---------- shell ---------- */
.diag-app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.diag-sidebar {
  background: var(--navy); color: var(--on-navy);
  display: flex; flex-direction: column; gap: 1.2rem;
  padding: 1.25rem 1.1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.diag-sidebar .diag-lockup-brand, .diag-sidebar .diag-lockup-product { color: var(--on-navy); }
.diag-sidebar .diag-lockup-brand span { color: #7fd1d8; }
.diag-sidebar .diag-lockup-role { color: var(--nav-link); opacity: 0.8; }

.diag-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.diag-nav-h { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--footer-muted); opacity: 0.8; margin: 0.8rem 0 0.25rem 0.6rem; }
.diag-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.5rem 0.65rem; border-radius: 8px; color: var(--nav-link); text-decoration: none; font-size: 0.93rem;
  transition: background var(--dur-fast, 0.15s) ease;
}
.diag-nav a:hover { background: rgba(255, 255, 255, 0.08); }
.diag-nav a.is-active { background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; }
.diag-nav a small { color: var(--footer-muted); font-weight: 400; font-size: 0.78rem; white-space: nowrap; }
.diag-nav a.is-sub { padding-left: 1.2rem; font-size: 0.88rem; }
.diag-nav a.is-sub span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diag-nav .diag-nav-empty { color: var(--footer-muted); font-size: 0.82rem; padding: 0.2rem 0.65rem; margin: 0; }

.diag-sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.85rem; }
.diag-whoami { color: var(--footer-muted); line-height: 1.35; word-break: break-word; }
.diag-whoami strong { color: #fff; display: block; }
.diag-foot-link { color: var(--nav-link); text-decoration: none; }
.diag-foot-link:hover { text-decoration: underline; }
.diag-sidebar .btn-ghost { align-self: flex-start; }

.diag-main-col { display: flex; flex-direction: column; min-width: 0; }
.diag-topbar {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.4rem;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.diag-topbar-title { font-weight: 700; color: var(--heading); }
.diag-topbar-note { font-size: 0.85rem; }
.diag-menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.1rem; padding: 0.15rem 0.55rem; cursor: pointer; color: var(--heading); }

.diag-main { padding: 1.4rem 1.4rem 2.5rem; max-width: 1280px; width: 100%; }
.diag-main:focus { outline: none; }
.diag-main .fac-head .eyebrow { color: var(--teal); }
.diag-footer { padding: 1rem 1.4rem 1.6rem; font-size: 0.8rem; border-top: 1px solid var(--line); margin-top: auto; }
.diag-footer a { color: var(--muted); }

/* Portal-only panels */
.diag-loading { padding: 2rem 0; color: var(--muted); }
.diag-denied p { max-width: 62ch; }
.diag-kpis { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0 0 1.2rem; }
.diag-kpi { padding: 0.9rem 1.1rem; }
.diag-kpi .num { font-size: 1.7rem; font-weight: 800; color: var(--heading); line-height: 1.1; }
.diag-kpi .lbl { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }
.diag-privacy-page dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.2rem; margin: 1rem 0 0; }
.diag-privacy-page dt { font-weight: 700; color: var(--heading); }
.diag-privacy-page dd { margin: 0; }

/* ---------- small screens: sidebar becomes a drawer ---------- */
@media (max-width: 900px) {
  .diag-app { grid-template-columns: minmax(0, 1fr); }
  .diag-sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 85vw); z-index: 20; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  .diag-app.nav-open .diag-sidebar { transform: none; }
  .diag-app.nav-open::before { content: ""; position: fixed; inset: 0; background: rgba(18, 48, 63, 0.45); z-index: 15; }
  .diag-menu-btn { display: inline-block; }
  .diag-main, .diag-topbar, .diag-footer { padding-left: 1rem; padding-right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .diag-sidebar { transition: none; }
}
