:root {
  --green: #123d2d;
  --green-dark: #0b2c20;
  --green-light: #e9f2ec;
  --lime: #a9c99a;
  --white: #ffffff;
  --text: #24352c;
  --muted: #77847c;
  --border: #dce5df;
}

* {
  box-sizing: border-box;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f1f5f2;
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

.login-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  width: min(960px, 100%);
  min-height: 570px;
  overflow: hidden;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(18, 61, 45, 0.12);
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 35px;
  text-align: center;
  color: var(--white);
  background: linear-gradient(145deg, var(--green), var(--green-dark));
}

.login-logo {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  overflow: hidden;
}

.login-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}
.login-brand h1 {
  margin: 25px 0 5px;
  font-size: 34px;
  letter-spacing: 0.5px;
}

.login-brand > p {
  margin: 0;
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
}

.login-decoration {
  width: 55px;
  height: 3px;
  margin: 35px 0;
  border-radius: 5px;
  background: var(--lime);
}

.login-brand > small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.9;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 65px;
}

.eyebrow {
  color: #63816e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
}

.login-heading h2 {
  margin: 15px 0 8px;
  color: var(--green-dark);
  font-size: 32px;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

#loginForm {
  display: flex;
  flex-direction: column;
  margin-top: 35px;
}

#loginForm label {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

#loginForm input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: #fcfdfc;
  color: var(--text);
  font-size: 14px;
}

#loginForm input:focus {
  border-color: #618e71;
  box-shadow: 0 0 0 3px rgba(97, 142, 113, 0.12);
}

#email {
  margin-bottom: 22px;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 65px !important;
}

#togglePassword {
  position: absolute;
  right: 12px;
  border: 0;
  background: transparent;
  color: #52745c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.login-button {
  height: 50px;
  margin-top: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
}

.login-button:hover {
  background: var(--green-dark);
}

.login-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

#loginMessage {
  min-height: 20px;
  margin: 15px 0 0;
  font-size: 13px;
}

.login-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 45px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 700px) {
  body.login-page {
    padding: 14px;
  }

  .login-container {
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .login-brand {
    min-height: 235px;
    padding: 30px 20px;
  }

  .login-logo {
    width: 60px;
    height: 60px;
    border-radius: 17px;
    font-size: 36px;
  }

  .login-brand h1 {
    margin-top: 13px;
    font-size: 27px;
  }

  .login-decoration {
    margin: 17px 0;
  }

  .login-brand > small {
    font-size: 12px;
  }

  .login-panel {
    padding: 35px 25px;
  }

  .login-heading h2 {
    font-size: 27px;
  }
}
/* ================================
   DASHBOARD LAYOUT
================================ */

.dashboard-page {
  min-height: 100vh;
  background: #f4f7f5;
  color: #18352a;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

#side {
  background: #123d2d;
  color: #fff;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
}

.brand .mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #d8f3df;
  color: #123d2d;
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #c4d8cc;
  margin-top: 4px;
}

#side .label {
  color: #b9d0c2;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 0 10px;
}

#nav {
  display: grid;
  gap: 7px;
}

#nav button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #e5f0e9;
  padding: 12px;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

#nav button:hover,
#nav button.active {
  background: #245b43;
  color: #fff;
}

#logoutButton {
  margin-top: auto;
  width: 100%;
}

.shell > main {
  min-width: 0;
  padding: 28px;
}

.shell header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.shell header h1 {
  margin: 5px 0 0;
  font-size: 26px;
}

.eyebrow {
  color: #668273;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.user {
  color: #557064;
  font-size: 13px;
}

.hero {
  background: linear-gradient(120deg, #123d2d, #286347);
  color: #fff;
  padding: 32px;
  border-radius: 18px;
  margin-bottom: 22px;
}

.hero small {
  color: #c5e7d0;
  letter-spacing: 1.5px;
}

.hero h2 {
  font-size: 27px;
  margin: 12px 0 8px;
}

.hero p {
  color: #d9e9df;
  margin: 0;
}

.notice {
  background: #e8f4eb;
  border: 1px solid #cfe5d5;
  border-radius: 12px;
  padding: 16px;
  line-height: 1.6;
  margin: 20px 0 28px;
  color: #315c43;
}

#view > h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cards article {
  background: #fff;
  border: 1px solid #e2ebe5;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(20, 60, 40, 0.04);
}

.cards article b {
  font-size: 16px;
}

.cards article p {
  color: #718379;
  font-size: 13px;
  line-height: 1.6;
}

.menu {
  display: none;
}

/* ================================
   MOBILE DASHBOARD
================================ */

@media (max-width: 800px) {
  .shell {
    grid-template-columns: 1fr;
  }

  #side {
    display: none;
    position: fixed;
    z-index: 10;
    inset: 0 auto 0 0;
    width: 270px;
    overflow-y: auto;
  }

  #side.open {
    display: flex;
  }

  .shell > main {
    padding: 18px;
  }

  .shell header {
    align-items: flex-start;
  }

  .menu {
    display: block;
    border: 0;
    background: #e4efe7;
    color: #123d2d;
    padding: 10px 13px;
    border-radius: 8px;
    cursor: pointer;
  }

  .user {
    display: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px;
  }

  .hero h2 {
    font-size: 22px;
  }
}

/* Dashboard sidebar logo */
.brand .brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  flex-shrink: 0;
}

/* =========================================
   AL-WAHYAYN — ATTENDANCE MODULE
   Scoped styles: does not affect other modules
========================================= */

.attendance-page {
  background: #ffffff;
  border: 1px solid #e2ebe5;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 5px 20px rgba(17, 65, 42, 0.06);
}

.attendance-page h2 {
  color: #14532d;
  font-size: 25px;
  font-weight: 750;
  margin: 0 0 8px;
}

.attendance-page h3 {
  color: #166534;
  font-size: 19px;
  font-weight: 700;
  margin: 22px 0 14px;
}

.attendance-page p {
  color: #64756a;
  line-height: 1.6;
}

.attendance-page hr {
  border: 0;
  border-top: 1px solid #e3ece6;
  margin: 25px 0;
}

/* Form layout */

.attendance-page .hifz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.attendance-page .hifz-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attendance-page .hifz-field label {
  color: #294b38;
  font-size: 13px;
  font-weight: 650;
}

.attendance-page .hifz-input,
.attendance-page input,
.attendance-page select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #243b2d;
  background: #fbfdfb;
  border: 1px solid #cfddd3;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.attendance-page .hifz-input:focus,
.attendance-page input:focus,
.attendance-page select:focus {
  border-color: #23834b;
  box-shadow: 0 0 0 3px rgba(35, 131, 75, 0.12);
}

.attendance-page input:disabled,
.attendance-page select:disabled {
  background: #f0f4f1;
  color: #64756a;
  cursor: not-allowed;
}

/* Buttons */

.attendance-page .hifz-button,
.attendance-page .hifz-secondary {
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.attendance-page .hifz-button {
  color: #ffffff;
  background: #176b3a;
  border: 1px solid #176b3a;
  margin: 8px 8px 8px 0;
}

.attendance-page .hifz-button:hover {
  background: #10552e;
  box-shadow: 0 4px 10px rgba(23, 107, 58, 0.16);
}

.attendance-page .hifz-secondary {
  color: #176b3a;
  background: #edf7ef;
  border: 1px solid #cce5d1;
}

.attendance-page .hifz-secondary:hover {
  background: #dcefe0;
}

.attendance-page .hifz-button:active,
.attendance-page .hifz-secondary:active {
  transform: translateY(1px);
}

/* Session table and attendance register */

.attendance-page .hifz-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0 20px;
  border: 1px solid #e0eae3;
  border-radius: 11px;
  background: #ffffff;
}

.attendance-page .hifz-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  text-align: left;
}

.attendance-page .hifz-table th {
  padding: 14px 13px;
  color: #245238;
  background: #edf6ef;
  border-bottom: 1px solid #dce9df;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.attendance-page .hifz-table td {
  padding: 12px 13px;
  color: #405448;
  border-bottom: 1px solid #edf1ee;
  font-size: 13px;
  vertical-align: middle;
}

.attendance-page .hifz-table tbody tr:last-child td {
  border-bottom: 0;
}

.attendance-page .hifz-table tbody tr:hover {
  background: #f8fbf8;
}

.attendance-page .hifz-table td small {
  color: #829087;
  font-size: 11px;
}

.attendance-page .hifz-table td input,
.attendance-page .hifz-table td select {
  min-width: 105px;
  min-height: 38px;
  padding: 7px 9px;
  font-size: 12px;
}

.attendance-page .hifz-table td .attendance-comment {
  min-width: 150px;
}

/* Messages */

.attendance-page #attendanceMessage {
  margin: 12px 0;
}

.attendance-page #attendanceMessage .notice {
  padding: 12px 15px;
  color: #176b3a;
  background: #edf7ef;
  border: 1px solid #cce5d1;
  border-radius: 9px;
  font-size: 13px;
}

.attendance-page #attendanceMessage .notice.student-error {
  color: #a12d2d;
  background: #fff1f1;
  border-color: #f0cccc;
}

/* Attendance register details */

.attendance-page #attendanceDetails {
  margin-top: 24px;
}

.attendance-page #attendanceDetails > p {
  margin: 8px 0;
  font-size: 13px;
}

.attendance-page #attendanceDetails strong {
  color: #245238;
}

/* Mobile layout */

@media (max-width: 768px) {
  .attendance-page {
    padding: 17px;
    border-radius: 12px;
  }

  .attendance-page h2 {
    font-size: 21px;
  }

  .attendance-page h3 {
    font-size: 17px;
  }

  .attendance-page .hifz-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .attendance-page .hifz-button,
  .attendance-page .hifz-secondary {
    max-width: 100%;
  }

  .attendance-page .hifz-table {
    min-width: 600px;
  }
}

@media (max-width: 420px) {
  .attendance-page {
    padding: 13px;
  }

  .attendance-page .hifz-button {
    width: 100%;
    margin-right: 0;
  }
}

/* =========================================
   AL-WAHYAYN — ATTENDANCE PAGE
========================================= */

.attendance-page {
  background: #ffffff;
  border: 1px solid #dce9df;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 5px 20px rgba(20, 70, 42, 0.06);
  color: #24352a;
}

.attendance-page h2 {
  color: #14532d;
  font-size: 25px;
  font-weight: 750;
  margin: 0 0 8px;
}

.attendance-page h3 {
  color: #166534;
  font-size: 19px;
  font-weight: 700;
  margin: 24px 0 14px;
}

.attendance-page p {
  color: #647568;
  line-height: 1.6;
}

.attendance-page hr {
  border: 0;
  border-top: 1px solid #e2ebe4;
  margin: 26px 0;
}

/* Session creation form */

.attendance-page .hifz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.attendance-page .hifz-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attendance-page .hifz-field label {
  color: #355b42;
  font-size: 13px;
  font-weight: 650;
}

.attendance-page .hifz-input,
.attendance-page input,
.attendance-page select {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #cbdccf;
  border-radius: 9px;
  background: #fbfdfb;
  color: #263b2c;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.attendance-page .hifz-input:focus,
.attendance-page input:focus,
.attendance-page select:focus {
  border-color: #27834a;
  box-shadow: 0 0 0 3px rgba(39, 131, 74, 0.12);
}

.attendance-page input:disabled {
  background: #f0f4f1;
  color: #647568;
  cursor: not-allowed;
}

/* Buttons */

.attendance-page .hifz-button,
.attendance-page .hifz-secondary {
  min-height: 42px;
  padding: 10px 18px;
  border: 0;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
  margin: 8px 8px 8px 0;
}

.attendance-page .hifz-button {
  background: #166534;
  color: #ffffff;
}

.attendance-page .hifz-button:hover {
  background: #14532d;
  transform: translateY(-1px);
}

.attendance-page .hifz-secondary {
  background: #e8f3eb;
  color: #166534;
  border: 1px solid #cce2d1;
}

.attendance-page .hifz-secondary:hover {
  background: #d8ebdd;
}

/* Attendance sessions and register tables */

.attendance-page .hifz-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 22px;
  border: 1px solid #e0eae2;
  border-radius: 12px;
}

.attendance-page .hifz-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: #ffffff;
}

.attendance-page .hifz-table th {
  background: #eaf4ed;
  color: #245a36;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  padding: 15px 14px;
  white-space: nowrap;
  border-bottom: 1px solid #d8e7dc;
}

.attendance-page .hifz-table td {
  padding: 14px;
  border-bottom: 1px solid #edf2ee;
  color: #35483a;
  font-size: 13px;
  vertical-align: middle;
}

.attendance-page .hifz-table tbody tr:last-child td {
  border-bottom: 0;
}

.attendance-page .hifz-table tbody tr:hover {
  background: #f7fbf8;
}

.attendance-page .hifz-table small {
  display: inline-block;
  margin-top: 4px;
  color: #829187;
}

/* Register input fields */

.attendance-page .attendance-status {
  min-width: 125px;
}

.attendance-page .attendance-arrival,
.attendance-page .attendance-departure {
  min-width: 115px;
}

.attendance-page .attendance-comment {
  min-width: 160px;
}

/* Notifications */

.attendance-page #attendanceMessage .notice {
  padding: 12px 15px;
  margin: 16px 0;
  border-radius: 9px;
  background: #eaf5ed;
  border: 1px solid #c9e3d0;
  color: #176334;
  font-size: 14px;
}

.attendance-page #attendanceMessage .student-error {
  background: #fff0ef;
  border-color: #f1c9c5;
  color: #a12d25;
}

/* Register details */

.attendance-page #attendanceDetails {
  margin-top: 22px;
}

.attendance-page #attendanceDetails > p {
  margin: 8px 0;
  font-size: 14px;
}

/* Mobile layout */

@media (max-width: 768px) {
  .attendance-page {
    padding: 17px;
    border-radius: 12px;
  }

  .attendance-page h2 {
    font-size: 21px;
  }

  .attendance-page .hifz-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .attendance-page .hifz-button,
  .attendance-page .hifz-secondary {
    width: 100%;
    margin: 6px 0;
  }

  .attendance-page .hifz-table {
    min-width: 650px;
  }
}

@media (max-width: 400px) {
  .attendance-page {
    padding: 13px;
  }

  .attendance-page h2 {
    font-size: 19px;
  }
}
/* =========================
   ASSESSMENTS MODULE
========================= */

.assessments-page {
  width: 100%;
  overflow: hidden;
}

.assessments-page .hifz-grid {
  margin-bottom: 18px;
}

.assessments-page .hifz-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
}

.assessments-page .hifz-table {
  min-width: 1050px;
}

.assessments-page .assessment-score {
  width: 85px;
  min-width: 75px;
  padding: 9px 7px;
  border: 1px solid #cbd8ce;
  border-radius: 7px;
  background: #fff;
  color: #183b2b;
  font: inherit;
  text-align: center;
}

.assessments-page .assessment-score:focus,
.assessments-page .assessment-comments:focus {
  outline: none;
  border-color: #247b4b;
  box-shadow: 0 0 0 3px rgba(36, 123, 75, 0.12);
}

.assessments-page .assessment-comments {
  width: 190px;
  min-width: 150px;
  padding: 9px;
  border: 1px solid #cbd8ce;
  border-radius: 7px;
  resize: vertical;
  font: inherit;
}

.assessments-page #assessmentDetails {
  margin-top: 24px;
}

.assessments-page #assessmentDetails > p {
  margin: 8px 0;
}

.assessments-page #saveAssessmentRecords,
.assessments-page #submitAssessment,
.assessments-page #finaliseAssessment {
  margin: 8px 8px 8px 0;
}

@media (max-width: 768px) {
  .assessments-page .hifz-table {
    min-width: 900px;
  }

  .assessments-page .assessment-comments {
    width: 150px;
  }
}

/* =========================================
   ACADEMIC CALENDAR
========================================= */

.academic-calendar-page {
  padding: 28px;
  background: #ffffff;
  border: 1px solid #dce9df;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(20, 65, 39, 0.06);
}

.academic-calendar-page h2 {
  color: #14532d;
  font-size: 25px;
  font-weight: 700;
  margin: 0 0 8px;
}

.academic-calendar-page > p {
  color: #64746a;
  margin: 0 0 24px;
  line-height: 1.6;
}

.academic-calendar-page h3 {
  color: #185c36;
  font-size: 18px;
  font-weight: 700;
  margin: 22px 0 16px;
}

.academic-calendar-page hr {
  border: 0;
  border-top: 1px solid #e1ebe4;
  margin: 28px 0;
}

.academic-calendar-page .hifz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}

.academic-calendar-page .hifz-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.academic-calendar-page .hifz-field label {
  color: #344b3b;
  font-size: 13px;
  font-weight: 600;
}

.academic-calendar-page .hifz-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #243b2c;
  background: #fbfdfb;
  border: 1px solid #cbdccf;
  border-radius: 8px;
  font: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.academic-calendar-page .hifz-input:focus {
  outline: none;
  border-color: #247b4b;
  box-shadow: 0 0 0 3px rgba(36, 123, 75, 0.12);
}

.academic-calendar-page .hifz-button {
  min-height: 43px;
  padding: 11px 20px;
  color: #ffffff;
  background: #176239;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}

.academic-calendar-page .hifz-button:hover {
  background: #104b2b;
  transform: translateY(-1px);
}

.academic-calendar-page .hifz-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid #dce9df;
  border-radius: 10px;
}

.academic-calendar-page .hifz-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: #ffffff;
}

.academic-calendar-page .hifz-table th {
  padding: 14px 15px;
  color: #ffffff;
  background: #176239;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.academic-calendar-page .hifz-table td {
  padding: 13px 15px;
  color: #43564a;
  border-bottom: 1px solid #e8efe9;
  font-size: 13px;
}

.academic-calendar-page .hifz-table tbody tr:nth-child(even) {
  background: #f5faf6;
}

.academic-calendar-page .hifz-table tbody tr:last-child td {
  border-bottom: 0;
}

.academic-calendar-page #calendarSemesters > p,
.academic-calendar-page #calendarMonths > p {
  padding: 18px;
  color: #728176;
  background: #f5faf6;
  border: 1px dashed #cbdccf;
  border-radius: 8px;
}

.academic-calendar-page #calendarMessage {
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .academic-calendar-page {
    padding: 18px;
  }

  .academic-calendar-page .hifz-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .academic-calendar-page h2 {
    font-size: 21px;
  }

  .academic-calendar-page .hifz-button {
    width: 100%;
  }
}

button[data-approve-correction],
button[data-reject-correction] {
  margin: 5px 10px 5px 0 !important;
  padding: 10px 18px !important;
  display: inline-block;
}
button[data-reject-correction] {
  padding: 12px 24px !important;
}

/* Monthly Revision Tests */
.revision-tests-page {
  border-top: 4px solid #176b45;
  padding: 24px;
}

.revision-tests-page h2,
.revision-tests-page h3 {
  color: #176b45;
}

.revision-tests-page hr {
  border: 0;
  border-top: 1px solid #dce9df;
  margin: 22px 0;
}

.revision-tests-page .hifz-table th {
  background: #e8f3eb;
  color: #185c3c;
}

.revision-tests-page .revision-combined-score {
  width: 110px;
  min-width: 90px;
}

.revision-tests-page .revision-teacher-comments {
  width: 100%;
  min-width: 160px;
  resize: vertical;
}

.revision-tests-page button {
  margin: 6px 8px 6px 0;
}

@media (max-width: 768px) {
  .revision-tests-page .hifz-table {
    min-width: 650px;
  }
}

/* Revision Test form layout */
.revision-tests-page > p {
  color: #64756b;
  line-height: 1.6;
  margin: 8px 0 22px;
}

.revision-tests-page .hifz-field {
  margin-bottom: 16px;
}

.revision-tests-page .hifz-field label {
  display: block;
  color: #185c3c;
  font-weight: 600;
  margin-bottom: 8px;
}

.revision-tests-page .hifz-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbded0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.revision-tests-page #createRevisionTest {
  margin-top: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 8px;
}

.revision-tests-page #createRevisionTest:hover {
  filter: brightness(0.95);
}

/* Monthly Hifz Assessment form styling */
.assessments-page > p {
  color: #64756b;
  line-height: 1.6;
  margin: 8px 0 22px;
}

.assessments-page .hifz-field {
  margin-bottom: 16px;
}

.assessments-page .hifz-field label {
  display: block;
  color: #185c3c;
  font-weight: 600;
  margin-bottom: 8px;
}

.assessments-page .hifz-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbded0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.assessments-page #createAssessmentSession {
  margin-top: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 8px;
}

.assessments-page #createAssessmentSession:hover {
  filter: brightness(0.95);
}

/* Targets & Progress */
.targets-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.targets-page > p {
  color: var(--muted, #64748b);
  margin-top: -10px;
  line-height: 1.6;
}

.target-create-card,
.target-progress-card,
.target-card {
  background: #fff;
  border: 1px solid #dce8df;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 3px 12px rgba(20, 83, 45, 0.04);
}

.target-create-card h3,
.target-progress-card h3 {
  color: #14532d;
  margin: 0 0 20px;
  font-size: 17px;
}

/* Target creation form */
#targetCreateForm {
  display: block;
  width: 100%;
}

#targetCreateForm .hifz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  width: 100%;
  margin-bottom: 22px;
}

#targetCreateForm .hifz-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

#targetCreateForm .hifz-field label {
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

#targetCreateForm .hifz-input {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #cbd9cf;
  border-radius: 8px;
  background: #fbfdfb;
  color: #1f2937;
  font-size: 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

#targetCreateForm .hifz-input:focus {
  outline: none;
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
  background: #fff;
}

#targetCreateForm .hifz-field[hidden] {
  display: none !important;
}

#targetCreateForm #createTargetButton {
  min-width: 150px;
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  background: #166534;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}

#targetCreateForm #createTargetButton:hover {
  background: #14532d;
  transform: translateY(-1px);
}

/* Targets overview */
.targets-toolbar,
.target-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.targets-toolbar h3 {
  margin: 0;
  color: #14532d;
}

.targets-toolbar button {
  padding: 8px 14px;
  border: 1px solid #cbd9cf;
  border-radius: 8px;
  background: #fff;
  color: #166534;
  font-weight: 600;
  cursor: pointer;
}

.targets-toolbar button:hover {
  background: #f0fdf4;
}

#targetsList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.target-card h4 {
  margin: 0;
  color: #14532d;
}

.target-card p {
  margin: 10px 0;
  color: #475569;
  line-height: 1.5;
}

.target-status {
  padding: 5px 10px;
  border-radius: 20px;
  background: #e8f5ec;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.view-target-progress {
  margin-top: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #166534;
  color: #fff;
  cursor: pointer;
}

.view-target-progress:hover {
  background: #14532d;
}

.target-progress-card {
  overflow-x: auto;
}

.target-progress-card table {
  width: 100%;
  border-collapse: collapse;
}

.target-progress-card th,
.target-progress-card td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

/* Responsive layout */
@media (max-width: 700px) {
  #targetCreateForm .hifz-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .target-create-card,
  .target-progress-card,
  .target-card {
    padding: 16px;
  }

  .targets-toolbar {
    align-items: flex-start;
  }
}

/* =========================================
   REPORTS & ANALYTICS
========================================= */

.reports-page {
  width: 100%;
}

.reports-page > h2 {
  margin-bottom: 8px;
}

.reports-page > p {
  color: #64748b;
  margin-bottom: 22px;
}

.reports-page .form-group {
  max-width: 520px;
  margin: 20px 0;
}

.reports-page select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
}

/* Reports action buttons */
.reports-page #loadStudentReport,
.reports-page #printStudentReport {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* Generate Report */
.reports-page #loadStudentReport {
  background: #14532d;
  color: #ffffff;
  border-color: #14532d;
  box-shadow: 0 3px 8px rgba(20, 83, 45, 0.16);
}

.reports-page #loadStudentReport:hover:not(:disabled) {
  background: #166534;
  border-color: #166534;
  box-shadow: 0 5px 12px rgba(20, 83, 45, 0.22);
  transform: translateY(-1px);
}

/* Print Report */
.reports-page #printStudentReport {
  background: #ffffff;
  color: #166534;
  border-color: #166534;
  box-shadow: 0 2px 6px rgba(20, 83, 45, 0.08);
}

.reports-page #printStudentReport:hover:not(:disabled) {
  background: #f0fdf4;
  box-shadow: 0 4px 10px rgba(20, 83, 45, 0.14);
  transform: translateY(-1px);
}

/* Disabled state */
.reports-page #loadStudentReport:disabled,
.reports-page #printStudentReport:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Keyboard accessibility */
.reports-page #loadStudentReport:focus-visible,
.reports-page #printStudentReport:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.35);
  outline-offset: 3px;
}

/* Mobile layout */
@media (max-width: 520px) {
  .reports-page #loadStudentReport,
  .reports-page #printStudentReport {
    width: 100%;
    margin: 6px 0;
  }
}

.report-header {
  margin-top: 28px;
  padding: 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}

.report-header h3 {
  margin-top: 0;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin: 16px 0 28px;
}

.report-summary-card {
  padding: 18px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
}

.report-summary-card h4 {
  color: #166534;
  margin-top: 0;
}

.report-summary-card p {
  margin: 8px 0;
}

.reports-page .table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
}

.reports-page table {
  width: 100%;
  border-collapse: collapse;
}

.reports-page th,
.reports-page td {
  padding: 11px;
  border: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.reports-page th {
  background: #f0fdf4;
  color: #166534;
}

@media (max-width: 760px) {
  .report-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #studentReportArea,
  #studentReportArea * {
    visibility: visible;
  }

  #studentReportArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  .report-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .report-header,
  .report-summary-card {
    break-inside: avoid;
  }
}

/* =========================================
   AL-WAHYAYN OFFICIAL STUDENT REPORT
========================================= */

.print-institute-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 2px solid #166534;
}

.report-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  flex-shrink: 0;
}

.print-institute-header h2 {
  margin: 0 0 6px;
  color: #14532d;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.print-institute-header p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.report-header {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 22px;
}

.report-header > h3 {
  color: #166534;
  margin-bottom: 14px;
}

.report-header > h4 {
  font-size: 19px;
  color: #111827;
  margin-bottom: 15px;
}

.report-header > p {
  margin: 8px 0;
  color: #374151;
  font-size: 14px;
}

@page {
  size: A4 portrait;
  margin: 16mm;
}

@media print {
  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 11pt;
  }

  body * {
    visibility: hidden;
  }

  #studentReportArea,
  #studentReportArea * {
    visibility: visible;
  }

  #studentReportArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .print-institute-header {
    display: flex !important;
    border-bottom: 2px solid #166534;
    padding-bottom: 15px;
    margin-bottom: 20px;
  }

  .report-logo {
    width: 75px;
    height: 75px;
  }

  .print-institute-header h2 {
    color: #14532d !important;
    font-size: 18pt;
  }

  .report-header {
    border: none;
    padding: 0;
    margin: 0 0 22px;
  }

  .report-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .report-summary-card {
    border: 1px solid #d1d5db;
    padding: 12px;
    break-inside: avoid;
  }

  .reports-page h3 {
    break-after: avoid;
  }

  .reports-page table {
    width: 100%;
    font-size: 9pt;
  }

  .reports-page th,
  .reports-page td {
    padding: 7px;
    border: 1px solid #d1d5db;
  }

  .reports-page th {
    background: #f0fdf4 !important;
    color: #14532d !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-header,
  .report-summary-card,
  tr {
    break-inside: avoid;
  }

  button,
  select,
  #reportsMessage {
    display: none !important;
  }
}

/* CLASS & SUBGROUP REPORT */
.report-divider {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid #d1d5db;
}

.class-report-section {
  margin-top: 24px;
}

.class-report-section h3 {
  color: #14532d;
  margin: 22px 0 12px;
}

.class-report-section .form-group {
  max-width: 480px;
  margin-bottom: 16px;
}

.class-report-section table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

.class-report-section th,
.class-report-section td {
  padding: 11px 10px;
  border: 1px solid #d1d5db;
  text-align: left;
}

.class-report-section th {
  background: #f0fdf4;
  color: #14532d;
}

.class-report-section .report-summary-grid {
  margin-bottom: 22px;
}

@media print {
  body * {
    visibility: hidden;
  }

  #classReportArea,
  #classReportArea * {
    visibility: visible;
  }

  #classReportArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  #studentReportArea {
    display: none !important;
  }

  .class-report-section {
    margin: 0;
  }

  .class-report-section table {
    font-size: 8pt;
  }

  .class-report-section th,
  .class-report-section td {
    padding: 7px;
  }
}

/* CLASS REPORT ACTION BUTTONS */
.class-report-section #generateClassReport,
.class-report-section #printClassReport {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  margin: 5px 8px 16px 0;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Generate button */
.class-report-section #generateClassReport {
  background: #14532d;
  color: #ffffff;
  border-color: #14532d;
  box-shadow: 0 3px 8px rgba(20, 83, 45, 0.16);
}

.class-report-section #generateClassReport:hover:not(:disabled) {
  background: #166534;
  border-color: #166534;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(20, 83, 45, 0.22);
}

/* Print button */
.class-report-section #printClassReport {
  background: #ffffff;
  color: #166534;
  border-color: #166534;
  box-shadow: 0 2px 6px rgba(20, 83, 45, 0.08);
}

.class-report-section #printClassReport:hover:not(:disabled) {
  background: #f0fdf4;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(20, 83, 45, 0.14);
}

/* Disabled state */
.class-report-section #generateClassReport:disabled,
.class-report-section #printClassReport:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Keyboard focus */
.class-report-section #generateClassReport:focus-visible,
.class-report-section #printClassReport:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.35);
  outline-offset: 3px;
}

/* Mobile */
@media (max-width: 520px) {
  .class-report-section #generateClassReport,
  .class-report-section #printClassReport {
    width: 100%;
    margin: 6px 0;
  }
}
/* =========================================
   HIFZ PERFORMANCE TRENDS
========================================= */

.trends-section {
  margin-top: 28px;
}

.trends-section h3 {
  color: #14532d;
  margin: 24px 0 14px;
}

.trends-section > p {
  color: #64748b;
  margin-bottom: 18px;
}

.trends-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.trends-chart {
  display: grid;
  gap: 18px;
  margin: 18px 0 30px;
}

.trend-month {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
}

.trend-month h4 {
  color: #14532d;
  margin: 0 0 16px;
}

.trend-category {
  margin-bottom: 14px;
}

.trend-category:last-child {
  margin-bottom: 0;
}

.trend-category-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 6px;
}

.trend-category-label span {
  color: #334155;
}

.trend-category-label strong {
  color: #14532d;
}

.trend-bar-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
}

.trend-bar {
  height: 100%;
  background: #16a34a;
  border-radius: 20px;
  min-width: 0;
  transition: width 0.3s ease;
}

.trends-section table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13px;
}

.trends-section th,
.trends-section td {
  padding: 11px 10px;
  border: 1px solid #d1d5db;
  text-align: left;
}

.trends-section th {
  background: #f0fdf4;
  color: #14532d;
}

@media (max-width: 600px) {
  .trends-overview {
    grid-template-columns: 1fr;
  }

  .trend-month {
    padding: 14px;
  }

  .trends-section table {
    font-size: 11px;
  }

  .trends-section th,
  .trends-section td {
    padding: 8px 6px;
  }
}
#loadHifzTrends {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  background: #166534;
  color: #ffffff;
  border: 1px solid #166534;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

#loadHifzTrends:hover {
  background: #14532d;
  box-shadow: 0 3px 8px rgba(20, 83, 45, 0.18);
}

#loadHifzTrends:focus-visible {
  outline: 3px solid #86efac;
  outline-offset: 3px;
}

#loadHifzTrends:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 600px) {
  #loadHifzTrends {
    width: 100%;
  }
}
/* =========================================
   CONSOLIDATED MADRASAH REPORT
========================================= */

.consolidated-report-section {
  margin-top: 30px;
}

.consolidated-report-section h3 {
  color: #14532d;
  margin-bottom: 10px;
}

.consolidated-report-section > p {
  color: #64748b;
  margin-bottom: 20px;
}

.consolidated-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.consolidated-selection-card {
  background: #f8fafc;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 18px;
}

.consolidated-selection-card h4 {
  color: #14532d;
  margin-bottom: 14px;
}

.consolidated-selection-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.consolidated-selection-actions button {
  padding: 7px 13px;
  border: 1px solid #166534;
  border-radius: 6px;
  background: #fff;
  color: #166534;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.consolidated-selection-actions button:hover {
  background: #f0fdf4;
}

.consolidated-selection-list {
  max-height: 300px;
  overflow-y: auto;
}

.consolidated-selection-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.consolidated-selection-item:last-child {
  border-bottom: 0;
}

.consolidated-selection-item input {
  accent-color: #166534;
}

.consolidated-report-options {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.consolidated-report-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.consolidated-report-options input {
  accent-color: #166534;
}

#generateConsolidatedReport {
  background: #166534;
  color: white;
  border: 1px solid #166534;
}

#generateConsolidatedReport:hover {
  background: #14532d;
}

#generateConsolidatedReport:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .consolidated-selection-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================
   CONSOLIDATED PDF PRINT BUTTON
========================================= */

#printConsolidatedReport {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 24px;
  padding: 12px 24px;
  background: #166534;
  color: #ffffff;
  border: 1px solid #166534;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#printConsolidatedReport:hover {
  background: #14532d;
  border-color: #14532d;
  box-shadow: 0 4px 10px rgba(20, 83, 45, 0.2);
  transform: translateY(-1px);
}

#printConsolidatedReport:active {
  transform: translateY(0);
}

#printConsolidatedReport:focus-visible {
  outline: 3px solid #86efac;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  #printConsolidatedReport {
    width: 100%;
  }
}
/* =========================================
   ASSESSMENT REPORTS
========================================= */

.assessment-reports-section {
  margin-top: 30px;
}

.assessment-reports-section h3 {
  color: #14532d;
  margin-bottom: 10px;
}

.assessment-report-card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}

.assessment-report-card h4 {
  color: #166534;
  margin: 0 0 8px;
}

.assessment-report-card p {
  color: #64748b;
  margin-bottom: 14px;
}

.assessment-report-card button {
  margin: 5px 8px 10px 0;
}

.assessment-report-card .table-responsive {
  overflow-x: auto;
  margin-top: 16px;
}

.assessment-report-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.assessment-report-card th,
.assessment-report-card td {
  border: 1px solid #d1d5db;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.assessment-report-card th {
  background: #f0fdf4;
  color: #14532d;
}

.assessment-report-summary {
  margin: 14px 0;
  color: #14532d;
  font-weight: 600;
}

@media (max-width: 700px) {
  .assessment-report-card {
    padding: 12px;
  }

  .assessment-report-card table {
    min-width: 750px;
  }
}
/* =========================================
   ASSESSMENT REPORT ACTION BUTTONS
========================================= */

.assessment-report-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  margin: 6px 8px 12px 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

/* Load buttons */

#loadMonthlyHifzReport,
#loadRevisionTestReport,
#loadAnnualHifzReport {
  background: #166534;
  color: #ffffff;
  border: 1px solid #166534;
}

#loadMonthlyHifzReport:hover,
#loadRevisionTestReport:hover,
#loadAnnualHifzReport:hover {
  background: #14532d;
  border-color: #14532d;
}

/* Print buttons */

#printMonthlyHifzReport,
#printRevisionTestReport,
#printAnnualHifzReport {
  background: #ffffff;
  color: #166534;
  border: 1px solid #166534;
}

#printMonthlyHifzReport:hover,
#printRevisionTestReport:hover,
#printAnnualHifzReport:hover {
  background: #f0fdf4;
}

/* Disabled buttons */

.assessment-report-card button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Keyboard accessibility */

.assessment-report-card button:focus-visible {
  outline: 3px solid #86efac;
  outline-offset: 2px;
}

/* Mobile layout */

@media (max-width: 600px) {
  .assessment-report-card button {
    width: 100%;
    margin: 5px 0;
  }
}

/* =========================================
   ASSESSMENT REPORT PRINT CONTROL
========================================= */

@media print {
  body.print-monthly-hifz-report * {
    visibility: hidden !important;
  }

  body.print-monthly-hifz-report #monthlyHifzReportArea,
  body.print-monthly-hifz-report #monthlyHifzReportArea * {
    visibility: visible !important;
  }

  body.print-monthly-hifz-report #monthlyHifzReportArea {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
  }

  body.print-revision-test-report * {
    visibility: hidden !important;
  }

  body.print-revision-test-report #revisionTestReportArea,
  body.print-revision-test-report #revisionTestReportArea * {
    visibility: visible !important;
  }

  body.print-revision-test-report #revisionTestReportArea {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
  }

  body.print-annual-hifz-report * {
    visibility: hidden !important;
  }

  body.print-annual-hifz-report #annualHifzReportArea,
  body.print-annual-hifz-report #annualHifzReportArea * {
    visibility: visible !important;
  }

  body.print-annual-hifz-report #annualHifzReportArea {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
  }

  .assessment-report-card table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9pt !important;
  }

  .assessment-report-card th,
  .assessment-report-card td {
    border: 1px solid #999 !important;
    padding: 7px !important;
  }
}

/* =========================
   AL-WAHYAYN DARK MODE
========================= */

body.dashboard-page[data-theme="dark"] {
  --white: #17251e;
  --text: #e7f0e9;
  --muted: #a5b5aa;
  --border: #34483b;
  --green-light: #243a2d;

  background: #101a14;
  color: var(--text);
}

body.dashboard-page[data-theme="dark"] .shell,
body.dashboard-page[data-theme="dark"] main {
  background: #101a14;
  color: var(--text);
}

body.dashboard-page[data-theme="dark"] #side {
  background: #0b2c20;
  color: #ffffff;
}

body.dashboard-page[data-theme="dark"] header,
body.dashboard-page[data-theme="dark"] .hifz-card,
body.dashboard-page[data-theme="dark"] article,
body.dashboard-page[data-theme="dark"] .notice,
body.dashboard-page[data-theme="dark"] .hero {
  background: #17251e;
  color: var(--text);
  border-color: var(--border);
}

body.dashboard-page[data-theme="dark"] input,
body.dashboard-page[data-theme="dark"] select,
body.dashboard-page[data-theme="dark"] textarea,
body.dashboard-page[data-theme="dark"] table {
  background: #1d3025;
  color: var(--text);
  border-color: var(--border);
}

body.dashboard-page[data-theme="dark"] th {
  background: #243a2d;
  color: #e7f0e9;
}

body.dashboard-page[data-theme="dark"] td,
body.dashboard-page[data-theme="dark"] p,
body.dashboard-page[data-theme="dark"] label,
body.dashboard-page[data-theme="dark"] small {
  color: inherit;
}

body.dashboard-page[data-theme="dark"] hr {
  border-color: var(--border);
}
/* Settings dark mode fix */
body.dashboard-page[data-theme="dark"] #view .settings-page {
  background: #17251e !important;
  color: #e7f0e9 !important;
  border-color: #34483b !important;
}

body.dashboard-page[data-theme="dark"] #view .settings-page h2,
body.dashboard-page[data-theme="dark"] #view .settings-page p,
body.dashboard-page[data-theme="dark"] #view .settings-page strong,
body.dashboard-page[data-theme="dark"] #view .settings-page label {
  color: #e7f0e9 !important;
}

body.dashboard-page[data-theme="dark"] #view .settings-page select {
  background: #1d3025 !important;
  color: #e7f0e9 !important;
  border-color: #34483b !important;
}

body.dashboard-page[data-theme="dark"] #view .settings-page hr {
  border-color: #34483b !important;
}
/* Settings appearance section */
.settings-page {
  max-width: 850px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
}

.settings-page h2 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 21px;
}

.settings-page > p {
  margin: 0 0 24px;
  color: var(--muted);
}

.settings-page .hifz-field {
  max-width: 420px;
  margin-top: 20px;
}

.settings-page .hifz-field label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text);
}

.settings-page .hifz-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  font-size: 15px;
}

body.dashboard-page[data-theme="dark"] .settings-page h2 {
  color: #a9c99a;
}

/* Users & Halaqahs - Teacher action buttons */
#managementTeachers .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 16px;
  margin: 4px 5px 4px 0;
  border: 1px solid #123d2d;
  border-radius: 7px;
  background: #123d2d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

#managementTeachers .secondary-button:hover {
  background: #1c5940;
  border-color: #1c5940;
  transform: translateY(-1px);
}

#managementTeachers .secondary-button:focus-visible {
  outline: 3px solid #a9c99a;
  outline-offset: 2px;
}
/* Users & Halaqahs - Assignment Edit Button */
#managementAssignments .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 16px;
  margin: 4px 5px 4px 0;
  border: 1px solid #123d2d;
  border-radius: 7px;
  background: #123d2d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

#managementAssignments .secondary-button:hover {
  background: #1c5940;
  border-color: #1c5940;
  transform: translateY(-1px);
}

#managementAssignments .secondary-button:focus-visible {
  outline: 3px solid #a9c99a;
  outline-offset: 2px;
}
