/* ================= STYLE SYSTEM: STRAIGHT-LINE LEADERSHIP PORTAL ================= */

/* CSS Variables */
:root {
  --bg-color: #080a0f;
  --panel-bg: rgba(13, 17, 28, 0.65);
  --panel-border: rgba(255, 255, 255, 0.07);
  --sidebar-bg: #0b0e17;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-color: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-hover: #60a5fa;
  
  --success-color: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  --font-family-title: 'Outfit', sans-serif;
  --font-family-body: 'Inter', sans-serif;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  font-size: 14px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Glassmorphism Panel helper */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.btn-block { width: 100%; display: flex; justify-content: center; align-items: center; }

/* Buttons */
.btn {
  font-family: var(--font-family-title);
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  font-size: 14px;
}

.btn-primary {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 0 12px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 12px;
}
.btn-text:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 50%;
}
.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--border-radius-sm);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}
.btn-danger:active {
  transform: translateY(0);
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.btn-success:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}
.btn-success:active {
  transform: translateY(0);
}

.status-badge {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.status-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

/* ================= AUTH MODULE ================= */
.auth-card-container {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 45%),
              radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.03), transparent 35%),
              #06080c;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  animation: fadeIn 0.5s ease;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.logo-box {
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-title);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
}

.logo-box:hover {
  transform: translateY(-3px);
}

.logo-box i {
  width: 24px;
  height: 24px;
}

.logo-box.blue {
  background: var(--accent-color);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.logo-box.green {
  background: var(--success-color);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.logo-box.red {
  background: var(--danger-color);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.auth-header h1 {
  font-family: var(--font-family-title);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
}

.auth-header .subtitle {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  margin-top: 4px;
}

/* Inputs & Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.input-wrapper input, .form-control {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  outline: none;
  transition: var(--transition-smooth);
}

.input-wrapper input:focus, .form-control:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

.select-box {
  padding-left: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

select option {
  background-color: #0b0e17; /* Solid dark background to prevent light-mode browser override */
  color: #f1f5f9; /* Solid light color for option text visibility */
}

.error-msg {
  color: var(--danger-color);
  font-size: 13px;
  margin-bottom: 16px;
  min-height: 18px;
  text-align: center;
}

.auth-footer {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* ================= MAIN LAYOUT SYSTEM ================= */
.app-container.logged-out #platform-container {
  display: none;
}
.app-container.logged-in #auth-container {
  display: none;
}

.platform-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  background: radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.04), transparent 40%),
              #080a0f;
}

/* SIDEBAR */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--panel-border);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 16px;
  box-shadow: none;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 32px;
}

.brand-logo {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(59, 130, 246, 0.2);
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo i {
  width: 20px;
  height: 20px;
}

.brand-text h2 {
  font-family: var(--font-family-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.brand-text span {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 1.5px;
  display: block;
  margin-top: 1px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font-family-title);
  font-size: 14px;
  transition: var(--transition-smooth);
}

.nav-item i {
  width: 18px;
  height: 18px;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--text-primary);
  box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.05);
}
.nav-item.active i {
  color: var(--accent-color);
  filter: drop-shadow(0 0 5px var(--accent-glow));
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.user-avatar {
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--font-family-title);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.user-details {
  flex: 1;
  overflow: hidden;
}
.user-details h4 {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.user-details p {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.btn-logout-icon:hover {
  color: var(--danger-color);
  background: rgba(239, 68, 68, 0.1);
}

/* CONTENT CONTAINER */
.content-area {
  padding: 40px;
  overflow-y: auto;
  height: 100vh;
}

/* Page Tabs management */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}
.tab-content.active-tab {
  display: block;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.content-header h1 {
  font-family: var(--font-family-title);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.content-header .subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.date-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-badge i {
  width: 16px;
  height: 16px;
  color: var(--accent-color);
}

/* Card layout */
.card {
  padding: 24px;
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

/* ================= DASHBOARD TAB ================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.progress-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.progress-card h3 {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 32px;
}

.progress-ring-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bar {
  transition: stroke-dashoffset 0.6s ease;
  stroke-dasharray: 314.16; /* 2 * PI * r (r=50) */
  stroke-dashoffset: 314.16;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-family-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.progress-details {
  flex: 1;
}

.progress-step-indicator span {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.progress-step-indicator h4 {
  font-family: var(--font-family-title);
  font-size: 18px;
  font-weight: 600;
  margin: 4px 0 16px 0;
}

.stats-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 0;
  padding: 20px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon i {
  width: 22px;
  height: 22px;
}

.icon-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.icon-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.stat-info {
  flex: 1;
}
.stat-info span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.stat-info h2 {
  font-family: var(--font-family-title);
  font-size: 20px;
  font-weight: 700;
  margin: 2px 0 6px 0;
}
.stat-info p {
  font-size: 11px;
  color: var(--text-secondary);
}

.stat-progress-bar {
  background: rgba(255,255,255,0.05);
  height: 4px;
  border-radius: 2px;
  width: 100%;
  overflow: hidden;
}
.stat-progress-fill {
  background: var(--success-color);
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.dashboard-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.quote-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(255,255,255,0.01));
  border-left: 4px solid var(--accent-color);
}

.quote-icon {
  color: var(--accent-color);
  opacity: 0.3;
  margin-bottom: 12px;
}
.quote-icon i {
  width: 28px;
  height: 28px;
}

.quote-text {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.quote-author {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.quick-tracker-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.quick-tracker-card h3 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
}

.quick-tracker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-tracker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--border-radius-md);
  font-size: 13px;
}
.quick-tracker-item.completed {
  opacity: 0.6;
}
.quick-tracker-item.completed span {
  text-decoration: line-through;
  color: var(--text-muted);
}
.quick-tracker-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quick-tracker-item-text .action-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.quick-check {
  border: 1.5px solid var(--text-muted);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: var(--transition-smooth);
}
.quick-check.checked {
  background: var(--success-color);
  border-color: var(--success-color);
}
.quick-check i {
  width: 12px;
  height: 12px;
}

/* ================= CURRICULUM TAB ================= */
.module-nav-pills {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 6px;
  border-radius: var(--border-radius-md);
}

.pill {
  background: transparent;
  border: none;
  font-family: var(--font-family-title);
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.pill:hover {
  color: var(--text-primary);
}
.pill.active {
  background: var(--accent-color);
  color: #ffffff;
}

.module-viewer-layout {
  display: grid;
  grid-template-columns: calc(60% - 12px) calc(40% - 12px);
  gap: 24px;
  align-items: start;
}

.module-description {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-top: 12px;
}

.divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 28px 0;
}

.section-title {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.section-title i {
  color: var(--accent-color);
  width: 20px;
  height: 20px;
}

/* Video Player */
.video-player-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.video-player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Readings grid */
.readings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.reading-download-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--border-radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}
.reading-download-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.icon-pdf {
  color: #f43f5e;
  width: 24px;
  height: 24px;
}

.reading-info {
  flex: 1;
  overflow: hidden;
}
.reading-info strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reading-info span {
  font-size: 10px;
  color: var(--text-muted);
}

.icon-download {
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  transition: var(--transition-smooth);
}
.reading-download-card:hover .icon-download {
  color: var(--accent-color);
}

/* Assignments Sidebar Card */
.assignment-card {
  position: sticky;
  top: 20px;
}

.card-badge {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.assignment-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 24px;
}

.assignment-question {
  margin-bottom: 20px;
}
.assignment-question p {
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.assignment-question textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  padding: 12px;
  outline: none;
  resize: vertical;
  font-size: 13px;
  transition: var(--transition-smooth);
}
.assignment-question textarea:focus {
  border-color: var(--accent-color);
  background: rgba(0, 0, 0, 0.25);
}

.success-notice {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--success-color);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

/* ================= TRACKER TAB ================= */
.tracker-layout {
  display: flex;
  flex-direction: column;
}

.table-card {
  padding: 24px;
}

.tracker-week-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tracker-week-summary h3 {
  font-family: var(--font-family-title);
  font-size: 16px;
}

.weekly-percentage-badge {
  background: var(--success-glow);
  color: var(--success-color);
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-family: var(--font-family-title);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.weekly-percentage-badge strong {
  font-size: 16px;
  font-weight: 700;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.tracker-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tracker-table th, .tracker-table td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tracker-table th {
  font-family: var(--font-family-title);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding-bottom: 16px;
}

.tracker-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.day-col {
  text-align: center;
  width: 8%;
}

.commitment-cell-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.commitment-title-input {
  background: transparent;
  border: none;
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.commitment-title-input:focus {
  border-color: rgba(255,255,255,0.15);
}

.core-action-input {
  background: transparent;
  border: none;
  font-size: 12px;
  color: var(--text-secondary);
  width: 100%;
  outline: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.core-action-input:focus {
  border-color: rgba(255,255,255,0.1);
}

/* Checkbox alignment */
.checkbox-cell {
  text-align: center;
}

.checkbox-custom {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.checkbox-custom input {
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-marker {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--text-muted);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.checkbox-custom:hover .checkbox-marker {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
}
.checkbox-custom input:checked + .checkbox-marker {
  background: var(--success-color);
  border-color: var(--success-color);
  color: #ffffff;
  box-shadow: 0 0 10px var(--success-glow);
}
.checkbox-marker i {
  width: 14px;
  height: 14px;
}

.progress-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}
.progress-pill.high {
  background: var(--success-glow);
  color: var(--success-color);
  border-color: rgba(16, 185, 129, 0.15);
}
.progress-pill.medium {
  background: rgba(245, 158, 11, 0.08);
  color: var(--warning-color);
  border-color: rgba(245, 158, 11, 0.15);
}
.progress-pill.low {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger-color);
  border-color: rgba(239, 68, 68, 0.15);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state i {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
  margin-bottom: 16px;
}
.empty-state p {
  max-width: 320px;
  font-size: 13px;
  line-height: 1.5;
}

/* ================= REFLECTIONS HISTORY ================= */
.reflections-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-item {
  padding: 20px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-lg);
  animation: fadeIn 0.4s ease;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.timeline-header h3 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
}
.timeline-date {
  font-size: 11px;
  color: var(--text-muted);
}

.timeline-qa-item {
  margin-bottom: 12px;
}
.timeline-qa-item strong {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.timeline-qa-item p {
  font-size: 13px;
  color: var(--text-primary);
  background: rgba(0,0,0,0.15);
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255,255,255,0.03);
}

/* ================= LIBRARY TAB ================= */
.resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.resources-category-card h3 {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.resources-category-card h3 i {
  color: var(--accent-color);
}

.resource-files-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-files-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}
.resource-files-list a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(59, 130, 246, 0.25);
}

.resource-info {
  flex: 1;
  overflow: hidden;
}
.resource-info strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resource-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ================= ADMIN TAB ================= */
.admin-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

.students-table {
  width: 100%;
  border-collapse: collapse;
}
.students-table th, .students-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.students-table th {
  font-family: var(--font-family-title);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.students-table tbody tr:hover td {
  background: rgba(255,255,255,0.01);
}

.student-detail-panel {
  position: sticky;
  top: 20px;
  animation: fadeIn 0.4s ease;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.panel-header h3 {
  font-family: var(--font-family-title);
  font-size: 16px;
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
  gap: 16px;
}

.panel-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family-title);
  font-size: 13px;
  font-weight: 500;
  padding-bottom: 10px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.panel-tab:hover {
  color: var(--text-primary);
}
.panel-tab.active {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.panel-tab-content {
  display: none;
}
.panel-tab-content.active-panel-tab {
  display: block;
}

.student-tracker-summary-title {
  margin-bottom: 12px;
}
.student-tracker-summary-title h4 {
  font-family: var(--font-family-title);
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-commitments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-commitment-card {
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
}
.detail-commitment-card strong {
  display: block;
  font-family: var(--font-family-title);
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.detail-commitment-card span {
  font-size: 11px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 10px;
}

.detail-grid-days {
  display: flex;
  gap: 4px;
}

.detail-day-dot {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.detail-day-dot.done {
  background: var(--success-color);
  border-color: var(--success-color);
  color: #fff;
  font-weight: bold;
}

.detail-reflections-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-reflection-node {
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 12px;
  border-radius: var(--border-radius-md);
}
.detail-reflection-node h5 {
  font-family: var(--font-family-title);
  font-size: 12px;
  color: var(--accent-color);
  margin-bottom: 8px;
}
.detail-reflection-node .q-node {
  margin-bottom: 8px;
}
.detail-reflection-node .q-node strong {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.detail-reflection-node .q-node p {
  font-size: 12px;
  color: var(--text-primary);
  background: rgba(0,0,0,0.1);
  padding: 6px 8px;
  border-radius: 4px;
}

/* ================= MODAL LAYOUTS ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  padding: 32px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-family: var(--font-family-title);
  font-size: 20px;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

/* ================= RESPONSIVE SYSTEM ================= */
@media (max-width: 1024px) {
  .platform-layout {
    grid-template-columns: 80px 1fr;
  }
  .sidebar-brand .brand-text, 
  .sidebar .nav-item span,
  .sidebar .sidebar-footer .user-profile-summary .user-details,
  .sidebar .sidebar-footer .lang-label {
    display: none;
  }
  .sidebar {
    padding: 16px 8px;
    align-items: center;
  }
  .sidebar-nav {
    align-items: center;
  }
  .nav-item {
    justify-content: center;
    padding: 12px;
    width: 46px;
  }
  .user-profile-summary {
    justify-content: center;
    padding: 4px;
  }
  
  .dashboard-grid, .module-viewer-layout, .admin-layout, .resources-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .content-area {
    padding: 20px;
  }
  .content-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .readings-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= CURRICULUM EDITOR WORKSPACE ================= */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 992px) {
  .editor-grid {
    grid-template-columns: 1fr !important;
  }
}

.question-edit-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.question-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.question-edit-langs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 768px) {
  .question-edit-langs {
    grid-template-columns: 1fr;
  }
}

