/* ========================================================
   AUDIOBOEKEN — UGent Theme
   Navy sidebar + clean white content
   ======================================================== */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* UGent colours */
  --ugent-navy:      #003370;
  --ugent-navy-deep: #002050;
  --ugent-blue:      #1E64C8;
  --ugent-blue-dim:  rgba(30,100,200,.12);
  --ugent-blue-mid:  #1557b0;

  /* Page */
  --bg:        #EEF2F7;
  --surface:   #FFFFFF;
  --surface-2: #F7F9FC;

  /* Borders */
  --border:    #D8E2EE;
  --border-hi: #1E64C8;

  /* Text */
  --text:      #0F1E35;
  --text-soft: #4A5568;
  --muted:     #8896AB;

  /* Status */
  --danger:        #C0392B;
  --danger-rgb:    192, 57, 43;
  --danger-bg:     #FDF2F2;
  --danger-border: #F5C6C2;

  --error-bg:  #FDF2F2;
  --error-txt: #9B2335;

  /* Sidebar */
  --sidebar-w: 248px;

  /* Misc */
  --r-sm:  .25rem;
  --r:     .375rem;
  --r-md:  .5rem;
  --r-lg:  .625rem;
  --r-xl:  .875rem;
  --r-pill: 99px;

  --shadow-xs: 0 1px 2px rgba(15,30,53,.06);
  --shadow-sm: 0 1px 4px rgba(15,30,53,.08), 0 1px 2px rgba(15,30,53,.04);
  --shadow:    0 4px 16px rgba(15,30,53,.09), 0 1px 4px rgba(15,30,53,.05);
  --shadow-lg: 0 12px 32px rgba(15,30,53,.12), 0 2px 8px rgba(15,30,53,.06);

  --ease:     cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(0,.55,.45,1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body ───────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .9375rem;
  line-height: 1.6;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

/* ── Links ──────────────────────────────────────────────── */
a { color: var(--ugent-blue); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--ugent-navy); text-decoration: underline; }

/* ── Selection & placeholder ────────────────────────────── */
::selection { background: var(--ugent-blue-dim); color: var(--ugent-navy); }
::placeholder { color: var(--muted); }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Page enter ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════ */
aside.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--ugent-navy);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

/* ── Brand block ─────────────────────────────────────────── */
.sidebar-brand {
  background: var(--ugent-navy-deep, #002050);
  padding: 1.5rem 1.375rem 1.375rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

a.brand-link {
  display: flex;
  align-items: center;
  gap: .875rem;
  text-decoration: none;
  color: inherit;
}
a.brand-link:hover { text-decoration: none; }

/* Koptelefoon + UGent logo icon */
.brand-icon {
  width: 48px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(255,255,255,.15));
}

.brand-icon svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.brand-wordmark {
  display: flex;
  align-items: baseline;
  line-height: 1;
}

.brand-u {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.04em;
}

.brand-gent {
  font-size: 1.3rem;
  font-weight: 200;
  color: rgba(255,255,255,.85);
  letter-spacing: -.01em;
}

.brand-sub {
  font-size: .7rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  letter-spacing: .05em;
}

/* ── Nav ─────────────────────────────────────────────────── */
nav.sidebar-nav {
  flex: 1;
  padding: 1.25rem .875rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: .125rem;
}

.nav-section-title {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,.35);
  padding: 0 .625rem;
  margin-bottom: .375rem;
  display: block;
}

a.nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .5rem .75rem;
  border-radius: var(--r-md);
  font-size: .845rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: background .15s var(--ease), color .15s var(--ease);
}

a.nav-item:hover {
  background: rgba(255,255,255,.09);
  color: #fff;
  text-decoration: none;
}

svg.nav-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: .7;
  transition: opacity .15s var(--ease);
}

a.nav-item:hover svg.nav-icon { opacity: 1; }

/* ── Sidebar footer ──────────────────────────────────────── */
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .65rem;
  color: rgba(255,255,255,.3);
  letter-spacing: .04em;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   APP SHELL (right column)
   ══════════════════════════════════════════════════════════ */
.app-shell {
  grid-column: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2.5rem 2.5rem 3.5rem;
  max-width: 1100px;
  animation: fadeUp .25s var(--ease-out) both;
}

/* ══════════════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════════════ */
h1 {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.75rem;
}

h2 {
  font-size: .625rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin: 2.5rem 0 .875rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

p { color: var(--text-soft); margin-bottom: .5rem; }

/* ══════════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════
   LISTS
   ══════════════════════════════════════════════════════════ */
ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: .875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}

li:hover {
  border-color: var(--ugent-blue);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

li::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ugent-blue);
  opacity: 0;
  transition: opacity .15s var(--ease);
}
li:hover::before { opacity: 1; }

li a { font-weight: 600; color: var(--text); transition: color .15s var(--ease); }
li a:hover { color: var(--ugent-blue); text-decoration: none; }

/* ── Card Grid ───────────────────────────────────────────── */
ul.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

ul.card-grid li {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  transform: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

ul.card-grid li:hover {
  border-color: var(--ugent-blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

ul.card-grid li::before { display: none; }

/* Cover */
ul.card-grid li .card-header {
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

ul.card-grid li .avatar {
  width: 100%;
  height: 140px;
  border-radius: 0;
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(145deg, var(--ugent-navy) 0%, var(--ugent-blue) 100%);
}

ul.card-grid li:nth-child(2n) .avatar {
  background: linear-gradient(145deg, #1a5276 0%, #2e86c1 100%);
}
ul.card-grid li:nth-child(3n) .avatar {
  background: linear-gradient(145deg, #1e8449 0%, #27ae60 100%);
}
ul.card-grid li:nth-child(4n) .avatar {
  background: linear-gradient(145deg, #6c3483 0%, #8e44ad 100%);
}
ul.card-grid li:nth-child(5n) .avatar {
  background: linear-gradient(145deg, #b7770d 0%, #d4ac0d 100%);
}
ul.card-grid li:nth-child(7n) .avatar {
  background: linear-gradient(145deg, #117a65 0%, #1abc9c 100%);
}

ul.card-grid li .card-title {
  padding: .875rem 1rem .9rem;
  width: 100%;
  gap: .3rem;
}

ul.card-grid li .card-title a {
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  font-size: .875rem;
}

ul.card-grid li .meta-label {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-soft);
  letter-spacing: 0;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 1rem .875rem;
}

/* ══════════════════════════════════════════════════════════
   AVATAR
   ══════════════════════════════════════════════════════════ */
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--ugent-navy), var(--ugent-blue));
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}

/* ══════════════════════════════════════════════════════════
   CARD HEADER & TITLE
   ══════════════════════════════════════════════════════════ */
.card-header {
  display: flex;
  align-items: center;
  gap: .875rem;
  width: 100%;
}

.card-title {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex: 1;
  min-width: 0;
}

.card-title a {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  transition: color .15s var(--ease);
}
.card-title a:hover { color: var(--ugent-blue); text-decoration: none; }

/* ══════════════════════════════════════════════════════════
   DETAIL LAYOUT
   ══════════════════════════════════════════════════════════ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.detail-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ugent-blue);
}

/* ── Sidebar card ────────────────────────────────────────── */
.detail-sidebar {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ugent-navy);
}

.sidebar-label {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: .75rem;
  display: block;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.sidebar-actions .btn-secondary { width: 100%; justify-content: center; }

.sidebar-actions form:not(:has(label)) {
  display: flex;
  width: 100%;
}
.sidebar-actions form:not(:has(label)) button {
  width: 100%;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════
   META ROWS
   ══════════════════════════════════════════════════════════ */
.meta { display: flex; flex-direction: column; }

.meta-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: .75rem;
  align-items: baseline;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
}
.meta-row:last-child { border-bottom: none; }

.meta-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.meta-value {
  font-size: .9rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.55;
}
.meta-value a { color: var(--ugent-blue); font-weight: 600; }
.meta-value a:hover { color: var(--ugent-navy); text-decoration: underline; }

/* ══════════════════════════════════════════════════════════
   TAGS & BADGES
   ══════════════════════════════════════════════════════════ */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: .22rem .7rem;
  background: var(--ugent-blue-dim);
  color: var(--ugent-blue);
  border: 1px solid rgba(30,100,200,.2);
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.tag:hover {
  background: var(--ugent-blue);
  color: #fff;
  border-color: var(--ugent-blue);
  text-decoration: none;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .65rem;
  background: #FEF9E7;
  color: #7D6608;
  border: 1px solid #F7DC6F;
  border-radius: var(--r-pill);
  font-size: .75rem;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn-primary,
.btn-secondary,
form:has(label) button[type="submit"],
form:not(:has(label)) button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.25rem;
  border-radius: var(--r);
  font-family: inherit;
  font-size: .845rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s var(--ease);
  text-decoration: none;
  line-height: 1.5;
  letter-spacing: .005em;
  white-space: nowrap;
  user-select: none;
}

/* Primary */
.btn-primary,
form:has(label) button[type="submit"] {
  background: var(--ugent-blue);
  color: #fff;
  border-color: var(--ugent-blue);
  box-shadow: 0 1px 3px rgba(30,100,200,.25);
}
.btn-primary:hover,
form:has(label) button[type="submit"]:hover {
  background: var(--ugent-mid, #1557b0);
  border-color: var(--ugent-mid, #1557b0);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(30,100,200,.3);
}

/* Secondary */
.btn-secondary {
  background: var(--surface);
  color: var(--text-soft);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--ugent-blue);
  color: var(--ugent-blue);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

/* Delete */
form:not(:has(label)) button {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger-border);
  box-shadow: var(--shadow-xs);
}
form:not(:has(label)) button:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 3px 10px rgba(var(--danger-rgb), .25);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════
   ACTION ROW
   ══════════════════════════════════════════════════════════ */
.actions {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

form:not(:has(label)) { display: inline-flex; }

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */
form:has(label) {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

form:has(label)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ugent-blue);
}

label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: .08em;
  text-transform: uppercase;
}

label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: .6rem;
  text-transform: none;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  cursor: pointer;
}

input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--ugent-blue);
  cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="date"],
select {
  width: 100%;
  padding: .6rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  min-height: 6rem;
  resize: vertical;
  line-height: 1.65;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ugent-blue);
  box-shadow: 0 0 0 3px rgba(30,100,200,.12);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .5;
}

/* ══════════════════════════════════════════════════════════
   ERRORS
   ══════════════════════════════════════════════════════════ */
.error,
li.error {
  background: var(--error-bg);
  color: var(--error-txt);
  border: 1px solid var(--danger-border);
  border-left: 3px solid var(--danger);
  border-radius: var(--r);
  padding: .75rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: none;
  transform: none !important;
}
li.error::before, li.error::after { display: none; }
li.error:hover { transform: none !important; box-shadow: none; }

.error ul { margin: .4rem 0 0 1rem; list-style: disc; flex-direction: column; gap: .2rem; }
.error ul li {
  background: none; border: none; border-radius: 0; box-shadow: none;
  padding: 0; font-size: .875rem; display: list-item;
  color: var(--error-txt); transform: none !important;
}
.error ul li::before, .error ul li::after { display: none; }
.error ul li:hover { box-shadow: none; transform: none !important; border-color: transparent; }

p.error {
  background: var(--error-bg);
  color: var(--error-txt);
  border: 1px solid var(--danger-border);
  border-left: 3px solid var(--danger);
  border-radius: var(--r);
  padding: .6rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: inline-block;
}

/* ══════════════════════════════════════════════════════════
   EASTER EGG
   ══════════════════════════════════════════════════════════ */
#_easter {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeUp .25s var(--ease-out) both;
}

._egg-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem 2.25rem 1.75rem;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

._egg-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ugent-blue);
}

._egg-title { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: .85rem; letter-spacing: -.025em; }
._egg-body  { font-size: .875rem; color: var(--text-soft); line-height: 1.75; margin-bottom: 1.5rem; }

._egg-close {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1.1rem;
  border-radius: var(--r);
  background: var(--ugent-blue);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s var(--ease);
}
._egg-close:hover { background: var(--ugent-navy); }

._egg-box.saber::before {
  background: linear-gradient(90deg, #00aaff, #0066ff, #00aaff);
  animation: saberGlow 2s ease-in-out infinite;
}
@keyframes saberGlow {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}

/* ══════════════════════════════════════════════════════════
   ACTIVE NAV ITEM
   ══════════════════════════════════════════════════════════ */
a.nav-item.active {
  background: rgba(255,255,255,.14);
  color: #fff;
}
a.nav-item.active svg.nav-icon { opacity: 1; }

/* ══════════════════════════════════════════════════════════
   PAGE SUBTITLE
   ══════════════════════════════════════════════════════════ */
.page-sub {
  font-size: .875rem;
  color: var(--text-soft);
  margin: .2rem 0 0;
}
.page-sub a { color: var(--ugent-blue); font-weight: 500; }

/* ══════════════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════════════ */
.progress-wrap {
  width: 100%;
  height: 5px;
  background: var(--border);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin: .35rem 0 .15rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ugent-blue), #5da8e8);
  border-radius: var(--r-pill);
  transition: width .3s var(--ease);
  min-width: 3px;
}

.progress-times {
  font-size: .78rem;
  color: var(--text-soft);
  margin-top: .35rem;
  display: flex;
  align-items: center;
  gap: 0;
}

.progress-pct {
  font-size: .75rem;
  color: var(--muted);
}

.percentage-input {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.percentage-range {
  flex: 1;
  accent-color: var(--ugent-blue);
  cursor: pointer;
}

.percentage-number {
  width: 4.5rem;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════ */
.badge-deleted {
  display: inline-flex;
  align-items: center;
  padding: .18rem .65rem;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: var(--r-pill);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
}

.badge-done {
  display: inline-flex;
  align-items: center;
  padding: .18rem .65rem;
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════ */
.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.empty-state p {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════
   ERROR PAGES
   ══════════════════════════════════════════════════════════ */
.error-page {
  padding: 4rem 0;
  max-width: 480px;
}
.error-code {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: -.06em;
  color: var(--ugent-blue);
  line-height: 1;
  margin-bottom: .75rem;
  opacity: .18;
}
.error-page h1 {
  margin-bottom: .5rem;
}
.error-page p {
  margin-bottom: 2rem;
}

/* ══════════════════════════════════════════════════════════
   LINK SUBTLE
   ══════════════════════════════════════════════════════════ */
a.link-subtle {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: auto;
  flex-shrink: 0;
  transition: color .15s var(--ease);
}
a.link-subtle:hover { color: var(--ugent-blue); text-decoration: none; }

/* ══════════════════════════════════════════════════════════
   LI META ROW
   ══════════════════════════════════════════════════════════ */
.li-meta {
  font-size: .78rem;
  color: var(--text-soft);
  margin-top: .2rem;
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   FORM CONTEXT (edit mode info)
   ══════════════════════════════════════════════════════════ */
.form-context {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: .875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.form-context-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.form-context-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  min-width: 70px;
}

.form-context-value {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════
   TEXT HELPERS
   ══════════════════════════════════════════════════════════ */
.text-muted { color: var(--muted); }

/* ══════════════════════════════════════════════════════════
   CHECKBOX GROUP
   ══════════════════════════════════════════════════════════ */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .5rem 0 .25rem;
}

/* ══════════════════════════════════════════════════════════
   REVIEW BODY
   ══════════════════════════════════════════════════════════ */
p.review-body {
  font-size: .85rem;
  color: var(--text-soft);
  margin: .4rem 0 .5rem;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════
   ERRORS LIST (mixin override — no hover effect)
   ══════════════════════════════════════════════════════════ */
ul.errors-list {
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
  main { padding: 2rem 1.75rem 3rem; }
}

@media (max-width: 960px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .sidebar-actions { flex-direction: row; flex-wrap: wrap; }
  .sidebar-actions .btn-secondary,
  .sidebar-actions form:not(:has(label)) { width: auto; }
  .sidebar-actions form:not(:has(label)) button { width: auto; }
}

@media (max-width: 720px) {
  body { grid-template-columns: 1fr; }

  aside.sidebar {
    width: 100%;
    height: auto;
    min-height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-brand {
    flex: 1;
    padding: .875rem 1.25rem;
  }

  nav.sidebar-nav {
    flex: 1 0 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .25rem;
    padding: .625rem .875rem .75rem;
    border-top: 1px solid rgba(255,255,255,.08);
  }

  .nav-section {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .125rem;
  }

  .nav-section-title { display: none; }

  a.nav-item { padding: .375rem .65rem; font-size: .8rem; }
  .nav-item-icon { display: none; }

  .sidebar-footer { display: none; }

  .app-shell { grid-column: 1; }

  main { padding: 1.5rem 1.25rem 2rem; }

  h1 { font-size: 1.4rem; }

  .page-header { flex-direction: column; align-items: flex-start; gap: .75rem; }

  ul.card-grid { grid-template-columns: repeat(2, 1fr); gap: .875rem; }
}

@media (max-width: 420px) {
  ul.card-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.25rem; }
  main { padding: 1.25rem 1rem 2rem; }

  .meta-row { grid-template-columns: 1fr; gap: .15rem; padding: .65rem 0; }
  form:has(label) { padding: 1.5rem 1.25rem; }
}