:root {
  --soft-sage: #8B9D83;
  --warm-beige: #E8DCC4;
  --soft-cream: #F7F3EB;
  --medium-olive: #6B7D5C;
  --light-olive: #9BAA8E;
  --warm-white: #FDFBF7;
  --soft-brown: #5C4E3A;
  --accent-teal: #5D9B9B;
  --light-sage: #A8B89D;
  --medium-brown: #7A6B52;
  
  
  --cafe-noir: #5C4E3A;
  --kombu-green: #6B7D5C;
  --moss-green: #9BAA8E;
  --tan: #E8DCC4;
  --bone: #F7F3EB;
  
  --dark-green: #6B7D5C;
  --accent-green: #8B9D83;
  --warm-tan: #E8DCC4;
  --light-cream: #F7F3EB;
  --olivine: #A8B89D;
  
  --main-green: #8B9D83;
  --gradient: linear-gradient(135deg, #8B9D83, #9BAA8E);
  --light-bg: #F7F3EB;
  --card-bg: #FDFBF7;
  --text-dark: #4A4137;
  --text-medium: #5C4E3A;
  --shadow: 0 4px 12px rgba(91, 82, 68, 0.12);
  --shadow-hover: 0 6px 18px rgba(91, 82, 68, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", Arial, sans-serif;
}
body {
  background: rgb(225, 243, 225);
}

.login-page {
  position: relative;
  width: 100%;
  height: 100vh;
  background-image: url(31.png);
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.school-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 30px;
  color: #D4E5CC;
  text-shadow: 2px 2px 8px rgba(45,80,22,0.5);
}

.login-card {
  background: rgba(180, 195, 170, 0.35); 
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: 20px;
  padding: 40px;
  width: 340px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);  
  transform: translateY(50px);
  margin-left: 640px;
  margin-bottom: 100px;
}
.login-card h3 {
  color: #397939;
  margin-bottom: 25px;
  font-size: 22px;
  text-align: center;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 18px;
  border: none;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  transition: 0.3s;
  background: rgba(255, 255, 255, 0.75);  
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.login-card input:focus {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(107, 142, 95, 0.2);
}

.login-card button {
  width: 100%;
  padding: 14px;
  background: rgba(107, 142, 95, 0.85);  
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-card button:hover {
  background: rgba(74, 124, 62, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 124, 62, 0.3);
}
.login-type-btn {
  flex: 1;
  padding: 10px;
  background: rgba(107, 142, 95, 0.65);  
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-type-btn:hover {
  background: rgba(74, 124, 62, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-type-btn.active {
  background: rgba(74, 124, 62, 0.9);  
  box-shadow: 0 4px 12px rgba(74, 124, 62, 0.3);
}

header {
  background: #397939;
  padding: 13px 20px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
header h1 {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
}
.header-logo {
  height: 34px; 
  width: 32px;  
  margin-left: 5px; 
  margin-right: 15px; 
  object-fit: cover; 
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 50%; 
  background: white; 
  padding: -5px; 
  border: 3px solid rgba(255, 255, 255, 0.9); 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); 
}
.header-logo:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.admin-icon-btn {
  font-size: 24px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}
.admin-icon-btn:hover {
  transform: scale(1.1);
}

.dashboard {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 60px);
}

aside {
  width: 230px;
  min-width: 190px;
  background: #397939;
  padding-top: 18px;
  backdrop-filter: blur(8px);
  overflow-y: auto;
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
  display: flex;
  flex-direction: column;
}

aside ul {
  list-style: none;
  display: block;
}
aside ul li[data-section="logout"] {
  margin-top: 0px;
}
#sidebarMainMenu {
  flex: 1;
}
#sidebarBottomMenu {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 8px;
  margin-bottom: 10px;
}
aside ul li {
  padding: 10px 12px;
  margin: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 13px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
aside ul li:hover,
aside ul li.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 600;
  border-left: 4px solid white;
}

.collapse-menu {
  display: none;
  margin-left: 16px;
  margin-top: 0;
  margin-bottom: 0;
}

.collapse-menu li {
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin: 2px 0;
  color: white;
  transition: 0.2s;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collapse-menu li:hover,
.collapse-menu li.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

main {
  flex: 1;
  min-width: 0;
  padding: 22px;
  background: #e8f5e8;
  min-height: calc(100vh - 60px);
}
.card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(232, 220, 196, 0.4);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.summary-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.summary-card {
  flex: 1;
  background: #fff;
  border-radius: 14px;
  text-align: center;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: 0.3s;
}
.summary-card h4 {
  font-weight: 600;
  color: var(--text-medium);
}
.summary-card p {
  font-size: 26px;
  font-weight: 700;
  margin-top: 5px;
}
.summary-card.total { border-top: 4px solid #7A8C6F; }
.summary-card.male { border-top: 4px solid #5D9B9B; }
.summary-card.female { border-top: 4px solid #9BAA8E; }

.flex-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.flex-row .card {
  flex: 1;
  min-width: 300px;
}
canvas {
  width: 100% !important;
  height: 280px !important;
  margin-top: 12px;
}

/* Para sa Generate Summary Report chart lang */
#reportChart {
  height: 500px !important;
  min-width: 900px;
}

.small-dd {
  float: right;
  padding: 4px 8px;
  font-size: 12px;
}

.page {
  display: none;
}
.page.active {
  display: block;
}

.enroll-card {
  background: linear-gradient(135deg, #FDFBF7, #F7F3EB);
  border-radius: 16px;
  padding: 28px;
  padding-bottom: 150px;
  box-shadow: var(--shadow);
  border: 2px solid #E8DCC4;
}

.enroll-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 25px;
  align-items: start;
}

.enroll-form {
  width: 100%;
}

.student-info {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(91, 82, 68, 0.08);
  border: 1px solid #E8DCC4;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 15px;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #6B7D5C;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #E8DCC4;
  outline: none;
  font-size: 14px;
  background: #fff;
  transition: all 0.25s ease;
}

.form-group select {
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #8B9D83;
  box-shadow: 0 0 6px rgba(139,157,131,0.3);
}

.submit-btn {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  width: 100%;
  margin-top: 15px;
}

.submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(139,157,131,0.3);
}

.cancel-btn {
  background: #e5e7eb;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
}

.upload-card {
  background: #F7F3EB;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #E8DCC4;
}

.upload-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.summary-column {
  border-radius: 10px;
  padding: 12px 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.summary-column h4 {
  color: #6B7D5C;
  font-size: 14px;
  margin-bottom: 8px;
}

.summary-column table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.summary-column th, .summary-column td {
  padding: 6px 8px;
  border-bottom: 1px solid #E8DCC4;
  text-align: left;
}

.summary-column tr:last-child td {
  border-bottom: none;
}

.summary-column thead {
  background: #F7F3EB;
  color: #5C4E3A;
  font-weight: 600;
}

.summary-column tbody tr:hover {
  background: #FDFBF7;
}

.dept-btn {
  background-color: #8B9D83;
  color: #fff;
  border: none;
  padding: 8px 20px;
  margin-right: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dept-btn:hover {
  background-color: #7A8C6F;
}

.dept-btn.active {
  background-color: #6B7D5C;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.shift-btn {
  background-color: #8B9D83;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.shift-btn:hover {
  background-color: #7A8C6F;
}

.student-table {
  width: 100%;
  overflow-x: auto;
}

.student-table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 11px;
  table-layout: fixed;
}

.student-table th,
.student-table td {
  padding: 8px 4px;
  border: 1px solid #d9e4dd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-table th {
  background: #397939;
  color: white;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  padding: 10px 4px;
  border: 1px solid #2e5539;
  text-align: center;
}

.student-table td {
  font-size: 13px;
  text-align: center;
}

.student-table th:nth-child(1),  .student-table td:nth-child(1)  { width: 7%; }
.student-table th:nth-child(2),  .student-table td:nth-child(2)  { width: 22%; }
.student-table th:nth-child(3),  .student-table td:nth-child(3)  { width: 3%; }
.student-table th:nth-child(4),  .student-table td:nth-child(4)  { width: 3%; }
.student-table th:nth-child(5),  .student-table td:nth-child(5)  { width: 9%; }
.student-table th:nth-child(6),  .student-table td:nth-child(6)  { width: 10%; }
.student-table th:nth-child(7),  .student-table td:nth-child(7)  { width: 8%; }
.student-table th:nth-child(8),  .student-table td:nth-child(8)  { width: 8%; }
.student-table th:nth-child(9),  .student-table td:nth-child(9)  { width: 5%; }
.student-table th:nth-child(10), .student-table td:nth-child(10) { width: 9%; }
.student-table th:nth-child(11), .student-table td:nth-child(11) { width: 7%; }

.student-table td:last-child  { text-align: center; }
.student-table td:first-child { font-weight: 600; color: #2d4a35; }

.student-table tbody tr { background: #fff; transition: background 0.12s; }
.student-table tbody tr:hover { background: #e6f2ea; }
.student-table tbody tr:nth-child(even) { background: #f4f8f5; }
.student-table tbody tr:nth-child(even):hover { background: #e6f2ea; }

.status-btn {
  border: none;
  padding: 2px 4px;
  font-weight: 500;
  font-size: 10.5px;
  cursor: default;
  background: transparent;
  color: #1a1a1a;
  display: inline-block;
}
.status-btn.approved { background: transparent; color: #1a1a1a; }

.table-container {
  overflow-x: auto;
}

.document-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.document-table th,
.document-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.document-table th {
  background: #397939 !important;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
}

.document-table tr:hover {
  background: #F7F3EB;
  transition: 0.2s;
}

.logout-card {
  text-align: center;
  padding: 40px 30px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  max-width: 400px;
  margin: 80px auto;
  
}

.logout-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #7A8C6F;
  margin-bottom: 8px;
}

.logout-card p {
  font-size: 14px;
  color: #5C4E3A;
  margin-bottom: 20px;
}

.logout-card button {
  background: linear-gradient(135deg, #8B9D83, #9BAA8E);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(139, 157, 131, 0.25);
  transition: all 0.3s ease;
}

.logout-card button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 14px rgba(139, 157, 131, 0.35);
}

.save-alert {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--gradient);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 9999;
}

.save-alert.show {
  opacity: 1;
  transform: translateY(0);
}

.students-container {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.student-column {
  flex: 1;
  min-width: 250px;
  background: #F7F3EB;
  padding: 10px;
  border-radius: 8px;
}

.buttons-center {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 15px;
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 1000px) {
  .enroll-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  aside {
    position: fixed;
    left: -230px;
    top: 60px;
    height: calc(100% - 60px);
    transition: left 0.3s;
    z-index: 1000;
  }
  
  aside.active { 
    left: 0; 
  }
  
  .flex-row { 
    flex-direction: column; 
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) {
  aside {
    display: flex !important;
    position: sticky !important;
    left: 0 !important;
    width: 185px !important;
    min-width: 185px !important;
  }

  .dashboard {
    display: flex !important;
  }
}

.form-group.full-width {
  grid-column: 1 / -1;
}
.enroll-form .submit-btn,
.enroll-form .cancel-btn {
  grid-column: 1 / -1;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 30px;
  margin-bottom: 16px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  height: 42px;
}
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 6px;
  font-size: 14px;
}

#departmentToggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#departmentToggle .arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.docs-upload-list {
  display: grid;
  gap: 12px;
}

.doc-upload-item {
  background: #fff;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #C9DDB8;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.doc-upload-item:hover {
  background: #F7F3EB;
  border-color: #8B9D83;
}

.doc-upload-item label {
  font-weight: 500;
  color: #5C4E3A;
  font-size: 14px;
  margin: 0;
  cursor: pointer;
}

.doc-upload-item input[type="file"] {
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  max-width: 250px;
}

.doc-upload-item input[type="file"]::-webkit-file-upload-button {
  background: #8B9D83;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  margin-right: 8px;
}

.doc-upload-item input[type="file"]::-webkit-file-upload-button:hover {
  background: #7A8C6F;
}

.docs-header h4 {
  margin: 0;
}

.docs-header p {
  margin: 0;
}

#currentDepartmentTitle {
  color: #6B7D5C;
  margin-bottom: 15px;
  font-size: 18px;
}

.dept-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dept-filter-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #C9DDB8;
  font-size: 14px;
  outline: none;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dept-filter-select:hover {
  border-color: #8B9D83;
}

.dept-filter-select:focus {
  border-color: #8B9D83;
  box-shadow: 0 0 6px rgba(139,157,131,0.3);
}

.generate-btn, .print-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 14px;
}

.generate-btn {
  background: #8B9D83;
  color: white;
}

.generate-btn:hover {
  background: #7A8C6F;
  transform: translateY(-2px);
}

.print-btn {
  background: #5D9B9B;
  color: white;
}

.print-btn:hover {
  background: #4E8A8A;
  transform: translateY(-2px);
}
.document-table tr:hover {
  background: #F7F3EB;
  transition: 0.2s;
  cursor: pointer;
}

.document-table tbody tr {
  cursor: pointer;
}

.document-table tbody tr:hover {
  background: #F7F3EB;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(139,157,131,0.15);
}

.request-history-item {
  background: white;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #8B9D83;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.request-history-item.pending {
  border-left-color: #D4A574;
}

.request-history-item.approved {
  border-left-color: #7A8C6F;
}

.request-history-item.declined {
  border-left-color: #C49563;
}

.request-history-item h4 {
  margin: 0 0 8px 0;
  color: #6B7D5C;
  font-size: 15px;
}

.request-history-item p {
  margin: 4px 0;
  font-size: 13px;
  color: #5C4E3A;
}

.info-item {
  padding: 8px 12px;
  background: #F7F3EB;
  border-radius: 6px;
  border: 1px solid #E8DCC4;
}

.info-item strong {
  color: #6B7D5C;
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: #F7F3EB;
  border-radius: 8px;
  border: 1px solid #E8DCC4;
}

.doc-item:hover {
  background: #F7F3EB;
  border-color: #8B9D83;
}

.doc-item .doc-name {
  font-weight: 500;
  color: #5C4E3A;
}

.doc-item .doc-badge {
  background: #7A8C6F;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.back-to-list-btn {
  margin-bottom: 15px;
  padding: 8px 16px;
  background: #8B9D83;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-to-list-btn:hover {
  background: #7A8C6F;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(139,157,131,0.3);
}

.student-details-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 25px;
  margin-top: 20px;
}

.request-history-card {
  background: #F7F3EB;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #E8DCC4;
}

.request-history-card h3 {
  color: #6B7D5C;
  margin-bottom: 15px;
}

.request-history-scroll {
  max-height: 500px;
  overflow-y: auto;
}

.student-info-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.student-info-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #C9DDB8;
}

.student-info-card h3 {
  color: #6B7D5C;
  margin-bottom: 15px;
}

.student-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  font-size: 14px;
}

.submitted-docs-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #C9DDB8;
}

.submitted-docs-card h3 {
  color: #6B7D5C;
  margin-bottom: 15px;
}

.submitted-docs-grid {
  display: grid;
  gap: 10px;
}

.loading-text {
  text-align: center;
  color: #5C4E3A;
  padding: 20px;
}

@media (max-width: 1200px) {
  .student-details-layout {
    grid-template-columns: 1fr;
  }
  
  .request-history-card {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .student-info-grid {
    grid-template-columns: 1fr;
  }
}

.form-row {
  position: relative;
  z-index: 1;
}

.form-row:has(select) {
  margin-bottom: 25px;
}

.enroll-form {
  overflow: visible !important;
}

.enroll-card .form-row:last-of-type {
  margin-bottom: 40px; 
}

.page {
  overflow: visible !important;
}

main {
  overflow: visible !important;
}

.tab-btn {
  position: relative;
}

.tab-btn:hover {
  color: #8B9D83;
}

.tab-btn.active {
  color: #6B7D5C;
  border-bottom-color: #8B9D83 !important;
}

.tab-content {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#previewTable tbody tr:hover {
  background: #F7F3EB;
}

#previewTable td {
  padding: 10px 12px;
  border-bottom: 1px solid #F7F3EB;
}

#selectFileBtn:hover {
  background: #F7F3EB;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139,157,131,0.2);
}

#downloadTemplateBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,157,131,0.4);
}

#confirmUploadBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,157,131,0.4);
}

#cancelUploadBtn:hover {
  background: #d1d5db;
}

#updateStudentModal.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}
#updateStudentModal.modal.show {
  display: flex !important;
}
.update-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

.update-modal-header {
  background: linear-gradient(135deg, #8B9D83, #9BAA8E);
  color: white;
  padding: 20px;
  border-radius: 12px 12px 0 0;
}

.update-modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.update-form {
  padding: 25px;
}

.form-section {
  margin-bottom: 25px;
}

.section-title {
  color: #6B7D5C;
  margin-bottom: 15px;
  border-bottom: 2px solid #E8DCC4;
  padding-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #5C4E3A;
  font-size: 14px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #E8DCC4;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #8B9D83;
  box-shadow: 0 0 0 3px rgba(139, 157, 131, 0.1);
}

.form-group input::placeholder {
  color: #9ca3af;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;  
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #E8DCC4;
}

.btn-cancel {
  padding: 12px 30px;
  background: #7A6B52;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: #6B5C43;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-save {
  padding: 12px 30px;
  background: linear-gradient(135deg, #8B9D83, #9BAA8E);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 157, 131, 0.3);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .update-modal-content {
    max-width: 95%;
    margin: 10px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-actions {
    flex-direction: column-reverse;
  }
  
  .btn-cancel,
  .btn-save {
    width: 100%;
  }
}

.update-modal-content::-webkit-scrollbar {
  width: 8px;
}

.update-modal-content::-webkit-scrollbar-track {
  background: #F7F3EB;
  border-radius: 10px;
}

.update-modal-content::-webkit-scrollbar-thumb {
  background: #E8DCC4;
  border-radius: 10px;
}

.update-modal-content::-webkit-scrollbar-thumb:hover {
  background: #9BAA8E;
}

table thead th:nth-child(11) {
  background-color: #397939 !important;
  color: white !important;
  font-weight: 600;
  padding: 9px 6px;
  text-align: center;
  font-size: 9px;
}

table tbody td:nth-child(11) {
  padding: 8px 6px;
  text-align: center;
  overflow: visible;
  text-overflow: unset;
}

table tr:hover td:nth-child(11) {
  background-color: inherit;
}

#studentDetails.page {
  display: none !important;
}

.print-summary-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.print-summary-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.print-summary-container {
  position: relative;
  max-width: 1200px;
  width: 95%;
  max-height: 90vh;
  background: white;
  padding: 30px;
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 10001;
}

.print-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  background: #D4A574;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10002;
}

.print-close-btn:hover {
  background: #C49563;
  transform: scale(1.1);
}

.print-top-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 50px;
  padding-top: 10px;
  justify-content: center;
  position: relative;
}

.print-cdlb-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: white;
  padding: 5px;
  border: 3px solid rgba(139, 157, 131, 0.3);
  box-shadow: 0 4px 12px rgba(139, 157, 131, 0.3);
  position: absolute;
  left: 20px;
}

.print-summary-report-title {
  color: #5C4E3A;
  font-weight: 700;
  font-size: 24px;
  margin: 0;
  letter-spacing: 0.5px;
}

.print-two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

.print-left-column,
.print-right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.print-report-card {
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.print-green-card {
  background: linear-gradient(135deg, #9BAA8E, #8B9D83);
}

.print-blue-card {
  background: linear-gradient(135deg, #7BB5B5, #5D9B9B);
  border: 3px solid #5D9B9B;
}

.print-card-header {
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.print-green-header {
  background: rgba(255, 255, 255, 0.3);
}

.print-blue-header {
  background: rgba(255, 255, 255, 0.25);
}

.print-card-header h3 {
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.print-sub-header {
  text-align: center;
  padding: 10px;
  margin: 15px 0 12px 0;
}

.print-sub-header h4 {
  color: white;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px;
  border-radius: 8px;
  margin: 0;
}

.print-info-item {
  background: white;
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.print-info-item.print-highlighted {
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.print-info-item .print-label {
  font-size: 14px;
  font-weight: 600;
  color: #5C4E3A;
}

.print-info-item .print-value {
  font-size: 18px;
  font-weight: 700;
  color: #7A8C6F;
}

.print-blue-card .print-info-item .print-value {
  color: #5D9B9B;
}

.print-data-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.print-data-item {
  background: white;
  padding: 10px 18px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.print-data-item .print-name {
  font-size: 14px;
  font-weight: 500;
  color: #5C4E3A;
}

.print-data-item .print-count {
  font-size: 16px;
  font-weight: 700;
  color: #7A8C6F;
}

.print-blue-card .print-data-item .print-count {
  color: #5D9B9B;
}

.print-summary-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #E8DCC4;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.print-summary-footer p {
  font-size: 13px;
  margin: 0;
  color: #5C4E3A;
}

.print-btn-action {
  padding: 12px 30px;
  background: linear-gradient(135deg, #8B9D83, #9BAA8E);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(139, 157, 131, 0.3);
}

.print-btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 157, 131, 0.4);
}

.print-data-list::-webkit-scrollbar {
  width: 6px;
}

.print-data-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.print-data-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.print-data-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

@media print {
  .print-summary-overlay,
  .print-close-btn,
  .print-btn-action {
    display: none !important;
  }
  
  .print-summary-container {
    max-width: 100%;
    max-height: none;
    box-shadow: none;
    padding: 15px;
  }
  
  .print-two-column-layout {
    page-break-inside: avoid;
  }
  
  .print-report-card {
    page-break-inside: avoid;
  }
  
  .print-data-list {
    max-height: none;
  }
  
  
  .print-green-card,
  .print-blue-card,
  .print-cdlb-logo,
  .print-summary-report-btn {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media (max-width: 1024px) {
  .print-two-column-layout {
    grid-template-columns: 1fr;
  }
  
  .print-summary-container {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .print-summary-container {
    padding: 15px;
    width: 98%;
  }
  
  .print-top-header {
    flex-direction: column;
  }
  
  .print-cdlb-logo {
    width: 60px;
    height: 60px;
    font-size: 16px;
  }
  
  .print-summary-report-btn {
    padding: 12px 25px;
    font-size: 16px;
  }
}
body:not(.dashboard-loaded) #updateStudentModal,
body:not(.dashboard-loaded) #studentDetails {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
#cdlbPrintArea {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: white;
  z-index: 99999;
  overflow: auto;
}

.cdlb-cert {
  display: none;
  width: 750px;
  margin: 40px auto;
  padding: 50px 60px;
  border: none;
  font-family: 'Times New Roman', serif;
  background: white;
  box-sizing: border-box;
}

.cdlb-cert-header {
  text-align: center;
  margin-bottom: 5px;
}
.cdlb-republic {
  font-size: 13px;
  color: #555;
  margin: 0;
}
.cdlb-school {
  font-size: 22px;
  font-weight: bold;
  color: #2d6a2d;
  margin: 4px 0;
}
.cdlb-address {
  font-size: 12px;
  color: #555;
  margin: 0;
}
.cdlb-divider {
  display: none;
}

.cdlb-cert-title {
  text-align: center;
  margin: 25px 0 20px;
}
.cdlb-cert-title h2 {
  font-size: 20px;
  letter-spacing: 2px;
  text-decoration: underline;
  color: #1a1a1a;
}

.cdlb-cert-body {
  font-size: 14.5px;
  line-height: 2.1;
  text-align: justify;
  color: #222;
}
.cdlb-cert-body p {
  margin-bottom: 12px;
}

.cdlb-hl {
  font-weight: bold;
  text-transform: uppercase;
  border-bottom: 1px solid #000;
  padding: 0 3px;
}

.cdlb-cert-footer {
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
}
.cdlb-sig {
  text-align: center;
}
.cdlb-sig-line {
  border-top: 1px solid #000;
  width: 200px;
  margin: 0 auto 5px;
}
.cdlb-sig-name {
  font-weight: bold;
  font-size: 13px;
  margin: 0;
}
.cdlb-sig-title {
  font-size: 12px;
  color: #555;
  margin: 0;
}

@media print {
  @page {
    size: 8.5in 11in;
    margin: 15mm 20mm;
  }

  body * {
    visibility: hidden !important;
  }

  /* Show printSummaryModal content when printing from it */
  #printSummaryModal.printing-active {
    display: block !important;
    visibility: visible !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: auto !important;
    background: white !important;
    z-index: 999999 !important;
    overflow: visible !important;
  }
  #printSummaryModal.printing-active * {
    visibility: visible !important;
  }
  #printSummaryModal.printing-active .psm-overlay,
  #printSummaryModal.printing-active .psm-close-btn,
  #printSummaryModal.printing-active .psm-print-btn {
    display: none !important;
  }
  #printSummaryModal.printing-active .psm-container {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 20px !important;
  }
  /* Hide modal when NOT doing summary print */
  #printSummaryModal:not(.printing-active) {
    display: none !important;
    visibility: hidden !important;
  }

  #cdlbPrintArea.printing {
    visibility: visible !important;
    display: block !important;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 999999;
    background: white;
  }
  #cdlbPrintArea.printing .active-cert * {
    visibility: visible !important;
  }

  #cdlbPrintArea.printing .cdlb-cert {
    display: none !important;
    visibility: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    line-height: 1.9 !important;
  }

  #cdlbPrintArea.printing #cert-goodmoral.active-cert,
  #cdlbPrintArea.printing #cert-coe.active-cert {
    display: block !important;
    visibility: visible !important;
  }
  .cdlb-cert-title h2 {
    font-size: 16px !important;
  }

  .cdlb-sig-line {
    width: 160px !important;
  }
}
/* Print Summary Modal - Base Styles */
#printSummaryModal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

/* Print Summary Modal */
.psm-container {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}
.psm-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid #397939;
  padding-bottom: 16px;
}
.psm-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.psm-title-block h2 {
  margin: 0;
  color: #397939;
  font-size: 18px;
}
.psm-title-block p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #666;
}
.psm-close-btn {
  margin-left: auto;
  padding: 8px 18px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.psm-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.psm-stat-box {
  flex: 1;
  min-width: 120px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.psm-stat-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}
.psm-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #397939;
}
.psm-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.psm-section-title {
  font-weight: 700;
  font-size: 13px;
  color: #397939;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.psm-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.psm-muni-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.psm-muni-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid #e5e7eb;
}
.psm-muni-name { color: #374151; }
.psm-muni-count { font-weight: 600; color: #397939; }
.psm-data-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #e5e7eb;
}
.psm-data-label { color: #374151; }
.psm-data-val { font-weight: 600; color: #397939; }
.psm-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}
.psm-print-btn {
  padding: 10px 24px;
  background: #397939;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.psm-print-btn:hover { background: #2d5f2d; }