/* Academy Next — Docentportaal */
.acnp-portal {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #111827;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Nav */
.acnp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.acnp-nav__title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.acnp-nav__sub {
  font-size: 11px;
  color: #6b7280;
}

.acnp-nav__tabs {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
}

.acnp-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .12s;
  white-space: nowrap;
  flex: 0 0 auto;
}

.acnp-tab:hover {
  background: #f3f4f6;
  color: #111827;
}

.acnp-tab.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.acnp-nav__user {
  font-size: 12px;
  color: #6b7280;
}

/* Cards */
.acnp-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.acnp-card {
  background: #f9fafb;
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
}

.acnp-card__label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.acnp-card__value {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  line-height: 1.2;
  word-break: break-word;
}

.acnp-card__sub {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 3px;
}

/* Section label */
.acnp-section-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

/* Class card */
.acnp-class-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.acnp-class-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.acnp-class-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.acnp-class-card__meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 3px;
}

.acnp-class-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}

/* Buttons */
.acnp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  color: #374151;
  text-decoration: none;
  background: #fff;
  cursor: pointer;
  transition: background .1s;
  white-space: nowrap;
  max-width: 100%;
}

.acnp-btn:hover {
  background: #f3f4f6;
}

.acnp-btn--primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.acnp-btn--primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.acnp-btn--disabled {
  opacity: .4;
  pointer-events: none;
}

/* Badges */
.acnp-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
}

.acnp-badge--green {
  background: #d1fae5;
  color: #065f46;
}

.acnp-badge--orange {
  background: #fef3c7;
  color: #92400e;
}

.acnp-badge--red {
  background: #fee2e2;
  color: #991b1b;
}

.acnp-badge--blue {
  background: #dbeafe;
  color: #1e40af;
}

/* Notices */
.acnp-notice {
  padding: 12px 16px;
  border-radius: 8px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
}

.acnp-notice--error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.acnp-notice--success {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

/* Back link */
.acnp-back {
  margin-bottom: 16px;
}

.acnp-back a {
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
}

.acnp-back a:hover {
  color: #111827;
}

/* Attendance header */
.acnp-attendance-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.acnp-attendance-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.acnp-attendance-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 3px;
}

.acnp-date-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.acnp-date-current {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  min-width: 140px;
  text-align: center;
}

/* Attendance list */
.acnp-att-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.acnp-att-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.acnp-att-row:last-child {
  border-bottom: none;
}

.acnp-att-name {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  word-break: break-word;
}

.acnp-att-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

.acnp-att-btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: all .1s;
  white-space: nowrap;
}

.acnp-att-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.acnp-att-btn.is-present {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
  font-weight: 600;
}

.acnp-att-btn.is-absent {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
  font-weight: 600;
}

.acnp-att-btn.is-late {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
  font-weight: 600;
}

.acnp-att-btn--reset {
  padding: 6px 10px;
  color: #9ca3af;
  border-color: #e5e7eb;
}
.acnp-att-btn--reset:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

/* Note + summary + submit */
.acnp-att-note-row {
  margin-bottom: 12px;
}

.acnp-att-note-label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 5px;
}

.acnp-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  font-size: 13px;
  color: #111827;
  box-sizing: border-box;
}

.acnp-att-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.acnp-submit-btn {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .1s;
}

.acnp-submit-btn:hover {
  background: #1d4ed8;
}

.acnp-submit-btn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

/* Roster table */
.acnp-roster-table {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.acnp-roster-header {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  gap: 0;
  padding: 9px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.acnp-roster-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  gap: 0;
  padding: 11px 16px;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
}

.acnp-roster-row:last-child {
  border-bottom: none;
}

.acnp-roster-name {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  min-width: 0;
  word-break: break-word;
}

.acnp-roster-meta {
  font-size: 12px;
  color: #6b7280;
  min-width: 0;
  word-break: break-word;
}

/* Hours nav */
.acnp-hours-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.acnp-hours-month {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  min-width: 160px;
  text-align: center;
}

/* Tablet */
@media (max-width: 768px) {
  .acnp-portal {
    padding: 0 12px;
  }

  .acnp-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acnp-nav {
    padding: 12px 14px;
  }

  .acnp-class-card {
    padding: 14px;
  }

  .acnp-roster-header,
  .acnp-roster-row {
    grid-template-columns: 2fr 2fr 1fr;
  }

  .acnp-roster-header > *:nth-child(4),
  .acnp-roster-row > *:nth-child(4) {
    display: none;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .acnp-portal {
    font-size: 13px;
    padding: 0 10px;
  }

  .acnp-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .acnp-nav__tabs {
    width: 100%;
    padding-bottom: 2px;
  }

  .acnp-nav__user {
    width: 100%;
  }

  .acnp-cards {
    grid-template-columns: 1fr;
  }

  .acnp-card__value {
    font-size: 22px;
  }

  .acnp-attendance-header,
  .acnp-hours-nav,
  .acnp-date-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .acnp-date-current,
  .acnp-hours-month {
    min-width: 0;
    width: 100%;
    text-align: left;
  }

  .acnp-class-card__actions,
  .acnp-att-btns {
    width: 100%;
  }

  .acnp-class-card__actions .acnp-btn,
  .acnp-att-btns .acnp-att-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }

  .acnp-att-row {
    flex-direction: column;
    align-items: stretch;
  }

  .acnp-att-name {
    flex: none;
    width: 100%;
  }

  .acnp-roster-header {
    display: none;
  }

  .acnp-roster-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 14px;
  }

  .acnp-roster-row > * {
    display: block !important;
  }
}

/* Extra small screens */
@media (max-width: 400px) {
  .acnp-nav,
  .acnp-class-card,
  .acnp-att-row,
  .acnp-notice {
    padding-left: 12px;
    padding-right: 12px;
  }

  .acnp-class-card__actions .acnp-btn,
  .acnp-att-btns .acnp-att-btn {
    flex: 1 1 100%;
  }

  .acnp-tab {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* Bericht-popup (klassenlijst) — geen paginaverversing */
.acnp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.acnp-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
}
.acnp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  font-weight: 600;
}
.acnp-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0 4px;
}
.acnp-modal-body { padding: 16px; }
.acnp-modal-body textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.acnp-modal-footer {
  padding: 0 16px 16px;
  display: flex;
  justify-content: flex-end;
}

/* Hifdh: visuele surah-kaart (114 vakjes, kleurgecodeerd) */
.acnp-surah-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: #4b5563;
  margin-bottom: 10px;
}
.acnp-surah-legend span { display: inline-flex; align-items: center; gap: 5px; }
.acnp-surah-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.acnp-surah-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 4px;
}
.acnp-surah-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: default;
}
.acnp-surah-cell--none {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #9ca3af;
}
.acnp-surah-cell--started {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #6b7280;
}
.acnp-surah-cell--red {
  background: #fecaca;
  border: 1px solid #ef4444;
  color: #7f1d1d;
}
.acnp-surah-cell--orange {
  background: #fed7aa;
  border: 1px solid #f97316;
  color: #7c2d12;
}
.acnp-surah-cell--green {
  background: #bbf7d0;
  border: 1px solid #22c55e;
  color: #14532d;
}

/* Klasmededeling (docentenportaal, boven de klassenlijst) */
.acnp-announce-block {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 16px;
}
.acnp-announce-block summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  list-style: none;
}
.acnp-announce-block summary::-webkit-details-marker { display: none; }

/* Niveau-bewerk-formulier (docentenportaal, per leerling) */
.acnp-level-edit {
  padding: 0 16px 12px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.acnp-level-edit summary {
  cursor: pointer;
  font-size: 12px;
  color: #2563eb;
  padding: 8px 0;
  list-style: none;
}
.acnp-level-edit summary::-webkit-details-marker { display: none; }
.acnp-level-edit-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
  padding-bottom: 6px;
}
.acnp-level-edit-form label {
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
  margin-top: 4px;
}
.acnp-level-edit-hint {
  font-weight: 400;
  color: #9ca3af;
}
.acnp-level-edit-form select,
.acnp-level-edit-form textarea {
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.acnp-level-edit-form button {
  align-self: flex-start;
  margin-top: 6px;
}

/* ── Taalwissel (NL/AR) in de navigatiebalk ────────────────────────── */
.acnp-nav__lang {
  display: flex;
  gap: 6px;
  align-items: center;
}
.acnp-lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #e5e7eb;
}
.acnp-lang-switch:hover { background: #e5e7eb; }

/* ── RTL (Arabisch) ──────────────────────────────────────────────────
   De meeste layout is met flexbox opgebouwd, wat automatisch meespiegelt
   zodra dir="rtl" op de buitenste wrapper staat — hier alleen de
   uitzonderingen die NIET vanzelf meespiegelen (expliciete
   text-align/tekstrichting), plus een Arabisch-vriendelijke lettertype-
   stack voor prettiger lezen van Fus-ha. */
.acnp-rtl {
  direction: rtl;
  text-align: right;
  font-family: "Segoe UI", Tahoma, "Geeza Pro", "Arial", sans-serif;
}
.acnp-rtl .acnp-date-current,
.acnp-rtl .acnp-hours-month {
  text-align: right;
}
/* Iconen/emoji die vóór tekst stonden (bv. "✓ Aanwezigheid") blijven
   visueel prettiger vóór de tekst staan, ook gespiegeld — browsers doen dit
   doorgaans al goed vanzelf bij dir="rtl", geen aparte regel nodig. */
.acnp-rtl .acnp-back a::before {
  content: none;
}