/* Plain, text-first student-services look: top tabs, simple sidebar, bordered tables. */
:root {
  --brand: #1f3b5c;
  --brand-2: #2c5282;
  --tab-bg: #dfe4ea;
  --tab-hover: #eef1f4;
  --bg: #ffffff;
  --panel: #f4f5f7;
  --panel-head: #e3e7ec;
  --text: #222222;
  --muted: #666666;
  --line: #c9ced4;
  --line-soft: #e1e4e8;
  --link: #1a4f8b;
  --stripe: #f7f8fa;
  --danger: #b0281c;
  --ok-bg: #e8f3e6; --ok-text: #25501f; --ok-line: #9cc596;
  --warn-bg: #fdf4e1; --warn-text: #6b4b10; --warn-line: #e3c07a;
  --info-bg: #e9f1f8; --info-text: #1d4468; --info-line: #9dbbd6;
  --danger-bg: #fbeae8; --danger-text: #7a1c13; --danger-line: #e0a39c;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #16283f; --brand-2: #8fb3dc; --tab-bg: #2a3038; --tab-hover: #323943; --bg: #1a1d21; --panel: #22262b; --panel-head: #2b3036;
    --text: #e2e4e7; --muted: #a3a8ae; --line: #3c434b; --line-soft: #30363d; --link: #8fb8e6; --stripe: #1f2327; --danger: #f08b80;
    --ok-bg: #1d2f1b; --ok-text: #b8dcb2; --ok-line: #3e6a39; --warn-bg: #33291a; --warn-text: #efd29c; --warn-line: #7a6231;
    --info-bg: #19293a; --info-text: #b1cfeb; --info-line: #3b5b7c; --danger-bg: #361c19; --danger-text: #f2b5ad; --danger-line: #7a3830;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #16283f; --brand-2: #8fb3dc; --tab-bg: #2a3038; --tab-hover: #323943; --bg: #1a1d21; --panel: #22262b; --panel-head: #2b3036;
  --text: #e2e4e7; --muted: #a3a8ae; --line: #3c434b; --line-soft: #30363d; --link: #8fb8e6; --stripe: #1f2327; --danger: #f08b80;
  --ok-bg: #1d2f1b; --ok-text: #b8dcb2; --ok-line: #3e6a39; --warn-bg: #33291a; --warn-text: #efd29c; --warn-line: #7a6231;
  --info-bg: #19293a; --info-text: #b1cfeb; --info-line: #3b5b7c; --danger-bg: #361c19; --danger-text: #f2b5ad; --danger-line: #7a3830;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 14px/1.5 Arial, "Helvetica Neue", Helvetica, sans-serif;
}
a { color: var(--link); }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
p { margin: 0 0 .9em; }
ul { margin: 0 0 .9em; padding-left: 1.4em; }
code { font: 13px Consolas, "Courier New", monospace; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.ic { width: 1em; height: 1em; flex: none; vertical-align: -.125em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: 6px 10px; z-index: 100; }
.skip:focus { left: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.text-danger { color: var(--danger) !important; }
form.inline { display: inline; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- header ---------- */
.site-header { background: var(--brand); color: #fff; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; min-height: 72px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; min-width: 0; }
.brand .logo { max-height: 52px; max-width: 220px; object-fit: contain; background: #fff; padding: 4px 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.site-name { font: bold 20px Georgia, "Times New Roman", serif; }
.tagline { font-size: 12px; color: #c9d4e2; }
.header-user { font-size: 12px; color: #dde5ef; }
.header-user a, .header-user .linklike { color: #fff; }
.header-user .sep { margin: 0 6px; color: #8ea3bd; }

/* ---------- tabs ---------- */
.tabbar { background: var(--tab-bg); border-bottom: 3px solid var(--brand); }
.tabbar ul { list-style: none; margin: 0; padding: 6px 0 0; display: flex; gap: 2px; overflow-x: auto; }
.tabbar a {
  display: block; padding: 7px 16px; font-weight: bold; font-size: 13px; color: var(--text); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); border-bottom: 0; background: var(--tab-hover);
}
.tabbar a:hover { background: var(--bg); }
.tabbar a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabbar-empty { height: 6px; }

/* ---------- body columns ---------- */
.body-cols { flex: 1; width: 100%; padding-top: 16px; padding-bottom: 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 900px) { .body-cols.with-side { grid-template-columns: 230px minmax(0, 1fr); } }
@media (max-width: 899.98px) { .sidebar { order: 2; } }
.content { min-width: 0; }
.breadcrumb { font-size: 12px; color: var(--muted); padding-bottom: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line-soft); }

/* sidebar */
.sidebar { font-size: 13px; }
.side-box { border: 1px solid var(--line); background: var(--panel); margin-bottom: 14px; }
.side-title { background: var(--panel-head); border-bottom: 1px solid var(--line); padding: 5px 10px; font-weight: bold; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.side-body { padding: 10px; }
.side-body p { margin-bottom: .5em; }
.side-links { list-style: none; margin: 0; padding: 4px 0; }
.side-links a { display: block; padding: 4px 10px 4px 20px; position: relative; }
.side-links a::before { content: "›"; position: absolute; left: 9px; color: var(--muted); }
.side-links a.active { font-weight: bold; color: var(--text); text-decoration: none; background: var(--bg); }
.user-block { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.user-block-name { font-weight: bold; }
.user-block > div { min-width: 0; overflow-wrap: anywhere; }
dl.mini { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; margin: 0; }
dl.mini dt { color: var(--muted); }
dl.mini dd { margin: 0; text-align: right; }

/* ---------- content blocks ---------- */
.page-title { font: normal 24px Georgia, "Times New Roman", serif; color: var(--brand-2); margin-bottom: 14px; }
.card { border: 1px solid var(--line); background: var(--bg); padding: 12px 14px; margin-bottom: 16px; min-width: 0; }
.card-title { font-size: 15px; margin: -12px -14px 12px; padding: 6px 14px; background: var(--panel-head); border-bottom: 1px solid var(--line); }
.card-title.spaced { margin-top: 16px; margin-left: 0; margin-right: 0; padding-left: 0; background: none; border: 0; border-bottom: 1px solid var(--line-soft); }
.card h4 { font-size: 14px; margin-top: 12px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-2 > .card { margin-bottom: 0; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.course-body h3 { font-size: 15px; margin: 2px 0 4px; }
.course-body p { margin-bottom: 4px; }
ul.conditions li { margin-bottom: 3px; }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-name { font-size: 18px; font-weight: bold; }
.profile-head > div > div { margin-bottom: 3px; }

/* alerts + status labels */
.alert { padding: 8px 12px; margin-bottom: 14px; border: 1px solid; border-left-width: 4px; }
.alert ul { margin: 6px 0 0; }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); border-color: var(--ok-line); }
.alert-warn { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-line); }
.alert-info { background: var(--info-bg); color: var(--info-text); border-color: var(--info-line); }
.alert-danger { background: var(--danger-bg); color: var(--danger-text); border-color: var(--danger-line); }
.alert a { color: inherit; font-weight: bold; }
.alert-icon { display: flex; gap: 10px; align-items: flex-start; }
.alert-icon > .ic { width: 18px; height: 18px; margin-top: 2px; }
.badge { display: inline-block; padding: 0 5px; font-size: 12px; font-weight: bold; border: 1px solid; white-space: nowrap; }
.badge.ok { color: var(--ok-text); background: var(--ok-bg); border-color: var(--ok-line); }
.badge.warn { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-line); }
.badge.info { color: var(--info-text); background: var(--info-bg); border-color: var(--info-line); }
.badge.danger { color: var(--danger-text); background: var(--danger-bg); border-color: var(--danger-line); }

/* key/value */
.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; margin: 0; border-top: 1px solid var(--line-soft); }
.kv dt, .kv dd { padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.kv dt { font-weight: bold; padding-right: 10px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* user pictures */
.userpic { object-fit: cover; flex: none; display: inline-grid; place-items: center; vertical-align: middle; border: 1px solid var(--line); background: var(--bg); }
.userpic.default { background: #e4e6e9; color: #a2a7ad; overflow: hidden; }
.userpic.default .ic { width: 80%; height: 80%; margin-top: 20%; }
.userpic.xs, .userpic.sm { width: 28px; height: 32px; }
.userpic.md { width: 54px; height: 64px; }
.userpic.lg { width: 84px; height: 100px; }
.userpic.xl { width: 105px; height: 130px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 14px; }
.generaltable { width: 100%; border-collapse: collapse; margin-bottom: 12px; border: 1px solid var(--line); }
.generaltable th, .generaltable td { padding: 5px 8px; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.generaltable thead th { background: var(--panel-head); font-size: 13px; white-space: nowrap; }
.generaltable tbody th { font-weight: bold; width: 40%; background: var(--panel); }
.generaltable.striped tbody tr:nth-of-type(even) { background: var(--stripe); }
.generaltable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.generaltable tr.total td, .generaltable tr.total th { font-weight: bold; }
.generaltable.creds { max-width: 560px; }
.generaltable.compact th, .generaltable.compact td { padding: 4px 6px; }
.user-link { display: inline-flex; align-items: center; gap: 6px; }
.progress { width: 100%; max-width: 420px; height: 12px; border: 1px solid var(--line); background: var(--panel); appearance: none; display: block; }
.progress::-webkit-progress-bar { background: var(--panel); }
.progress::-webkit-progress-value { background: #3d7a37; }
.progress::-moz-progress-bar { background: #3d7a37; }
.progress-label { margin: 0 0 3px; }

/* filter tabs + toolbar (admin lists) */
.nav-tabs { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 12px; padding: 0; border-bottom: 1px solid var(--line); }
.nav-tabs a { display: block; padding: 4px 10px; margin-bottom: -1px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; text-decoration: none; }
.nav-tabs a.active { background: var(--bg); border-bottom-color: var(--bg); color: var(--text); font-weight: bold; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.search { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.search input { width: 240px; max-width: 100%; }

/* ---------- forms ---------- */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg); width: 100%; max-width: 420px;
  border: 1px solid #a9afb6; border-radius: 0; padding: 4px 6px; min-height: 28px;
}
textarea { max-width: 620px; resize: vertical; }
input[type="file"] { border: 0; padding: 2px 0; min-height: 0; }
input[type="checkbox"] { width: auto; min-height: 0; margin: 0 5px 0 0; vertical-align: -1px; }
input.short { max-width: 160px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #7fa7d4; outline-offset: 0; }
.invalid input, .invalid select, .invalid textarea { border-color: var(--danger); background: var(--danger-bg); }

.mform fieldset { border: 1px solid var(--line); margin: 0 0 14px; padding: 8px 14px 4px; min-width: 0; }
.mform legend { font-weight: bold; padding: 0 6px; font-size: 14px; color: var(--brand-2); }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; margin-bottom: 10px; }
@media (min-width: 768px) {
  .field { grid-template-columns: 200px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .field > :not(.lbl) { grid-column: 2; }
  .field > .lbl { grid-row: 1 / span 2; padding-top: 5px; text-align: right; }
  .form-actions { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 14px; }
}
.lbl { font-weight: bold; font-size: 13px; }
.req { color: var(--danger); text-decoration: none; margin-left: 2px; }
.req .ic { width: 11px; height: 11px; }
.hint { font-size: 12px; color: var(--muted); }
.err { font-size: 12px; color: var(--danger); display: flex; gap: 4px; align-items: center; font-weight: bold; }
.static { padding-top: 5px; }
.check { display: inline-flex; align-items: center; padding-top: 5px; }
.pending-out { font-weight: bold; color: var(--danger); }
.logo-preview { max-height: 70px; max-width: 260px; padding: 4px; border: 1px solid var(--line); background: #fff; }
.form-actions { margin: 4px 0 18px; }
.form-actions > div { display: flex; gap: 6px; flex-wrap: wrap; }
.danger-zone { border: 1px solid var(--danger-line); margin: 20px 0 0; padding: 8px 14px 12px; }
.danger-zone legend { color: var(--danger); font-weight: bold; padding: 0 6px; }
.buttons { display: flex; gap: 6px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 4px 14px; border: 1px solid #8d949c; border-radius: 2px;
  background: linear-gradient(#fbfbfb, #e4e6e9); color: #222; font: bold 13px Arial, sans-serif;
  cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.5;
}
.btn:hover { background: #e4e6e9; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #2a4d77; }
.btn.secondary { color: #222; }
.btn.danger { background: #a3261b; border-color: #7e1d14; color: #fff; }
.btn.link { background: none; border-color: transparent; color: var(--link); font-weight: normal; text-decoration: underline; }

/* ---------- login ---------- */
.login-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; padding-top: 6px; }
@media (min-width: 820px) { .login-cols { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; } }
.login-box { border: 1px solid var(--line); background: var(--panel); }
.box-title { background: var(--brand); color: #fff; font-weight: bold; padding: 6px 12px; }
.box-body { padding: 14px 12px; }
.login-form { display: grid; gap: 4px; }
.login-form label { font-weight: bold; font-size: 13px; }
.login-form input { max-width: none; margin-bottom: 8px; }
.login-form .btn { justify-self: start; }
.area-public .body-cols { max-width: 1000px; }

/* ---------- footer ---------- */
.site-footer { border-top: 3px solid var(--brand); background: var(--panel); font-size: 12px; color: var(--muted); }
.footer-in { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 10px; padding-bottom: 12px; }
.footer-in .copy { margin-left: auto; }

/* error page */
.card.narrow { max-width: 520px; }

@media (max-width: 767.98px) {
  input, select, textarea { font-size: 16px; }
  .site-name { font-size: 17px; }
  .brand .logo { max-height: 40px; }
  .footer-in .copy { margin-left: 0; }
}
