/* ── Fonts ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Ginto Nord Condensed';
  src: url('ABCGintoNordCondensed-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ginto';
  src: url('ABCGinto-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ginto';
  src: url('ABCGinto-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
body { font-family: 'Ginto', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 0; padding: 0; color: #222; background: #fff; }
.admin-container { max-width: 640px; margin: 0 auto; padding: 0 1rem; }
.admin-body { padding-top: 1.5rem; padding-bottom: 2rem; }
h2   { font-size: 1.2rem; margin: 0 0 1.25rem; color: #420044; }
.sub { color: #666; margin-bottom: 2rem; font-size: 0.95rem; }

/* ── Header ───────────────────────────────────────────────────────────── */
.admin-header {
  background: linear-gradient(160deg, #420044 0%, #710045 100%);
  border-bottom: solid 1px #2a0030;
  padding: 1rem 0;
  margin-bottom: 0;
}
.admin-header h1 {
  font-family: 'Ginto Nord Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0;
}

/* ── Navbar ───────────────────────────────────────────────────────────── */
.admin-nav { display: flex; gap: 0.25rem; margin: 0.5rem 0 1.75rem; border-bottom: 2px solid #e5e7eb; }
.admin-nav a {
  display: inline-block; padding: 0.4rem 1rem; font-size: 0.95rem;
  text-decoration: none; color: #555; border-radius: 4px 4px 0 0;
  margin-bottom: -2px; border: 2px solid transparent; border-bottom: none;
}
.admin-nav a:hover { color: #111; background: #f3f4f6; }
.admin-nav a.admin-nav-active {
  color: #b20051; font-weight: 600;
  border-color: #e5e7eb; border-bottom-color: #fff; background: #fff;
}

.btn {
  display: inline-block; padding: 0.55rem 1.2rem; border-radius: 4px;
  background: #b20051; color: #fff; border: none; cursor: pointer;
  font-size: 1rem; text-decoration: none;
}
.btn:hover         { background: #420044; }
.btn-secondary     { background: #6b7280; }
.btn-secondary:hover { background: #4b5563; }

input[type=email] {
  width: 100%; padding: 0.5rem; font-size: 1rem;
  border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;
}

.error  { color: #b91c1c; margin: 0.5rem 0; }
.notice { background: #fdf0f5; border: 1px solid #f0b3ce; padding: 1rem; border-radius: 4px; }
.hint   { font-size: 0.85rem; color: #666; margin-bottom: 0.75rem; }

/* ── Banners ──────────────────────────────────────────────────────────── */
.banner-warning {
  background: #fef3c7; border: 1px solid #d97706; border-radius: 6px;
  padding: 0.75rem 1rem; margin-bottom: 1rem;
}
.banner-dev {
  background: #fef9c3; border: 2px solid #ca8a04; border-radius: 6px;
  padding: 0.75rem 1rem; margin-bottom: 1.5rem; color: #713f12;
}

/* ── Availability form ────────────────────────────────────────────────── */
.session { border: 1px solid #ddd; border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.session.is-closed, .session.is-cancelled { opacity: 0.7; }
.date-hdr { font-weight: bold; font-size: 1.05rem; margin-bottom: 0.75rem; }

.meta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin-bottom: 0.75rem; }
.meta-row label { display: block; font-size: 0.8rem; color: #555; margin-bottom: 0.2rem; }
.meta-row select,
.meta-row input[type=time],
.meta-row input[type=date] {
  padding: 0.35rem 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem;
}
.meta-row input[type=text] {
  padding: 0.35rem 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem;
  width: 22rem; max-width: 100%;
}

.advanced-options { margin-bottom: 0.75rem; }
.advanced-options summary {
  cursor: pointer; font-size: 0.85rem; color: #666; user-select: none;
  list-style: none;
}
.advanced-options summary::-webkit-details-marker { display: none; }
.advanced-options summary::before { content: "▸ "; }
.advanced-options[open] summary::before { content: "▾ "; }
.advanced-options summary:hover { color: #222; }
.advanced-options .meta-row { margin-top: 0.6rem; margin-bottom: 0; }

.sup-info  { font-size: 0.9rem; color: #555; margin-bottom: 0.6rem; }
.needs-sup { font-size: 0.85rem; color: #b45309; }

.options { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.options label {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem; border: 1px solid #ccc; border-radius: 4px;
  cursor: pointer; font-size: 0.95rem;
}
.options input[type=radio] { accent-color: #b20051; }
.options label:has(input:checked) { border-color: #b20051; background: #fdf0f5; }

.add-session { border: 2px dashed #ccc; border-radius: 6px; padding: 1rem; margin-top: 2rem; }
.add-session h3 { margin: 0 0 0.75rem; font-size: 1rem; }

/* ── Supervisor assignment table ──────────────────────────────────────── */
.session-info { margin-bottom: 1.25rem; }
.session-info h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.session-info p  { margin: 0; font-size: 0.9rem; color: #555; }
.session-info .session-message { margin-top: 0.4rem; font-style: italic; color: #333; }

.assign-table {
  width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; table-layout: fixed;
}
.assign-table th {
  padding: 0.5rem 0.25rem; font-size: 0.8rem; font-weight: 600;
  text-align: center; color: #444; border-bottom: 2px solid #ddd;
}
.assign-table th.col-name        { text-align: left; width: 35%; }
.assign-table th.col-supervisor  { color: #166534; }
.assign-table th.col-available   { color: #92400e; }
.assign-table th.col-unavailable { color: #991b1b; }

@media (max-width: 640px) {
  .assign-table th.rotated {
    height: 6rem;
    padding: 0 0 0.4rem 0;
    vertical-align: bottom;
    text-align: left;
    overflow: visible;
  }
  .assign-table th.rotated span {
    display: inline-block;
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: left bottom;
  }
}

.assign-table td {
  border-bottom: 1px solid #eee; padding: 0; text-align: center; vertical-align: middle;
}
.assign-table td.col-name {
  text-align: left; padding: 0 0.5rem; font-size: 0.95rem;
}
.assign-table tr:last-child td { border-bottom: none; }

.assign-table td.radio-cell label {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; cursor: pointer;
}
.assign-table td.radio-cell input[type=radio] {
  width: 22px; height: 22px; accent-color: #b20051; cursor: pointer; margin: 0;
}

.assign-table td.col-supervisor:has(input:checked)  { background: #dcfce7; }
.assign-table td.col-available:has(input:checked)   { background: #fef9c3; }
.assign-table td.col-unavailable:has(input:checked) { background: #fee2e2; }
.assign-table td.col-none:has(input:checked)        { background: #f3f4f6; }

/* ── Posts list ───────────────────────────────────────────────────────── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.page-header h2 { margin: 0; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0; border-bottom: 1px solid #eee;
}
.post-list-item:last-child { border-bottom: none; }
.post-list-date { font-size: 0.85rem; color: #888; white-space: nowrap; flex-shrink: 0; }
.post-list-title { flex: 1; font-size: 0.95rem; }
.post-count { font-size: 0.85rem; font-weight: normal; color: #888; }

.posts-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #eee; gap: 1rem;
}
.pagination { display: flex; align-items: center; gap: 0.5rem; }
.page-indicator { font-size: 0.85rem; color: #666; }
.btn.disabled { opacity: 0.4; pointer-events: none; }

/* ── Post editor ──────────────────────────────────────────────────────── */
.field-row { margin-bottom: 1.25rem; }
.field-row label:first-child { display: block; font-size: 0.8rem; color: #555; margin-bottom: 0.3rem; }
.field-row input[type=text],
.field-row input[type=date] {
  width: 100%; padding: 0.5rem; font-size: 1rem;
  border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;
}
.field-row-inline { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.field-checks { display: flex; flex-direction: column; gap: 0.4rem; padding-top: 1.4rem; }
.check-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.95rem; cursor: pointer; }

.image-strip {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  min-height: 4rem; margin-bottom: 0.75rem;
}
.image-thumb {
  position: relative; width: 80px; height: 80px;
  border-radius: 4px; overflow: hidden; background: #f0f0f0;
}
.image-thumb img,
.image-thumb .thumb-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-remove {
  position: absolute; top: 2px; right: 3px;
  background: rgba(0,0,0,0.55); color: #fff; border: none;
  border-radius: 50%; width: 20px; height: 20px; line-height: 18px;
  font-size: 14px; cursor: pointer; padding: 0; text-align: center;
}
.thumb-remove:hover { background: rgba(0,0,0,0.8); }

.image-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
