/* ========================================
   OKUN ACADEMIA - Page-Specific Styles
   ======================================== */

/* ---- Login ---- */
.login-form .form-group:last-of-type {
  margin-bottom: 8px;
}

.login-form .btn {
  width: 100%;
  margin-top: 12px;
}

.login-links {
  text-align: center;
  margin-top: 16px;
}

.login-links a {
  font-size: var(--text-sm);
  color: var(--text-link);
  text-decoration: none;
  cursor: pointer;
}

.login-links a:hover {
  text-decoration: underline;
}

.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: 16px;
  display: none;
}

.login-error.show {
  display: block;
}

/* ---- Calendar ---- */
.calendar-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.calendar-header h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  text-transform: capitalize;
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day-name {
  padding: 10px;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

.calendar-cell {
  min-height: 90px;
  padding: 8px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--ease-fast);
}

.calendar-cell:nth-child(7n) {
  border-right: none;
}

.calendar-cell:hover {
  background: var(--bg-primary);
}

.calendar-cell.other-month {
  opacity: 0.4;
}

.calendar-cell.today {
  background: var(--info-bg);
}

.calendar-date {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.calendar-event {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.calendar-event.scheduled {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.calendar-event.completed {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.calendar-event.cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  text-decoration: line-through;
}

/* ---- Class Content Viewer ---- */
.class-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 32px;
  line-height: 1.8;
  font-size: var(--text-base);
}

.class-content h1 { font-size: var(--text-2xl); font-weight: 600; margin: 24px 0 12px; color: var(--text-primary); }
.class-content h2 { font-size: var(--text-xl); font-weight: 600; margin: 20px 0 10px; color: var(--text-primary); }
.class-content h3 { font-size: var(--text-lg); font-weight: 500; margin: 16px 0 8px; color: var(--text-primary); }
.class-content p { margin-bottom: 14px; color: var(--text-secondary); }
.class-content ul, .class-content ol { margin: 10px 0 14px 24px; color: var(--text-secondary); }
.class-content li { margin-bottom: 6px; }

.class-content pre {
  background: var(--navy);
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 16px 0;
  font-size: var(--text-sm);
  line-height: 1.6;
}

.class-content code {
  font-family: 'Consolas', 'Monaco', monospace;
}

.class-content .highlight-box {
  background: var(--warning-bg);
  border-left: 4px solid var(--accent-gold);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}

.class-content .info-box {
  background: var(--info-bg);
  border-left: 4px solid var(--info);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}

.class-content .diagram {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 20px 0;
  text-align: center;
}

.class-content .diagram .flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.class-content .diagram .flow-step {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
}

.class-content .diagram .flow-arrow {
  font-size: var(--text-xl);
  color: var(--text-muted);
}

.class-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: var(--text-sm);
}

.class-content table th,
.class-content table td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.class-content table th {
  background: var(--bg-primary);
  font-weight: 600;
}

/* ---- Quiz ---- */
.quiz-container {
  max-width: 700px;
}

.quiz-header {
  margin-bottom: 24px;
}

.quiz-header h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: 4px;
}

.quiz-header p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.quiz-question {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.quiz-question-number {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.quiz-question-text {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--ease-fast);
  font-size: var(--text-sm);
}

.quiz-option:hover {
  border-color: var(--accent-gold-light);
  background: rgba(255,188,80,0.05);
}

.quiz-option.selected {
  border-color: var(--accent-gold);
  background: rgba(255,188,80,0.1);
}

.quiz-option.correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.quiz-option.incorrect {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.quiz-option input[type="radio"] {
  accent-color: var(--accent-gold);
}

.quiz-results {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 32px;
  text-align: center;
}

.quiz-score {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--accent-gold-dark);
  margin-bottom: 8px;
}

.quiz-score-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ---- Metrics ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.chart-bar-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding: 16px 0;
}

.chart-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.chart-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--accent-gold), var(--accent-gold-dark));
  transition: height var(--ease-smooth);
  margin-top: auto;
}

.chart-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.chart-bar-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* ---- Professor Profile ---- */
.profile-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.profile-card .avatar {
  flex-shrink: 0;
}

.profile-info h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-info .role {
  font-size: var(--text-sm);
  color: var(--accent-gold-dark);
  font-weight: 500;
  margin-bottom: 12px;
}

.profile-info .bio {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.profile-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.profile-contact span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-contact svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (max-width: 600px) {
  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .profile-contact {
    align-items: center;
  }
}

/* ---- Support Form ---- */
.support-card {
  max-width: 600px;
}

/* ---- Password Recovery ---- */
.recovery-success {
  text-align: center;
  padding: 24px 0;
}

.recovery-success svg {
  width: 48px;
  height: 48px;
  fill: var(--success);
  margin-bottom: 12px;
}

/* ---- Enrollment Bulk ---- */
.bulk-enroll-preview {
  margin-top: 16px;
}

/* ---- Presentation Mode ---- */
.pres-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-secondary);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pres-header {
  background: var(--bg-sidebar);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.pres-title {
  flex: 1;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-sidebar);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pres-subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 400;
}

.pres-counter {
  font-size: var(--text-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.pres-close-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-sidebar);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  font-family: inherit;
  white-space: nowrap;
}

.pres-close-btn:hover {
  background: rgba(255,255,255,0.1);
}

.pres-slide-area {
  flex: 1;
  overflow-y: auto;
  padding: 48px 80px;
  font-size: 1.1rem;
  line-height: 1.75;
}

.pres-slide-inner {
  max-width: 1100px;
  margin: 0 auto;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pres-breadcrumb {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.pres-slide-inner h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 28px;
  border-bottom: 3px solid var(--accent-gold);
  padding-bottom: 18px;
  line-height: 1.2;
}

.pres-slide-inner h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 28px;
  border-bottom: 3px solid var(--accent-gold);
  padding-bottom: 16px;
  line-height: 1.2;
}

.pres-slide-inner h4 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 10px;
}

.pres-slide-inner h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 14px 0 8px;
}

.pres-slide-inner p {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.pres-slide-inner li {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.pres-footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-shrink: 0;
}

.pres-nav-btn {
  background: var(--accent-gold);
  color: var(--bg-sidebar);
  border: none;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s;
}

.pres-nav-btn:hover:not(:disabled) {
  background: var(--accent-gold-dark);
}

.pres-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pres-dot-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  max-width: 300px;
  overflow: hidden;
}

.pres-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}

.pres-dot.active {
  background: var(--accent-gold);
  transform: scale(1.4);
}

.pres-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0 0;
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .pres-slide-area {
    padding: 24px 20px;
  }
  .pres-hint { display: none; }
}

/* ---- Slide break separator (visible in scroll view, invisible in presentation) ---- */
hr.slide-break {
  border: none;
  border-top: 1px dashed var(--border-light);
  margin: 36px 0;
  opacity: 0.5;
}

/* ---- Class viewer toolbar ---- */
.class-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.bulk-enroll-preview .email-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--info-bg);
  color: var(--info);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  margin: 2px;
}

/* ---- Class list item ---- */
.class-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--ease-fast);
  cursor: pointer;
}

.class-list-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-color);
}

.class-number {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.class-list-info {
  flex: 1;
  min-width: 0;
}

.class-list-info h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.class-list-info p {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.class-list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Certificate ---- */
.certificate-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.certificate-card.complete {
  border-color: var(--accent-gold);
}

.certificate-card.complete::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-dark));
}
