/* ==================== DAILY LOG VIEWER STYLES ==================== */

/* Dashboard Summary */
.daily-log-summary {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.log-header h3 {
  margin: 0;
  font-size: 20px;
  color: #1a1a1a;
  font-weight: 700;
}

.btn-view-all {
  background: none;
  border: none;
  color: #667eea;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-view-all:hover {
  color: #764ba2;
  transform: translateX(4px);
}

/* Stats Cards */
.log-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(135deg, #f8f9ff, #fff);
  border: 2px solid #e0e7ff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #667eea;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

/* Recent Sessions */
.recent-sessions {
  margin-top: 24px;
}

.recent-sessions h4 {
  font-size: 16px;
  color: #333;
  margin: 0 0 16px;
  font-weight: 600;
}

/* Empty State */
.daily-log-empty {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 16px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.daily-log-empty p {
  color: #999;
  margin: 0 0 24px;
  font-size: 16px;
}

.btn-small {
  padding: 10px 20px;
  font-size: 14px;
}

/* ==================== FULL VIEW MODAL ==================== */

.log-modal {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

.log-modal .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Navigation */
.log-navigation {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 16px;
}

.log-navigation input[type="date"] {
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
  text-align: center;
}

.log-navigation input[type="date"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Day Log */
.day-log {
  animation: fadeIn 0.3s ease;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.day-header h3 {
  margin: 0;
  font-size: 24px;
  color: #1a1a1a;
  font-weight: 700;
}

.today-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Day Stats Grid */
.day-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.day-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #f8f9ff, #fff);
  border: 2px solid #e0e7ff;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
}

.day-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.stat-icon-lg {
  font-size: 48px;
  line-height: 1;
}

.stat-content {
  flex: 1;
}

.stat-value-lg {
  font-size: 32px;
  font-weight: 700;
  color: #667eea;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-sublabel {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* Sessions Timeline */
.sessions-timeline {
  margin-bottom: 32px;
}

.sessions-timeline h4 {
  font-size: 18px;
  color: #333;
  margin: 0 0 20px;
  font-weight: 600;
}

.session-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
}

.session-timeline-marker {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
  position: relative;
}

.session-timeline-marker::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, #667eea, transparent);
  min-height: 60px;
}

.session-item:last-child .session-timeline-marker::after {
  display: none;
}

.session-content {
  flex: 1;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
}

.session-content:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.session-time {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  font-family: 'Monaco', 'Courier New', monospace;
}

.session-duration {
  font-size: 13px;
  font-weight: 600;
  color: #999;
  background: #f8f9fa;
  padding: 4px 12px;
  border-radius: 20px;
}

.session-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-program {
  font-weight: 700;
  color: #1a1a1a;
  font-size: 15px;
}

.session-topic {
  color: #666;
  font-size: 14px;
}

.session-notes {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #667eea;
}

.notes-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.notes-text {
  color: #666;
  font-size: 13px;
  line-height: 1.5;
  font-style: italic;
}

.no-sessions {
  text-align: center;
  color: #999;
  padding: 40px;
  font-size: 15px;
}

/* Programs Breakdown */
.programs-breakdown {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 24px;
}

.programs-breakdown h4 {
  font-size: 18px;
  color: #333;
  margin: 0 0 20px;
  font-weight: 600;
}

.program-breakdown-item {
  margin-bottom: 20px;
}

.program-breakdown-item:last-child {
  margin-bottom: 0;
}

.program-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.program-name {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 15px;
}

.program-duration {
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
}

.program-progress-bar {
  height: 10px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.program-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* Empty Day State */
.day-log-empty {
  text-align: center;
  padding: 80px 20px;
}

.empty-date {
  font-size: 18px;
  font-weight: 600;
  color: #666;
  margin-bottom: 24px;
}

.day-log-empty .empty-icon {
  font-size: 72px;
  margin-bottom: 20px;
  opacity: 0.4;
}

.day-log-empty p {
  color: #999;
  font-size: 16px;
  margin-bottom: 24px;
}

/* ==================== SIDEBAR WIDGET ==================== */

.sidebar-widget.daily-widget {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.sidebar-widget h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #1a1a1a;
  font-weight: 700;
}

.widget-empty {
  color: #999;
  font-size: 13px;
  margin: 12px 0;
}

.widget-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.widget-label {
  font-size: 13px;
  color: #666;
}

.widget-value {
  font-size: 16px;
  font-weight: 700;
  color: #667eea;
}

.btn-widget {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.btn-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .log-modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .day-stats-grid {
    grid-template-columns: 1fr;
  }

  .day-stat-card {
    padding: 16px;
  }

  .stat-icon-lg {
    font-size: 36px;
  }

  .stat-value-lg {
    font-size: 24px;
  }

  .session-item {
    flex-direction: column;
    gap: 12px;
  }

  .session-timeline-marker::after {
    display: none;
  }

  .log-navigation {
    flex-direction: column;
    gap: 12px;
  }

  .log-navigation input[type="date"] {
    width: 100%;
  }

  .log-stats {
    grid-template-columns: 1fr;
  }
}

/* ==================== ANIMATIONS ==================== */

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==================== DARK MODE ==================== */

@media (prefers-color-scheme: dark) {
  .daily-log-summary,
  .log-modal {
    background: #1e1e1e;
    color: #e0e0e0;
  }

  .log-header h3,
  .day-header h3,
  .session-program {
    color: #e0e0e0;
  }

  .stat-card,
  .day-stat-card {
    background: #2a2a2a;
    border-color: #444;
  }

  .session-content {
    background: #2a2a2a;
    border-color: #444;
  }

  .programs-breakdown {
    background: #2a2a2a;
  }

  .program-progress-bar {
    background: #444;
  }
}
