/* ========================================
   CCTU SRC Academic Toolkit - Main Stylesheet
   Modern Academic Dashboard Design
   ======================================== */

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f8f9ff;
  color: #0b1c30;
  -webkit-tap-highlight-color: transparent;
}

/* ===== Custom Scrollbar ===== */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c3c6d1;
  border-radius: 10px;
}

/* ===== Top App Bar ===== */
.top-app-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f8f9ff;
  border-bottom: 1px solid #c3c6d1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 64px;
  transition: all 0.3s ease;
}

.top-app-bar.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background: rgba(248, 249, 255, 0.95);
  backdrop-filter: blur(8px);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fecb00;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #001e40;
}

.notif-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #001e40;
  transition: all 0.15s ease;
}

.notif-btn:hover {
  background: #e5eeff;
}

.notif-btn:active {
  transform: scale(0.95);
}

/* ===== Main Container ===== */
.main-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== GPA Card ===== */
.gpa-card {
  background: linear-gradient(135deg, #001e40 0%, #003366 100%);
  border-radius: 12px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gpa-bg-icon {
  position: absolute;
  top: 0;
  right: 0;
  padding: 16px;
  opacity: 0.1;
}

.gpa-bg-icon .material-symbols-outlined {
  font-size: 120px;
  font-variation-settings: 'FILL' 1;
}

.gpa-content {
  position: relative;
  z-index: 10;
}

.gpa-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 4px;
}

.gpa-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.gpa-number {
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gpa-type {
  font-size: 14px;
  opacity: 0.7;
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.progress-bar-fill {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #fecb00;
  border-radius: 9999px;
  width: var(--progress-width, 0%);
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 12px;
  font-weight: 700;
  color: #fecb00;
}

.track-btn {
  background: #fecb00;
  color: #001e40;
  border: none;
  padding: 10px 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.track-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.track-btn:active {
  transform: scale(0.96);
}

.track-btn .material-symbols-outlined {
  font-size: 18px;
}

/* ===== View Toggle ===== */
.view-toggle {
  background: #eff4ff;
  padding: 4px;
  border-radius: 12px;
  display: flex;
}

.toggle-btn {
  flex: 1;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #43474f;
}

.toggle-btn.active {
  background: #001e40;
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-btn:active {
  transform: scale(0.97);
}

/* ===== View Containers ===== */
.view-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.view-container.hidden {
  display: none;
}

/* ===== Section Styles ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #001e40;
}

.section-date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #737780;
}

/* ===== Upcoming Alert ===== */
.upcoming-alert {
  background: rgba(254, 203, 0, 0.1);
  border: 1px solid rgba(254, 203, 0, 0.2);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: pulse 2s infinite;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upcoming-alert:hover {
  background: rgba(254, 203, 0, 0.15);
  transform: translateX(4px);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.upcoming-alert .material-symbols-outlined:first-child {
  color: #745b00;
  font-weight: bold;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-size: 14px;
  font-weight: 700;
  color: #001e40;
}

.alert-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: #745b00;
}

/* ===== Schedule List ===== */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-item {
  background: white;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #c3c6d1;
  display: flex;
  gap: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.schedule-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.schedule-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #c3c6d1;
  padding-right: 16px;
  min-width: 80px;
}

.schedule-hour {
  font-size: 18px;
  font-weight: 700;
  color: #001e40;
}

.schedule-ampm {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #737780;
}

.schedule-details {
  flex: 1;
}

.schedule-name {
  font-size: 16px;
  font-weight: 700;
  color: #001e40;
  margin-bottom: 8px;
}

.schedule-meta {
  display: flex;
  gap: 16px;
  color: #43474f;
}

.schedule-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.schedule-meta-item .material-symbols-outlined {
  font-size: 16px;
}

.remind-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 16px;
  border-left: 1px solid #c3c6d1;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #737780;
  transition: all 0.2s ease;
}

.remind-btn:hover {
  color: #001e40;
}

.remind-btn:active {
  transform: scale(0.95);
}

.remind-btn .material-symbols-outlined {
  font-size: 20px;
}

.remind-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ===== Tasks Section ===== */
.tasks-container {
  background: #e5eeff;
  padding: 16px;
  border-radius: 12px;
}

.task-item {
  background: white;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #c3c6d1;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.task-item:last-child {
  margin-bottom: 0;
}

.task-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #c3c6d1;
  cursor: pointer;
  accent-color: #001e40;
}

.task-content {
  flex: 1;
}

.task-title {
  font-size: 14px;
  font-weight: 700;
  color: #001e40;
}

.task-title.completed {
  text-decoration: line-through;
  opacity: 0.5;
}

.task-deadline {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.task-deadline.urgent {
  color: #ba1a1a;
}

.task-deadline.normal {
  color: #43474f;
}

.task-deadline .material-symbols-outlined {
  font-size: 12px;
}

/* ===== Calendar Styles ===== */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-month {
  font-size: 20px;
  font-weight: 700;
  color: #001e40;
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #001e40;
  transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
  background: #e5eeff;
}

.calendar-nav-btn:active {
  transform: scale(0.9);
}

.calendar-container {
  background: white;
  border: 1px solid #c3c6d1;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #737780;
  padding: 8px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #0b1c30;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.calendar-day:hover:not(.empty) {
  background: #e5eeff;
}

.calendar-day.active {
  background: #001e40;
  color: white;
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  background: #fecb00;
  border-radius: 50%;
}

.calendar-day.empty {
  color: rgba(115, 119, 128, 0.3);
  cursor: default;
}

/* ===== Daily Agenda ===== */
.daily-agenda-title {
  font-size: 18px;
  font-weight: 700;
  color: #001e40;
  margin-bottom: 16px;
}

.daily-agenda {
  background: #e5eeff;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-item {
  background: white;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid;
  transition: all 0.2s ease;
}

.agenda-item.academic {
  border-left-color: #fecb00;
}

.agenda-item.deadline {
  border-left-color: #ba1a1a;
}

.agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.agenda-title {
  font-size: 14px;
  font-weight: 700;
  color: #001e40;
}

.agenda-time {
  font-size: 12px;
  color: #737780;
}

.agenda-location {
  font-size: 12px;
  color: #43474f;
}

/* ===== Quick Resources ===== */
.resources-section {
  margin-top: 8px;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .resources-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.resource-card {
  background: #dce9ff;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resource-card:hover {
  background: #d3e4fe;
  transform: translateY(-4px);
}

.resource-card:active {
  transform: scale(0.97);
}

.resource-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #003366;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.resource-card:hover .resource-icon {
  transform: scale(1.1);
}

.resource-icon .material-symbols-outlined {
  color: #f1c100;
  font-size: 28px;
  font-variation-settings: 'FILL' 1;
}

.resource-label {
  font-size: 14px;
  font-weight: 700;
  color: #001e40;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 64px;
  padding: 0 16px;
  background: #f8f9ff;
  z-index: 50;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 12px rgba(0, 51, 102, 0.08);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  color: #737780;
  padding: 8px 12px;
  border-radius: 8px;
}

.nav-item.active {
  color: #001e40;
  font-weight: 700;
}

.nav-item.active::after {
  content: '';
  width: 4px;
  height: 4px;
  background: #f1c100;
  border-radius: 50%;
  margin-top: 4px;
}

.nav-item:hover {
  background: #e5eeff;
  transform: translateY(-2px);
}

.nav-item:active {
  transform: scale(0.95);
}

.nav-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.nav-item .material-symbols-outlined {
  font-size: 24px;
}

.nav-item .material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1;
}

/* ===== Toast Notification ===== */
.custom-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #001e40;
  color: white;
  padding: 12px 20px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
  white-space: nowrap;
  max-width: 90%;
  white-space: normal;
  text-align: center;
  font-family: 'Inter', sans-serif;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 480px) {
  .main-container {
    padding: 16px 12px;
    gap: 20px;
  }
  
  .schedule-time {
    min-width: 60px;
    padding-right: 12px;
  }
  
  .schedule-hour {
    font-size: 16px;
  }
  
  .schedule-meta {
    flex-direction: column;
    gap: 4px;
  }
  
  .section-title {
    font-size: 18px;
  }
}

@media (min-width: 768px) {
  .schedule-list {
    max-width: 100%;
  }
}