/* HigherEd+ customer sign-in and product launcher.
   Brand: the HigherEd+ mark (teal shield, orange book); deep teal for
   actions, orange only as the accent in the wordmark. */
:root {
  --brand: #0b7a87; --brand-hover: #08616b; --brand-soft: #e6f5f7; --teal: #66cdd8; --orange: #be4622;
  --ink: #1f1f1f; --ink-2: #444746; --muted: #5f6368; --line: #dadce0; --line-strong: #747775;
  --bg: #f7f9fa; --card: #ffffff;
  --err: #b3261e; --err-bg: #fceeed; --ok: #146c43; --ok-bg: #e6f4ea;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
button, input { font-family: inherit; }
p { margin: 0; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
.hidden { display: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; background: radial-gradient(900px 460px at 50% -12%, rgba(102, 205, 216, .28), transparent 62%), var(--bg); }
.card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 40px 40px 32px; animation: rise .25s ease-out; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 40px -16px rgba(11, 122, 135, .22); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 20px; }
.row-between .check { margin: 0; }
.row-between .small { font-size: 14px; }
.switch { text-align: center; font-size: 14px; color: var(--ink-2); margin-top: 18px; }
.rules { list-style: none; margin: 8px 4px 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 8px; transition: color .15s; }
.rules li::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; box-sizing: border-box; transition: all .15s; }
.rules li.ok { color: var(--ok); }
.rules li.ok::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.logo img { width: 58px; height: auto; }
.logo img.full { width: 170px; }
.word { font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.word b { color: var(--orange); font-weight: 700; }
h1 { font-size: 24px; font-weight: 600; margin: 0; text-align: center; letter-spacing: -.01em; line-height: 1.3; }
.sub { margin: 8px 0 0; text-align: center; color: var(--ink-2); font-size: 15px; }
form { margin-top: 28px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); margin: -14px 0 14px -8px; padding: 6px 10px 6px 6px; border-radius: 8px; }
.back:hover { background: var(--bg); text-decoration: none; }
.back svg { width: 18px; height: 18px; }

/* fields: outlined with a floating label */
.fld { position: relative; margin-bottom: 18px; }
.fld input { width: 100%; height: 52px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 16px; font-size: 16px; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.fld input:focus { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.fld input[readonly] { background: var(--bg); color: var(--ink-2); border-color: var(--line); }
.fld label { position: absolute; left: 12px; top: 15px; padding: 0 4px; background: #fff; color: var(--muted); font-size: 16px; pointer-events: none; transition: all .15s ease; }
.fld input:focus + label, .fld input:not(:placeholder-shown) + label { top: -9px; font-size: 12px; font-weight: 500; color: var(--brand); }
.fld input:not(:focus):not(:placeholder-shown) + label { color: var(--muted); }
.fld input[readonly] + label { background: linear-gradient(#fff 50%, var(--bg) 50%); }
.fld .hint { font-size: 12px; color: var(--muted); margin: 6px 4px 0; line-height: 1.4; }
.fld.code input { letter-spacing: .35em; font-size: 22px; font-weight: 600; text-align: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); margin: -6px 0 16px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.link-row { margin: 0 0 26px; font-size: 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 24px; border-radius: 8px; border: 1px solid transparent; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; position: relative; transition: background .15s, box-shadow .15s, border-color .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.btn-primary:disabled { opacity: .7; cursor: default; box-shadow: none; }
.btn-text { background: transparent; color: var(--brand); padding: 0 12px; margin-left: -12px; }
.btn-text:hover { background: var(--brand-soft); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); width: 100%; height: 48px; }
.btn-outline:hover { background: var(--bg); border-color: var(--line-strong); }
.btn-outline svg { color: var(--brand); }
.btn-block { width: 100%; }
.btn.busy { color: transparent; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; margin: 22px 0 16px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* messages */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.45; margin-top: 22px; background: var(--err-bg); color: var(--err); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert svg { width: 18px; height: 18px; margin-top: 2px; }
.alert + form { margin-top: 18px; }
.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-top: 28px; }
.done .ico { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; }
.done .ico svg { width: 26px; height: 26px; }
.done p { color: var(--ink-2); }
.done .btn { margin-top: 8px; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 18px; }

.foot { margin-top: 24px; font-size: 12px; color: var(--muted); }

/* ---------- launcher ---------- */
.launcher { min-height: 100vh; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 12px; position: sticky; top: 0; z-index: 2; }
.topbar img { width: 34px; height: auto; }
.topbar img.wordmark { width: auto; height: 20px; }
.topbar .word { font-size: 18px; }
.topbar .sp { flex: 1; }
.who { display: flex; align-items: center; gap: 12px; margin-right: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.who .n { font-size: 14px; font-weight: 600; line-height: 1.2; }
.who .u { font-size: 12px; color: var(--muted); }
.btn-sm { width: auto; height: 36px; padding: 0 14px; font-size: 14px; }
.main { max-width: 1040px; margin: 0 auto; padding: 44px 24px 64px; }
.main h1 { text-align: left; font-size: 28px; }
.main .sub { text-align: left; margin-top: 6px; }
.main .alert { margin: 0 0 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; }
.tile { display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; color: var(--ink); min-height: 196px; transition: box-shadow .15s, border-color .15s, transform .15s; }
a.tile:hover { text-decoration: none; border-color: var(--teal); box-shadow: 0 10px 28px -14px rgba(11, 122, 135, .45); transform: translateY(-2px); }
.tile.soon { opacity: .55; }
.tile .mark { height: 64px; display: flex; align-items: center; gap: 10px; }
.tile .mark img { max-height: 44px; max-width: 190px; object-fit: contain; }
.tile .mark img.icon { height: 38px; width: 38px; }
.tile .mark img.tall { max-height: 64px; }
/* A white wordmark needs its brand colour behind it to be legible on the
   white tile; WriteSTREAK's own sign-in page puts it on this gradient. */
.tile .mark .panel-mark { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 10px; background: linear-gradient(135deg, #2a1d6b 0%, #5b3bbf 55%, #7c4ddb 100%); }
.tile .mark .panel-mark img { max-height: 20px; max-width: 160px; }
.tile .mark .nm { font-size: 20px; font-weight: 700; }
.tile .tag { color: var(--ink-2); font-size: 14px; flex: 1; }
.tile .go { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: 14px; }
.tile .go svg { width: 18px; height: 18px; transition: transform .15s; }
a.tile:hover .go svg { transform: translateX(3px); }
.tile.soon .go { color: var(--muted); }

@media (max-width: 520px) {
  .auth { justify-content: flex-start; padding-top: 28px; }
  .card { padding: 30px 22px 26px; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .btn-text { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .who .u, .who .n { display: none; }
  .main { padding: 24px 16px 48px; }
}

/* ---------- the university administrator's list (/manage) ---------- */
.topbar .home { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.manage-link { display: flex; align-items: center; gap: 16px; margin-top: 34px; padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); font-weight: 500; }
.manage-link:hover { text-decoration: none; border-color: var(--teal); }
.manage-link > svg { width: 26px; height: 26px; color: var(--brand); flex-shrink: 0; }
.manage-link > svg:last-child { margin-left: auto; color: var(--muted); width: 20px; height: 20px; }
.manage-link span { display: flex; flex-direction: column; gap: 2px; }
.manage-link small { color: var(--muted); font-size: 13px; font-weight: 400; }
.manage .back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 18px; }
.manage .back svg { width: 18px; height: 18px; }
.manage .sub b { color: var(--ink); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; margin-top: 24px; }
.panel h2 { font-size: 18px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.panel h2 .count { font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 10px; }
.panel .hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.panel textarea { width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; resize: vertical; }
.panel textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.panel .actions { margin-top: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.panel-head input { height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; width: 240px; }
.panel-head input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.people { display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: 1fr auto auto auto; gap: 18px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person b { display: block; font-size: 15px; }
.person .e { color: var(--muted); font-size: 13px; }
.person .last { color: var(--muted); font-size: 13px; white-space: nowrap; }
.person .act { display: flex; justify-content: flex-end; min-width: 90px; }
.person .confirm { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.off { background: var(--err-bg); color: var(--err); }
.btn-text.danger { color: var(--err); }
.file { cursor: pointer; }
.people .empty { padding: 26px 0; text-align: center; color: var(--muted); }
@media (max-width: 640px) { .person { grid-template-columns: 1fr auto; } .person .last { display: none; } .panel-head input { width: 100%; } }
