/*
 * assignment-grader-overrides.css
 * Project-specific overrides on top of cbc-tokens.css + cbc-components.css.
 * Never edit the canonical token/component files — only add overrides here.
 */

/* ── Layout ──────────────────────────────────────────────────────────────── */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

.auth-panel {
  width: 100%;
  max-width: 420px;
}

/* ── Stat strip ──────────────────────────────────────────────────────────── */
.stat-strip {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat__value {
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 24px;
  font-weight: 500;
  color: var(--c-ink, #1c1714);
  line-height: 1.1;
}

.stat__label {
  color: var(--c-ink-soft, #6b5f58);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="datetime-local"],
.form-field textarea,
.form-field select {
  font-family: var(--f-sans, 'IBM Plex Sans', sans-serif);
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--c-rule, #cfc4bb);
  background: var(--c-paper, #faf7f5);
  color: var(--c-ink, #1c1714);
  border-radius: 2px;
  width: 100%;
  box-sizing: border-box;
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.form-row .form-field { flex: 1; min-width: 180px; }

.btn-full { width: 100%; }

/* ── Auth footer link ────────────────────────────────────────────────────── */
.auth-footer {
  margin-top: 16px;
  font-size: 13px;
  color: var(--c-ink-soft, #6b5f58);
  text-align: center;
}
.auth-footer a { color: var(--c-accent, #b65a1f); }

/* ── Alert ───────────────────────────────────────────────────────────────── */
.alert-error {
  background: #fef2f0;
  border-left: 3px solid #c0392b;
  color: #c0392b;
  font-family: var(--f-sans);
  font-size: 13px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: 2px;
}

/* ── Data table ──────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--f-sans, 'IBM Plex Sans', sans-serif);
}
.data-table th {
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-ink-soft, #6b5f58);
  border-bottom: 1px dashed var(--c-rule, #cfc4bb);
  padding: 6px 8px;
  text-align: left;
}
.data-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--c-surface, #f3efec);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--c-surface, #f3efec); }

.mono-cell {
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
}

.mono-link {
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
  color: var(--c-accent, #b65a1f);
  text-decoration: none;
}
.mono-link:hover { text-decoration: underline; }

/* ── Grade letter colours ────────────────────────────────────────────────── */
.grade-letter { font-family: var(--f-mono); font-weight: 500; }
.grade-a { color: #1a7a37; }
.grade-b { color: #2e6ea6; }
.grade-c { color: #8a6c00; }
.grade-d { color: #c0392b; }
.grade-f { color: #6b5f58; }
.grade-none { color: var(--c-ink-soft, #6b5f58); }

/* Grade hero on submission detail */
.grade-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 12px 0;
}
.grade-letter-big {
  font-family: var(--f-mono);
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
}
.grade-nums { display: flex; gap: 20px; flex-wrap: wrap; }

/* ── Score slider ────────────────────────────────────────────────────────── */
.score-slider {
  flex: 1 1 auto;
  min-width: 120px;
  accent-color: var(--c-accent, #b65a1f);
  cursor: pointer;
  height: 6px;
}

/* ── Paired slider + numeric input row (Loom UX policy) ──────────────────── */
.ctrl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ctrl-num {
  width: 86px;
  font-family: var(--f-mono, 'IBM Plex Mono', monospace);
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid var(--c-rule, #cfc4bb);
  background: var(--c-paper, #faf7f5);
  color: var(--c-ink, #1c1714);
  border-radius: 2px;
  text-align: right;
  -moz-appearance: textfield;
}
.ctrl-num::-webkit-outer-spin-button,
.ctrl-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ctrl-range {
  color: var(--c-ink-soft, #6b5f58);
  white-space: nowrap;
}

/* ── Comments ────────────────────────────────────────────────────────────── */
.comment-card {
  border-left: 2px solid var(--c-rule, #cfc4bb);
  padding: 8px 12px;
  margin-bottom: 12px;
}
.comment-meta {
  color: var(--c-ink-soft, #6b5f58);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.comment-body {
  font-family: var(--f-sans);
  font-size: 14px;
  white-space: pre-wrap;
  color: var(--c-ink, #1c1714);
}

/* ── Avatar circle ───────────────────────────────────────────────────────── */
.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c-accent, #b65a1f);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
  margin-right: 4px;
}

/* ── Assignment card ─────────────────────────────────────────────────────── */
.assignment-card { transition: box-shadow 0.15s ease; }
.assignment-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ── Danger button ───────────────────────────────────────────────────────── */
.btn-danger {
  color: #c0392b !important;
  border-color: #c0392b !important;
}
.btn-danger:hover {
  background: #fef2f0 !important;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.app-nav { border-radius: 0; margin: 0; }

/* ── Feedback body ───────────────────────────────────────────────────────── */
.feedback-body {
  font-family: var(--f-sans);
  font-size: 14px;
  white-space: pre-wrap;
  background: var(--c-surface, #f3efec);
  padding: 10px 12px;
  border-radius: 2px;
  color: var(--c-ink);
}

/* ── Panel title helpers ─────────────────────────────────────────────────── */
.panel__title { margin: 0 0 4px; }
.panel__body  { margin: 0; }
