:root {
  --portal-width: 1280px;
  --portal-gutter: 96px;
  --portal-accent: #60ade4;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fff;
}

main { flex: 1; min-height: 0; min-width: 0; }

.demo-container,
.topbar-content,
.workspace-heading-inner,
.workspace > :not(.workspace-header, .dashboard-hero) {
  width: min(var(--portal-width), calc(100% - var(--portal-gutter)));
  margin-inline: auto;
}

.topbar-content {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr;
  min-height: 112px;
  gap: 8px 20px;
  padding-block: 10px;
}

.brand-home {
  width: 300px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.logo { width: 100%; }

.section-nav {
  grid-column: 1 / -1;
  align-items: center;
  gap: 2px 12px;
}

.nav-button {
  min-height: 42px;
  padding: 6px 2px;
  border-radius: 0;
  font-size: .84rem;
  font-weight: 700;
  text-decoration-color: var(--portal-accent);
  text-underline-offset: 8px;
  text-decoration-thickness: 3px;
}

.nav-button:is(:hover, [aria-current='page']) {
  color: var(--ink);
  background: transparent;
  text-decoration-line: underline;
}

.account-bar {
  min-width: 0;
  align-self: center;
  justify-content: end;
  gap: 6px 12px;
}

.account-menu { position: relative; }

.account-menu > summary {
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.account-actions {
  position: absolute;
  z-index: 2;
  inset: calc(100% + 6px) 0 auto auto;
  display: grid;
  min-width: max-content;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 20px #15334e18;
}

.account-actions > .button { justify-self: start; }

#employee-view-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0 10px;
  overflow-wrap: anywhere;
}

#employee-view-bar p { color: var(--muted); }
#employee-view-exit { min-height: 32px; }

.button { border-radius: 100px; }
.button-link { border-radius: 4px; }

.workspace { width: 100%; padding-block: 0 clamp(32px, 5vw, 58px); }

.workspace-header {
  display: block;
  margin-bottom: 24px;
  padding-block: clamp(24px, 4vw, 45px) 0;
}

.workspace-header h1 {
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -.035em;
}

.dashboard-hero { display: none; }

.workspace:has(> :is(#admin-panel, #personal-panel):not([hidden])) .workspace-header {
  display: none;
}

.workspace:has(> :is(#admin-panel, #personal-panel):not([hidden])) .dashboard-hero {
  display: block;
  overflow: hidden;
  margin-bottom: clamp(20px, 4vw, 48px);
  padding-block: clamp(32px, 5vw, 66px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(25px, 5vw, 62px);
}

.dashboard-hero-copy { min-width: 0; }

.dashboard-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.dashboard-eyebrow::before {
  flex: 0 0 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--portal-accent);
  content: '';
}

.dashboard-eyebrow:empty,
.dashboard-actions:empty { display: none; }

#dashboard-heading {
  margin: 0 0 .55em;
  font-size: clamp(2.55rem, 5.3vw, 4.5rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

#dashboard-heading span {
  position: relative;
  z-index: 0;
  display: inline-block;
}

#dashboard-heading span::after {
  position: absolute;
  z-index: -1;
  inset: auto -4px .06em -2px;
  height: .25em;
  border-radius: 3px;
  background: var(--gold);
  transform: rotate(-2deg);
  content: '';
}

#dashboard-intro { max-width: 54ch; margin-bottom: .55em; color: var(--muted); line-height: 1.6; }

.dashboard-actions,
.roster-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-actions { padding-top: 9px; }
.dashboard-actions .button {
  min-height: 42px;
  padding: 8px 17px;
  border-color: var(--ink);
  font-size: .9rem;
}
.roster-actions:has(> :not([hidden])) { margin-inline-start: auto; }
.roster-actions:not(:has(> :not([hidden]))) { display: none; }

.roster-scope { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.roster-scope .button[aria-pressed='true'] { border-color: var(--ink); background: var(--ink); color: white; }

.dashboard-photo { position: relative; padding-right: 14px; }

.dashboard-photo::before {
  position: absolute;
  inset: 23px -8px auto auto;
  box-sizing: content-box;
  width: 120px;
  height: 120px;
  border: 20px solid var(--portal-accent);
  border-radius: 50%;
  content: '';
}

.dashboard-photo::after {
  position: relative;
  display: block;
  height: clamp(245px, 31vw, 395px);
  border-radius: 125px 16px 16px;
  background: var(--blue-soft) url('/brand/school.webp') center / cover;
  content: '';
}

.dashboard-callout {
  margin: 0 0 20px;
  padding: 11px 13px;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: var(--gold-soft);
}

.dashboard-callout > strong { display: block; }

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin: 0 0 20px;
}

.dashboard-tile,
.dashboard-shifts {
  min-width: 0;
  padding: clamp(16px, 2.3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  overflow-wrap: anywhere;
}

.dashboard-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--blue-soft);
}
.dashboard-shifts { margin-bottom: 20px; }

.dashboard-tile h2,
.dashboard-shifts h2 {
  margin: 0 0 11px;
  font-size: 1.27rem;
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -.035em;
}

.dashboard-big {
  display: block;
  margin: .2em 0;
  font-size: 1.63rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}

.dashboard-tile p { margin: 0 0 .55em; color: var(--muted); line-height: 1.6; }

.dashboard-link {
  display: inline;
  min-height: 0;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: start;
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: #70869a;
  text-underline-offset: 4px;
  white-space: normal;
}

.dashboard-link:not(:disabled):hover { background: transparent; text-decoration-thickness: 2px; }
.dashboard-tile .dashboard-link { margin-top: auto; }
.dashboard-shifts ul { padding: 0; list-style: none; }

.dashboard-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-block: 10px;
  border-top: 1px solid var(--line);
}

.dashboard-row > span { font-variant-numeric: tabular-nums; }

#admin-panel .admin-groups,
#personal-panel .admin-groups {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  align-items: stretch;
}

#employee-panel { display: contents; }
#employee-panel .admin-group:not(:has(> .button:not([hidden]))) { display: none; }

#admin-panel .admin-group,
#personal-panel .admin-group {
  min-width: 0;
  padding: 18px 24px;
  border-radius: 16px;
  background: white;
}

#admin-panel .admin-group h2,
#personal-panel .admin-group h2 {
  margin-bottom: 6px;
  font-size: 1.15rem;
  line-height: 1.22;
}

#admin-panel .admin-group > .button,
#personal-panel .admin-group > .button {
  justify-content: flex-start;
  align-self: flex-start;
  min-height: 34px;
  padding: 5px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-align: start;
  text-decoration: underline;
  text-decoration-color: #70869a;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  white-space: normal;
}

#admin-panel .admin-group > .button:hover,
#personal-panel .admin-group > .button:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: var(--ink);
}

.auth-panel {
  margin-block: clamp(32px, 8vh, 95px);
  box-shadow: 0 15px 34px #15334e0d;
}

#swaps-panel > .button { margin-bottom: .75rem; }
.shift-swaps-content { display: grid; gap: 18px; }
.shift-swaps-proposal { width: min(100%, 42rem); }
.shift-swap-type { margin: 0; }

.demo-footer {
  padding-block: 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-size: .87rem;
}

@media (max-width: 1180px) {
  :root { --portal-gutter: 64px; }
}

@media (max-width: 760px) {
  :root { --portal-gutter: 40px; }
  .topbar-content { gap: 8px 16px; min-height: 0; }
  .brand-home { width: clamp(175px, 38vw, 245px); }
  .account-bar { margin-inline-start: 0; }
  #employee-view-bar { flex-basis: 100%; }
  .dashboard-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-photo::before { width: 80px; height: 80px; border-width: 14px; }
  .dashboard-photo::after { height: clamp(200px, 49vw, 320px); border-top-left-radius: 70px; }
  .dashboard-metrics,
  #admin-panel .admin-groups,
  #personal-panel .admin-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (max-width: 490px) {
  .topbar-content { grid-template-columns: minmax(0, 1fr); }
  .account-bar { justify-content: start; }
  .account-actions { inset: calc(100% + 6px) auto auto 0; }
  #employee-view-bar { justify-content: start; }
  .dashboard-metrics,
  #admin-panel .admin-groups,
  #personal-panel .admin-groups { grid-template-columns: minmax(0, 1fr); }
  .roster-actions:has(> :not([hidden])) { margin-inline-start: 0; }
}
