/* Coursework Studio — a plain, legible notebook look.
   No external fonts (keeps the app self-contained on shared hosting). */

:root {
  --paper: #F7F5EF;
  --surface: #FFFFFF;
  --ink: #1E2129;
  --muted: #62687A;
  --line: #DCD6C7;
  --accent: #2C6E63;      /* deep teal — primary actions */
  --accent-ink: #17453D;
  --amber: #B4791F;       /* grades / highlights */
  --danger: #A8402E;
  --radius: 3px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p  { margin: 0 0 1em; }

a { color: var(--accent-ink); }
a:hover { text-decoration: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 1rem; }
.who { color: var(--muted); font-size: 0.9rem; }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
}

.flash {
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: #EEF3EF;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.flash-error { border-color: var(--danger); background: #F6E9E6; }

/* Cards used sparingly, for discrete list items only */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.9rem;
}
.card + .card { margin-top: 0; }

.list { display: flex; flex-direction: column; gap: 0.75rem; }

.meta { color: var(--muted); font-size: 0.85rem; }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.badge-grade { border-color: var(--amber); color: var(--amber); font-weight: 700; }
.badge-visible { border-color: var(--accent); color: var(--accent-ink); }

form { margin: 0; }
label { display: block; margin: 0.9rem 0 0.3rem; font-weight: 600; font-size: 0.92rem; }
input[type=text], input[type=email], input[type=password], input[type=file],
select, textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
textarea { min-height: 6rem; resize: vertical; }
input[type=checkbox] { width: auto; margin-right: 0.4rem; }
.checkline { display: flex; align-items: center; margin: 0.9rem 0 0.3rem; }
.checkline label { margin: 0; font-weight: 400; }

.btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-outline { background: transparent; color: var(--accent-ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-small { padding: 0.3rem 0.7rem; font-size: 0.82rem; }

.row-actions { display: flex; gap: 0.6rem; margin-top: 0.7rem; align-items: center; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: none; }

.tabs { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tabs a { padding-bottom: 0.6rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--ink); border-color: var(--accent); font-weight: 600; }

.recorder { border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem; margin: 0.6rem 0; }
.recorder video, .recorder audio { width: 100%; margin-top: 0.6rem; }
.rec-controls { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.5rem; }
.rec-timer { font-variant-numeric: tabular-nums; color: var(--muted); }

.divider { border: none; border-top: 1px solid var(--line); margin: 1.5rem 0; }

.comment { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment .who { font-weight: 600; color: var(--ink); font-size: 0.88rem; }

.empty { color: var(--muted); font-style: italic; padding: 1rem 0; }
