:root {
  font-family: 'Inter', system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: light;
  color: #1e3a5f;
  background: #ffffff;
  background-attachment: fixed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  --accent-primary: #1dd3b0;
  --accent-secondary: #9b5de5;
  --accent-gradient: linear-gradient(135deg, #9b5de5 0%, #1dd3b0 50%, #42a5f5 100%);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(30, 58, 95, 0.1);
  --glass-shadow: 0 8px 32px rgba(30, 58, 95, 0.1);
  --text-primary: #1e3a5f;
  --text-secondary: #2d4a6f;
  --text-muted: #5a7a9a;
}

/* Landing Page - Grainy Gradient Blur */
.landing-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #ffffff;
}

.landing-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

.landing-blur {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 8s ease-in-out infinite;
}

.landing-blur-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #9b5de5 0%, #7b4bc4 100%);
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.landing-blur-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #42a5f5 0%, #2196f3 100%);
  bottom: -100px;
  right: -50px;
  animation-delay: -3s;
}

.landing-blur-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #1dd3b0 0%, #17a88d 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.landing-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 48px;
  max-width: 700px;
}

.landing-title {
  font-size: 64px;
  font-weight: 800;
  color: #1e3a5f;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.5);
}

.landing-description {
  font-size: 20px;
  color: #2d4a6f;
  margin-bottom: 48px;
  line-height: 1.7;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.landing-cta {
  display: inline-block;
  background: linear-gradient(135deg, #9b5de5 0%, #1dd3b0 50%, #42a5f5 100%);
  color: white;
  padding: 18px 48px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(155, 93, 229, 0.3);
}

.landing-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(155, 93, 229, 0.4);
}

.app-cards {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.app-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 16px;
  padding: 32px;
  width: 280px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(30, 58, 95, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(30, 58, 95, 0.15);
}

.app-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 12px;
}

.app-card-description {
  font-size: 14px;
  color: #5a7a9a;
  margin-bottom: 24px;
  line-height: 1.6;
  flex: 1;
}

.app-card .landing-cta {
  padding: 14px 32px;
  font-size: 16px;
  cursor: pointer;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(155, 93, 229, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #1e3a5f;
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: #9b5de5;
}

.auth-error {
  color: #e74c3c;
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 18px;
}

.auth-toggle {
  margin-top: 12px;
  font-size: 14px;
  color: #5a7a9a;
}

.auth-toggle a {
  color: #9b5de5;
  text-decoration: none;
  font-weight: 600;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .landing-title {
    font-size: 42px;
  }

  .app-cards {
    flex-direction: column;
    align-items: center;
  }

  .app-card {
    width: 100%;
    max-width: 300px;
  }
  
  .landing-description {
    font-size: 16px;
    padding: 0 20px;
  }
  
  .landing-content {
    padding: 24px;
  }
}

/* App Container - Light theme matching landing page */
#app-container {
  background: #ffffff;
  color: #1e3a5f;
  min-height: 100vh;
}

/* Legacy login styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 48px;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.login-card h1 {
  font-size: 32px;
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 16px;
  line-height: 1.6;
}

.login-btn {
  display: inline-block;
  background: var(--accent-gradient);
  color: var(--text-primary);
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(66, 165, 245, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 165, 245, 0.4);
}

.logout-link {
  margin-left: auto;
  color: var(--text-muted) !important;
}

.utility-header {
  max-width: 600px;
  margin: 0 auto 8px auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.user-menu {
  position: relative;
  cursor: pointer;
  padding: 4px 8px 12px 8px;
  border-radius: 6px;
}

.logout-btn {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  right: 0;
  background: #1e3a5f;
  border: 1px solid rgba(155, 93, 229, 0.4);
  color: #e0e0e0;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: visibility 0s 0.15s, opacity 0.15s;
  z-index: 100;
}

.user-menu:hover .logout-btn {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s, opacity 0.15s;
}

.logout-btn:hover {
  background: #9b5de5;
  color: #fff;
  border-color: #9b5de5;
}

.user-greeting {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

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

body {
  margin: 0;
  padding: 20px;
  min-height: 100vh;
}

.section {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  margin-bottom: 24px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(30, 58, 95, 0.15);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--text-primary);
  padding-bottom: 6px;
  border-bottom: none;
}

/* Collapsible sections */
.section.collapsible .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 24px;
  user-select: none;
  position: relative;
  transition: opacity 0.2s;
}

.section.collapsible .section-header:hover {
  opacity: 0.85;
}

.section.collapsible .section-header .section-title {
  margin-bottom: 0;
  border-bottom: none;
}

.collapse-icon {
  font-size: 16px;
  color: var(--accent-primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.collapse-icon-left {
  position: absolute;
  left: -24px;
}

.section.collapsible.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.section.collapsible .section-header .date-header {
  flex: 1;
}

.section.collapsible .section-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  max-height: 2000px;
  opacity: 1;
}

.section.collapsible.collapsed .section-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.section.collapsible.collapsed .section-header {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 20px;
}

.section-title.date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

.date-nav-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.date-nav-btn {
  width: auto;
  min-width: unset;
  padding: 2px 8px;
  min-height: unset;
  font-size: 14px;
  background-color: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 4px;
}

.date-nav-btn:hover {
  background-color: transparent;
  color: var(--text-primary);
}

#date-display {
  font-size: 20px;
  font-weight: 700;
}

#save-btn.saved-indicator,
#save-possibility-btn.saved-indicator {
  background: linear-gradient(135deg, #1dd3b0 0%, #42a5f5 100%);
  box-shadow: 0 4px 15px rgba(29, 211, 176, 0.4);
}

#save-btn, #add-task-btn {
  margin-top: 12px;
  margin-bottom: 12px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-secondary);
}

input[type="date"] {
  width: auto;
  padding: 0 2px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1;
  border: none;
  border-radius: 4px;
  background-color: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

input[type="number"],
input[type="text"],
textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.5;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="number"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type="number"] {
  max-width: 200px;
}

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

.gratitude-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gratitude-number {
  font-weight: 500;
  min-width: 24px;
}

.gratitude-input {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gratitude-input:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}

#task-input {
  padding: 14px 16px;
  font-size: 16px;
}

/* Possibility Section */
.objections-comforts {
  display: flex;
  gap: 16px;
}

.oc-column {
  flex: 1;
}

.oc-column label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.numbered-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.numbered-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.numbered-label {
  font-weight: 500;
  min-width: 20px;
  color: var(--text-muted);
}

.objection-input,
.comfort-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.objection-input:focus,
.comfort-input:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}

.add-row-btn {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
  min-height: unset;
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}

.add-row-btn:hover {
  background-color: rgba(66, 165, 245, 0.2);
  color: var(--text-primary);
  border-color: #1e3a5f;
}

.ctfar-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctfar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctfar-label {
  font-weight: 700;
  font-size: 16px;
  min-width: 24px;
  color: #9b5de5;
}

.ctfar-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ctfar-input:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}

.gratitude-display {
  margin-top: 8px;
}

.gratitude-items-numbered {
  margin: 4px 0 0 0;
  padding-left: 24px;
  list-style: decimal;
}

.gratitude-items-numbered li {
  margin-bottom: 4px;
}

button {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  min-height: 48px;
  transition: all 0.2s;
}

button.primary-btn,
#save-btn,
#add-task-btn,
#generate-report-btn,
#save-possibility-btn,
#upload-therapy-btn,
.report-btn {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(66, 165, 245, 0.25);
}

button.primary-btn:hover,
#save-btn:hover,
#add-task-btn:hover,
#generate-report-btn:hover,
#save-possibility-btn:hover,
#upload-therapy-btn:hover,
.report-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 165, 245, 0.35);
}

button:focus,
button:focus-visible {
  outline: none;
}

.placeholder-text {
  color: var(--text-muted);
  font-style: italic;
}

#saved-entries .history-item {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent-secondary);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.1);
  transition: transform 0.2s;
}

#saved-entries .history-item:hover {
  transform: translateX(4px);
}

#views-possibility-entries .history-item {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent-secondary);
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.1);
  transition: transform 0.2s;
}

#views-possibility-entries .history-item:hover {
  transform: translateX(4px);
}

#views-possibility-entries p {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--text-primary);
}

#views-possibility-entries p:last-child {
  margin-bottom: 0;
}

.history-content {
  flex: 1;
}

.history-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.edit-btn, .save-edit-btn, .cancel-edit-btn {
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
  min-height: unset;
}

.cancel-edit-btn {
  background-color: var(--text-muted);
}

#saved-entries p {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--text-primary);
}

#saved-entries p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
  color: var(--text-secondary);
}

@media (prefers-color-scheme: light) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(29, 211, 176, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: #213547;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 50%, #f5f3ff 100%);
  }

  .section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(29, 211, 176, 0.2);
  }

  .section:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  }

  .section-title {
    color: #1a1a2e;
    border-bottom: none;
  }

  label {
    color: #555;
  }

  input[type="date"] {
    background: transparent;
    color: #213547;
    border: none;
  }

  input[type="number"],
  input[type="text"],
  textarea {
    background: rgba(255, 255, 255, 0.9);
    color: #213547;
    border: 1px solid rgba(29, 211, 176, 0.3);
  }

  input[type="number"]:focus,
  input[type="text"]:focus,
  textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(29, 211, 176, 0.15);
  }

  button {
    background: transparent;
    color: #555;
  }

  button.primary-btn,
  #save-btn,
  #add-task-btn,
  #generate-report-btn,
  #save-possibility-btn,
  #upload-therapy-btn,
  .report-btn {
    background: var(--accent-gradient);
    color: white;
  }

  button:hover {
    background: rgba(29, 211, 176, 0.1);
  }

  button.primary-btn:hover,
  #save-btn:hover,
  #add-task-btn:hover,
  #generate-report-btn:hover,
  #save-possibility-btn:hover,
  #upload-therapy-btn:hover,
  .report-btn:hover {
    background: var(--accent-gradient);
    transform: translateY(-2px);
  }

  .placeholder-text {
    color: #999;
  }

  #saved-entries .history-item {
    background: rgba(255, 255, 255, 0.8);
    border-left: 4px solid var(--accent-primary);
  }

  #saved-entries p {
    color: #333;
  }

  strong {
    color: #555;
  }

  .task-item {
    background: transparent;
  }

  .task-item:hover {
    background: transparent;
  }
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  transition: all 0.2s;
  position: relative;
  background: transparent;
  border: 1px solid transparent;
}

.task-item:hover {
  background: transparent;
  border-color: transparent;
}

.delete-task-btn {
  margin-left: auto;
  opacity: 0;
  cursor: pointer;
  color: #ef4444;
  transition: opacity 0.2s;
  background: none;
  border: none;
  padding: 4px;
  min-height: unset;
  width: auto;
}

.task-item:hover .delete-task-btn {
  opacity: 1;
}

.delete-task-btn:hover {
  background: none;
  color: #dc2626;
}

/* Navigation */
.nav-bar {
  display: flex;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto 24px auto;
  padding: 16px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-bar::-webkit-scrollbar {
  display: none;
}

@media (max-width: 480px) {
  .nav-bar {
    margin: 0 12px 16px 12px;
    padding: 12px 16px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  
  .nav-link {
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.nav-link {
  padding: 10px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover {
  background: rgba(155, 93, 229, 0.25);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(66, 165, 245, 0.3);
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

#today-view,
#possibility-view,
#therapy-view,
#views-view,
#reports-view {
  padding-bottom: 60px;
}

/* Subviews */
.subview {
  display: none;
}

.subview.active {
  display: block;
}

/* Sub-navigation */
.sub-nav {
  display: flex;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto 16px auto;
  padding: 12px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}

.sub-nav-link {
  padding: 8px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.sub-nav-link:hover {
  background: rgba(155, 93, 229, 0.25);
  color: var(--text-primary);
}

.sub-nav-link.active {
  background: var(--accent-gradient);
  color: white;
}

/* Hobonichi View */
.hobonichi-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hobonichi-nav-btn {
  width: auto;
  padding: 8px 16px;
  min-height: unset;
  font-size: 16px;
}

.hobonichi-date {
  font-size: 18px;
  font-weight: 600;
  min-width: 280px;
  text-align: center;
}

.hobonichi-entry {
  background: var(--glass-bg);
  padding: 16px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent-secondary);
  border-radius: 8px;
}

.hobonichi-year {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hobonichi-details p {
  margin-bottom: 8px;
  line-height: 1.6;
}

.hobonichi-details p:last-child {
  margin-bottom: 0;
}

/* Habit Grid */
.habit-grid {
  overflow-x: auto;
  position: relative;
}

.habit-grid-row {
  display: flex;
  border-bottom: 1px solid #333;
  min-width: max-content;
}

.habit-grid-row.header {
  font-weight: 600;
  background: var(--header-bg, #1e3a5f);
  position: sticky;
  top: 0;
  z-index: 10;
}

.habit-grid-cell {
  min-width: 60px;
  padding: 8px;
  text-align: center;
  border-right: 1px solid #333;
}

.habit-grid-cell:last-child {
  border-right: none;
}

.habit-grid-cell.habit-name {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  text-align: left;
  font-weight: 600;
  word-wrap: break-word;
  white-space: normal;
  position: sticky;
  left: 0;
  background: var(--card-bg, rgba(30, 58, 95, 0.8));
  z-index: 5;
}

.habit-grid-row.header .habit-grid-cell.habit-name {
  background: var(--header-bg, #1e3a5f);
  z-index: 15;
}

.habit-grid-cell.date-header {
  font-size: 12px;
}

/* Reports View */
.reports-description {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.report-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.report-btn {
  flex: 1;
  min-width: 200px;
}

.report-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

.report-content {
  line-height: 1.8;
}

.section-description {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

@media (prefers-color-scheme: light) {
  .section-description {
    color: #666;
  }
}

.upload-area {
  border: 2px dashed var(--glass-border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  transition: border-color 0.2s, background-color 0.2s;
  background: rgba(15, 21, 40, 0.3);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent-primary);
  background: rgba(29, 211, 176, 0.05);
}

.upload-area p {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

@media (prefers-color-scheme: light) {
  .upload-area {
    background: rgba(255, 255, 255, 0.5);
  }
  
  .upload-area p {
    color: #666;
  }
}

.therapy-session-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.therapy-session-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.15);
}

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

.therapy-session-date {
  font-weight: 600;
  color: var(--text-primary);
}

.therapy-session-filename {
  color: var(--text-muted);
  font-size: 14px;
}

.therapy-session-summary {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.therapy-session-highlights {
  margin-top: 12px;
}

.therapy-session-highlights li {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 6px;
  margin-left: 16px;
}

.therapy-session-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.therapy-session-actions button {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
  min-height: unset;
}

/* Trends Analysis */
.trends-analysis {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}

.trends-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.trends-body {
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
}

.trends-body h1, .trends-body h2, .trends-body h3 {
  color: var(--text-primary);
  margin: 16px 0 8px 0;
  font-weight: 600;
}

.trends-body p {
  margin-bottom: 12px;
}

.trends-body ul, .trends-body ol {
  margin: 8px 0 12px 20px;
}

.trends-body li {
  margin-bottom: 6px;
}

.trends-body strong {
  color: var(--accent-secondary);
}

.trends-date {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.therapy-analyzing {
  color: var(--accent-primary);
  font-style: italic;
}


.possibility-entry-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.possibility-entry-card .entry-date {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.possibility-entry-card .entry-possible {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.possibility-entry-card .entry-goal {
  color: var(--text-muted);
  font-size: 14px;
}

.entry-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 8px;
}

.entry-type-badge.journal {
  background: rgba(29, 211, 176, 0.2);
  color: #0d7d66;
}

.entry-type-badge.possibility {
  background: rgba(155, 93, 229, 0.2);
  color: #6b3fa0;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.2);
}

.report-header h3 {
  margin: 0;
  color: var(--text-primary);
}

.report-date {
  color: var(--text-muted);
  font-size: 14px;
}

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

.report-body h2, .report-body h3, .report-body h4 {
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 12px;
}

.report-body p {
  margin-bottom: 12px;
}

.report-body li {
  margin-bottom: 6px;
  margin-left: 20px;
}

.error-text {
  color: #ff6b6b;
}


@media (prefers-color-scheme: light) {
  .nav-bar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(29, 211, 176, 0.2);
  }

  .nav-link {
    color: #555;
  }

  .nav-link:hover {
    background: rgba(29, 211, 176, 0.1);
    color: var(--accent-primary);
  }

  .nav-link.active {
    background: var(--accent-gradient);
    color: white;
  }

  .hobonichi-entry {
    background: rgba(255, 255, 255, 0.6);
  }

  .hobonichi-details p {
    color: #333;
  }

  .habit-grid-row.header {
    background: rgba(240, 248, 255, 0.95);
  }

  .habit-grid-row {
    border-bottom: 1px solid rgba(29, 211, 176, 0.2);
  }

  .habit-grid-cell {
    border-right: 1px solid rgba(29, 211, 176, 0.2);
  }

  .habit-grid-cell.habit-name {
    background: rgba(255, 255, 255, 0.95);
  }

  .habit-grid-row.header .habit-grid-cell.habit-name {
    background: rgba(240, 248, 255, 0.95);
  }
}
