:root {
  --bg-primary: #12181f;
  --bg-secondary: #1a222d;
  --bg-tertiary: #242f3e;
  --text-primary: #f0f4f8;
  --text-secondary: #8b9bb4;
  --accent: #2563eb;
  --accent-hover: #3b82f6;
  --danger: #dc2626;
  --danger-hover: #ef4444;
  --success: #16a34a;
  --border: #2d3b4e;
  --font: 'Outfit', Inter, system-ui, -apple-system, sans-serif;
}

body.light-mode {
  --bg-primary: #f3f4f6;
  --bg-secondary: #ffffff;
  --bg-tertiary: #edf2f7;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border: #d1d5db;
  --accent: #2563eb;
  --accent-hover: #3b82f6;
}

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

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

header {
  background-color: var(--bg-secondary);
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  object-fit: cover;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode h1 {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 16px;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background-color: var(--bg-tertiary);
  transform: scale(1.05);
}

.container {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

button {
  font-family: var(--font);
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
  transform: translateY(-1.5px);
}

button:active {
  transform: translateY(0.5px);
  background: rgba(37, 99, 235, 0.16);
}

button.secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

button.secondary:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--text-secondary);
  transform: translateY(-1.5px);
}

button.danger {
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
}

button.danger:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: var(--danger-hover);
  color: var(--danger-hover);
  transform: translateY(-1.5px);
}

/* Dashboard List */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.project-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.project-cover-wrap {
  width: 100%;
  height: 140px;
  background-color: var(--bg-tertiary);
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.project-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-cover {
  transform: scale(1.06);
}

.project-card h3,
.project-card p.date,
.project-card p.description,
.project-card .project-actions {
  margin-left: 18px;
  margin-right: 18px;
}

.project-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 0;
}

.project-card p.date {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 0;
}

.project-card p.description {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 12px;
}

.project-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 18px;
}

.project-actions button {
  padding: 8px 12px;
  font-size: 13px;
}

/* Wizard view / modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.wizard-modal {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

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

.wizard-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wizard-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-primary);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

/* Steps Indicator */
.steps-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  background-color: var(--bg-primary);
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.step-indicator {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-indicator.active {
  color: var(--accent-hover);
}

.step-indicator.completed {
  color: var(--success);
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

input[type="text"], input[type="password"], textarea, select {
  font-family: var(--font);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  border-color: var(--accent);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Photo source selection */
.source-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}

.source-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.source-card:hover {
  border-color: var(--accent);
}

.source-card.active {
  background-color: rgba(37, 99, 235, 0.1);
  border-color: var(--accent);
}

.source-card .icon {
  font-size: 28px;
}

/* Photo view lists */
.photo-count-info {
  background-color: var(--bg-tertiary);
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  border-left: 4px solid var(--accent);
}

/* Stops items list */
.stops-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.stop-item {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stop-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stop-photos-preview {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
}

.stop-photos-preview img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Color schemes options */
.color-options {
  display: flex;
  gap: 15px;
}

.color-option {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  flex: 1;
  font-size: 13px;
  transition: all 0.2s ease;
}

.color-option:hover {
  border-color: var(--text-secondary);
}

.color-option.active {
  border-color: var(--accent);
  background-color: rgba(37, 99, 235, 0.05);
}

.color-preview {
  height: 24px;
  border-radius: 4px;
  margin-bottom: 6px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state .icon {
  font-size: 48px;
}

/* Progress area */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background-color: var(--bg-tertiary);
  border-radius: 8px;
}

.progress-bar-wrap {
  background-color: var(--border);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  background-color: var(--success);
  width: 0%;
  height: 100%;
  transition: width 0.3s ease;
}

/* Quick Help Modal styling */
.help-modal {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

.help-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
}

.help-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-primary);
}

/* Markdown parsing rendering within Help modal */
.help-body h1 {
  font-size: 24px;
  margin-bottom: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light-mode .help-body h1 {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.help-body h2 {
  font-size: 18px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.help-body p {
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.help-body ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.help-body li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.help-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
