/* ==========================================================================
   sections.css — Section-specific styles for dashboard content areas
   Life Dashboard · Hobonichi Rainbow Aesthetic
   ========================================================================== */

/* ======================================================================
   Generic Section
   ====================================================================== */
.section {
  margin-bottom: var(--space-xl);
}

.section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  border-bottom: 2px dotted var(--border);
}

.section-header-emoji {
  font-size: 18px;
  line-height: 1;
}

.section-header-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--text);
  letter-spacing: 0.5px;
}

.section-header-count {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-faint);
  margin-left: auto;
}

.section-header-action {
  margin-left: auto;
}

/* Section header color variants */
.section-header-pink   { border-bottom-color: rgba(255, 20, 147, 0.25); }
.section-header-purple { border-bottom-color: rgba(168, 85, 247, 0.25); }
.section-header-blue   { border-bottom-color: rgba(14, 165, 233, 0.25); }
.section-header-green  { border-bottom-color: rgba(34, 197, 94, 0.25); }
.section-header-yellow { border-bottom-color: rgba(245, 158, 11, 0.25); }
.section-header-peach  { border-bottom-color: rgba(251, 146, 60, 0.25); }

/* ======================================================================
   What's Happening — Current state card (prominent)
   ====================================================================== */
#whats-happening {
  background: linear-gradient(135deg, var(--pink-bg) 0%, var(--purple-bg) 50%, var(--blue-bg) 100%);
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

#whats-happening::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--rainbow-gradient);
  background-size: 300% 100%;
  animation: shimmer 3s ease infinite;
}

#whats-happening .wh-title {
  font-family: var(--font-pixel);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--hotpink);
  margin-bottom: var(--space-sm);
}

#whats-happening .wh-state {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--text);
  margin-bottom: var(--space-xs);
}

#whats-happening .wh-sub {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-soft);
}

#whats-happening .wh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ======================================================================
   Areas Grid — 12 life area cards
   ====================================================================== */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
}

/* ---- Area Card ---- */
.area-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.area-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.area-card.expanded {
  grid-column: 1 / -1;
  cursor: default;
}

.area-card-cover {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  background: var(--bg-alt);
}

.area-card-emoji {
  font-size: 22px;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.area-card-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.3;
}

.area-card-counts {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* Area card accent borders (by data-area attribute) */
.area-card[data-area="love"]         { border-left: 3px solid var(--area-love-accent); }
.area-card[data-area="career"]       { border-left: 3px solid var(--area-career-accent); }
.area-card[data-area="wealth"]       { border-left: 3px solid var(--area-wealth-accent); }
.area-card[data-area="health"]       { border-left: 3px solid var(--area-health-accent); }
.area-card[data-area="creativity"]   { border-left: 3px solid var(--area-creativity-accent); }
.area-card[data-area="energy"]       { border-left: 3px solid var(--area-energy-accent); }
.area-card[data-area="intellect"]    { border-left: 3px solid var(--area-intellect-accent); }
.area-card[data-area="explore"]      { border-left: 3px solid var(--area-explore-accent); }
.area-card[data-area="organization"] { border-left: 3px solid var(--area-organization-accent); }
.area-card[data-area="connection"]   { border-left: 3px solid var(--area-connection-accent); }
.area-card[data-area="outreach"]     { border-left: 3px solid var(--area-outreach-accent); }
.area-card[data-area="selfcare"]     { border-left: 3px solid var(--area-selfcare-accent); }

/* Area card hover bg tint (by data-area) */
.area-card[data-area="love"]:hover         { background: var(--area-love-bg); }
.area-card[data-area="career"]:hover       { background: var(--area-career-bg); }
.area-card[data-area="wealth"]:hover       { background: var(--area-wealth-bg); }
.area-card[data-area="health"]:hover       { background: var(--area-health-bg); }
.area-card[data-area="creativity"]:hover   { background: var(--area-creativity-bg); }
.area-card[data-area="energy"]:hover       { background: var(--area-energy-bg); }
.area-card[data-area="intellect"]:hover    { background: var(--area-intellect-bg); }
.area-card[data-area="explore"]:hover      { background: var(--area-explore-bg); }
.area-card[data-area="organization"]:hover { background: var(--area-organization-bg); }
.area-card[data-area="connection"]:hover   { background: var(--area-connection-bg); }
.area-card[data-area="outreach"]:hover     { background: var(--area-outreach-bg); }
.area-card[data-area="selfcare"]:hover     { background: var(--area-selfcare-bg); }

/* ---- Expanded area card content ---- */
.area-card-expanded {
  display: none;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 2px dotted var(--border);
}

.area-card.expanded .area-card-expanded {
  display: block;
}

/* ======================================================================
   Vision Items (inside expanded area cards)
   ====================================================================== */
.vision-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--area-organization-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.vision-item-cover {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--purple-bg);
}

.vision-item-content {
  flex: 1;
  min-width: 0;
}

.vision-item-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: 2px;
}

.vision-item-desc {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-faint);
  line-height: 1.5;
}

/* ======================================================================
   Goal Items
   ====================================================================== */
.goal-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px dotted var(--border-soft);
}

.goal-item:last-child {
  border-bottom: none;
}

.goal-item-cover {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--bg-alt);
}

.goal-item-name {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goal-item-area {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.goal-item-progress {
  width: 60px;
  flex-shrink: 0;
}

/* ---- Goal Progress Bar ---- */
.goal-bar {
  width: 100%;
  height: 4px;
  background: var(--border-soft);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.goal-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--hotpink);
  transition: width var(--transition-slow);
  min-width: 2px;
}

/* Progress bar color variants keyed to areas */
.goal-bar-fill[data-area="love"]         { background: var(--area-love-accent); }
.goal-bar-fill[data-area="career"]       { background: var(--area-career-accent); }
.goal-bar-fill[data-area="wealth"]       { background: var(--area-wealth-accent); }
.goal-bar-fill[data-area="health"]       { background: var(--area-health-accent); }
.goal-bar-fill[data-area="creativity"]   { background: var(--area-creativity-accent); }
.goal-bar-fill[data-area="energy"]       { background: var(--area-energy-accent); }
.goal-bar-fill[data-area="intellect"]    { background: var(--area-intellect-accent); }
.goal-bar-fill[data-area="explore"]      { background: var(--area-explore-accent); }
.goal-bar-fill[data-area="organization"] { background: var(--area-organization-accent); }
.goal-bar-fill[data-area="connection"]   { background: var(--area-connection-accent); }
.goal-bar-fill[data-area="outreach"]     { background: var(--area-outreach-accent); }
.goal-bar-fill[data-area="selfcare"]     { background: var(--area-selfcare-accent); }

/* ======================================================================
   CINDER Card — Agent state display
   ====================================================================== */
.cinder-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  background: var(--purple-bg);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.cinder-orb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: gentlePulse 3s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(196, 181, 253, 0.5);
}

/* Orb state colors */
.cinder-orb[data-state="slickveil"] { background: var(--state-slickveil-accent); box-shadow: 0 0 10px rgba(196, 181, 253, 0.6); }
.cinder-orb[data-state="slipcore"]  { background: var(--state-slipcore-accent); box-shadow: 0 0 10px rgba(251, 191, 36, 0.6); }
.cinder-orb[data-state="fraymark"]  { background: var(--state-fraymark-accent); box-shadow: 0 0 10px rgba(248, 113, 113, 0.6); }
.cinder-orb[data-state="voltage"]   { background: var(--state-voltage-accent); box-shadow: 0 0 10px rgba(52, 211, 153, 0.6); }
.cinder-orb[data-state="clearmark"] { background: var(--state-clearmark-accent); box-shadow: 0 0 10px rgba(125, 211, 252, 0.6); }
.cinder-orb[data-state="lowline"]   { background: var(--state-lowline-accent); box-shadow: 0 0 10px rgba(148, 163, 184, 0.4); }

.cinder-info {
  flex: 1;
  min-width: 0;
}

.cinder-name {
  font-family: var(--font-pixel);
  font-size: var(--text-xs);
  color: var(--neon-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.cinder-phase {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--text-soft);
  margin-bottom: var(--space-xs);
}

.cinder-thought {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-style: italic;
  line-height: 1.5;
}

/* ======================================================================
   Sidebar Sections
   ====================================================================== */
.sidebar-section {
  margin-bottom: var(--space-lg);
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section-title {
  font-family: var(--font-pixel);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px dotted var(--border);
}

/* ======================================================================
   Notebook Grid — Sidebar notebook links
   ====================================================================== */
.notebook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.nb-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) var(--space-sm);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-fast);
  font-family: var(--font-display);
  font-size: var(--text-xs);
}

.nb-link:hover {
  background: var(--pink-bg);
  border-color: var(--hotpink);
  color: var(--hotpink);
  transform: translateY(-1px);
}

.nb-link-emoji {
  font-size: 14px;
  line-height: 1;
}

.nb-link-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nb-link-count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  flex-shrink: 0;
}

/* ======================================================================
   Quick Links — Sidebar link pills
   ====================================================================== */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--text-soft);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.quick-links a:hover {
  background: var(--pink-bg);
  border-color: var(--hotpink);
  color: var(--hotpink);
}

/* ======================================================================
   Capture Items
   ====================================================================== */
.capture-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px dotted var(--border-soft);
}

.capture-item:last-child {
  border-bottom: none;
}

.capture-type-badge {
  font-family: var(--font-pixel);
  font-size: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  white-space: nowrap;
}

.capture-type-badge[data-type="thought"] { background: var(--purple-bg); color: var(--area-organization-accent); }
.capture-type-badge[data-type="task"]    { background: var(--pink-bg); color: var(--hotpink); }
.capture-type-badge[data-type="idea"]    { background: var(--yellow-bg); color: var(--area-creativity-accent); }
.capture-type-badge[data-type="note"]    { background: var(--blue-bg); color: var(--area-intellect-accent); }
.capture-type-badge[data-type="link"]    { background: var(--green-bg); color: var(--area-explore-accent); }

.capture-summary {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.capture-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ======================================================================
   Daily Note
   ====================================================================== */
.daily-note {
  background: var(--yellow-bg);
  border: 1px dashed var(--area-creativity-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.daily-note-date {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--area-creativity-accent);
  margin-bottom: var(--space-sm);
}

.daily-note-body {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-soft);
  line-height: 1.7;
}

/* ======================================================================
   Currently Tracker — inline-editable fields
   ====================================================================== */
.currently-tracker {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.currently-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.currently-label {
  font-family: var(--font-pixel);
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  min-width: 70px;
  flex-shrink: 0;
}

.currently-value {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text);
  flex: 1;
  min-width: 0;
  padding: 2px 6px;
  border-bottom: 1px dashed var(--border);
  cursor: text;
  transition: border-color var(--transition-fast);
  outline: none;
}

.currently-value:hover,
.currently-value:focus {
  border-bottom-color: var(--hotpink);
}

.currently-value[contenteditable="true"]:focus {
  border-bottom-style: solid;
  border-bottom-color: var(--hotpink);
  background: var(--pink-bg);
  border-radius: var(--radius-sm);
}

/* ======================================================================
   UWG Card — Project status card
   ====================================================================== */
.uwg-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.uwg-card-info {
  flex: 1;
  min-width: 0;
}

.uwg-card-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: 2px;
}

.uwg-card-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.uwg-card-progress {
  width: 80px;
  flex-shrink: 0;
}

.uwg-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-soft);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.uwg-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--area-career-accent);
  transition: width var(--transition-slow);
}

.uwg-progress-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-align: right;
  margin-top: 2px;
}

/* ======================================================================
   Places Card — Gallery card with visited/wishlist indicator
   ====================================================================== */
.places-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.places-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.places-card-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: var(--bg-alt);
}

.places-card-content {
  padding: var(--space-sm) var(--space-md);
}

.places-card-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: 2px;
}

.places-card-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-pixel);
  font-size: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.places-card-indicator.visited {
  background: var(--area-explore-bg);
  color: var(--area-explore-accent);
}

.places-card-indicator.wishlist {
  background: var(--area-love-bg);
  color: var(--area-love-accent);
}

/* ======================================================================
   Tab Switcher — Today / Week / Month tabs
   ====================================================================== */
.tab-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 2px;
  margin-bottom: var(--space-md);
}

.tab-btn {
  flex: 1;
  padding: 6px 12px;
  font-family: var(--font-pixel);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  position: relative;
}

.tab-btn:hover {
  color: var(--text-soft);
  background: var(--surface);
}

.tab-btn.active {
  color: var(--hotpink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--hotpink);
  border-radius: var(--radius-full);
}

/* ======================================================================
   Responsive
   ====================================================================== */
@media (max-width: 768px) {
  .areas-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-sm);
  }

  .area-card {
    padding: var(--space-sm);
  }

  .area-card-cover {
    height: 45px;
  }

  .area-card-emoji {
    font-size: 18px;
  }

  #whats-happening {
    padding: var(--space-md);
  }

  .vision-item {
    flex-direction: column;
  }

  .vision-item-cover {
    width: 100%;
    height: 80px;
  }

  .notebook-grid {
    grid-template-columns: 1fr;
  }

  .currently-row {
    flex-direction: column;
    gap: 2px;
  }

  .currently-label {
    min-width: unset;
  }

  .uwg-card {
    flex-direction: column;
    align-items: stretch;
  }

  .uwg-card-progress {
    width: 100%;
  }

  .goal-item {
    flex-wrap: wrap;
  }

  .goal-item-progress {
    width: 100%;
    margin-top: 2px;
  }

  .tab-btn {
    padding: 5px 8px;
    font-size: 7px;
  }
}

@media (max-width: 380px) {
  .areas-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .area-card {
    padding: 8px;
  }

  .area-card-cover {
    height: 36px;
  }

  .area-card-name {
    font-size: var(--text-xs);
  }

  .section-header {
    gap: 6px;
  }

  .section-header-emoji {
    font-size: 14px;
  }

  .section-header-title {
    font-size: var(--text-sm);
  }

  .cinder-card {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .cinder-orb {
    width: 20px;
    height: 20px;
  }

  .capture-item {
    flex-wrap: wrap;
  }

  .capture-meta {
    width: 100%;
    text-align: right;
  }
}

/* FIELD echo in feeling card */
.feeling-card__echo {
    font-style: italic;
    color: var(--text-secondary, #9e95b0);
    margin: 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.4;
}
.feeling-card__state {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}
.feeling-form__state {
    font-size: 0.7rem;
    color: var(--text-secondary, #9e95b0);
    margin-top: 0.25rem;
    text-transform: uppercase;
}
/* Capture routing destinations */
.capture-item__dests {
    font-size: 0.7rem;
    color: var(--text-secondary, #9e95b0);
    margin-top: 0.25rem;
    font-family: 'Space Mono', monospace;
}
