/* Elevate EMS Partner Progress: the same clean look as the Staff site (white on light gray, Elevate navy, the phone's
   own font). Made for phones first. */
:root {
  --bg: #eceef1; --paper: #ffffff; --blush-soft: #eef1f5; --taupe: #8a96a3; --taupe-dark: #02273D; --ink: #1f2328;
  --muted: #6a737d; --line: #d0d5db; --line-soft: #e6e9ed; --sage: #1e7e34; --sage-soft: #e6f4ea; --honey-soft: #fff4d6;
  --rose: #b42318; --rose-soft: #fdecea; --navy: #02273D;
  --shadow: 0 1px 3px rgba(0, 0, 0, .12);
  --serif: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; font-size: 16px; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.loading { padding: 80px 16px; text-align: center; color: var(--muted); font-size: 16px; }
.empty { color: var(--muted); margin: 6px 0; }

.btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 9px 18px; font-weight: 500; cursor: pointer; }
.btn:hover { border-color: var(--taupe); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.wide { width: 100%; padding: 12px; font-size: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 14px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: var(--blush-soft); color: var(--navy); white-space: nowrap; }
.tag.sage { background: var(--sage-soft); color: var(--sage); }
.tag.honey { background: var(--honey-soft); color: #8a6100; }

/* Sign in / set up */
.signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.signin-card { background: #fff; border-radius: 10px; padding: 24px 22px; max-width: 420px; width: 100%; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); text-align: center; }
.signin-logo { width: 72px; height: 72px; margin-bottom: 2px; }
.signin-card h1 { font-size: 24px; color: var(--navy); }
.signin-card > p { margin: 10px 0; }
.signin-card form { text-align: left; margin-top: 16px; display: grid; gap: 10px; }
.opt { font-size: 13px; font-weight: 400; color: var(--muted); }
.first-time { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.field input { font-size: 16px; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; width: 100%; }
.field input:focus { outline: 2px solid rgba(2, 39, 61, .35); outline-offset: 0; border-color: var(--navy); }
fieldset { border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 10px; }
legend { font-size: 15px; font-weight: 600; padding: 0 6px; }
.err { color: var(--rose); background: var(--rose-soft); border-radius: 6px; padding: 8px 12px; margin: 0; font-size: 14px; }
.note { color: var(--sage); background: var(--sage-soft); border-radius: 6px; padding: 8px 12px; margin: 0; font-size: 14px; }

/* Signed in */
.sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-bottom: 8px; box-shadow: 0 6px 10px -10px rgba(0, 0, 0, .3); }
.top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; max-width: 720px; margin: 0 auto; padding-top: max(14px, env(safe-area-inset-top)); }
.top img { width: 42px; height: 42px; }
.top > div { flex: 1; min-width: 0; }
.top h1 { font-size: 20px; line-height: 1.1; color: var(--navy); }
.top p { margin: 0; color: var(--muted); font-size: 14px; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--navy); cursor: pointer; padding: 0; flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.on { background: var(--navy); color: #fff; border-color: var(--navy); }
/* The person icon's menu */
.top > .menu-wrap { position: relative; flex: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .16); min-width: 190px; padding: 4px; display: grid; }
.menu-pop button { background: none; border: 0; text-align: left; padding: 11px 12px; font-size: 15px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.menu-pop button:hover, .menu-pop button.on { background: var(--blush-soft); }
.menu-pop button:disabled { color: var(--muted); cursor: default; }
.menu-pop button[data-act="signout"] { color: var(--muted); border-top: 1px solid var(--line-soft); border-radius: 0 0 6px 6px; margin-top: 2px; }
.checking { color: var(--muted); font-size: 12px; }
.tabs { display: flex; max-width: 720px; margin: 4px auto 0; padding: 0 16px; }
.tabs button { flex: 1; border: 1px solid var(--line); background: #fff; padding: 9px 6px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; margin-left: -1px; }
.tabs button:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.tabs button:last-child { border-radius: 0 6px 6px 0; }
.tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; position: relative; }
.wrap { max-width: 720px; margin: 0 auto; padding: 14px 16px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.wrap > *, .day, .days { min-width: 0; }
.box { background: #fff; border-radius: 8px; padding: 16px; box-shadow: var(--shadow); }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--navy); }
.box-head h2 { font-size: 18px; color: var(--navy); }
.box form { display: grid; gap: 12px; }
.box form .btn { justify-self: start; }
.menu-who { margin: 0; padding: 10px 12px 8px; font-size: 13px; color: var(--muted); word-break: break-all; }
.menu-pop button[data-act="signout"] { border-top: 1px solid var(--line-soft); color: var(--ink); }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; }
.code-in { font-size: 24px !important; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.tag.rose { background: var(--rose-soft); color: var(--rose); }
.mini-head { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 6px; }
.foot { text-align: center; margin: 4px 0 0; }

/* Key dates */
.dates { list-style: none; margin: 0; padding: 0; }
.dates li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.dates li:last-child { border-bottom: 0; }
.dates li span { color: var(--muted); }
.dates li b { font-weight: 600; text-align: right; white-space: nowrap; }
.dates li.past b, .dates li.past span { color: var(--taupe); font-weight: 400; }
.dates li.next b { color: var(--navy); }
.dates li.next span::after { content: "Next"; margin-left: 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: var(--navy); color: #fff; }

/* Students */
.summary { margin: 0 0 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; margin: 0 0 10px; background: #fff; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.search input { border: 0; outline: 0; padding: 10px 0; font-size: 16px; width: 100%; background: transparent; }
.cards { display: grid; gap: 10px; }
.stu { border: 1px solid var(--line-soft); border-radius: 8px; padding: 12px 14px; }
.stu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stu-head h3 { margin: 2px 0 0; font-size: 17px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.grade { text-align: right; flex: none; line-height: 1.1; }
.grade b { display: block; font-size: 22px; color: var(--navy); font-variant-numeric: tabular-nums; }
.grade span { font-size: 12px; color: var(--muted); }
.grade.low b { color: var(--rose); }
.grade.none b { color: var(--taupe); }
.act { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.act b { color: var(--ink); font-weight: 600; }
.prog { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line-soft); }
.prog > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; font-size: 14px; }
.prog > li > span { color: var(--muted); }
.prog > li > b { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; text-align: right; }
.prog .tap { cursor: pointer; }
.prog .caret { font-size: 11px; }
.prog .assign-list { display: block; padding: 2px 0 6px; }
.prog .assign-list ul { list-style: none; margin: 0; padding: 8px 12px; background: var(--blush-soft); border-radius: 6px; display: grid; gap: 4px; }
.prog .assign-list li { font-size: 14px; }
.yes { color: var(--sage); font-weight: 700; }
.no { color: var(--taupe); }
.bar { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--sage); border-radius: 3px; }
.out { list-style: none; margin: 0; padding: 0; }
.out li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 15px; }
.out li:last-child { border-bottom: 0; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
