/* Sidebar and Layout Overhaul */
.sidebar-container {
  background-color: #ffffff;
  border-right: 1px solid #f1f5f9;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
  overflow-x: hidden;
  /* Hide scrollbar for Chrome, Safari and Opera */
  -webkit-overflow-scrolling: touch;
}

.sidebar-container::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.sidebar-container {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Pastikan nav juga tidak memunculkan scrollbar samping */
.sidebar-container nav {
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar-container nav::-webkit-scrollbar {
  display: none;
}

.sidebar-menu-item {
  position: relative;
  border-radius: 14px;
  margin: 6px 16px; /* Margin ditingkatkan agar card lebih ke tengah */
  padding: 12px 20px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #64748b;
  display: flex;
  align-items: center;
  width: calc(100% - 32px); /* Memaksa card simetris */
}

.sidebar-menu-item:hover {
  background-color: #f8fafc;
  color: #0f172a;
}

.sidebar-menu-item.active {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.sidebar-menu-item.active .lucide {
  color: #ffffff;
}

.sidebar-logo-section {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f8fafc;
}

.sidebar-school-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-top: 2px;
}

.logout-btn {
  color: #ef4444;
  font-weight: 600;
  transition: all 0.2s;
  border-radius: 12px;
  margin: 12px;
  padding: 12px 16px;
}

.logout-btn:hover {
  background-color: #fef2f2;
}

/* Top Navbar Overhaul */
.top-navbar {
  height: 80px;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #f1f5f9;
  z-index: 40;
}

.search-container {
  background-color: #f8fafc;
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 300px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.search-container:focus-within {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

/* Dashboard Layout Adjustments */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

.dashboard-container {
  display: flex;
  min-height: 100vh;
  background-color: #f8fafc;
}

.dashboard-content-wrapper {
  flex: 1;
  margin-left: 260px; /* Sesuai lebar sidebar baru */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .dashboard-content-wrapper {
    margin-left: 0;
    width: 100%;
  }
}

/* Card Overhaul */
.premium-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

/* Table Overhaul */
.premium-table-container {
  border: 1px solid #f1f5f9;
  border-radius: 20px;
  overflow: hidden;
  background: white;
}

.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.premium-table th {
  background: #ffffff;
  padding: 16px 24px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
}

.premium-table td {
  padding: 16px 24px;
  font-size: 14px;
  color: #0f172a;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}

.premium-table tr:last-child td {
  border-bottom: none;
}

.premium-table tr:hover td {
  background-color: #fbfcfe;
}

.avatar-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}

.class-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: white;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

/* Filter Buttons */
.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid #6366f1;
  color: #6366f1;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
}

.filter-btn-secondary {
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 20px;
  font-weight: 600;
}

/* Dashboard Stats Footer */
.stats-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: white;
  border-top: 1px solid #f1f5f9;
  border-radius: 0 0 20px 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

.stat-value {
  font-weight: 800;
  color: #1e1b4b;
  font-size: 16px;
}

/* Pagination */
.pagination-dot {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.pagination-dot.active {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
  border-color: #6366f1;
}

/* Teacher Card Styles */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.teacher-card {
  background: white;
  border-radius: 24px;
  border: 1px solid #f1f5f9;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.teacher-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.teacher-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  overflow: hidden;
  background: #f1f5f9;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.teacher-name {
  font-size: 18px;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 4px;
}

.teacher-subject {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.teacher-card-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #cbd5e1;
  cursor: pointer;
  transition: color 0.2s;
}

/* Form Overhaul */
.form-section-card {
  background: white;
  border-radius: 20px;
  border: 1px solid #f1f5f9;
  margin-bottom: 24px;
  overflow: hidden;
}

.form-section-header {
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
  color: white;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
}

.form-section-content {
  padding: 32px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 8px;
}

.form-input {
  width: full;
  padding: 12px 16px;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  color: #1e1b4b;
}

.form-input:focus {
  border-color: #6366f1;
  outline: none;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
  color: #cbd5e1;
}

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

.file-upload-zone {
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.file-upload-zone:hover {
  border-color: #6366f1;
  background: #f8fafc;
}

.btn-draft {
  padding: 12px 24px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #1e1b4b;
}

.btn-submit {
  padding: 12px 32px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Split View Layout */
.split-view-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .split-view-container {
    grid-template-columns: 1fr;
  }
}

.form-column {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.table-column {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.view-header {
  padding: 16px 24px;
  background: #f8fafc;
  color: #6366f1;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.view-content {
  padding: 24px;
  background: white;
}

/* Alert/Success Styles */
.success-alert {
  background: #86efac;
  color: #14532d;
  padding: 16px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

/* Grades Styles */
.pass-badge {
  background: #15803d;
  color: white;
  padding: 4px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
}

.requirements-box {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}

.requirements-title {
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 8px;
  display: block;
}

/* Schedule Table Specifics */
.schedule-table-container {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #f1f5f9;
}

.schedule-table th {
  background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
  color: #FFFFFF;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.2);
}

.schedule-table td {
  padding: 10px;
  text-align: center;
  border: 1px solid #FFFFFF;
  color: #333;
}

.schedule-time-col {
  background: #e0e7ff;
  font-weight: 700;
  color: #4338ca;
}

.schedule-cell {
  background: #f8fafc;
  min-width: 120px;
}

.schedule-subject {
  font-weight: 700;
  display: block;
}

.schedule-teacher {
  font-size: 11px;
  color: #444;
  display: block;
}

/* Attendance Card Styles */
.attendance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.attendance-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 16px;
  position: relative;
  transition: all 0.2s;
}

.attendance-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.attendance-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-hadir {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #15803d;
}

.status-izin {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #b91c1c;
}

.attendance-avatar {
  width: 60px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
}

.attendance-edit-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #FFD700;
  color: white;
  padding: 4px;
  border-radius: 4px;
}

/* ─── Animated Components ─── */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.15); }
}

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}
