/* Cornerstone Portal look (portal.csjax.org): near-black header with the school logo and a red rule, warm greys, red accents. */
:root {
  --red: #E4010D; --red-dark: #B00009; --ink: #141213; --slate: #6B6466; --chalk: #F6F4F4;
  --line: #E4DFDF; --paper: #FFFFFF; --head: #141213; --r: 14px;
}
body { background: var(--chalk); color: var(--ink); }
h1 { font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }

/* header: logo instead of the text wordmark */
.bar { background: var(--head); border-bottom: 3px solid var(--red); padding: calc(var(--safe-t) + .5rem) 1rem .5rem; }
.bar .mark { display: flex; align-items: center; min-height: 44px; padding-left: 146px; font-size: 0; color: transparent;
  background: url(https://portal.csjax.org/icons/logo-horizontal.webp) left center / 138px auto no-repeat; }
.bar .mark small { display: block; font-size: .72rem; font-weight: 600; color: #F3EFEF; opacity: .85; letter-spacing: .04em;
  border-left: 1px solid #4A4446; padding-left: .6rem; line-height: 1.25; }
.bar a.pill, .bar button.pill, .bar a.pill[href="/discipline"] { background: rgba(255,255,255,.12) !important; color: #fff !important; }
.bar a.pill:hover { background: rgba(255,255,255,.2) !important; }
@media (max-width: 420px) { .bar .mark { padding-left: 120px; background-size: 112px auto; } .bar .mark small { font-size: .66rem; } }

.card { border-radius: var(--r); }
.btn { border-radius: 10px; }
.status { border-radius: 10px; }
.hr-nav, .disc-nav { background: var(--head); }
.disc-nav a, .hr-nav a { align-items: center; }
.login .crest { color: var(--red); }

/* bottom tabs, as in the Portal app */
.tabs { background: var(--paper); border-top: 1px solid var(--line); }
.tabs a, .tabs button.tab-more { flex: 1; position: relative; font-size: .7rem; font-weight: 600; color: var(--slate); }
.tabs a[aria-current=page], .tabs button.tab-more[aria-current=page] { color: var(--red); }
.tabs a[aria-current=page]::before, .tabs button.tab-more[aria-current=page]::before {
  content: ""; position: absolute; top: 0; left: 24%; right: 24%; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
.tabs button.tab-more { border: 0; background: transparent; padding: .5rem 0 .55rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; cursor: pointer; font-family: inherit; }
.tabs button.tab-more svg { width: 1.5rem; height: 1.5rem; }

/* More sheet */
.more-sheet { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.more-in { background: var(--paper); width: 100%; max-width: 640px; border-radius: 20px 20px 0 0; padding: .6rem 1rem calc(1rem + var(--safe-b)); }
.more-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto .6rem; }
.more-in h2 { font-size: 1.2rem; text-transform: uppercase; margin: 0 0 .4rem; }
.more-list { list-style: none; margin: 0; padding: 0; }
.more-list a { display: flex; align-items: center; gap: .9rem; padding: .8rem .4rem; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.more-list li:first-child a { border-top: 0; }
.more-list a[aria-current=page] { color: var(--red); }
.more-ico { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 10px; background: #FBE9EA; color: var(--red); display: grid; place-items: center; }
.more-ico svg { width: 1.35rem; height: 1.35rem; }
.more-list b { display: block; font-weight: 700; }
.more-list span.small { color: var(--slate); }
@media (min-width: 700px) { .more-sheet { align-items: center; } .more-in { border-radius: 20px; max-width: 460px; } }

/* Team time off page (Time off tab, opened from More): show only everyone's time off */
main.team-only > :not(#team-to) { display: none !important; }
main.team-only > #team-to { margin-top: 0; }

/* ---------- One menu for managers and admins (body.uni) ---------- */
#uni-side { display: none; }
body.uni .bar .pill { display: none !important; }
@media (min-width: 900px) {
  body.uni { padding-left: 248px; }
  body.uni #uni-side { display: flex; flex-direction: column; gap: .1rem; position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 6;
    background: var(--head); border-right: 3px solid var(--red); padding: calc(var(--safe-t) + .9rem) .7rem 1rem; overflow-y: auto; }
  body.uni .bar, body.uni nav.tabs, body.uni .hr-nav, body.uni .disc-nav { display: none !important; }
  body.uni .hr-shell, body.uni .disc-shell { display: block; min-height: 100dvh; }
  body.uni .hr-main, body.uni .disc-main { padding: 1.5rem 2rem 3rem; max-width: 1240px; }
  body.uni main:not(.hr-main):not(.disc-main) { max-width: 720px; padding: 1.5rem 1.5rem 3rem; }
  body.uni .modal-wrap { left: 248px; }
}
.uni-logo { display: flex; align-items: flex-end; height: 84px; margin: 0 .35rem .35rem; text-decoration: none;
  background: url(https://portal.csjax.org/icons/logo-horizontal.webp) left top / 190px auto no-repeat; }
.uni-logo span { color: #F3EFEF; opacity: .75; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.uni-who { color: #A69EA0; font-size: .82rem; margin: 0 .35rem .6rem; padding-bottom: .7rem; border-bottom: 1px solid #322D2E; }
.uni-h { color: #A69EA0; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: .9rem .5rem .3rem; }
#uni-side a:not(.uni-logo) { display: flex; align-items: center; gap: .65rem; color: #E4DFDF; text-decoration: none; padding: .5rem .6rem; border-radius: 8px; font-weight: 600; font-size: .95rem; }
#uni-side a:not(.uni-logo):hover { background: rgba(255,255,255,.07); }
#uni-side a[aria-current=page] { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 #FF4650; }
#uni-side a svg { width: 1.2rem; height: 1.2rem; flex: none; }
.uni-subs { margin: .1rem 0 .4rem 1.55rem; padding-left: .5rem; border-left: 1px solid #322D2E; display: flex; flex-direction: column; gap: .05rem; }
#uni-side a.uni-sub { font-size: .88rem; font-weight: 500; padding: .38rem .6rem; justify-content: space-between; color: #CFC8C9; }
#uni-side a.uni-sub[aria-current=page] { color: #fff; font-weight: 700; }
#uni-side .count { background: var(--red); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 .45rem; line-height: 1.3rem; font-weight: 800; }
@media (max-width: 899px) {
  body.uni .hr-main, body.uni .disc-main { padding-bottom: calc(6rem + var(--safe-b)); }
  body.uni .disc-shell { grid-template-columns: 1fr; }
  body.uni .disc-nav { flex-direction: row; overflow-x: auto; padding: .4rem; gap: .25rem; position: sticky; top: 3.6rem; z-index: 4; }
  body.uni .disc-nav a { white-space: nowrap; gap: .4rem; }
}

/* ---------- Human Resources (body.hr-area): no My Time Clock items here ---------- */
/* Phone: the Human Resources sections as a strip across the top (nav.js); the section's own pages sit under it.
   Computer: the sidebar has them, so the strip is hidden. */
#hr-top { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; background: var(--head, #141213); padding: .5rem .6rem; }
#hr-top::-webkit-scrollbar { display: none; }
#hr-top a { display: inline-flex; align-items: center; gap: .35rem; flex: none; white-space: nowrap; text-decoration: none; color: #E4DFDF; font-weight: 700; font-size: .9rem;
  padding: .5rem .8rem; border-radius: 999px; background: rgba(255,255,255,.08); }
#hr-top a[aria-current=page] { background: #F3EFEF; color: #141213; }
#hr-top .count { background: var(--red); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 .45rem; line-height: 1.3rem; font-weight: 800; }
body.hr-area nav.tabs { display: none !important; }
.disc-shell.disc-flat, .hr-shell.hr-flat { grid-template-columns: 1fr; }
@media (min-width: 900px) { body.uni #hr-top { display: none; } }
@media (max-width: 899px) {
  body.hr-area .hr-main, body.hr-area .disc-main, body.hr-area main { padding-bottom: calc(2rem + var(--safe-b)); }
  body.hr-area .disc-nav, body.hr-area .hr-nav { position: static; }
}

/* Phones: rows of several buttons (HR / HR Forms section menus, Open/Cleared style toggles) become an even grid of
   rounded tiles, matching the Cornerstone Portal. The selected one is a light tile. "html body" outranks page styles. */
.nw { white-space: nowrap; }
@media (max-width: 640px) {
  html body .hr-nav, html body .disc-nav { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; padding: .6rem; overflow: visible; position: static; flex-direction: initial; }
  html body .hr-nav a, html body .disc-nav a { display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: 2px .35em; text-align: center;
    min-height: 52px; padding: .45rem .55rem; border-radius: 14px; border: 1.5px solid #3A3536; background: #1F1B1C; color: #F3EFEF; box-shadow: none;
    white-space: normal; font-size: .9rem; line-height: 1.2; }
  html body .hr-nav a[aria-current=page], html body .disc-nav a[aria-current=page] { background: #F3EFEF; color: #141213; border-color: #F3EFEF; box-shadow: none; }
  html body .seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; width: 100%; border: 0; border-radius: 0; overflow: visible; }
  html body .seg button { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: .45rem .6rem; border-radius: 14px;
    border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font-size: .92rem; line-height: 1.2; }
  html body .seg button[aria-selected=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
}
