/* LMS Portal - Demo Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface-2: #1a1a24;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #3B82F6;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --purple: #8B5CF6;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: clamp(10px, 2vw, 14px);
}

.app {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: clamp(50px, 12vw, 70px);
  min-width: 50px;
  background: var(--surface);
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(8px, 2vw, 16px) 0;
  flex-shrink: 0;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(12px, 3vw, 24px);
}

.logo-icon {
  font-size: clamp(16px, 4vw, 24px);
  margin-bottom: 4px;
}

.logo-text {
  font-size: clamp(8px, 1.5vw, 10px);
  font-weight: 700;
  color: var(--primary);
}

.nav-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1vw, 8px);
  width: 100%;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(8px, 2vw, 12px) clamp(4px, 1vw, 8px);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  border-left-color: var(--primary);
}

.nav-item .icon {
  font-size: clamp(14px, 3vw, 18px);
  margin-bottom: 4px;
}

.nav-item .label {
  font-size: clamp(7px, 1.2vw, 9px);
  color: var(--text-muted);
}

.nav-item.active .label {
  color: var(--primary);
}

/* Main Content */
.content {
  flex: 1;
  padding: clamp(12px, 3vw, 20px);
  overflow: auto;
  min-width: 0;
}

.screen {
  display: none;
  animation: fadeIn 0.3s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(12px, 3vw, 24px);
}

.header h1 {
  font-size: clamp(14px, 3vw, 20px);
  font-weight: 600;
}

.subtitle {
  font-size: clamp(9px, 1.5vw, 12px);
  color: var(--text-muted);
  margin-top: 4px;
}

.avatar {
  width: clamp(24px, 5vw, 36px);
  height: clamp(24px, 5vw, 36px);
  background: var(--surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(12px, 2vw, 16px);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(6px, 1.5vw, 12px);
  margin-bottom: clamp(12px, 3vw, 24px);
}

.stat-card {
  background: var(--surface);
  border-radius: clamp(8px, 2vw, 12px);
  padding: clamp(8px, 2vw, 16px);
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 12px);
  border: 1px solid rgba(255,255,255,0.05);
}

.stat-card.blue { border-left: 3px solid var(--primary); }
.stat-card.green { border-left: 3px solid var(--success); }
.stat-card.orange { border-left: 3px solid var(--warning); }
.stat-card.purple { border-left: 3px solid var(--purple); }

.stat-icon {
  font-size: clamp(16px, 3vw, 24px);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 700;
}

.stat-label {
  font-size: clamp(7px, 1.2vw, 10px);
  color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 2vw, 16px);
}

.card {
  background: var(--surface);
  border-radius: clamp(8px, 2vw, 12px);
  padding: clamp(8px, 2vw, 16px);
  border: 1px solid rgba(255,255,255,0.05);
}

.card h3 {
  font-size: clamp(10px, 1.8vw, 14px);
  margin-bottom: clamp(8px, 2vw, 16px);
  color: var(--text-muted);
}

/* Pie Chart */
.attendance-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pie-chart {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 12px;
}

.pie {
  --p: 0;
  --c: #3B82F6;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p)*1%), var(--surface-2) 0);
}

.pie-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* Notices */
.notice-list {
  list-style: none;
}

.notice-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-icon {
  font-size: 20px;
}

.notice-item strong {
  font-size: 12px;
  display: block;
  margin-bottom: 4px;
}

.notice-item p {
  font-size: 10px;
  color: var(--text-muted);
}

/* Courses */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.course-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.course-color {
  height: 60px;
}

.course-info {
  padding: 12px;
}

.course-info h4 {
  font-size: 13px;
  margin-bottom: 4px;
}

.course-info p {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.progress-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

/* Calendar */
.calendar-container {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.05);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-header h3 {
  font-size: 14px;
}

.cal-nav {
  background: var(--surface-2);
  border: none;
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-name {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border-radius: 6px;
}

.cal-day.today {
  background: var(--primary);
  font-weight: 600;
}

.cal-day.event {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

/* Attendance */
.attendance-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.att-stat {
  flex: 1;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.05);
}

.att-stat.present { border-top: 3px solid var(--success); }
.att-stat.absent { border-top: 3px solid var(--danger); }
.att-stat.leave { border-top: 3px solid var(--warning); }

.att-value {
  font-size: 24px;
  font-weight: 700;
  display: block;
}

.att-label {
  font-size: 10px;
  color: var(--text-muted);
}

.attendance-list {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.att-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
}

.att-row:last-child {
  border-bottom: none;
}

.status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.status.present { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status.absent { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.status.leave { background: rgba(245, 158, 11, 0.2); color: var(--warning); }

/* Profile */
.profile-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.05);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}

.profile-card h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.profile-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.profile-details {
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span:first-child {
  color: var(--text-muted);
}

@media (max-width: 500px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
}