:root {
  /* Colors */
  --bg-dark: #090a0f;
  --bg-card: rgba(18, 20, 32, 0.65);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.2);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Core brand color gradients */
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-color: #818cf8;
  
  /* Area Specific Colors */
  --career-color: #6366f1;       /* Indigo */
  --finances-color: #10b981;     /* Emerald */
  --health-color: #f43f5e;       /* Rose */
  --family-color: #f59e0b;       /* Amber */
  --friends-color: #ec4899;      /* Pink */
  --romance-color: #d946ef;      /* Magenta */
  --inner-life-color: #14b8a6;   /* Teal */
  --fun-color: #eab308;          /* Yellow */
  --environment-color: #84cc16;  /* Lime */
  --mission-color: #3b82f6;      /* Blue */
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

h1, h2, h3, h4, .logo-text h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Background Glow Effects */
.bg-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}

.bg-glow-1 {
  background: #6366f1;
  top: -100px;
  right: -50px;
}

.bg-glow-2 {
  background: #d946ef;
  bottom: -150px;
  left: -100px;
}

/* Header */
.app-header {
  border-bottom: 1px solid var(--border-light);
  background-color: rgba(9, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 2rem;
  line-height: 1;
}

.logo-text h1 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.app-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.nav-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.nav-btn.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--border-light);
}

/* Main Layout */
.app-main {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  min-height: calc(100vh - 9.5rem);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active {
  display: block;
}

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

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: var(--border-active);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Overview Tab Layout */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.span-cols-2 {
  grid-column: span 2;
}

/* Balance Ring Chart */
.balance-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.balance-score-wrapper {
  margin: 1.5rem 0;
  position: relative;
  width: 140px;
  height: 140px;
}

.circular-chart {
  display: block;
  width: 100%;
  height: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 2.8;
}

.circle {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-in-out;
}

.score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
}

.score-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.balance-status {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  border: 1px solid var(--border-light);
}

/* Capture Form */
.capture-card {
  display: flex;
  flex-direction: column;
}

.capture-form {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.capture-form textarea {
  width: 100%;
  height: 100px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.capture-form textarea:focus {
  border-color: var(--accent-color);
}

.capture-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.captured-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

/* Progression List */
.areas-mini-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.mini-area-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.015);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mini-area-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.mini-icon {
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

.mini-info {
  flex-grow: 1;
}

.mini-info h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.mini-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.mini-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease-out;
}

.mini-level {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: right;
  min-width: 2.5rem;
}

.mini-level-max {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Life Areas Layout */
.areas-detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.sidebar-card {
  padding: 1.25rem;
}

.area-selector-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1rem;
}

.selector-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.9rem;
  width: 100%;
}

.selector-btn:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.selector-btn.active {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.selector-level {
  margin-left: auto;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  color: var(--text-secondary);
}

.selector-btn.active .selector-level {
  background: var(--accent-gradient);
  color: white;
}

/* Detail Placeholder */
.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  min-height: 400px;
}

.placeholder-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  opacity: 0.2;
}

.detail-placeholder h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.detail-placeholder p {
  color: var(--text-secondary);
  max-width: 400px;
  font-size: 0.95rem;
}

/* Area Detail Panel */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-title-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detail-icon {
  font-size: 2.25rem;
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid var(--border-light);
}

.detail-title-text h2 {
  font-size: 1.5rem;
}

.detail-title-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.detail-badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  padding: 0.4rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid currentColor;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.75rem;
}

/* Milestones Box */
.milestones-box h3, .ladder-box h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.02);
  padding: 0.75rem;
  border-radius: 0.75rem;
  transition: background-color 0.2s ease;
}

.milestone-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.milestone-checkbox {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  user-select: none;
}

.milestone-checkbox.checked {
  background: var(--accent-gradient);
  border-color: transparent;
}

.milestone-checkbox.checked::after {
  content: "✓";
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

.milestone-text {
  font-size: 0.85rem;
  flex-grow: 1;
}

.milestone-item.completed .milestone-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.milestone-lvl-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-weight: 600;
}

.level-trigger-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-light);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}

.level-trigger-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
}

/* Level Ladder list */
.ladder-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.ladder-step {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.ladder-step.current {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-active);
}

.ladder-step.completed {
  opacity: 0.7;
}

.step-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.ladder-step.current .step-num {
  background: var(--accent-gradient);
  color: white;
}

.step-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.ladder-step.current .step-desc {
  color: var(--text-primary);
  font-weight: 500;
}

/* Custom Scrollbar */
.ladder-list::-webkit-scrollbar {
  width: 4px;
}

.ladder-list::-webkit-scrollbar-track {
  background: transparent;
}

.ladder-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.ladder-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Kanban / Idea Board */
.idea-board-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.triage-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.kanban-column {
  background: rgba(10, 11, 18, 0.5);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.column-header h3 {
  font-size: 1rem;
  color: var(--text-primary);
}

.column-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  font-weight: 600;
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.25s ease;
  position: relative;
  cursor: grab;
}

.kanban-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.kanban-card-text {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.triage-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  text-transform: capitalize;
}

.triage-badge.suggested {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}

.triage-badge.approved {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
}

.triage-badge.rejected {
  background: rgba(244, 63, 94, 0.1);
  color: #fda4af;
}

.triage-badge.inbox {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.kanban-card-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-light);
  justify-content: flex-end;
}

.action-dot-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-dot-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-light);
  padding: 2rem 0;
  background-color: rgba(9, 10, 15, 0.9);
  margin-top: auto;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Responsive design */
@media (max-width: 900px) {
  .areas-detail-layout {
    grid-template-columns: 1fr;
  }
  .kanban-board {
    grid-template-columns: 1fr 1fr;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .span-cols-2 {
    grid-column: span 1;
  }
  .areas-mini-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
  .header-container {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 1rem;
  }
  .footer-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
