/* ═══════════════════════════════════════════════════════════════════════
   STUDYRIA CAMPUS — Design System (campus.css)
   AMOLED Dark + Glassmorphism. Responsive. Accessible.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Page Wrapper ── */
#page-campus {
  min-height: 100vh;
  padding: 0;
}

.campus-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* ── Campus Header ── */
.campus-header {
  background: linear-gradient(135deg, rgba(147,2,5,0.08), rgba(139,92,246,0.06));
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
body.light .campus-header {
  background: linear-gradient(135deg, rgba(147,2,5,0.06), rgba(139,92,246,0.04));
  border-color: rgba(0,0,0,0.06);
}
.campus-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 4px;
  background: linear-gradient(135deg, #930205, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.campus-header p {
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
  margin: 0;
}

/* ── Campus Tab Bar ── */
.campus-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.campus-tabs::-webkit-scrollbar { display: none; }
.campus-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
body.light .campus-tab {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.06);
}
.campus-tab.active {
  background: linear-gradient(135deg, #930205, #8b5cf6);
  color: #fff;
  border-color: transparent;
}
.campus-tab:hover:not(.active) {
  color: #930205;
  border-color: rgba(147,2,5,0.3);
}

/* ── Card Grid ── */
.campus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .campus-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

.campus-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
body.light .campus-card {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.campus-card:hover {
  border-color: rgba(147,2,5,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(147,2,5,0.12);
}
.campus-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(147,2,5,0.15), rgba(139,92,246,0.1));
}
.campus-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.campus-card-sub {
  font-size: 0.72rem;
  color: var(--text-secondary, #94a3b8);
}

/* ── Feed Items ── */
.campus-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.2s;
}
body.light .feed-item {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.feed-item:hover {
  border-color: rgba(147,2,5,0.25);
  background: rgba(147,2,5,0.04);
}
.feed-item-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(147,2,5,0.15), rgba(139,92,246,0.1));
}
.feed-item-body { flex: 1; min-width: 0; }
.feed-item-title {
  font-size: 0.85rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-item-sub {
  font-size: 0.72rem; color: var(--text-secondary, #94a3b8);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-item-badge {
  font-size: 0.65rem; font-weight: 700;
  padding: 3px 8px; border-radius: 8px;
  background: rgba(251,191,36,0.15); color: #fbbf24;
  flex-shrink: 0;
}

/* ── Focus Timer ── */
.focus-timer {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  margin-bottom: 20px;
}
body.light .focus-timer {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.focus-timer-display {
  font-size: 3.5rem;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  color: #930205;
  margin: 12px 0;
  letter-spacing: 2px;
}
.focus-timer-mode {
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary, #94a3b8);
}
.focus-timer-controls {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 20px;
}
.focus-btn {
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 0.85rem; font-weight: 700;
  border: none; cursor: pointer;
  transition: all 0.2s;
}
.focus-btn-primary {
  background: linear-gradient(135deg, #930205, #8b5cf6);
  color: #fff;
}
.focus-btn-primary:hover { transform: scale(1.05); }
.focus-btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary, #e2e8f0);
  border: 1px solid rgba(255,255,255,0.08);
}
body.light .focus-btn-secondary {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}

/* ── Notes ── */
.note-editor {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
body.light .note-editor {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.note-editor input, .note-editor textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  outline: none;
  resize: none;
}
.note-editor input {
  font-size: 0.9rem; font-weight: 700; margin-bottom: 8px;
}
.note-editor textarea {
  font-size: 0.82rem; min-height: 80px; line-height: 1.5;
}
.note-list { display: flex; flex-direction: column; gap: 8px; }
.note-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-left: 3px solid #930205;
  cursor: pointer;
  transition: all 0.2s;
}
body.light .note-item {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.note-item:hover { background: rgba(147,2,5,0.04); }
.note-item-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 2px; }
.note-item-preview { font-size: 0.75rem; color: var(--text-secondary, #94a3b8); }

/* ── Calendar ── */
.campus-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}
.cal-day-header {
  text-align: center;
  font-size: 0.65rem; font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  padding: 4px 0;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
}
body.light .cal-day {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.04);
}
.cal-day:hover { border-color: rgba(147,2,5,0.3); }
.cal-day.today {
  background: linear-gradient(135deg, #930205, #8b5cf6);
  color: #fff; font-weight: 700;
}
.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #fbbf24;
}
.cal-day.other-month { opacity: 0.3; }

/* ── Goals ── */
.goal-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 8px;
}
body.light .goal-item {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.goal-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-top: 8px;
}
body.light .goal-progress-bar { background: rgba(0,0,0,0.06); }
.goal-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #930205, #8b5cf6);
  transition: width 0.4s ease;
}
.goal-completed .goal-progress-fill {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* ── Exam Countdown ── */
.exam-countdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 8px;
}
body.light .exam-countdown-item {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.exam-countdown-days {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ef4444;
  min-width: 60px;
  text-align: center;
}
.exam-countdown-info { flex: 1; }
.exam-countdown-name { font-size: 0.88rem; font-weight: 700; }
.exam-countdown-date { font-size: 0.72rem; color: var(--text-secondary, #94a3b8); }

/* ── Documents Vault ── */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.vault-item {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
body.light .vault-item {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.vault-item:hover { border-color: rgba(147,2,5,0.25); }
.vault-item-icon { font-size: 1.8rem; margin-bottom: 6px; }
.vault-item-name { font-size: 0.78rem; font-weight: 600; }
.vault-item-type { font-size: 0.65rem; color: var(--text-secondary, #94a3b8); text-transform: uppercase; }

/* ── Analytics ── */
.analytics-stat {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}
body.light .analytics-stat {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.analytics-stat-num {
  font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(135deg, #930205, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.analytics-stat-label {
  font-size: 0.72rem; color: var(--text-secondary, #94a3b8); margin-top: 2px;
}

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}
body.light .skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.03), rgba(0,0,0,0.06), rgba(0,0,0,0.03));
  background-size: 200% 100%;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty State ── */
.campus-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary, #94a3b8);
}
.campus-empty-icon { font-size: 2.5rem; margin-bottom: 10px; opacity: 0.5; }
.campus-empty-text { font-size: 0.85rem; }

/* ── Section Title ── */
.campus-section-title {
  font-size: 0.95rem; font-weight: 800;
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.campus-section-title .badge {
  font-size: 0.65rem; padding: 2px 8px;
  border-radius: 8px; background: rgba(147,2,5,0.15);
  color: #930205; font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .campus-header h1 { font-size: 1.3rem; }
  .focus-timer-display { font-size: 2.8rem; }
  .campus-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Animations ── */
@keyframes campus-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.campus-fade-in {
  animation: campus-fade-in 0.3s ease forwards;
}
