/* ---------------------------------------------------------------------------
   Credential Exchange — shared styles
   One stylesheet, linked by every page, so the look stays consistent without
   hand-tuning a separate <style> block on each file.
--------------------------------------------------------------------------- */

:root {
  --deep-blue: #1c2f56;
  --deep-teal: #25474c;
  --classic-teal: #17726d;
  --soft-aqua: #6fa89e;
  --mint: #a8ddd3;
  --mid-blue: #86a9b8;
  --light-blue: #b6cbd4;
  --salmon-pink: #e49a76;
  --light-salmon: #ffbfa6;
  --earthy-brown: #513d2c;
  --beige-brown: #b8a188;
  --soft-light-beige: #d7cdb8;
  --very-light-beige: #eae4d2;
  --light-gray-white: #f6f6f6;
}

* { box-sizing: border-box; }

body {
  font-family: 'Calibri', 'Carlito', 'Segoe UI', Arial, sans-serif;
  background: white;
  color: var(--deep-blue);
  margin: 0;
  padding: 0;
}

.page-content {
  max-width: var(--ce-width, 1680px);
  margin: 0 auto;
  padding: 2rem var(--ce-pad, 1.5rem) 5rem;
}

a { color: var(--classic-teal); }

h1, h2, h3 { font-weight: 700; margin-top: 0; }
h2 { font-size: 1.375rem; margin-bottom: 0.25rem; }
h3 { font-size: 1rem; margin-top: 2rem; color: var(--deep-blue); }
.subtitle { color: var(--earthy-brown); margin-top: 0; font-size: 0.875rem; }

/* ---------------- Top nav bar, shared across every page ---------------- */

.topbar {
  background: linear-gradient(to bottom, var(--deep-blue) calc(100% - 4px), var(--salmon-pink) calc(100% - 4px));
  color: var(--light-gray-white);
  padding: 0.875rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.topbar .wordmark {
  font-weight: 700;
  font-size: 1rem;
  color: var(--light-gray-white);
  text-decoration: none;
}
.topbar .logo-img { height: 32px; width: auto; display: block; }
.topbar .wordmark-block { display: flex; flex-direction: row; align-items: center; gap: 0.625rem; }
.topbar .wordmark-text { display: flex; flex-direction: column; }

.welcome-screen {
  max-width: 420px;
  margin: 5rem auto 0;
  text-align: center;
}
.welcome-screen .logo-img { height: 64px; width: auto; margin-bottom: 1.25rem; }
.welcome-screen h2 { font-size: 1.375rem; margin-bottom: 0.375rem; }
.welcome-screen p { color: var(--earthy-brown); margin-bottom: 1.25rem; }
.topbar .wordmark {
  font-weight: 700;
  font-size: 1rem;
  color: var(--light-gray-white);
  text-decoration: none;
}
.topbar .wordmark-sub { font-size: 0.6875rem; letter-spacing: 0.04em; color: var(--very-light-beige); text-transform: uppercase; }
.topbar .identity-block { text-align: right; font-size: 0.75rem; color: var(--light-gray-white); }
.topbar .identity-name { font-weight: 700; font-size: 0.875rem; }
.topbar .identity-email { color: var(--very-light-beige); }
.topbar .identity-role { color: var(--very-light-beige); text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.6875rem; }
.topbar .sign-out-link { color: var(--very-light-beige); font-size: 0.6875rem; text-decoration: underline; cursor: pointer; background: none; border: none; padding: 0; }

.tabbar {
  background: white;
  border-bottom: 1px solid var(--soft-light-beige);
  padding: 0 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.tabbar a {
  display: inline-block;
  padding: 0.875rem 0.125rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep-blue);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.tabbar a.active { color: var(--classic-teal); border-bottom-color: var(--classic-teal); }
.tabbar a:hover { color: var(--classic-teal); }
.tabbar a.admin-link { display: none; }

.greeting-heading { font-size: 1.625rem; font-weight: 800; margin-bottom: 0.125rem; }
.greeting-sub { color: var(--earthy-brown); margin-top: 0; margin-bottom: 1.5rem; }

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}
.action-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--soft-light-beige);
  border-radius: 4px;
  padding: 1rem;
  background: white;
}
.action-card:hover { border-color: var(--classic-teal); }
.action-card.stub { border-style: dashed; border-color: var(--beige-brown); background: white; }
.action-card-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.25rem; color: var(--deep-blue); }
.action-card-desc { font-size: 0.875rem; color: var(--earthy-brown); }

/* ---------------- Buttons ---------------- */

button {
  font-family: inherit;
  padding: 0.5625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--classic-teal); color: white; border: none; }
.btn-primary:hover { background: var(--deep-blue); }
.btn-secondary { background: white; color: var(--classic-teal); border: 1px solid var(--classic-teal); }
.btn-outline-brown { background: white; color: var(--earthy-brown); border: 1px dashed var(--beige-brown); }
.btn-plain { background: white; color: var(--deep-blue); border: 1px solid var(--beige-brown); }
.btn-positive { background: var(--soft-aqua); color: var(--deep-blue); border: none; }
button:disabled { background: var(--soft-light-beige); color: var(--earthy-brown); cursor: not-allowed; border: none; }

/* ---------------- Cards / sign-in box ---------------- */

.panel {
  border: 1px solid var(--beige-brown);
  border-radius: 6px;
  padding: 1rem;
  background: var(--very-light-beige);
}

/* ---------------- KPI cards ---------------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  border: 1px solid var(--soft-light-beige);
  border-top: 4px solid var(--deep-blue);
  border-radius: 4px;
  padding: 1rem;
  background: white;
}
.kpi-card.tone-neutral { border-top-color: var(--deep-blue); }
.kpi-card.tone-attention { border-top-color: var(--salmon-pink); }
.kpi-card.tone-positive { border-top-color: var(--mint); }
.kpi-label { font-size: 0.8125rem; color: var(--earthy-brown); font-weight: 600; }
.kpi-value { font-size: 1.875rem; font-weight: 800; margin-top: 0.375rem; color: var(--deep-blue); }
.kpi-sub { font-size: 0.75rem; color: var(--earthy-brown); margin-top: 0.125rem; }

/* ---------------- Quick access buttons (Homepage) ---------------- */

.quick-access { display: flex; gap: 0.625rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.quick-access a { text-decoration: none; }
.quick-access-note { font-size: 0.75rem; color: var(--earthy-brown); margin: 0 0 1.5rem; }

/* ---------------- Tables ---------------- */

table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; }
th, td { border: 1px solid var(--soft-light-beige); padding: 0.625rem; text-align: left; font-size: 0.875rem; }
th { background: var(--very-light-beige); color: var(--deep-blue); font-weight: 700; }
tr.add-row td { background: var(--very-light-beige); }
.password-wrap { position: relative; }
.password-wrap input { width: 100%; padding-right: 2.125rem; }
.toggle-password-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.125rem 0.25rem;
  font-size: 0.9375rem;
  line-height: 1;
}

input, select {
  font-family: inherit;
  padding: 0.4375rem;
  font-size: 0.8125rem;
  border: 1px solid var(--beige-brown);
  border-radius: 4px;
}

/* ---------------- Status / message text ---------------- */

.status { margin: 0.625rem 0; font-weight: 600; color: var(--deep-blue); }
.text-error { color: var(--earthy-brown); font-weight: 700; }
.text-success { color: var(--classic-teal); font-weight: 700; }
.text-muted { color: var(--earthy-brown); }

/* Stub / "not built yet" banners -- deliberately distinct from attention-salmon
   so a placeholder page never reads as "needs review". */
.stub-banner {
  border: 1px dashed var(--beige-brown);
  background: var(--very-light-beige);
  color: var(--earthy-brown);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.875rem;
}

.denied-banner {
  color: var(--earthy-brown);
  font-weight: 700;
  padding: 1.25rem;
  border: 1px dashed var(--beige-brown);
  background: var(--very-light-beige);
  border-radius: 8px;
}

.view-as-banner {
  background: var(--light-salmon);
  border: 1px solid var(--salmon-pink);
  color: var(--deep-blue);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.version-footer {
  position: fixed;
  bottom: 10px;
  right: 14px;
  font-size: 0.6875rem;
  color: var(--earthy-brown);
  background: var(--light-gray-white);
  padding: 0.125rem 0.375rem;
}

/* =============================================================================
   PAGE-SPECIFIC STYLES
   Pulled out of individual HTML files (grading-view.html, test-login.html,
   instructor-tools.html) on 09-30-26 so all visual styling lives in this one
   file. Sections below are grouped by the page they originally came from.
   ============================================================================= */

/* ---------------- Grading View (grading-view.html) ---------------- */
.approve-btn { background: var(--classic-teal); color: white; border: none; border-radius: 6px; padding: 0.375rem 0.625rem; font-size: 0.75rem; }
.approve-btn:disabled { background: var(--soft-light-beige); color: var(--beige-brown); cursor: not-allowed; }
.reject-btn { background: white; color: var(--earthy-brown); border: 1px solid var(--beige-brown); border-radius: 6px; padding: 0.375rem 0.625rem; font-size: 0.75rem; margin-left: 0.25rem; }
.reject-btn:disabled { background: var(--soft-light-beige); color: var(--beige-brown); cursor: not-allowed; border: none; }

.view-toggle { display: flex; gap: 0.5rem; margin-bottom: 1.125rem; }
.view-toggle button.toggle-inactive { background: white; color: var(--classic-teal); border: 1px solid var(--classic-teal); }

.skill-catalog { border: 1px solid var(--soft-light-beige); border-radius: 8px; margin-bottom: 1.25rem; overflow: hidden; }
.credential-header {
  background: var(--very-light-beige);
  padding: 0.8125rem 1rem;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--soft-light-beige);
}
.credential-header:hover { background: var(--soft-light-beige); }
.credential-header .lock-note { font-weight: 400; font-size: 0.6875rem; color: var(--earthy-brown); }
.credential-body { display: none; padding: 0.5rem 0.875rem 0.75rem 0.875rem; }
.credential-body.open { display: block; }
.microcredential-group { margin-bottom: 0.375rem; }
.microcredential-header {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--deep-blue);
  cursor: pointer;
  padding: 0.375rem 0;
  display: flex;
  justify-content: space-between;
}
.microcredential-skills { display: none; padding-left: 0.875rem; }
.microcredential-skills.open { display: block; }
.skill-row {
  padding: 0.5rem 0.625rem;
  font-size: 0.9375rem;
  border-radius: 4px;
  margin: 0.125rem 0;
}
.skill-row.active-skill {
  background: var(--very-light-beige);
  color: var(--deep-blue);
  font-weight: 700;
  cursor: pointer;
}
.skill-row.active-skill:hover { background: var(--soft-light-beige); }
.skill-row.inactive-skill {
  color: var(--beige-brown);
  cursor: not-allowed;
}
.skill-row.inactive-skill .not-available-tag {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 0.375rem;
}
.skill-row.status-row {
  display: flex;
  justify-content: space-between;
  cursor: default;
  color: var(--deep-blue);
}

.status-badge {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  padding: 0.125rem 0.4375rem;
  border-radius: 10px;
}
.status-badge.demonstrated { background: var(--mint); color: var(--deep-blue); }
.status-badge.pending { background: var(--salmon-pink); color: var(--deep-blue); }
.status-badge.not-yet { background: var(--soft-light-beige); color: var(--earthy-brown); }
.status-badge.not-started { background: white; color: var(--earthy-brown); border: 1px dashed var(--beige-brown); }

.roster-list { border: 1px solid var(--soft-light-beige); border-radius: 8px; overflow: hidden; margin-bottom: 1.25rem; }
.roster-row {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--soft-light-beige);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.roster-row:last-child { border-bottom: none; }
.roster-row:hover { background: var(--very-light-beige); }
.roster-row .roster-name { font-weight: 700; font-size: 0.875rem; }
.roster-row .roster-email { font-size: 0.75rem; color: var(--earthy-brown); }

/* ---------------- Test Login (test-login.html) ---------------- */
/* NOTE: test-login.html originally overrode .page-content directly, which
   would have shrunk that layout on EVERY page if merged as-is. Scoped it to
   a new .narrow-content class added alongside .page-content in that one
   file instead -- see test-login.html. */
.narrow-content { max-width: 700px; }
textarea { width: 100%; height: 120px; margin-top: 0.625rem; font-family: monospace; font-size: 0.75rem; }
.curl-box { background: var(--very-light-beige); padding: 0.625rem; border-radius: 6px; font-family: monospace; font-size: 0.75rem; word-break: break-all; margin-top: 0.625rem; }

/* ---------------- Instructor Tools (instructor-tools.html) ---------------- */
ul.stub-list { line-height: 1.8; }

/* ---------------- Grading View: view toggle + gradebook table ---------------- */
.gradebook-scroll {
  overflow-x: auto;
  margin-bottom: 1rem;
}
table.gradebook-table {
  border-collapse: collapse;
  width: max-content;
  font-size: 1.0625rem;
}
table.gradebook-table th, table.gradebook-table td {
  border: 1px solid var(--soft-light-beige);
  padding: 0.375rem;
  text-align: center;
}
.gb-sticky-col {
  position: sticky;
  left: 0;
  background: white;
  z-index: 3;
  text-align: left !important;
  padding: 1.25rem 1.375rem !important;
  min-width: 240px;
  max-width: 300px;
  font-weight: 600;
}
thead .gb-sticky-col { background: var(--deep-blue); color: white; z-index: 4; }
.gb-credential-header {
  background: var(--deep-blue);
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  padding: 1.125rem 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
}
.gb-credential-header.gb-collapsed { writing-mode: vertical-rl; transform: rotate(180deg); padding: 0.5rem 0.25rem; }
.gb-microcredential-header {
  background: var(--classic-teal);
  color: white;
  font-weight: 700;
  font-size: 1.0625rem;
  padding: 1rem 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
}
.gb-microcredential-header.gb-collapsed { writing-mode: vertical-rl; transform: rotate(180deg); padding: 0.375rem 0.125rem; }
.gb-summary-cell { font-size: 1.0625rem; color: var(--deep-blue); font-weight: 700; background: var(--very-light-beige); }
.gb-eol-header { background: var(--salmon-pink) !important; color: var(--deep-blue) !important; }
.gb-eol-locked { background: var(--soft-light-beige); color: var(--earthy-brown); font-size: 1.25rem; cursor: not-allowed; }
.gb-eol-unlocked { background: var(--salmon-pink); }

.gb-credential-divider { border-left: 4px solid var(--deep-blue) !important; }

.grade-menu {
  position: fixed;
  z-index: 100;
  background: white;
  border: 1px solid var(--soft-light-beige);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  padding: 0.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 160px;
}
.grade-menu-option {
  border: none;
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  background: white;
  color: var(--deep-blue);
}
.grade-menu-option:hover { background: var(--very-light-beige); }
.grade-menu-demonstrated { color: var(--classic-teal); }
.grade-menu-not-yet { color: var(--earthy-brown); }
.gb-skill-header {
  width: 72px;
  max-width: 72px;
  height: 210px;
  padding: 0.75rem !important;
  text-align: center;
  vertical-align: middle;
}
.gb-skill-header-inner {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--earthy-brown);
  white-space: nowrap;
  display: inline-block;
}
.gb-skill-header.gb-active .gb-skill-header-inner { color: var(--deep-blue); font-weight: 800; }
.gb-skill-header.gb-active { background: var(--very-light-beige); }

.gb-cell { width: 72px; height: 72px; padding: 0.625rem !important; cursor: default; }
.gb-cell.gb-active-cell { cursor: pointer; }
.gb-cell.gb-active-cell:hover { background: var(--very-light-beige); }
.gb-cell-inactive { color: var(--beige-brown); font-size: 0.875rem; }
.gb-cell-blank { color: var(--beige-brown); font-size: 1.125rem; }
.gb-cell-complete { color: var(--classic-teal); font-size: 1.25rem; font-weight: 800; }
.gb-cell-not-complete { color: var(--earthy-brown); font-size: 1.25rem; font-weight: 800; }

.gb-legend { display: flex; gap: 1.375rem; font-size: 0.875rem; margin: 1rem 0 1.25rem 0; color: var(--earthy-brown); flex-wrap: wrap; }
.gb-legend span { display: flex; align-items: center; gap: 0.375rem; }

.header-with-badge { display: inline-flex; align-items: center; gap: 0.375rem; }
.badge-icon { width: 32px; height: 32px; object-fit: contain; vertical-align: middle; background: transparent; border-radius: 0; padding: 0.1875rem; }
.badge-icon-sm { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; background: transparent; border-radius: 0; padding: 0.125rem; }
.credential-header .badge-icon { width: 36px; height: 36px; }
.microcredential-header .badge-icon-sm { width: 26px; height: 26px; }
