/* NewTechInfo Admin Panel — Flexbox only, px units */

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

html,
body {
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background-color: #f3f4f6;
}

a {
  color: #e31e24;
  text-decoration: none;
}

.mb-3 {
  margin-bottom: 16px;
}

a:hover {
  color: #b91c1c;
}

img {
  max-width: 100%;
  height: auto;
}

/* Flexbox utilities */
.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.flex-align-center {
  align-items: center;
}

.flex-justify-center {
  justify-content: center;
}

.flex-justify-between {
  justify-content: space-between;
}

/* Admin layout */
.admin-body {
  overflow: hidden;
}

.admin-wrapper {
  height: 100vh;
  width: 100%;
}

.admin-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  background-color: #111827;
  color: #d1d5db;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid #1f2937;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  /* background-color: rgba(227, 30, 36, 0.15); */
  border-radius: 10px;
  flex-shrink: 0;
}

.logo-brand {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.logo-sub {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  padding: 16px 12px;
  gap: 4px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  transition:
    background-color 0.2s,
    color 0.2s;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.sidebar-link:hover {
  background-color: #1f2937;
  color: #ffffff;
}

.sidebar-link.active {
  background-color: #e31e24;
  color: #ffffff;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logout-form {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #1f2937;
}

.sidebar-logout:hover {
  background-color: rgba(227, 30, 36, 0.2);
  color: #fca5a5;
}

.admin-main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.admin-header {
  height: 64px;
  min-height: 64px;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 24px;
  flex-shrink: 0;
  gap: 12px;
}

.sidebar-toggle {
  display: none;
  flex-shrink: 0;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(17, 24, 39, 0.5);
  z-index: 998;
}

.sidebar-overlay.show {
  display: block;
}

.admin-body.sidebar-open {
  overflow: hidden;
}

.header-search-wrap {
  flex: 1;
  max-width: 480px;
  min-width: 0;
}

.global-search-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 12px;
  gap: 8px;
}

.search-icon {
  color: #9ca3af;
  flex-shrink: 0;
}

.global-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  outline: none;
  color: #1f2937;
}

.global-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.global-search-results.show {
  display: block;
}

.search-result-item {
  display: block;
  padding: 10px 16px;
  color: #1f2937;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}

.search-result-item:hover {
  background-color: #f9fafb;
}

.search-result-type {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
}

.header-user {
  gap: 12px;
}

.header-user-link {
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  padding: 6px 8px;
  margin: -6px -8px;
  transition: background-color 0.15s ease;
}

.header-user-link:hover {
  background-color: #f3f4f6;
}

.header-user-link:focus-visible {
  outline: 2px solid #e31e24;
  outline-offset: 2px;
}

.header-user-info {
  text-align: right;
}

.header-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.header-user-role {
  font-size: 11px;
  color: #e31e24;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-img {
  width: 40px;
  height: 40px;
  max-height: 40px;
  border-radius: 50%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  object-fit: cover;
}

.avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e31e24;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
}

.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.page-content {
  width: 100%;
}

/* Alerts */
.alert-container {
  gap: 8px;
  margin: 16px 0;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  padding: 0 4px;
}

.alert-close:hover {
  opacity: 1;
}

/* Page header */
.page-header {
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.date-badge {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: #6b7280;
}

/* Stats */
.stats-grid {
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat-card-box,
.stat-card {
  flex: 1;
  min-width: 200px;
}

.stats-grid-2 .stat-card {
  min-width: 280px;
}

.stats-grid-3 .stat-card {
  min-width: 220px;
}

.stat-card-box {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 25px;
  align-items: center;
}

.stat-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}
.stat-card-icon i {
  height: 48px;
  width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.stat-card-icon.red i {
  background: #ba00131a;
  color: #ba0013;
}
.stat-card-icon.green i {
  background: #d1fae5;
  color: #047857;
}
.stat-card-icon.blue i {
  background: #dae2fd;
  color: #5c647a;
}
.stat-card-icon.orange i {
  background: #fff7ed;
  color: #ea580c;
}

.stat-card-header {
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.stat-value-red {
  color: #e31e24;
}

.stat-value-green {
  color: #059669;
}

.stat-value-orange {
  color: #d97706;
}

.stat-change {
  font-size: 12px;
  color: #9ca3af;
}

.stat-change-up {
  color: #059669;
}

.stat-change-down {
  color: #e31e24;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-red {
  background-color: rgba(227, 30, 36, 0.1);
  color: #e31e24;
}

.stat-icon-orange {
  background-color: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.stat-icon-dark {
  background-color: #f3f4f6;
  color: #374151;
}

.stat-icon-green {
  background-color: rgba(5, 150, 105, 0.1);
  color: #059669;
}

/* Cards */
.card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.card-badge {
  font-size: 12px;
  color: #6b7280;
  background-color: #f3f4f6;
  padding: 4px 10px;
  border-radius: 20px;
}

.card-body {
  padding: 20px;
}

.table-card .card-body {
  padding: 0;
}

.table-card .table-responsive {
  padding: 0 20px;
}

.table-card .table-info,
.table-card .pagination-wrap {
  padding: 12px 20px;
}

.chart-card .card-body {
  padding: 16px 20px 24px;
}

.form-card {
  max-width: 800px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  text-align: left;
  padding: 12px 16px;
  background-color: #f9fafb;
  color: #6b7280;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  min-width: 150px;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
}

.table-user {
  gap: 10px;
}

.table-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e31e24;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.table-user-name {
  font-weight: 600;
  color: #111827;
  font-size: 13px;
}

.table-user-email {
  font-size: 12px;
  color: #9ca3af;
}

.table-actions {
  gap: 4px;
}

.table-info {
  font-size: 13px;
  color: #6b7280;
  padding: 8px 0;
}

.text-mono {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #6b7280;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: #9ca3af;
}

.text-truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
  width: fit-content;
}

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

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

.badge-secondary {
  background-color: #f3f4f6;
  color: #6b7280;
}

.badge-toggle {
  cursor: pointer;
  border: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    opacity 0.2s;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background-color: #e31e24;
  color: #ffffff;
  height: 40px;
  border-radius: 2px;
}

.btn-primary:hover {
  background-color: #b91c1c;
  color: #ffffff;
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
  color: #111827;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.btn-icon:hover {
  background-color: #e31e24;
  color: #ffffff;
  border-color: #e31e24;
}

.btn-back {
  margin-right: 12px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Forms */
.admin-form {
  gap: 20px;
}

.form-row {
  gap: 16px;
  flex-wrap: wrap;
}

.form-group {
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.required {
  color: #e31e24;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #e31e24;
  box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

.form-input.input-error,
.form-select.input-error,
.form-textarea.input-error {
  border-color: #e31e24;
}

.admin-form .form-input:invalid:not(:focus):not(:placeholder-shown),
.admin-form .form-select:invalid:not(:focus),
.admin-form .form-textarea:invalid:not(:focus):not(:placeholder-shown),
.login-form .form-input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #f87171;
}

.form-input-sm,
.form-select-sm {
  padding: 7px 10px;
  font-size: 13px;
  width: auto;
  min-width: 140px;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 12px;
  color: #9ca3af;
}

.form-error {
  font-size: 12px;
  color: #e31e24;
  min-height: 16px;
  margin-bottom: 4px;
}

.form-actions {
  gap: 12px;
  padding-top: 8px;
}

.checkbox-label {
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: #e31e24;
}

.filter-form {
  gap: 12px;
  flex-wrap: wrap;
}

.student-filter-form {
  width: 100%;
}

.filter-group {
  gap: 12px;
}

.filter-group-search .form-input-sm {
  min-width: 220px;
}

.filter-group-filters .form-select-sm,
.filter-group-filters .form-input-sm {
  min-width: 160px;
}

.course-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: block;
}

.course-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #9ca3af;
}

.password-field {
  gap: 8px;
}

.password-field .form-input {
  flex: 1;
}

.dashboard-filter-form {
  gap: 8px;
}

.dashboard-filter-form .form-input-sm {
  min-width: 150px;
}

.student-search {
  min-width: 350px;
}

.current-media {
  gap: 12px;
  margin-bottom: 8px;
}

/* Pagination */
.pagination-wrap {
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 13px;
  color: #6b7280;
}

.pagination {
  gap: 4px;
  list-style: none;
}

.page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  cursor: pointer;
  text-decoration: none;
}

.page-item.active .page-link {
  background-color: #e31e24;
  color: #ffffff;
  border-color: #e31e24;
}

.page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-item:not(.disabled):not(.active) .page-link:hover {
  background-color: #f3f4f6;
}

/* Dashboard */
.dashboard-chart-section {
  margin-bottom: 24px;
  gap: 16px;
}

.dashboard-quick-links {
  gap: 16px;
  flex-wrap: wrap;
}

.quick-link-card {
  flex: 1;
  min-width: 220px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  gap: 14px;
  color: #1f2937;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.quick-link-card:hover {
  border-color: #e31e24;
  box-shadow: 0 2px 8px rgba(227, 30, 36, 0.1);
  color: #1f2937;
}

.quick-link-icon {
  width: 44px;
  height: 44px;
  background-color: rgba(227, 30, 36, 0.1);
  color: #e31e24;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-link-text strong {
  font-size: 14px;
  display: block;
}

.quick-link-text small {
  font-size: 12px;
  color: #9ca3af;
}

/* Student profile */
.student-profile-layout {
  gap: 24px;
  align-items: flex-start;
}

.student-profile-main {
  gap: 20px;
  min-width: 0;
  width: 100%;
}

.student-profile-sidebar {
  width: 280px;
  min-width: 280px;
  flex-shrink: 0;
}

.profile-edit-layout {
  gap: 24px;
  align-items: flex-start;
}

.profile-edit-layout .profile-card {
  width: 280px;
  min-width: 280px;
  flex-shrink: 0;
}

.profile-card .card-body {
  padding: 32px 24px;
  gap: 12px;
}

.info-value-highlight {
  font-size: 18px;
  font-weight: 700;
  color: #e31e24;
}

.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #e31e24;
  color: #ffffff;
  font-size: 40px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  text-align: center;
}

.profile-id {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  margin-bottom: 8px;
}

.info-grid {
  flex-wrap: wrap;
  gap: 20px;
}

.info-item {
  flex: 1;
  min-width: 200px;
  gap: 4px;
}

.info-item-full {
  min-width: 100%;
  flex-basis: 100%;
}

.info-label {
  font-size: 12px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.info-value {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.financial-summary {
  gap: 24px;
}

.financial-stat {
  gap: 2px;
  text-align: right;
}

.financial-label {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
}

.financial-value {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.financial-value-green {
  color: #059669;
}

.financial-value-red {
  color: #e31e24;
}

.documents-list {
  flex-wrap: wrap;
  gap: 12px;
}

.document-item {
  flex: 1;
  min-width: 240px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  gap: 12px;
}

.document-icon {
  color: #e31e24;
  flex-shrink: 0;
}

.document-title {
  font-weight: 600;
  font-size: 14px;
}

.document-link {
  font-size: 12px;
}

.identity-documents-grid {
  flex-wrap: wrap;
  gap: 16px;
}

.identity-document-card {
  flex: 1;
  min-width: 220px;
  max-width: 320px;
  gap: 8px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

.identity-document-link {
  display: block;
}

.identity-document-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

/* Attendance */
.attendance-dots {
  gap: 4px;
}

.attendance-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.attendance-dot-present {
  background-color: #059669;
}

.attendance-dot-absent {
  background-color: #e31e24;
}

.attendance-dot-late {
  background-color: #d97706;
}

.attendance-calendar {
  gap: 8px;
}

.calendar-weekdays {
  gap: 4px;
}

.calendar-weekday {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  padding: 8px 0;
  min-width: 60px;
}

.calendar-days {
  gap: 4px;
}

.calendar-day {
  width: calc(14.28% - 4px);
  min-width: 60px;
  height: 64px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  gap: 4px;
  background-color: #ffffff;
}

.calendar-day-outside {
  opacity: 0.3;
  background-color: #f9fafb;
}

.calendar-day-number {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.calendar-day-present {
  background-color: #d1fae5;
  border-color: #a7f3d0;
}

.calendar-day-present .calendar-day-icon {
  color: #059669;
}

.calendar-day-absent {
  background-color: #fee2e2;
  border-color: #fecaca;
}

.calendar-day-absent .calendar-day-icon {
  color: #e31e24;
}

.calendar-day-late {
  background-color: #fef3c7;
  border-color: #fde68a;
}

.calendar-day-late .calendar-day-icon {
  color: #d97706;
}

.calendar-day-holiday {
  background-color: #f3f4f6;
  border-color: #e5e7eb;
}

.calendar-day-holiday .calendar-day-icon {
  color: #9ca3af;
}

.attendance-legend {
  gap: 16px;
}

.legend-item {
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.legend-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legend-present {
  background-color: #d1fae5;
  color: #059669;
}

.legend-absent {
  background-color: #fee2e2;
  color: #e31e24;
}

.legend-late {
  background-color: #fef3c7;
  color: #d97706;
}

.legend-holiday {
  background-color: #f3f4f6;
  color: #9ca3af;
}

/* Reports */
.reports-layout {
  gap: 20px;
  flex-wrap: wrap;
}

.method-breakdown {
  gap: 12px;
  margin-top: 20px;
}

.method-item {
  font-size: 13px;
  color: #374151;
}

.method-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
}

.method-percent {
  font-weight: 700;
  color: #111827;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background-color: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.reports-tables {
  gap: 24px;
  margin-top: 24px;
}

.reports-payments-card {
  margin-top: 24px;
}

.reports-tabs-nav {
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 20px;
  background: #f9fafb;
}

.reports-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.reports-tab:hover {
  color: #111827;
}

.reports-tab.active {
  color: #e31e24;
  border-bottom-color: #e31e24;
  background: #ffffff;
}

.reports-tab-badge {
  font-size: 11px;
  font-weight: 700;
}

.reports-tab-panel {
  display: none;
}

.reports-tab-panel.active {
  display: block;
}

.reports-payments-card .card-header {
  padding: 16px 20px 0;
  border-bottom: none;
}

.reports-payments-card .card-body {
  padding-top: 0;
}

.table-card .card-header .card-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.data-table tfoot td {
  padding: 14px 16px;
  font-weight: 700;
  background-color: #f9fafb;
  border-top: 2px solid #e5e7eb;
  color: #111827;
}

a.table-user-name {
  color: #111827;
  text-decoration: none;
}

a.table-user-name:hover {
  color: #e31e24;
}

.reports-payments-table .text-mono {
  white-space: nowrap;
}

/* Notifications */
.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-icon-megaphone {
  background-color: rgba(227, 30, 36, 0.1);
  color: #e31e24;
}

.notification-icon-alert {
  background-color: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.notification-icon-calendar {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

/* Rating */
.rating-stars {
  gap: 2px;
}

/* Static pages */
.static-pages-layout {
  gap: 20px;
  align-items: flex-start;
}

.static-pages-list {
  width: 260px;
  min-width: 260px;
  flex-shrink: 0;
}

.static-page-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  gap: 2px;
  transition: background-color 0.2s;
}

.static-page-item:hover {
  background-color: #f3f4f6;
}

.static-page-item.active {
  background-color: rgba(227, 30, 36, 0.1);
  border-left: 3px solid #e31e24;
}

.static-page-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.static-page-slug {
  font-size: 12px;
  color: #9ca3af;
}

.editor-toolbar {
  padding: 8px 16px;
  border-bottom: 1px solid #e5e7eb;
  gap: 4px;
  flex-wrap: wrap;
  background-color: #f9fafb;
}

.toolbar-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background-color: #ffffff;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background-color: #e5e7eb;
  margin: 0 4px;
}

.static-page-editor {
  min-height: 400px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  line-height: 1.7;
  color: #1f2937;
}

.static-page-editor:focus {
  border-color: #e31e24;
  box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

.static-page-editor h1,
.static-page-editor h2,
.static-page-editor h3 {
  margin-bottom: 12px;
}

.static-page-editor p {
  margin-bottom: 12px;
}

.static-page-editor ul,
.static-page-editor ol {
  margin-bottom: 12px;
  padding-left: 24px;
}

/* Login page */
.login-body {
  background: #f8f9ff;
  min-height: 100vh;
}

.login-wrapper {
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 485px;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 40px;
  border: 1px solid #e7bdb8;
  /* gap: 24px; */
}

.login-logo {
  /* gap: 8px; */
}

.login-logo-icon {
  width: 70px;
  height: 70px;
  /* background-color: rgba(227, 30, 36, 0.1); */
  border-radius: 16px;
  /* margin-bottom: 8px; */
}

.login-brand {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.login-subtitle {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
}

.login-form {
  /* gap: 16px; */
}

.login-hint {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

/* Enquiry */
.enquiry-message {
  font-size: 13px;
  color: #6b7280;
}

/* Loading overlay */
.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.form-input,
.form-select {
  height: 40px;
  border-radius: 2px;
}

/* Reports method card (replaces inline width on reports page) */
.reports-layout > .card:not(.chart-card) {
  width: 360px;
  flex-shrink: 0;
}

.sidebar-toggle.btn-icon {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-toggle.btn-icon:hover {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e31e24 !important;
}

.sidebar-toggle.btn-icon svg {
  width: 45px;
}

.custom-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Responsive */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 220px;
    min-width: 220px;
  }

  .student-profile-sidebar {
    width: 240px;
    min-width: 240px;
  }

  .static-pages-list {
    width: 220px;
    min-width: 220px;
  }
}

@media (max-width: 992px) {
  .student-profile-layout {
    flex-direction: column;
  }

  .student-profile-sidebar {
    width: 100%;
    min-width: 100%;
  }

  .static-pages-layout {
    flex-direction: column;
  }

  .static-pages-list {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 260px;
    min-width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .custom-table-header {
    display: block;
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-header {
    padding: 0 16px;
  }

  .header-search-wrap {
    max-width: none;
  }

  .header-user-info {
    display: none;
  }

  .admin-content {
    padding: 16px;
  }

  .page-header {
    flex-wrap: wrap;
  }

  .page-header-right {
    width: 100%;
  }

  .page-title {
    font-size: 20px;
  }

  .stat-card,
  .stat-card-box {
    min-width: 100%;
  }

  .card-header.flex-row {
    flex-wrap: wrap;
  }

  .card-header .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .card-header .filter-form > .flex-row {
    width: 100%;
    flex-wrap: wrap;
  }

  .card-header .filter-form > div:not(.flex-row) {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .student-search {
    min-width: 0;
    flex: 1;
  }

  .filter-form .form-select-sm {
    min-width: 0;
    /* flex: 1; */
  }

  .reports-layout {
    flex-direction: column;
  }

  .reports-layout > .card:not(.chart-card) {
    width: 100%;
  }

  .calendar-weekday,
  .calendar-day {
    min-width: 0;
  }

  .calendar-day {
    height: 52px;
  }

  .attendance-legend {
    flex-wrap: wrap;
  }

  .form-actions {
    flex-wrap: wrap;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-brand {
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .admin-header {
    padding: 0 12px;
  }

  .global-search-input {
    font-size: 13px;
  }

  .global-search-input::placeholder {
    font-size: 12px;
  }

  .btn-back {
    margin-right: 8px;
  }

  .table-card .table-responsive {
    padding: 0 12px;
  }

  .table-card .table-info,
  .table-card .pagination-wrap {
    padding: 12px;
  }
  .form-input-sm,
  .form-select-sm {
    width: 100%;
  }
}
