/* Boxarr Main Stylesheet with Dark Mode Support */

/* Light Theme (Default) */
:root {
  /* Primary colors - Purple gradient theme */
  --primary-color: #667eea;
  --primary-hover: #5a67d8;
  --primary-rgb: 102, 126, 234;
  --secondary-color: #764ba2;
  --secondary-rgb: 118, 75, 162;
  
  /* Background colors */
  --bg-color: #f7fafc;
  --background: #f7fafc;
  --card-bg: #ffffff;
  
  /* Text colors */
  --text-primary: #2d3748;
  --text-secondary: #718096;
  
  /* Border and shadows */
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  
  /* Status colors - semantic */
  --success: #48bb78;
  --success-color: #48bb78;
  --warning: #ed8936;
  --warning-color: #ed8936;
  --error: #f56565;
  --error-color: #f56565;
  --info: #4299e1;
  
  /* Movie status colors */
  --status-in-library: #48bb78;
  --status-monitored: #4299e1;
  --status-missing: #ed8936;
  --status-not-monitored: #a0aec0;
  
  /* Form specific colors */
  --input-bg: #ffffff;
  --input-border: #e2e8f0;
  --input-focus: rgba(102, 126, 234, 0.1);
  
  /* Special UI elements */
  --navbar-bg: #ffffff;
  --footer-bg: #ffffff;
  --code-bg: #f7fafc;
  --hover-bg: rgba(102, 126, 234, 0.05);
}

/* Dark Theme */
[data-theme="dark"] {
  /* Primary colors - Adjusted for dark mode */
  --primary-color: #818cf8;
  --primary-hover: #6366f1;
  --primary-rgb: 129, 140, 248;
  --secondary-color: #a78bfa;
  --secondary-rgb: 167, 139, 250;
  
  /* Background colors */
  --bg-color: #0f172a;
  --background: #0f172a;
  --card-bg: #1e293b;
  
  /* Text colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  
  /* Border and shadows */
  --border-color: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.3);
  
  /* Status colors - adjusted for dark */
  --success: #34d399;
  --success-color: #34d399;
  --warning: #fbbf24;
  --warning-color: #fbbf24;
  --error: #f87171;
  --error-color: #f87171;
  --info: #60a5fa;
  
  /* Movie status colors */
  --status-in-library: #34d399;
  --status-monitored: #60a5fa;
  --status-missing: #fbbf24;
  --status-not-monitored: #64748b;
  
  /* Form specific colors */
  --input-bg: #1e293b;
  --input-border: #334155;
  --input-focus: rgba(129, 140, 248, 0.1);
  
  /* Special UI elements */
  --navbar-bg: #1e293b;
  --footer-bg: #1e293b;
  --code-bg: #1e293b;
  --hover-bg: rgba(129, 140, 248, 0.1);
}

/* Auto theme - follows system preference */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    /* Primary colors - Adjusted for dark mode */
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --primary-rgb: 129, 140, 248;
    --secondary-color: #a78bfa;
    --secondary-rgb: 167, 139, 250;
    
    /* Background colors */
    --bg-color: #0f172a;
    --background: #0f172a;
    --card-bg: #1e293b;
    
    /* Text colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    
    /* Border and shadows */
    --border-color: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.3);
    
    /* Status colors - adjusted for dark */
    --success: #34d399;
    --success-color: #34d399;
    --warning: #fbbf24;
    --warning-color: #fbbf24;
    --error: #f87171;
    --error-color: #f87171;
    --info: #60a5fa;
    
    /* Movie status colors */
    --status-in-library: #34d399;
    --status-monitored: #60a5fa;
    --status-missing: #fbbf24;
    --status-not-monitored: #64748b;
    
    /* Form specific colors */
    --input-bg: #1e293b;
    --input-border: #334155;
    --input-focus: rgba(129, 140, 248, 0.1);
    
    /* Special UI elements */
    --navbar-bg: #1e293b;
    --footer-bg: #1e293b;
    --code-bg: #1e293b;
    --hover-bg: rgba(129, 140, 248, 0.1);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Theme Toggle Styles */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
}

.theme-toggle-btn {
  padding: 0.25rem 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}

.theme-toggle-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.theme-toggle-btn.active {
  background: var(--primary-color);
  color: white;
}

.theme-toggle-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.25rem;
}

/* Auto-Add Options Styles */
.auto-add-options {
  display: none;
  animation: slideDown 0.3s ease-out;
}

.auto-add-options.active {
  display: block;
}

.filter-options {
  display: none;
  padding-left: 1rem;
  animation: slideDown 0.3s ease-out;
}

.filter-options.active {
  display: block;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  width: auto;
  margin: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navigation Styles */
.navbar {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: background-color 0.3s ease;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand h1 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.version {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 500;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.15s;
}

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 0.375rem 0.75rem;
  background: var(--bg-color);
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.status-dot.error {
  background: var(--error);
}

.status-dot.connected {
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Header Styles */
.header {
  background: var(--card-bg);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.header h1 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Card Grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Movie Card */
.movie-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  border: 1px solid var(--border-color);
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
}

.movie-poster {
  width: 100%;
  height: 375px;
  object-fit: cover;
  background: #1a1a1a;
}

.movie-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.movie-info {
  padding: 1rem;
}

.movie-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.movie-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.movie-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.status-downloaded {
  background: var(--status-in-library);
  color: white;
}

.status-missing {
  background: var(--status-missing);
  color: white;
}

.status-in-cinemas {
  background: var(--status-monitored);
  color: white;
}

.status-not-monitored {
  background: var(--status-not-monitored);
  color: white;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover), var(--secondary-color));
}

.btn-secondary {
  background: var(--bg-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--hover-bg);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

.btn-info {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-info:hover {
  transform: translateY(-1px);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.15s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--input-focus);
}

.form-input:disabled, .form-select:disabled {
  background: var(--bg-color);
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* Form Sections */
.form-section {
  margin-bottom: 2rem;
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.form-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row.two-col {
  grid-template-columns: 1fr 1fr;
}

/* Checkbox Groups */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-color);
  margin-bottom: 0.75rem;
}

.checkbox-group:last-child {
  margin-bottom: 0;
}

.checkbox-input {
  width: auto !important;
  margin: 0.125rem 0 0 0;
  accent-color: var(--primary-color);
  flex-shrink: 0;
}

.checkbox-label {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.checkbox-label.main {
  font-weight: 500;
  color: var(--text-primary);
}

.checkbox-label.description {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* Scheduler Section */
.scheduler-group {
  padding: 0;
}

.scheduler-controls {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  gap: 1rem;
}

.scheduler-controls.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Button Row */
.button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 0;
}

.button-row .btn {
  min-width: 120px;
}

/* Status Messages */
.status-message {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-top: 1rem;
}

.status-success {
  background: var(--success);
  background: rgba(var(--success-rgb, 72, 187, 120), 0.1);
  color: var(--success);
  border: 1px solid var(--success);
}

.status-error {
  background: rgba(var(--error-rgb, 245, 101, 101), 0.1);
  color: var(--error);
  border: 1px solid var(--error);
}

.status-info {
  background: rgba(var(--info-rgb, 66, 153, 225), 0.1);
  color: var(--info);
  border: 1px solid var(--info);
}

/* Loading Indicator */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Connection Test Results */
.test-results {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  display: none;
}

.test-results.show {
  display: block;
}

.test-results h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.test-results ul {
  margin: 0.5rem 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Quality Profile Section */
.quality-section {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.quality-section.show {
  display: block;
}

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

/* Setup Page Styles */
.setup-page {
  min-height: 100vh;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.setup-container {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  max-width: 900px;
  width: 100%;
  border: 1px solid var(--border-color);
}

.setup-header {
  text-align: center;
  margin-bottom: 2rem;
}

.setup-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.875rem;
  font-weight: 700;
}

.setup-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.setup-nav {
  margin-bottom: 2rem;
}

/* Box Office Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Footer Styles */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer p {
  text-align: center;
  margin: 0;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* Scheduler Debug Section */
.scheduler-debug-section {
  margin-top: 2rem;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(var(--secondary-rgb), 0.05));
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.section-title.collapsible {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title.collapsible:hover {
  color: var(--primary-color);
}

.collapse-icon {
  font-size: 0.8em;
  transition: transform 0.2s;
}

.status-badge {
  margin-left: auto;
  font-size: 0.8em;
}

.scheduler-debug-content {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
}

.debug-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.debug-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: var(--bg-color);
  border-radius: 4px;
}

.debug-label {
  font-weight: 600;
  color: var(--text-primary);
}

.debug-value {
  color: var(--text-secondary);
  text-align: right;
}

.debug-value small {
  color: var(--text-secondary);
  font-size: 0.85em;
}

.debug-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-secondary);
}

small.text-muted {
  display: block;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  line-height: 1.3;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Responsive Design */
@media (max-width: 768px) {
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .header h1 {
    font-size: 1.75rem;
  }
  
  .setup-page {
    padding: 1rem;
  }
  
  .setup-container {
    padding: 2rem;
  }
  
  .form-row.two-col,
  .scheduler-controls.active {
    grid-template-columns: 1fr;
  }
  
  .setup-title {
    font-size: 1.5rem;
  }
  
  .theme-toggle {
    flex-direction: column;
    align-items: stretch;
  }
  
  .theme-toggle-btn {
    width: 100%;
  }
}

@media (min-width: 1920px) {
  .movie-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ============================================
   Historical Range Update Styles
   ============================================ */

/* Mode Switcher */
.mode-switcher {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.mode-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.mode-btn:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.mode-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: rgba(var(--primary-rgb), 0.05);
}

/* Range Mode Styling */
.range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.range-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.range-selects {
  display: flex;
  gap: 0.5rem;
}

.range-selects select {
  flex: 1;
}

/* Quick Presets */
.quick-presets {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(var(--primary-rgb), 0.05);
  border-radius: 8px;
}

.quick-presets label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.preset-btn {
  padding: 0.5rem 0.75rem;
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.preset-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Range Summary */
.range-summary {
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.summary-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.date-range {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.existing-weeks-info {
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: rgba(237, 137, 54, 0.1);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--warning-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Multi-week Progress */
.multi-week-progress {
  margin: 1.5rem 0;
}

.progress-bar-container {
  margin-bottom: 1rem;
}

.progress-bar-bg {
  width: 100%;
  height: 24px;
  background: var(--bg-color);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
}

.progress-text {
  text-align: center;
  color: var(--text-primary);
  font-weight: 500;
  margin-top: 0.5rem;
}

.current-week-info {
  padding: 0.75rem;
  background: rgba(var(--primary-rgb), 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Summary Modal Stats */
.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  padding: 1.5rem;
  background: var(--bg-color);
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-card.success {
  background: rgba(72, 187, 120, 0.05);
  border-color: var(--success-color);
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Failed Weeks */
.failed-weeks {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(245, 101, 101, 0.05);
  border-radius: 8px;
  border: 1px solid var(--error-color);
}

.failed-weeks h4 {
  margin: 0 0 0.75rem 0;
  color: var(--error-color);
}

.failed-weeks ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}