﻿:root {
    --navy: #1e2761;
    --navy-2: #2b3a8c;
    --ice: #cadcfc;
    --gold: #b8862b;
    --ink: #1c2330;
    --muted: #5c6473;
    --line: #e3e7ef;
    --bg: #f5f7fb;
    --card: #ffffff;
    --danger: #b3261e;
    --ok: #1f7a4d;
    --accent: #1c7293;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--navy); color: #fff; padding: 0 24px; height: 60px;
}
.brand { color: #fff; text-decoration: none; font-size: 20px; font-weight: 700; }
.brand span { color: var(--ice); font-weight: 400; font-size: 14px; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: var(--ice); text-decoration: none; font-size: 15px; }
.topbar nav a:hover { color: #fff; }
.who { color: #fff; font-size: 13px; opacity: .85; }
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: none; color: var(--ice); cursor: pointer; font-size: 15px; padding: 0; }
.linkbtn:hover { color: #fff; }

.container { max-width: none; margin: 24px auto; padding: 0 28px; }

/* Centered auth pages (sign in, enroll, request access, forgot password) */
.authpage { max-width: 480px; margin: 6vh auto 0; }
.authpage.wide { max-width: 640px; }
.authpage h1 { text-align: center; }
.authpage > .sub { text-align: center; }
.authpage .card, .authpage .card.wide { max-width: none; margin: 0 auto; }
h1 { font-size: 28px; margin: 0 0 4px; }
h2 { font-size: 20px; margin: 24px 0 12px; }
.sub { color: var(--muted); margin: 0 0 20px; }

/* Cohort tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.tile {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 18px 18px 16px; text-decoration: none; color: inherit;
    box-shadow: 0 1px 2px rgba(20,30,60,.05); transition: box-shadow .15s, transform .15s;
}
.tile:hover { box-shadow: 0 6px 18px rgba(20,30,60,.12); transform: translateY(-2px); }
.tile .prog { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
    color: var(--gold); text-transform: uppercase; }
.tile h3 { margin: 6px 0 8px; font-size: 18px; color: var(--navy); }
.tile .dates { color: var(--muted); font-size: 14px; }
.tile .role { display: inline-block; margin-top: 12px; font-size: 12px; background: var(--ice);
    color: var(--navy); padding: 3px 10px; border-radius: 999px; }
.tile { display: block; height: 100%; }
.tile-wrap { position: relative; display: block; }
.tile-gear {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; line-height: 1; text-decoration: none;
    color: var(--muted); background: rgba(255,255,255,.85);
    border: 1px solid var(--line); transition: background .15s, color .15s, transform .15s;
}
.tile-gear:hover { background: var(--navy); color: #fff; transform: rotate(45deg); }

/* In-app toast (floating status message) */
.app-toast {
    position: fixed; right: 20px; bottom: 20px; z-index: 1000;
    max-width: 380px; padding: 14px 18px; border-radius: 10px;
    background: var(--navy); color: #fff; box-shadow: 0 8px 24px rgba(20,30,60,.25);
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity .25s, transform .25s; cursor: pointer;
}
.app-toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* In-app confirm modal */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1100; background: rgba(20,30,60,.45);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
    background: var(--card); border-radius: 12px; padding: 22px 24px;
    max-width: 440px; width: 100%; box-shadow: 0 12px 40px rgba(20,30,60,.3);
}

/* Dashboard hero (centered welcome + build badge) */
.dash-hero { text-align: center; margin: 8px 0 26px; }
.dash-hero h1 { margin: 6px 0 4px; }
.dash-hero .sub { margin: 0; }
.build-badge {
    display: inline-block; margin-bottom: 6px; padding: 4px 14px;
    font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--navy); background: var(--gold); border-radius: 999px;
}

/* Forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; max-width: 520px; }
.card.wide { max-width: none; }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 14px; }
input, select, textarea {
    width: 100%; padding: 9px 11px; border: 1px solid #c7cede; border-radius: 8px;
    font-size: 15px; font-family: inherit; background: #fff;
}
textarea { min-height: 90px; }
.row { display: flex; gap: 14px; }
.row > div { flex: 1; }
.btn {
    display: inline-block; margin-top: 18px; background: var(--navy); color: #fff; border: none;
    padding: 11px 20px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--navy-2); }
.btn.busy { opacity: .6; pointer-events: none; }
/* Action / navigation links — blue and underlined on hover */
.muted-link { color: #1a5fb4; font-size: 14px; text-decoration: none; }
.muted-link:hover { text-decoration: underline; }
/* Also make in-content links (like footer "Manage gradebook →") read as blue links */
.cohort-main a.muted-link, a.linkblue { color: #1a5fb4; text-decoration: none; }
a.linkblue:hover { text-decoration: underline; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 15px; }
.alert-info { background: var(--ice); color: var(--navy); }
.alert-danger { background: #f7dcda; color: var(--danger); }
.alert-ok { background: #d9f0e3; color: var(--ok); }
.field-error { color: var(--danger); font-size: 13px; margin-top: 4px; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0; }
/* The publisher line sits under the school's line, quieter, on its own row. */
.footer > span { display: block; }
.footer-publisher { margin-top: 6px; font-size: 12px; opacity: .8; }
.footer-publisher a { color: inherit; text-decoration: underline; }
.empty { color: var(--muted); background: var(--card); border: 1px dashed var(--line);
    border-radius: 12px; padding: 40px; text-align: center; }

/* Printable access-instructions sheet */
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 32px 36px; max-width: 780px; }
.sheet-head { border-bottom: 3px solid var(--navy); padding-bottom: 10px; margin-bottom: 18px; }
.sheet-meta { border-collapse: collapse; margin: 0 0 8px; }
.sheet-meta td { padding: 4px 0; vertical-align: top; }
.sheet-meta td:first-child { color: var(--muted); width: 130px; }
.sheet .steps { line-height: 1.7; padding-left: 22px; }
.sheet .steps li { margin-bottom: 6px; }
.sheet-help { margin-top: 20px; padding: 12px 16px; background: var(--ice); color: var(--navy);
    border-radius: 8px; }

@media print {
    .topbar, .footer, .no-print { display: none !important; }
    body { background: #fff; }
    .container { margin: 0; max-width: none; padding: 0; }
    .sheet { border: none; padding: 0; max-width: none; }
    .cohort-nav { display: none !important; }
    .cohort-shell { display: block !important; }
}

/* Cohort left tree menu */
.cohort-shell { display: flex; gap: 24px; align-items: flex-start; }
.cohort-main { flex: 1; min-width: 0; }
.cohort-nav { width: 230px; flex: 0 0 230px; background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; padding: 10px; position: sticky; top: 20px; }
.cohort-nav .cohort-back { display: block; padding: 6px 10px; color: var(--muted); font-size: 13px; text-decoration: none; }
.cohort-nav .cohort-back:hover { color: var(--navy); }
.cohort-nav .cohort-title { font-weight: 700; color: var(--navy); padding: 6px 10px 10px;
    font-size: 15px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.cohort-nav a:not(.cohort-back) { display: block; padding: 9px 10px; border-radius: 8px;
    color: var(--ink); text-decoration: none; font-size: 14px; }
.cohort-nav a:not(.cohort-back):hover { background: var(--bg); }
.cohort-nav a.active { background: var(--ice); color: var(--navy); font-weight: 600; }
.cohort-nav .navgroup { color: var(--muted); font-size: 11px; text-transform: uppercase;
    letter-spacing: .04em; padding: 12px 10px 4px; }

/* Collapsible sidebar sections (Instructor / Student) */
.cohort-nav .navsection { border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; overflow: hidden; }
.cohort-nav .navsection > summary { list-style: none; cursor: pointer; padding: 10px 12px;
    font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--navy); background: var(--bg); display: flex; align-items: center; justify-content: space-between; }
.cohort-nav .navsection > summary::-webkit-details-marker { display: none; }
.cohort-nav .navsection > summary::after { content: "▸"; font-size: 11px; color: var(--muted); transition: transform .15s ease; }
.cohort-nav .navsection[open] > summary::after { transform: rotate(90deg); }
.cohort-nav .navsection > summary:hover { color: var(--navy); background: var(--ice); }
.cohort-nav .navsection .navlinks { padding: 6px; }
.cohort-nav .navsection .navgroup { padding: 10px 8px 3px; }

@media (max-width: 820px) {
    .cohort-shell { flex-direction: column; }
    .cohort-nav { width: 100%; flex-basis: auto; position: static; }
}

/* ---------------------------------------------------------------------------
   First-run setup screen.  (22 October 2026)
   It is a three-section form, not a sign-in box, so it gets its own width and
   its sections get real cards instead of inline-styled headings crammed into a
   640px column. Scoped to .setup so no other auth page changes.
   --------------------------------------------------------------------------- */
.authpage.setup { max-width: 920px; }
.authpage.setup > h1,
.authpage.setup > .sub { text-align: center; }
.setup-block { margin-bottom: 18px; }
.setup-block > h2 { font-size: 17px; margin: 0 0 2px; }
.setup-block > .sub { margin: 0 0 16px; font-size: 14px; }
.setup-block > label:first-of-type { margin-top: 0; }
.setup-actions { display: flex; justify-content: flex-end; margin-bottom: 40px; }
.setup-actions .btn { margin-top: 0; }
/* Checkbox rows: a fixed-width box with the text beside it, not a full-width input. */
.checkline { display: flex; align-items: center; gap: 9px; font-weight: 400; margin: 10px 0 0; }
.checkline > input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; }
@media (max-width: 760px) {
    .authpage.setup { max-width: none; margin: 3vh 16px 0; }
    .setup-block .row { flex-direction: column; gap: 0; }
}

/* "Where your records will be filed" panel on the first-run setup screen. */
.treebox { background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
    padding: 14px 16px; margin-top: 18px; }
.treehead { font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 10px; }
.treebox pre { margin: 0; font-family: Consolas, "Courier New", monospace; font-size: 12.5px;
    line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--ink); }

/* Guidance note on the first-run setup screen (how many repositories, how to write them). */
.notebox { background: var(--ice); border: 1px solid #b6cdf5; border-radius: 10px;
    padding: 14px 16px; margin: 0 0 20px; color: var(--navy); font-size: 14px; line-height: 1.55; }
.notebox p { margin: 0 0 10px; }
.notebox p:last-child { margin-bottom: 0; }
.notebox code { font-family: Consolas, "Courier New", monospace; font-size: 12.5px;
    background: #fff; border: 1px solid #c7d8f3; border-radius: 5px; padding: 1px 6px; }
.examples { border-collapse: collapse; margin: 0 0 10px; }
.examples td { padding: 3px 0; vertical-align: top; }
.examples td:first-child { width: 170px; color: var(--navy); opacity: .8; padding-right: 12px;
    white-space: nowrap; }
.notewarn { border-top: 1px solid #b6cdf5; padding-top: 10px; }

/* Starter repository picker on the first-run setup screen. */
.repo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.repo-pick { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 0;
    padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.repo-pick:hover { border-color: #b6cdf5; }
.repo-pick > input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; margin: 2px 0 0; }
.repo-name { display: block; font-weight: 600; font-size: 13.5px; color: var(--navy); }
.repo-desc { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.repo-foot { margin: 14px 0 0; font-size: 13px; }
@media (max-width: 760px) { .repo-grid { grid-template-columns: 1fr; } }

/* Program boxes, section sub-headings, help button and help panel on first-run setup. */
.repo-sub { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--muted); margin: 22px 0 10px; }
.prog-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.prog-grid input { margin: 0; }

.helpbtn { margin-left: 10px; width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid var(--line); background: #fff; color: var(--navy);
    font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; vertical-align: middle; }
.helpbtn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.helpbox { max-width: 720px; max-height: 82vh; overflow-y: auto; text-align: left; }
.helphead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.helphead h2 { margin: 0; font-size: 20px; color: var(--navy); }
.helpclose { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted);
    cursor: pointer; padding: 0 2px; }
.helpclose:hover { color: var(--ink); }
.helpbox h3 { font-size: 15px; color: var(--navy); margin: 18px 0 6px; }
.helpbox p, .helpbox li { font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.helpbox ul { margin: 0 0 10px; padding-left: 20px; }
.helpbox code { font-family: Consolas, "Courier New", monospace; font-size: 12.5px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

@media (max-width: 760px) { .prog-grid { grid-template-columns: 1fr; } }
