/* ===== Base & Reset ===== */
html, body {
  height: 100%;
  margin: 0;
}

body {
  background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ===== Layout Wrapper ===== */
.wrapper {
  display: flex;
  min-height: 100vh; /* Full viewport height */
}

/* ===== Sidebar ===== */
.sidebar {
  background-color: #054c2c;
  color: white;
  padding: 15px;
  flex-shrink: 0;
}

.sidebar .nav-link {
  color: white;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: green;
  border-radius: 5px;
}

/* ===== Main Content ===== */
.main-content, .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #fff;
}

.container-fluid {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===== Footer ===== */
.footer {
  background-color: #fff;
  border-top: 2px solid #dee2e6;
  font-size: 15px;
  text-align: center;
  padding: 10px 20px;
  margin-top: auto;
}

/* ===== Topbar ===== */
.topbar {
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  z-index: 1000;
}

/* ===== Profile Section ===== */
.profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}

.profile i {
  font-size: 24px;
  color: #333;
}

.profile strong {
  font-size: 14px;
  color: #333;
}

/* ===== Profile Dropdown ===== */
.profile-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  padding: 5px 0;
  min-width: 100px;
  display: none;
  flex-direction: column;
  z-index: 999;
  transition: all 0.3s ease;
}

.profile-dropdown.d-block {
  display: flex;
  width: 100%;
}

.profile-dropdown a {
  padding: 5px 20px;
  text-decoration: none;
  color: #007bff;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.profile-dropdown a:hover {
  background-color: #f2f2f2;
}

/* ===== Typography ===== */
h1 { font-size: 30px; }

h2, .section-title h2 {
  font-size: 28px;
  color: #222;
  padding-bottom: 5px;
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

h2::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #207106;
  transition: width 0.3s ease;
}

h2:hover {
  color: #207106;
}

h2:hover::after {
  width: 100%;
}

h3 { font-size: 35px; color: #333; font-weight: bold; }
h4 { font-size: 20px; color: #444; font-weight: normal; }
h5 { font-size: 16px; color: #444; font-weight: normal; }

p {
  margin-bottom: 15px;
  font-size: 18px;
  color: #374151;
  text-align: justify;
}

/* ===== Buttons ===== */
.btn-submit,
.btn-green {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  color: white;
  border: none;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.btn-submit {
  background-color: #054C2C;
  width: 100%;
}

.btn-submit:hover {
  background-color: #1e7e34;
}

.btn-green {
  background-color: #28a745;
}

.btn-green:hover {
  background-color: #218838;
}

/* ===== Alerts ===== */
.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 10px 15px;
  border-radius: 5px;
  margin: 10px 0;
}

/* ===== Forms & Inputs ===== */
.input-group .btn {
  border-radius: 0 12px 12px 0;
}

.form-label {
  font-weight: 500;
}

.w-80 {
  width: 80% !important;
}

/* ===== Submit Button Custom ===== */
.submit-btn {
  background: linear-gradient(135deg, #029910, #207106);
  color: white;
  padding: 6px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 18px;
  border: none;
  text-align: center;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.submit-btn a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  width: 100%;
}

.submit-btn:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #207106, #029910);
}

.submit-btn:hover .rocket {
  animation: wiggle 0.6s infinite;
}

/* ===== Tables & Badges (Mobile) ===== */
@media (max-width: 400px) {
  table th, table td {
    font-size: 12px;
    padding: 4px;
    white-space: nowrap;
  }

  table td:nth-child(4) {
    white-space: normal;
    word-break: break-word;
    max-width: 120px;
  }

  table td:last-child a {
    display: block;
    margin-bottom: 4px;
  }

  .badge {
    font-size: 10px;
  }
}

/* ===== Responsive Typography ===== */
@media (max-width: 768px) {
  h1 { font-size: 26px; }
  h2, .section-title h2 { font-size: 24px; }
  h3 { font-size: 28px; }
  h4 { font-size: 18px; }
  h5 { font-size: 15px; }
  p { font-size: 16px; }
}

@media (max-width: 480px) {
  h1 { font-size: 22px; }
  h2, .section-title h2 { font-size: 20px; }
  h3 { font-size: 24px; }
  h4 { font-size: 16px; }
  h5 { font-size: 14px; }
  p { font-size: 14px; }
}

@media (max-width: 576px) {
  .btn-success {
    font-size: 14px;
    padding: 6px 12px;
  }
}

@media (max-width: 400px) {
  .btn-success {
    font-size: 12px;
    padding: 5px 10px;
  }
}

/* ===== Offcanvas ===== */
.offcanvas .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
}

	
table.calendar {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    table-layout: fixed; /* Ensures equal widths */
}

.calendar th, .calendar td {
    border: 1px solid #ccc;
    vertical-align: top;
    height: 70px; /* fixed height for uniformity */
    position: relative;
	justify-content: center; /* vertical center */
    align-items: center;     /* horizontal center */
    overflow: hidden;
}
.day-number {
    font-weight: bold;
    position: absolute;
    top: 5px;
    left: 5px;
}
.calendar small {
    position: absolute;
    bottom:25%;
    left: 5px;
    right: 5px;
    font-size: 0.75rem;
    line-height: 1.1;
	top: 25%;
}

.present { background-color: #28a745; color: white; }
.absent { background-color: #dc3545; color: white; }
.no-class { background-color: #ffc107; color: black; }
.quiz { background-color: #0d6efd; color: white; }
.empty { background-color: #f8f9fa; }
.day-number { font-weight: bold; }
small { display: block; margin-top: 5px; font-size: 16px !important; }
.mb20{margin-bottom:20px;}