/* Desktop layouts; small screens use responsive.css. */
@media (min-width: 981px) {
  body[data-portal="staff"] .auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
    align-items: center;
    gap: clamp(42px, 6vw, 110px);
    padding: 45px max(5vw, calc((100vw - 1480px)/2));
    background: linear-gradient(124deg, #4c0b22 0%, #76203e 54%, #f7eff2 54.15%, #fffafb 100%);
  }
  body[data-portal="staff"] .auth-identity {
    max-width: 625px;
    padding: 30px 0;
    align-self: center;
    position: relative;
  }
  body[data-portal="staff"] .auth-identity .school-logo {
    width: 126px;
    height: 126px;
    margin-bottom: 23px;
    border-width: 3px;
    box-shadow: 0 14px 42px #2a071a60;
  }
  body[data-portal="staff"] .auth-identity h1 {
    font-size: clamp(46px, 5.1vw, 76px);
    line-height: 1.08;
    letter-spacing: -.035em;
    max-width: 650px;
    margin: 18px 0;
  }
  body[data-portal="staff"] .auth-identity > p:not(.overline):not(.disclaimer) {
    font-size: clamp(15px, 1.32vw, 19px);
    line-height: 1.6;
  }
  body[data-portal="staff"] .auth-identity .overline {
    font-size: 12px;
    letter-spacing: 2px;
  }
  body[data-portal="staff"] .auth-card {
    width: 100%;
    max-width: 540px;
    justify-self: end;
    padding: clamp(28px, 3vw, 42px);
    border: 1px solid #ead9df;
    border-top: 5px solid #8a2749;
    border-radius: 25px;
    box-shadow: 0 26px 70px #3e122328;
    background: #fff;
  }
  body[data-portal="staff"] #loginForm h2 { font-size: 25px; letter-spacing: -.025em; }
  body[data-portal="staff"] .auth-card :is(input,select,textarea) { min-height: 47px; }
  body[data-portal="staff"] .auth-card .primary { min-height: 50px; font-size: 15px; }
  body[data-portal="staff"] .auth-card .tab { min-height: 43px; }

  .app-shell { background: #f8f5f7; }
  .app-shell .sidebar { width: 286px; box-shadow: 9px 0 28px #4e193014; }
  .app-shell .main { margin-left: 286px; }
  .sidebar .brand { padding: 28px 19px 18px; gap: 12px; }
  .sidebar .brand strong { font-size: 19px; letter-spacing: -.015em; }
  .sidebar .brand small { font-size: 11px; }
  .sidebar .user-card { padding: 16px; margin: 5px 15px 16px; }
  .sidebar .navigation { padding-inline: 12px; gap: 4px; }
  .sidebar .nav-btn { font-size: 13.5px; padding: 13px 15px; border-radius: 11px; transition: background-color .15s ease; }
  .sidebar .nav-btn.active { background: #ffffff28; box-shadow: inset 4px 0 #ffb8cb; color: #fff; }
  .sidebar .sidebar-bottom { padding: 16px 20px 19px; border-top: 1px solid #ffffff25; background: #21051225; line-height: 1.5; }
  .sidebar #logout { display: block; margin: 12px 0 8px; min-height: 43px; width: 100%; text-align: center; border-color: #ffffff91; background: #ffffff17; }
  .app-shell .topbar {
    min-height: 104px;
    padding: 20px clamp(24px, 3vw, 48px);
    background: #fff;
    border-bottom: 1px solid #eadce2;
    box-shadow: 0 5px 20px #51213c06;
  }
  .app-shell .topbar h1 { font-size: clamp(22px, 1.8vw, 28px); letter-spacing: -.025em; }
  .app-shell .topbar .overline { font-size: 11px; letter-spacing: 1.2px; }
  .app-shell .topbar-school-logo { width: 52px; height: 52px; }
  .app-shell .role-pill { padding: 11px 16px; font-size: 12px; }
  .app-shell .view { max-width: 1540px; padding: 30px clamp(24px, 3vw, 48px); margin-inline: auto; }
  .app-shell .card { border-radius: 18px; border: 1px solid #e9dfe4; box-shadow: 0 7px 24px #3f18320d; padding: clamp(20px, 2vw, 28px); }
  .app-shell .kpi-grid { gap: 18px; }
  .app-shell .kpi { border: 1px solid #eddce3; box-shadow: 0 10px 20px #4f21400d; padding: 23px; }
  .app-shell .kpi strong { font-size: 27px; }
  .app-shell .grid-table th { position: sticky; top: 0; z-index: 1; background: #f8f0f4; }
  .app-shell .grid-table th, .app-shell .grid-table td { padding: 13px 14px; }
  .app-shell .footer { padding-left: clamp(24px, 3vw, 48px); padding-right: clamp(24px, 3vw, 48px); }
}
/* The menu remains fully usable when a desktop window is short. */
@media (min-width: 981px) and (max-height: 740px) {
  .sidebar .brand { padding-top: 15px; padding-bottom: 10px; }
  .sidebar .user-card { padding: 10px; margin-bottom: 7px; }
  .sidebar .nav-btn { padding-block: 10px; }
  body[data-portal="staff"] .auth-shell { padding-block: 20px; }
}
.release-version { display: block; font-size: 10px; color: #f4cad7; opacity: .9; letter-spacing: .02em; margin-top: 5px; }
/* Keep the sign-out action reachable on short displays and touch screens. */
.sidebar { min-height: 0; }
.sidebar .navigation { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.sidebar .sidebar-bottom { flex-shrink: 0; }
