@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --navy-sidebar: #1E3A5F;
  --navy-sidebar-dark: #12243d;
  --navy-sidebar-light: #2A4E7A;
  --white: #FFFFFF;
  --gold-accent: #F5A623;
  --gold-accent-hover: #E0951C;
  --sky-blue-card: #E8F4FD;
  --sky-blue-hover: #D0E8FC;
  --canvas-bg: #F8FAFC;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  
  /* Status Colors */
  --color-success: #10B981;
  --color-success-bg: #D1FAE5;
  --color-warning: #F59E0B;
  --color-warning-bg: #FEF3C7;
  --color-danger: #EF4444;
  --color-danger-bg: #FEE2E2;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--canvas-bg);
  color: var(--text-dark);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Page Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background-color: var(--navy-sidebar);
  color: var(--white);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  box-shadow: 4px 0 25px rgba(30, 58, 95, 0.15);
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo {
  height: 42px;
  width: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px;
}

.sidebar-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.sidebar-brand span {
  color: var(--gold-accent);
  font-size: 0.8rem;
  display: block;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-menu {
  flex-grow: 1;
  padding: 1.5rem 0.75rem;
  list-style: none;
  margin: 0;
  overflow-y: auto;
}

.menu-item {
  margin-bottom: 0.4rem;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.menu-link i {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.menu-link:hover {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.05);
}

.menu-link:hover i {
  transform: translateX(3px);
}

.menu-link.active {
  color: var(--navy-sidebar);
  background-color: var(--gold-accent);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
}

.menu-link.active i {
  color: var(--navy-sidebar);
}

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: var(--navy-sidebar-dark);
}

.admin-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold-accent);
  object-fit: cover;
}

.admin-info {
  flex-grow: 1;
  min-width: 0;
}

.admin-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-role {
  font-size: 0.75rem;
  color: var(--gold-accent);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--canvas-bg);
}

.navbar-top {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--navy-sidebar);
}

.content-body {
  padding: 1.75rem;
  flex-grow: 1;
  overflow-y: auto;
}

/* Premium Card Styles */
.card-stats {
  background-color: var(--sky-blue-card);
  border: 1px solid rgba(30, 58, 95, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
}

.card-stats:hover {
  transform: translateY(-4px);
  background-color: var(--sky-blue-hover);
  box-shadow: 0 10px 20px rgba(30, 58, 95, 0.06);
}

.card-stats::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--gold-accent);
}

.stat-icon {
  position: absolute;
  right: 1.25rem;
  bottom: 1rem;
  font-size: 3.5rem;
  color: rgba(30, 58, 95, 0.06);
  pointer-events: none;
  transition: all 0.3s ease;
}

.card-stats:hover .stat-icon {
  color: rgba(30, 58, 95, 0.1);
  transform: scale(1.1);
}

.stat-num {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy-sidebar);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* Standard Premium Card */
.card-custom {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  margin-bottom: 1.75rem;
  overflow: hidden;
}

.card-custom-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-custom-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy-sidebar);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-custom-body {
  padding: 1.5rem;
}

/* Accent Buttons */
.btn-gold {
  background-color: var(--gold-accent);
  color: var(--navy-sidebar);
  font-weight: 600;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-gold:hover {
  background-color: var(--gold-accent-hover);
  color: var(--navy-sidebar);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.2);
}

.btn-navy {
  background-color: var(--navy-sidebar);
  color: var(--white);
  font-weight: 600;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-navy:hover {
  background-color: var(--navy-sidebar-light);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

/* Badge Styles */
.badge-custom {
  padding: 0.35em 0.65em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
}

.badge-active {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.badge-leave {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge-suspended {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
}

/* Tables Customization */
.table-custom {
  width: 100%;
  margin-bottom: 0;
}

.table-custom th {
  background-color: #F8FAFC;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.table-custom td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.table-custom tbody tr:hover {
  background-color: #F8FAFC;
}

/* Search bar styling */
.search-box {
  position: relative;
}

.search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  padding-left: 2.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.search-box input:focus {
  border-color: var(--navy-sidebar-light);
  box-shadow: 0 0 0 3px rgba(42, 78, 122, 0.15);
}

/* Modals */
.modal-content-custom {
  border-radius: 16px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-header-custom {
  background-color: var(--navy-sidebar);
  color: var(--white);
  padding: 1.25rem 1.5rem;
  border: none;
}

.modal-header-custom .modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.modal-header-custom .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}

/* Attendance Heatmap Styles */
.heatmap-container {
  overflow-x: auto;
}

.heatmap-table {
  border-collapse: separate;
  border-spacing: 4px;
  width: 100%;
}

.heatmap-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
}

.heatmap-cell {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.heatmap-cell:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.heatmap-present {
  background-color: var(--color-success);
  color: var(--white);
}

.heatmap-absent {
  background-color: var(--color-danger);
  color: var(--white);
}

.heatmap-late {
  background-color: var(--color-warning);
  color: var(--white);
}

.heatmap-student-name {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  font-size: 0.85rem;
  padding-right: 1rem;
}

/* Custom Alert Banner */
.attendance-flag-banner {
  border-left: 4px solid var(--color-danger);
  background-color: var(--color-danger-bg);
  color: #B91C1C;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Timeline / Audit Log */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  list-style: none;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--navy-sidebar-light);
  border: 2px solid var(--white);
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.timeline-text {
  font-size: 0.85rem;
  margin: 0;
}

/* Real-Time Notification System (Toasts) */
.toast-container-custom {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast-custom {
  background-color: var(--white);
  border-left: 4px solid var(--navy-sidebar);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  min-width: 320px;
  max-width: 400px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-custom.hide {
  transform: translateX(120%);
  opacity: 0;
}

.toast-custom-icon {
  font-size: 1.25rem;
}

.toast-custom-content {
  flex-grow: 1;
}

.toast-custom-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.toast-custom-message {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.toast-custom-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Bottom Bar */
.footer-bottom {
  text-align: center;
  padding: 1.25rem;
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Profile details in modal */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--sky-blue-card);
}

.profile-name {
  font-size: 1.35rem;
  margin: 0;
  color: var(--navy-sidebar);
}

.profile-id {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Transcript Print Styles */
.transcript-box {
  padding: 2.5rem;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.transcript-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px double var(--navy-sidebar);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.transcript-logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.transcript-title {
  text-align: right;
}

.transcript-title h2 {
  color: var(--navy-sidebar);
  margin: 0;
  font-size: 1.75rem;
}

.transcript-title p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.transcript-student-details {
  background-color: var(--canvas-bg);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

@media print {
  body * {
    visibility: hidden;
  }
  #print-transcript-modal-body, #print-transcript-modal-body * {
    visibility: visible;
  }
  #print-transcript-modal-body {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
    margin: 0;
  }
  .modal-footer, .btn-close {
    display: none !important;
  }
  .transcript-box {
    border: none !important;
    padding: 0 !important;
  }
}

/* Mobile Sidebar Toggle styling */
.mobile-header {
  display: none;
  background-color: var(--navy-sidebar);
  color: var(--white);
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 991.98px) {
  .mobile-header {
    display: flex;
  }
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: 0;
    overflow: hidden;
    box-shadow: none;
  }
  .sidebar.show {
    height: auto;
    max-height: calc(100vh - 56px);
  }
  .navbar-top {
    display: none;
  }
}

/* Dynamic overlay for disabled functions under access control */
.action-restricted {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
  cursor: not-allowed !important;
}

/* Announcement Card Accent Colors */
.ann-notice {
  border-left: 4px solid var(--navy-sidebar-light);
}

.ann-exam {
  border-left: 4px solid var(--color-danger);
}

.ann-event {
  border-left: 4px solid var(--gold-accent);
}

/* Missing utility classes for custom color theme */
.text-navy-sidebar {
  color: var(--navy-sidebar) !important;
}

.bg-navy {
  background-color: var(--navy-sidebar) !important;
}

