/* 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;
}

/* 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;
}

/* 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;
  }
}