/**
 * EggDash Design System - Common Styles
 * Based on Linear App minimal modern design
 * Dark mode only for MVP
 */

/* ===================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   =================================== */

:root {
  /* Background Colors */
  --bg-primary: #0D0D0D;
  --bg-secondary: #1A1A1A;
  --bg-tertiary: #2D2D2D;

  /* Border Colors */
  --border-primary: #2D2D2D;
  --border-secondary: #404040;

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;

  /* Accent Colors */
  --accent-primary: #8B7FE8;
  --accent-hover: #9D93EA;

  /* Status Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  /* Value Card Colors (Dark Mode) */
  --card-purple: #581C87;
  --card-blue: #1E3A8A;
  --card-red: #7F1D1D;
  --card-yellow: #713F12;

  --card-purple-text: #E9D5FF;
  --card-blue-text: #DBEAFE;
  --card-red-text: #FECACA;
  --card-yellow-text: #FEF3C7;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  /* Animation Durations */
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;

  /* Easing Functions */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===================================
   GLOBAL RESETS & BASE STYLES
   =================================== */

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

html,
body {
  width: 100%;
  height: 100%;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

p {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
}

.caption {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-tertiary);
}

/* ===================================
   BUTTONS
   =================================== */

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--duration-base) var(--ease-in-out);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-secondary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

/* ===================================
   CARDS
   =================================== */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--duration-base) var(--ease-in-out);
}

.card:hover {
  border-color: var(--border-secondary);
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.card-description {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===================================
   PROGRESS BARS
   =================================== */

.progress-bar-container {
  width: 100%;
}

.progress-bar-track {
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
  transition: width 600ms var(--ease-out);
  border-radius: 6px;
}

.progress-bar-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--spacing-sm);
  text-align: left;
}

/* ===================================
   INPUTS & FORMS
   =================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: 14px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-in-out);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 127, 232, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

/* ===================================
   VALUE CARDS
   =================================== */

.value-card {
  position: relative;
  width: 140px;
  height: 80px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-in-out);
  user-select: none;
}

.value-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-secondary);
}

.value-card-active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(139, 127, 232, 0.3);
}

.value-card-dragging {
  opacity: 0.5;
}

.value-card-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.value-card-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.value-card-icon {
  font-size: 18px;
  line-height: 1;
}

.value-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.value-card-level {
  font-size: 12px;
  color: var(--text-secondary);
}

.value-card-progress-text {
  font-size: 11px;
  color: var(--text-tertiary);
}

.value-card-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  opacity: 0;
  transition: all var(--duration-fast) var(--ease-in-out);
  cursor: pointer;
}

.value-card:hover .value-card-remove {
  opacity: 1;
}

.value-card-remove:hover {
  background: var(--error);
  color: var(--text-primary);
}

/* ===================================
   ONBOARDING
   =================================== */

.onboarding-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #FFF9F0 0%, #FFF4E6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  font-family: var(--font-family);
}

.onboarding-card {
  width: 600px;
  max-height: 90vh;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-in-out);
}

.onboarding-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #E5E7EB;
}

.onboarding-progress-fill {
  height: 100%;
  background: var(--accent-primary);
  transition: width var(--duration-base) var(--ease-in-out);
  width: 0%;
}

.onboarding-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 64px 80px;
  overflow-y: auto;
  overflow-x: hidden;
}

.onboarding-step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.onboarding-emoji {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 20px;
}

.onboarding-title {
  font-size: 28px;
  font-weight: 600;
  color: #0D0D0D;
  margin-bottom: 10px;
  text-align: center;
  font-family: Georgia, serif;
}

.onboarding-description {
  font-size: 15px;
  color: #6B7280;
  margin-bottom: 24px;
  text-align: center;
}

.onboarding-textarea {
  width: 100%;
  height: 120px;
  border: 2px solid rgba(139, 127, 232, 0.3);
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.5);
  font-family: var(--font-family);
  resize: none;
  transition: border-color var(--duration-base) var(--ease-in-out);
}

.onboarding-textarea::placeholder {
  color: #D1D5DB;
  opacity: 0.8;
}

.onboarding-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.onboarding-examples {
  margin-top: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onboarding-example {
  font-size: 14px;
  color: #9CA3AF;
}

.onboarding-buttons {
  padding: 0 64px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboarding-btn-skip {
  font-size: 14px;
  color: #6B7280;
  background: transparent;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-in-out);
  font-family: var(--font-family);
}

.onboarding-btn-skip:hover {
  color: #0D0D0D;
}

.onboarding-btn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6B7280;
  background: transparent;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-in-out);
  font-family: var(--font-family);
}

.onboarding-btn-back:hover {
  color: #0D0D0D;
}

.onboarding-btn-next {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-in-out);
  font-family: var(--font-family);
}

.onboarding-btn-next:hover {
  background: var(--accent-hover);
}

.onboarding-btn-complete {
  width: 100%;
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-in-out);
  font-family: var(--font-family);
}

.onboarding-btn-complete:hover {
  background: var(--accent-hover);
}

/* ===================================
   ONBOARDING HABIT TYPE STEP
   =================================== */

.habit-type-section {
  margin-bottom: 20px;
  width: 100%;
}

.habit-type-label {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 10px 0;
}

.habit-type-options {
  display: flex;
  gap: 10px;
}

.habit-type-option {
  flex: 1;
  padding: 12px;
  background: #F9FAFB;
  border: 2px solid #E5E7EB;
  border-radius: 10px;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.habit-type-option:hover {
  background: #F3F4F6;
  border-color: #D1D5DB;
}

.habit-type-option.selected {
  background: #FEF3F2;
  border-color: #FCA5A5;
  box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.1);
}

.habit-type-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #EF4444;
}

.option-content {
  flex: 1;
}

.option-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}

.option-desc {
  font-size: 12px;
  color: #6B7280;
}

/* ===================================
   SETTINGS PAGE
   =================================== */

.settings-wrapper {
  display: flex;
  height: 100vh;
  background: var(--bg-primary);
}

.settings-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-primary);
  padding: 24px 0;
}

.settings-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-in-out);
  font-family: var(--font-family);
}

.settings-tab:hover {
  background: var(--bg-tertiary);
}

.settings-tab-active {
  background: var(--accent-primary);
  color: var(--text-primary);
}

.settings-tab-icon {
  font-size: 16px;
  line-height: 1;
}

.settings-tab-label {
  flex: 1;
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  /* Hide scrollbar but keep scrolling functionality */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.settings-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.settings-header {
  padding: 32px;
}

.settings-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.settings-tab-content {
  padding: 0 32px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.settings-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  min-width: 600px; /* Minimum width for desktop to ensure consistent layout */
}

.settings-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.settings-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.settings-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-family);
  transition: border-color var(--duration-base) var(--ease-in-out);
}

.settings-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.settings-input::placeholder {
  color: var(--text-tertiary);
}

.settings-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.settings-radio {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.settings-radio-text {
  font-size: 14px;
  color: var(--text-primary);
}

.settings-readonly {
  font-size: 14px;
  color: var(--text-tertiary);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.settings-btn-save {
  background: var(--accent-primary);
  color: var(--text-primary);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-in-out);
  font-family: var(--font-family);
}

.settings-btn-save:hover {
  background: var(--accent-hover);
}

.settings-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-primary);
}

.settings-section:last-child {
  border-bottom: none;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.settings-section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.settings-btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
  font-family: var(--font-family);
}

.settings-btn-secondary:hover {
  background: var(--border-secondary);
  border-color: var(--border-secondary);
}

.settings-danger-zone {
  border-bottom: none;
  padding-top: 32px;
}

/* Backup & Recovery UI */
.settings-backup-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  margin-bottom: 16px;
}

.settings-backup-icon {
  font-size: 20px;
}

.settings-backup-details {
  flex: 1;
}

.settings-backup-label {
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 2px;
}

.settings-backup-time {
  font-size: 14px;
  color: #10B981;
  font-weight: 600;
}

.settings-recovery-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 12px;
  margin-bottom: 16px;
}

.settings-recovery-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.settings-recovery-info {
  flex: 1;
}

.settings-recovery-label {
  font-size: 14px;
  color: #FFFFFF;
  font-weight: 600;
  margin-bottom: 4px;
}

.settings-recovery-time {
  font-size: 13px;
  color: #9CA3AF;
  margin-bottom: 4px;
}

.settings-recovery-desc {
  font-size: 12px;
  color: #6B7280;
}

.settings-btn-danger {
  background: var(--error);
  color: var(--text-primary);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-in-out);
  font-family: var(--font-family);
}

.settings-btn-danger:hover {
  background: #DC2626;
}

.settings-link {
  display: inline-block;
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-in-out);
}

.settings-link:hover {
  color: var(--accent-hover);
}

.settings-placeholder {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Toast notifications */
.settings-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--duration-base) var(--ease-out);
  z-index: 1000;
  font-family: var(--font-family);
}

.settings-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.settings-toast-success {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.settings-toast-error {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* ===================================
   VALUE CARD DETAIL PAGE
   =================================== */

.value-card-detail-page {
  min-height: 100vh;
  background: #0D0D0D;
  color: #FFFFFF;
  padding: 32px 0;
}

.value-card-detail-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.value-card-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.detail-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9CA3AF;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: color 250ms ease;
}

.detail-back-btn:hover {
  color: #FFFFFF;
}

.detail-nav-buttons {
  display: flex;
  gap: 8px;
}

.detail-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #8B7FE8;
  color: #8B7FE8;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease;
}

.detail-nav-btn:hover {
  background: #8B7FE8;
  color: #FFFFFF;
}

.detail-nav-btn.btn-archive {
  border-color: #EF4444;
  color: #EF4444;
}

.detail-nav-btn.btn-archive:hover {
  background: #EF4444;
  color: #FFFFFF;
}

.value-card-detail-card {
  background: #1A1A1A;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  border: 2px solid;
  transition: all 250ms ease;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.detail-header-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.detail-icon {
  font-size: 48px;
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 8px 0;
}

.detail-type-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-type-badge {
  background: #2D2D2D;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #9CA3AF;
}

.detail-speed {
  font-size: 12px;
  color: #8B7FE8;
}

.detail-status-wrapper {
  position: relative;
}

.detail-status-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  transition: opacity 250ms ease;
}

.detail-status-btn:hover {
  opacity: 0.9;
}

.detail-status-info {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 300px;
  background: #1A1A1A;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  border: 2px solid;
  z-index: 10;
}

.detail-status-text {
  font-size: 14px;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.detail-status-subtext {
  font-size: 12px;
  color: #9CA3AF;
}

.detail-status-tip {
  font-size: 12px;
  color: #F97316;
  margin-top: 8px;
}

/* =====================================
   VALUE CARD DETAIL - CONSISTENT SPACING SYSTEM
   ===================================== */

/* Spacing Scale:
   - Section spacing: 32px (major divisions)
   - Title to content: 20px (section breathing room)
   - Content groups: 16px (medium spacing)
   - Item internals: 8px (small spacing)
   - Micro adjustments: 4px (tight spacing)
*/

.detail-section {
  margin-bottom: 32px; /* Section-to-section spacing */
}

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

.detail-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 20px 0; /* Standalone title spacing */
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px; /* Same as section-title */
}

/* When title is inside header, remove its bottom margin */
.detail-section-header .detail-section-title {
  margin-bottom: 0; /* Remove to prevent double spacing */
}

/* Level Progress Section */
.detail-level-number {
  font-size: 32px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 16px; /* Content group spacing */
}

.detail-stats-row {
  display: flex;
  align-items: center;
  gap: 16px; /* Reduced from 24px for consistency */
  margin-top: 16px; /* Content group spacing */
  font-size: 14px;
  color: #9CA3AF;
}

/* Habit Type Section */
.detail-habit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px; /* Grid cell spacing */
  margin-bottom: 16px; /* Space before next element */
}

.detail-habit-item {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Label to value spacing */
}

.detail-habit-label {
  font-size: 12px;
  color: #6B7280;
  margin: 0; /* Remove default margin */
}

.detail-habit-value {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0; /* Remove inconsistent margin */
}

.detail-habit-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  align-self: flex-start;
  margin-top: 4px; /* Micro spacing */
}

.detail-habit-prediction {
  background: rgba(139, 127, 232, 0.1);
  border: 1px solid rgba(139, 127, 232, 0.3);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px; /* Icon to text spacing */
  margin-top: 16px; /* Consistent spacing from above */
  font-size: 13px;
  color: #9CA3AF;
}

.detail-text-btn {
  font-size: 14px;
  color: #8B7FE8;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: color 250ms ease;
  display: flex;
  align-items: center;
  gap: 6px; /* Icon to text spacing */
  padding: 0;
}

.detail-text-btn:hover {
  color: #9D93EA;
}

.detail-text-btn svg {
  flex-shrink: 0;
}

/* Recent Activity Section */
.detail-activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px; /* Consistent grid spacing */
  margin-bottom: 16px;
}

.detail-activity-item {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Label to content spacing */
}

.detail-activity-label {
  font-size: 14px;
  color: #FFFFFF;
  margin: 0; /* Remove default margin */
}

.detail-week-dots {
  display: flex;
  gap: 4px; /* Tight spacing for dots */
  margin-top: 8px;
}

.detail-week-dot {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #2D2D2D;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.detail-week-dot.completed {
  background: #10B981;
  color: #FFFFFF;
}

.detail-activity-value {
  font-size: 14px;
  color: #9CA3AF;
  margin-top: 4px;
}

.detail-streak-row {
  display: flex;
  align-items: center;
  gap: 16px; /* Consistent gap */
  font-size: 14px;
  margin-top: 16px; /* Space from activity grid */
}

.detail-streak-row span:first-child {
  color: #FFFFFF;
  font-weight: 500;
}

.detail-warning-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #EF4444;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px; /* Consistent spacing */
}

/* Warning Box */
.detail-warning-content {
  display: flex;
  align-items: flex-start;
  gap: 8px; /* Icon to text */
  margin-bottom: 16px; /* Consistent spacing */
}

.detail-warning-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.detail-warning-text {
  flex: 1;
  font-size: 14px;
  color: #FFFFFF;
  line-height: 1.5;
}

.detail-warning-btn {
  padding: 8px 16px;
  background: #EF4444;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 250ms ease;
}

.detail-warning-btn:hover {
  background: #DC2626;
}

/* Calendar Section */
.detail-calendar-connected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px; /* Increased for better spacing */
  background: #0D0D0D;
  border-radius: 8px;
  border: 1px solid #2D2D2D;
  gap: 16px; /* Space between info and button */
}

.detail-calendar-info {
  display: flex;
  align-items: center;
  gap: 8px; /* Icon/text spacing */
  flex-wrap: wrap;
}

.detail-calendar-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.detail-calendar-status {
  font-size: 12px;
  color: #9CA3AF;
}

/* Inline Keyword Tags */
.inline-keywords {
  display: flex;
  align-items: center;
  gap: 4px; /* Tight tag spacing */
  flex-wrap: wrap;
  margin-left: 8px;
}

.inline-keyword-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(139, 127, 232, 0.2);
  color: #8B7FE8;
  font-size: 11px;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid rgba(139, 127, 232, 0.3);
}

.detail-calendar-hours {
  font-size: 12px;
  color: #9CA3AF;
}

/* Calendar Actions Container */
.detail-calendar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Load History Button */
.detail-calendar-load-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #10B981;
  background: transparent;
  border: 1px solid #10B981;
  border-radius: 6px;
  cursor: pointer;
  transition: all 250ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.detail-calendar-load-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: #34D399;
  color: #34D399;
}

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

.detail-calendar-load-btn svg {
  flex-shrink: 0;
}

/* Edit Button */
.detail-calendar-edit-btn {
  padding: 6px 12px;
  font-size: 13px;
  color: #8B7FE8;
  background: transparent;
  border: 1px solid #8B7FE8;
  border-radius: 6px;
  cursor: pointer;
  transition: all 250ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.detail-calendar-edit-btn:hover {
  background: rgba(139, 127, 232, 0.1);
  border-color: #9D93EA;
  color: #9D93EA;
}

.detail-calendar-disconnect {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid #2D2D2D;
  color: #9CA3AF;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 250ms ease;
}

.detail-calendar-disconnect:hover {
  border-color: #EF4444;
  color: #EF4444;
}

.detail-calendar-empty {
  text-align: center;
  padding: 32px 24px; /* Consistent padding */
  background: #0D0D0D;
  border: 1px solid #2D2D2D;
  border-radius: 8px;
}

.detail-calendar-empty-text {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 16px; /* Consistent spacing */
}

.detail-calendar-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Icon to text */
  padding: 10px 20px; /* Slightly larger for importance */
  background: #8B7FE8;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 250ms ease;
}

.detail-calendar-connect-btn:hover {
  background: #9D93EA;
}

/* Calendar Info Box (Removed - now using modals) */
.detail-calendar-info-box {
  background: #2D2D2D;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  border: 1px solid #3D3D3D;
}

.detail-calendar-info-box .info-icon {
  font-size: 20px;
  margin-bottom: 8px;
  display: inline-block;
}

.detail-calendar-info-box .info-text {
  color: #E5E7EB;
}

.detail-calendar-info-box .info-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #FFFFFF;
}

.detail-calendar-info-box .info-text p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 8px 0;
  color: #9CA3AF;
}

.detail-calendar-info-box .info-text p:last-child {
  margin-bottom: 0;
}

.detail-calendar-info-box .info-detail {
  padding-top: 4px;
  border-top: 1px solid #3D3D3D;
  margin-top: 8px !important;
  font-size: 12px;
  color: #6B7280;
}

/* Description Section */
.detail-description {
  font-size: 14px;
  color: #9CA3AF;
  line-height: 1.6;
  margin: 0;
  padding: 16px; /* Added padding for better containment */
  background: #0D0D0D;
  border: 1px solid #2D2D2D;
  border-radius: 8px;
  min-height: 60px;
}

/* Recent Events Log */
/* Recent Activity Table */
.detail-events-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0D0D0D;
  border: 1px solid #2D2D2D;
  border-radius: 8px;
  padding: 8px;
}

.detail-event-row {
  display: grid;
  grid-template-columns: 130px 110px 1fr 60px;
  gap: 16px;
  align-items: center;
  padding: 10px 12px;
  background: #1A1A1A;
  border-radius: 4px;
  transition: all 0.15s ease;
  font-size: 13px;
}

.detail-event-row:hover {
  background: #222222;
  border-left: 2px solid #8B7FE8;
  padding-left: 10px;
}

/* Date Column */
.event-date-col {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9CA3AF;
}

.event-month {
  font-weight: 500;
}

.event-day {
  font-weight: 600;
  color: #FFFFFF;
}

.event-weekday {
  color: #6B7280;
}

/* Time Range Column */
.event-time-range {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #9CA3AF;
  white-space: nowrap;
}

/* Title Column */
.event-title-col {
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Hours Column */
.event-hours-col {
  text-align: right;
  font-weight: 600;
  color: #8B7FE8;
  white-space: nowrap;
}

.detail-events-empty {
  padding: 32px 24px; /* Consistent padding */
  text-align: center;
  background: #0D0D0D;
  border: 1px solid #2D2D2D;
  border-radius: 8px;
}

.detail-archive-section {
  background: transparent;
  border: 1px solid #EF4444;
  border-radius: 12px;
  padding: 20px;
}

.detail-archive-title {
  font-size: 16px;
  font-weight: 600;
  color: #EF4444;
  margin: 0 0 8px 0;
}

.detail-archive-text {
  font-size: 12px;
  color: #9CA3AF;
  margin: 0 0 16px 0;
}

.detail-archive-btn {
  padding: 8px 20px;
  border: 1px solid #EF4444;
  color: #EF4444;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease;
}

.detail-archive-btn:hover {
  background: #EF4444;
  color: #FFFFFF;
}

/* ===================================
   MAIN DASHBOARD LAYOUT
   =================================== */

.dashboard-layout {
  display: flex;
  height: 100vh;
  background: #0D0D0D;
  color: #FFFFFF;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dashboard-sidebar {
  width: 60px;
  background: #1A1A1A;
  border-right: 1px solid #2D2D2D;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 16px;
}

.sidebar-btn {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  background: transparent;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  transition: all 250ms ease;
}

.sidebar-btn:hover {
  background: #2D2D2D;
  color: #FFFFFF;
}

.sidebar-btn.active {
  background: #2D2D2D;
  color: #FFFFFF;
}

.sidebar-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #8B7FE8;
}

.dashboard-main {
  flex: 1;
  overflow-y: auto;
}

/* Top Navigation Bar */
.dashboard-top-nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid #2D2D2D;
  gap: 24px;
}

.dashboard-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  min-width: fit-content;
}

.dashboard-search-bar {
  flex: 1;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.search-input {
  width: 100%;
  height: 48px;
  background: #1A1A1A;
  border: none;
  border-radius: 24px;
  padding: 0 48px 0 24px;
  font-size: 14px;
  color: #FFFFFF;
  transition: all 250ms ease;
}

.search-input::placeholder {
  color: #9CA3AF;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 127, 232, 0.5);
}

.search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  pointer-events: none;
}

/* Google Quick Links */
.google-quick-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.google-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #9CA3AF;
  transition: all 200ms ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.google-link:hover {
  background: rgba(139, 127, 232, 0.2);
  color: #8B7FE8;
  transform: translateY(-2px);
}

.google-link svg {
  width: 20px;
  height: 20px;
}

/* Google G icon styling */
.google-g-icon {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Product Sans', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1;
}

.dashboard-content-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  padding: 32px;
  border-bottom: 1px solid #2D2D2D;
  min-height: 600px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 16px 0;
}

/* Tracking Section */
.tracking-section {
  display: flex;
  flex-direction: column;
}

.tracking-drop-zone {
  background: rgba(26, 26, 26, 0.8);
  border: 2px dashed rgba(139, 127, 232, 0.3);
  border-radius: 16px;
  padding: 16px;
  min-height: 400px;
  transition: all 250ms ease;
}

.tracking-drop-zone.dragging {
  border-color: #8B7FE8;
  background: rgba(139, 127, 232, 0.05);
}

.tracking-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.tracking-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.tracking-empty-text {
  font-size: 14px;
  color: #6B7280;
}

.tracking-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tracking-card {
  position: relative;
  width: 100%;
  min-height: 110px;
  background: rgba(26, 26, 26, 0.9);
  border: 2px solid rgba(139, 127, 232, 0.2);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  cursor: grab;
  transition: all 250ms ease;
}

.tracking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tracking-card:active {
  cursor: grabbing;
}

.tracking-card.active {
  border-color: #8B7FE8;
  box-shadow: 0 0 8px rgba(139, 127, 232, 0.3);
}

.tracking-card.drag-over {
  border-color: #8B7FE8;
  background: rgba(139, 127, 232, 0.05);
}

.tracking-card-content {
  flex: 1;
}

.tracking-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.tracking-card-level {
  font-size: 11px;
  font-weight: 500;
  color: #A78BFA;
  letter-spacing: 0.3px;
}

.tracking-card-progress {
  margin-top: 4px;
}

.tracking-card-progress-text {
  font-size: 10px;
  color: #6B7280;
  margin-top: 2px;
}

.tracking-card-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2D2D2D;
  border: none;
  border-radius: 50%;
  color: #9CA3AF;
  cursor: pointer;
  opacity: 0;
  transition: all 250ms ease;
}

.tracking-card:hover .tracking-card-remove {
  opacity: 1;
}

.tracking-card-remove:hover {
  background: #EF4444;
  color: #FFFFFF;
}

/* Chart Section */
.chart-section {
  display: flex;
  flex-direction: column;
}

.chart-container {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 24px;
  transition: all 250ms ease;
}

.chart-container.empty {
  border-style: dashed;
}

.chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  text-align: center;
}

.chart-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.chart-empty-text {
  font-size: 16px;
  color: #6B7280;
}

.chart-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  gap: 16px;
}

.chart-connect-text {
  font-size: 14px;
  color: #6B7280;
}

.chart-connect-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #8B7FE8;
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 250ms ease;
}

.chart-connect-btn:hover {
  background: #9D93EA;
}

.chart-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.chart-divider {
  border-top: 1px solid #2D2D2D;
  padding-top: 24px;
}

.chart-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #9CA3AF;
  margin: 0 0 16px 0;
}

/* Card List Section */
.card-list-section {
  padding: 24px;
}

.card-list-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.add-card-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #8B7FE8;
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 250ms ease;
}

.add-card-btn:hover {
  background: #9D93EA;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 200px));
  gap: 8px;
}

.value-card {
  position: relative;
  width: 140px;
  height: 110px;
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  cursor: pointer;
  transition: all 250ms ease;
}

.value-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.value-card.dragging {
  opacity: 0.5;
}

/* Add to Tracking button (appears on hover) */
.value-card-add-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: #10B981;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
  z-index: 10;
}

.value-card:hover .value-card-add-btn {
  opacity: 1;
  transform: scale(1);
}

.value-card-add-btn:hover {
  background: #059669;
  transform: scale(1.1);
}

.value-card-add-btn svg {
  color: #FFFFFF;
}

.value-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.value-card-level {
  font-size: 11px;
  font-weight: 500;
  color: #A78BFA;
  letter-spacing: 0.3px;
}

.value-card-progress {
  margin-top: 2px;
}

.progress-bar {
  height: 4px;
  background: #2D2D2D;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B7FE8, #9D93EA);
  transition: width 0.5s ease-out;
}

.value-card-xp {
  font-size: 10px;
  color: #6B7280;
}

/* Level Story Modal */
.story-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.25s ease-out;
}

.story-modal {
  background: #1A1A1A;
  border: 1px solid #8B7FE8;
  border-radius: 12px;
  padding: 28px;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.25s ease-out;
}

.story-title {
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 14px;
}

.story-quote {
  font-size: 15px;
  font-style: italic;
  color: #A78BFA;
  margin-bottom: 16px;
  line-height: 1.5;
}

.story-body {
  font-size: 14px;
  line-height: 1.7;
  color: #D1D5DB;
}

.info-icon {
  font-size: 14px;
  color: #6B7280;
  cursor: pointer;
  margin-left: 6px;
  transition: color 150ms ease;
  display: inline-block;
}

.info-icon:hover {
  color: #8B7FE8;
}

/* Level-up Toast */
.levelup-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #1A1A1A;
  border: 1px solid #8B7FE8;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  animation: slideInRight 0.3s ease-out;
}

.levelup-toast-content {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
}

.levelup-toast-subtitle {
  color: #9CA3AF;
  font-size: 12px;
  margin-top: 4px;
}

/* Tracking Full Notification */
.tracking-full-notification {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3500;
  animation: fadeIn 0.2s ease-out;
}

.tracking-full-notification.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

.tracking-full-content {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  text-align: center;
  animation: scaleIn 0.3s ease-out;
}

.tracking-full-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.tracking-full-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 12px 0;
}

.tracking-full-message {
  font-size: 14px;
  color: #9CA3AF;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.tracking-full-close-btn {
  background: #8B7FE8;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tracking-full-close-btn:hover {
  background: #9D8FF5;
  transform: translateY(-1px);
}

.tracking-full-close-btn:active {
  transform: translateY(0);
}

/* Animations */
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* PWA Install Prompt */
.pwa-install-prompt {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000;
  animation: slideUp 0.3s ease-out;
}

.pwa-install-prompt.hidden {
  display: none;
}

.pwa-install-content {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 24px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  position: relative;
  min-width: 320px;
  max-width: 400px;
}

.pwa-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: #6B7280;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.pwa-close-btn:hover {
  color: #FFFFFF;
}

.pwa-install-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.pwa-install-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 8px 0;
}

.pwa-install-desc {
  font-size: 14px;
  color: #9CA3AF;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.pwa-install-btn {
  background: #8B7FE8;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.pwa-install-btn:hover {
  background: #9D8FF5;
  transform: translateY(-1px);
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Demo Mode Indicator */
.demo-mode-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 5000;
  animation: slideInRight 0.4s ease-out;
}

.demo-mode-content {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(139, 127, 232, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.demo-mode-icon {
  font-size: 20px;
}

.demo-mode-text {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.demo-mode-cta {
  background: #FFFFFF;
  color: #8B7FE8;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-mode-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===================================
   CALENDAR CONNECTION FLOW
   =================================== */

.calendar-connection-overlay {
  position: fixed;
  inset: 0;
  background: #0D0D0D;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.calendar-connection-modal {
  width: 600px;
  height: 800px;
  background: #1A1A1A;
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.calendar-step-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.calendar-step-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.calendar-step-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.calendar-header {
  text-align: center;
  margin-bottom: 32px;
}

.calendar-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.calendar-title {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 8px 0;
}

.calendar-subtitle {
  font-size: 16px;
  color: #9CA3AF;
  margin: 0;
}

.calendar-benefits {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.calendar-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.calendar-benefit-icon {
  font-size: 20px;
  color: #8B7FE8;
}

.calendar-benefit-text {
  font-size: 16px;
  color: #FFFFFF;
}

.calendar-privacy-box {
  background: #2D2D2D;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 32px;
}

.calendar-privacy-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.calendar-privacy-icon {
  font-size: 20px;
}

.calendar-privacy-text {
  font-size: 14px;
  color: #9CA3AF;
  margin: 0;
}

.calendar-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-primary-btn {
  width: 100%;
  height: 48px;
  background: #8B7FE8;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 250ms ease;
}

.calendar-primary-btn:hover {
  background: #9D93EA;
  transform: scale(0.98);
}

.calendar-google-icon {
  width: 20px;
  height: 20px;
}

.calendar-cancel-btn {
  width: 100%;
  color: #9CA3AF;
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color 250ms ease;
}

.calendar-cancel-btn:hover {
  color: #FFFFFF;
}

.calendar-permissions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.calendar-permission-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.calendar-permission-item.denied {
  opacity: 0.5;
}

.calendar-permission-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.calendar-permission-text {
  font-size: 14px;
  color: #FFFFFF;
}

.calendar-permission-text.strikethrough {
  text-decoration: line-through;
  color: #9CA3AF;
}

.calendar-privacy-section {
  margin-bottom: 32px;
}

.calendar-privacy-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.calendar-privacy-title {
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0;
}

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

.calendar-privacy-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.calendar-bullet {
  color: #9CA3AF;
}

.calendar-privacy-link {
  font-size: 14px;
  color: #8B7FE8;
  text-decoration: none;
  transition: text-decoration 250ms ease;
}

.calendar-privacy-link:hover {
  text-decoration: underline;
}

.calendar-success-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.calendar-success-stats {
  text-align: center;
  margin-bottom: 32px;
}

.calendar-success-text {
  font-size: 16px;
  color: #FFFFFF;
  margin: 4px 0;
}

.calendar-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.calendar-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #8B7FE8;
  border-top-color: transparent;
  border-radius: 50%;
  animation: calendar-spin 1s linear infinite;
}

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

.calendar-loading-text {
  font-size: 14px;
  color: #9CA3AF;
  margin: 0;
}

/* ===================================
   HABIT TYPE SELECTOR MODAL
   =================================== */

.habit-type-selector-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.habit-type-selector-modal {
  background: #1A1A1A;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  overflow-x: hidden;
}

.habit-type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.habit-type-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.habit-type-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #9CA3AF;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 250ms ease;
}

.habit-type-close:hover {
  background: #2D2D2D;
}

.habit-type-section {
  margin-bottom: 24px;
}

.habit-type-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 12px 0;
}

.habit-type-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.habit-type-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #0D0D0D;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 250ms ease;
}

.habit-type-option:hover {
  background: #2D2D2D;
}

.habit-type-option input[type="radio"] {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  accent-color: #8B7FE8;
  cursor: pointer;
}

.habit-type-option-content {
  flex: 1;
}

.habit-type-option-title {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.habit-type-option-desc {
  font-size: 12px;
  color: #6B7280;
}

.habit-type-prediction {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(139, 127, 232, 0.3);
  background: rgba(139, 127, 232, 0.1);
  margin-bottom: 24px;
}

.habit-type-prediction.type-i-warning {
  background: rgba(239, 68, 68, 0.1);
  border-color: #EF4444;
}

.habit-type-prediction-type {
  font-size: 14px;
  font-weight: 600;
  color: #8B7FE8;
  margin-bottom: 8px;
}

.habit-type-prediction-text {
  font-size: 14px;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.habit-type-prediction-speed {
  font-size: 14px;
  color: #10B981;
}

.habit-type-warning-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #EF4444;
}

.habit-type-warning-text {
  font-size: 12px;
  color: #EF4444;
}

.habit-type-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.habit-type-cancel {
  font-size: 14px;
  color: #9CA3AF;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 250ms ease;
}

.habit-type-cancel:hover {
  color: #FFFFFF;
}

.habit-type-save {
  padding: 8px 24px;
  background: #8B7FE8;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 250ms ease;
}

.habit-type-save:hover {
  background: #9D93EA;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-primary {
  color: var(--text-primary);
}

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

.text-tertiary {
  color: var(--text-tertiary);
}

.text-accent {
  color: var(--accent-primary);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-error {
  color: var(--error);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-xs {
  gap: var(--spacing-xs);
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* ===================================
   ADD CARD MODAL
   =================================== */

.add-card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn var(--duration-base) var(--ease-out);
}

.add-card-modal {
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  animation: slideUp var(--duration-base) var(--ease-out);
}

.add-card-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.add-card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-sm) 0;
}

.add-card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.add-card-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.label-text {
  flex: 1;
}

.label-required {
  color: var(--error);
}

.info-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color var(--duration-fast) var(--ease-out);
}

.info-btn:hover {
  color: var(--accent-primary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-family);
  transition: all var(--duration-fast) var(--ease-out);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 127, 232, 0.1);
}

.form-input.error {
  border-color: var(--error);
  animation: shake 0.3s ease-in-out;
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Icon Grid */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--spacing-sm);
}

.icon-option {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--bg-primary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.icon-option:hover {
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

.icon-option.selected {
  border-color: var(--accent-primary);
  background: rgba(139, 127, 232, 0.1);
}

/* Frequency & Length Selectors */
.selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
}

.selector-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  min-height: 72px;
  background: var(--bg-primary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.selector-option:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.selector-option.selected {
  border-color: var(--accent-primary);
  background: rgba(139, 127, 232, 0.1);
}

.selector-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  text-align: center;
}

.selector-hint {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

.habit-info {
  margin-top: var(--spacing-md);
  animation: slideDown var(--duration-base) var(--ease-out);
}

.info-box {
  padding: var(--spacing-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-box strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.info-box p {
  margin: var(--spacing-xs) 0;
  color: var(--text-secondary);
}

.info-box p strong {
  display: inline;
  margin: 0;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.modal-actions .btn-secondary,
.modal-actions .btn-primary {
  flex: 1;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
}

/* Animations for modal */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

.fade-in {
  animation: fadeIn var(--duration-base) var(--ease-out);
}

.slide-up {
  animation: slideUp var(--duration-slow) var(--ease-out);
}

.scale-in {
  animation: scaleIn var(--duration-slow) var(--ease-out);
}

/* ===================================
   SCROLLBAR (WEBKIT)
   =================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-secondary);
}

/* ===================================
   CALENDAR SETTINGS UI (NEW)
   =================================== */

.detail-calendar-settings {
  margin-top: 16px;
  padding: 20px;
  background: rgba(139, 127, 232, 0.05);
  border: 1px solid rgba(139, 127, 232, 0.2);
  border-radius: 12px;
}

.detail-settings-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 20px 0;
}

.detail-settings-group {
  margin-bottom: 20px;
}

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

.detail-settings-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #E5E7EB;
  margin-bottom: 8px;
}

/* Keyword Tags */
.detail-keywords-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 36px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.detail-keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #8B7FE8 0%, #6E5FD5 100%);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  border-radius: 16px;
  transition: all 200ms ease;
}

.detail-keyword-tag:hover {
  background: linear-gradient(135deg, #9B8FF8 0%, #7E6FE5 100%);
  transform: translateY(-1px);
}

.keyword-remove-btn {
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 150ms ease;
}

.keyword-remove-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Keyword Input */
.detail-keyword-input-row {
  display: flex;
  gap: 8px;
}

.detail-keyword-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 127, 232, 0.3);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 14px;
  transition: all 200ms ease;
}

.detail-keyword-input:focus {
  outline: none;
  border-color: #8B7FE8;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(139, 127, 232, 0.1);
}

.detail-keyword-input::placeholder {
  color: #6B7280;
}

/* ===============================================
   INTEGRATED DASHBOARD STYLES
   =============================================== */

.integrated-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
}

/* Empty State */
.integrated-dashboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.dashboard-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.dashboard-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.dashboard-empty-hint {
  font-size: 14px;
  color: #9CA3AF;
}

/* Hero Metrics */
.integrated-hero-metrics {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 24px;
}

.integrated-hero-label {
  font-size: 12px;
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.integrated-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.integrated-metric-card {
  background: #0D0D0D;
  border: 1px solid #2D2D2D;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.integrated-metric-card:hover {
  transform: translateY(-2px);
  border-color: #8B7FE8;
}

.integrated-metric-label {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 8px;
}

.integrated-metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #8B7FE8;
  line-height: 1.2;
}

.integrated-metric-hint {
  font-size: 11px;
  color: #6B7280;
  margin-top: 4px;
}

/* Charts Row */
.integrated-charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.integrated-chart-container {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 24px;
}

.integrated-chart-title {
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 16px 0;
}

/* Donut Chart */
.integrated-donut-wrapper {
  position: relative;
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.integrated-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  margin-top: -30px; /* Adjust for legend below */
}

.integrated-donut-value {
  font-size: 28px;
  font-weight: 700;
  color: #8B7FE8;
  line-height: 1;
}

.integrated-donut-label {
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 4px;
}

/* Bar Chart */
.integrated-bar-wrapper {
  height: 240px;
  margin-bottom: 16px;
}

.integrated-momentum-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #10B981;
  margin-bottom: 4px;
}

.integrated-momentum-arrow {
  font-size: 20px;
}

.integrated-momentum-text {
  font-weight: 600;
}

.integrated-momentum-hint {
  font-size: 12px;
  color: #9CA3AF;
}

/* Top Cards */
.integrated-top-cards {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 24px;
}

.integrated-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 16px 0;
}

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

.integrated-top-item {
  background: #0D0D0D;
  border: 1px solid #2D2D2D;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: all 0.25s ease;
}

.integrated-top-item:hover {
  transform: translateY(-2px);
  border-color: #8B7FE8;
}

.integrated-top-rank {
  font-size: 18px;
  line-height: 1;
}

.integrated-top-info {
  flex: 1;
}

.integrated-top-category {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 4px;
}

.integrated-top-card-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.integrated-top-icon {
  font-size: 18px;
}

.integrated-top-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.integrated-top-value {
  font-size: 12px;
  font-weight: 600;
  color: #8B7FE8;
}

/* AI Section */
.integrated-ai-section {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  overflow: hidden;
}

.integrated-ai-toggle {
  width: 100%;
  background: transparent;
  border: none;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.25s ease;
}

.integrated-ai-toggle:hover {
  background: rgba(45, 45, 45, 0.5);
}

.integrated-ai-title {
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
}

.integrated-ai-chevron {
  width: 20px;
  height: 20px;
  color: #9CA3AF;
  transition: transform 0.3s ease;
}

.integrated-ai-chevron.rotate-180 {
  transform: rotate(180deg);
}

.integrated-ai-content {
  border-top: 1px solid #2D2D2D;
  padding: 24px;
  background: #0D0D0D;
}

.integrated-ai-content.hidden {
  display: none;
}

.integrated-ai-placeholder {
  text-align: center;
}

.integrated-ai-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.integrated-ai-coming {
  font-size: 14px;
  color: #9CA3AF;
  margin-bottom: 16px;
}

.integrated-ai-desc {
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.integrated-ai-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.integrated-ai-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #9CA3AF;
}

.integrated-ai-bullet {
  color: #8B7FE8;
  font-weight: 700;
}

/* ===============================================
   INDIVIDUAL DASHBOARD STYLES
   =============================================== */

.individual-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
}

/* Hero Section */
.individual-hero {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 24px;
}

.individual-hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.individual-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.individual-hero-icon {
  font-size: 32px;
}

.individual-hero-title {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.individual-hero-subtitle {
  font-size: 14px;
  color: #9CA3AF;
  margin: 4px 0 0 0;
}

.individual-hero-right {
  text-align: right;
}

.individual-hero-level-label {
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 4px;
}

.individual-hero-level-value {
  font-size: 28px;
  font-weight: 700;
  color: #8B7FE8;
  line-height: 1;
}

.individual-hero-type {
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 4px;
}

.individual-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.individual-metric-card {
  background: #0D0D0D;
  border: 1px solid #2D2D2D;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.individual-metric-card:hover {
  transform: translateY(-2px);
  border-color: #8B7FE8;
}

.individual-metric-label {
  font-size: 11px;
  color: #9CA3AF;
  margin-bottom: 4px;
}

.individual-metric-value {
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.2;
}

.individual-metric-value.highlight {
  color: #10B981;
}

.individual-metric-hint {
  font-size: 10px;
  color: #6B7280;
  margin-top: 2px;
}

/* Timeline Chart */
.individual-timeline {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 24px;
}

.individual-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.individual-timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0;
}

.individual-timeline-badge {
  font-size: 11px;
  color: #9CA3AF;
  background: #0D0D0D;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid #2D2D2D;
}

.individual-timeline-badge-dot {
  color: #8B7FE8;
}

.individual-timeline-canvas {
  height: 350px;
}

.individual-timeline-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 12px;
  color: #9CA3AF;
}

.individual-timeline-legend {
  display: flex;
  gap: 16px;
}

.individual-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.individual-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.individual-legend-dot.purple {
  background: #8B7FE8;
}

.individual-legend-dot.green {
  background: #10B981;
}

/* 3-Column Layout */
.individual-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.individual-col-card {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
  border-radius: 16px;
  padding: 24px;
}

.individual-col-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 16px 0;
}

/* Progress Column (Text-only) */
.individual-progress-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.individual-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.individual-progress-label {
  color: #9CA3AF;
}

.individual-progress-value {
  color: #FFFFFF;
  font-weight: 600;
}

.individual-progress-value.success {
  color: #10B981;
  font-weight: 700;
}

.individual-progress-divider {
  height: 1px;
  background: #2D2D2D;
  margin: 12px 0;
}

.individual-progress-status {
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 8px;
}

.individual-progress-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

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

.individual-check-icon {
  font-size: 14px;
}

.individual-check-icon.done {
  color: #10B981;
}

.individual-check-icon.pending {
  color: #9CA3AF;
}

.individual-check-text {
  color: #9CA3AF;
}

.individual-check-text.done {
  color: #10B981;
}

/* Summary Column (2x3 grid) */
.individual-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.individual-summary-item {
  background: #0D0D0D;
  border: 1px solid #2D2D2D;
  border-radius: 12px;
  padding: 12px;
}

.individual-summary-label {
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 4px;
}

.individual-summary-value {
  font-size: 20px;
  font-weight: 600;
  color: #8B7FE8;
}

/* Calendar Column */
.individual-calendar-wrapper {
  /* Container for GitHubActivityCalendar component */
}

/* ===============================================
   GITHUB ACTIVITY CALENDAR STYLES
   =============================================== */

.github-calendar-container {
  width: 100%;
}

.github-cal-title {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 16px 0;
}

.github-cal-scroll {
  overflow-x: auto;
  margin-bottom: 16px;
}

.github-cal-scroll::-webkit-scrollbar {
  height: 6px;
}

.github-cal-scroll::-webkit-scrollbar-track {
  background: #1A1A1A;
  border-radius: 3px;
}

.github-cal-scroll::-webkit-scrollbar-thumb {
  background: #2D2D2D;
  border-radius: 3px;
}

.github-cal-scroll::-webkit-scrollbar-thumb:hover {
  background: #3D3D3D;
}

.github-cal-grid {
  display: inline-grid;
  grid-template-rows: repeat(7, minmax(0, 1fr));
  grid-auto-flow: column;
  gap: 3px;
}

.github-cal-day {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.github-cal-day:hover {
  transform: scale(1.2);
}

.github-cal-day-hover {
  ring: 2px solid #8B7FE8;
  box-shadow: 0 0 0 2px #8B7FE8;
}

/* Color intensity levels */
.github-cal-0 {
  background: #1A1A1A;
  border: 1px solid #2D2D2D;
}

.github-cal-1 {
  background: #2D1B69;
}

.github-cal-2 {
  background: #5B21B6;
}

.github-cal-3 {
  background: #7C3AED;
}

.github-cal-4 {
  background: #A78BFA;
}

/* Legend */
.github-cal-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 11px;
  color: #9CA3AF;
}

.github-cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.github-cal-dot {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

/* Stats */
.github-cal-stats {
  font-size: 12px;
  color: #9CA3AF;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.github-cal-stat-row {
  line-height: 1.5;
}

.github-cal-streak-current {
  color: #10B981;
  font-weight: 600;
}

.github-cal-streak-longest {
  color: #FFFFFF;
  font-weight: 600;
}

.github-cal-active-days {
  color: #FFFFFF;
  font-weight: 600;
}

/* Utilities */
.hidden {
  display: none;
}

.rotate-180 {
  transform: rotate(180deg);
}

.detail-keyword-add-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #8B7FE8 0%, #6E5FD5 100%);
  border: none;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
}

.detail-keyword-add-btn:hover {
  background: linear-gradient(135deg, #9B8FF8 0%, #7E6FE5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 127, 232, 0.3);
}

.detail-keyword-add-btn:active {
  transform: translateY(0);
}

/* Radio Group */
.detail-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(139, 127, 232, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms ease;
}

.detail-radio-label:hover {
  background: rgba(139, 127, 232, 0.1);
  border-color: rgba(139, 127, 232, 0.4);
}

.detail-radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #8B7FE8;
}

.detail-radio-label span {
  color: #E5E7EB;
  font-size: 14px;
}

.detail-radio-label:has(input:checked) {
  background: rgba(139, 127, 232, 0.15);
  border-color: #8B7FE8;
}

.detail-radio-label:has(input:checked) span {
  color: #FFFFFF;
  font-weight: 500;
}

/* Checkbox Label */
.detail-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(139, 127, 232, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms ease;
}

.detail-checkbox-label:hover {
  background: rgba(139, 127, 232, 0.1);
  border-color: rgba(139, 127, 232, 0.4);
}

.detail-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #8B7FE8;
}

.detail-checkbox-label span {
  color: #E5E7EB;
  font-size: 14px;
}

.detail-checkbox-label:has(input:checked) {
  background: rgba(139, 127, 232, 0.15);
  border-color: #8B7FE8;
}

.detail-checkbox-label:has(input:checked) span {
  color: #FFFFFF;
  font-weight: 500;
}

.detail-settings-hint {
  font-size: 12px;
  color: #9CA3AF;
  margin: 8px 0 0 0;
  line-height: 1.4;
}

/* Stats Summary */
.detail-stats-summary {
  margin-top: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(139, 127, 232, 0.2);
}

.detail-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.detail-stat-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-stat-label {
  font-size: 14px;
  color: #9CA3AF;
}

.detail-stat-value {
  font-size: 16px;
  font-weight: 600;
  color: #8B7FE8;
}

/* Calendar Status & Toggle Button */
.detail-calendar-status {
  padding: 4px 10px;
  background: rgba(139, 127, 232, 0.2);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #8B7FE8;
}

.detail-calendar-toggle-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #8B7FE8 0%, #6E5FD5 100%);
  border: none;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.detail-calendar-toggle-btn:hover {
  background: linear-gradient(135deg, #9B8FF8 0%, #7E6FE5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 127, 232, 0.3);
}

.detail-calendar-toggle-btn:active {
  transform: translateY(0);
}

.detail-calendar-edit-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #8B7FE8 0%, #6E5FD5 100%);
  border: none;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.detail-calendar-edit-btn:hover {
  background: linear-gradient(135deg, #9B8FF8 0%, #7E6FE5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 127, 232, 0.3);
}

.detail-calendar-edit-btn:active {
  transform: translateY(0);
}

.detail-settings-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.detail-settings-save-btn {
  flex: 1;
  padding: 10px 20px;
  background: linear-gradient(135deg, #8B7FE8 0%, #6E5FD5 100%);
  border: none;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.detail-settings-save-btn:hover {
  background: linear-gradient(135deg, #9B8FF8 0%, #7E6FE5 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 127, 232, 0.3);
}

.detail-settings-cancel-btn {
  flex: 1;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(139, 127, 232, 0.3);
  border-radius: 8px;
  color: #E5E7EB;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.detail-settings-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(139, 127, 232, 0.5);
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

@media (max-width: 1280px) {
  html {
    font-size: 13px;
  }
}

/* ===================================
   ARCHIVE PAGE
   =================================== */

.archive-container {
  padding: var(--spacing-2xl);
  max-width: 1200px;
  margin: 0 auto;
}

.archive-header {
  margin-bottom: var(--spacing-2xl);
}

.archive-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-xs) 0;
}

.archive-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

/* Empty State */
.archive-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-2xl) 0;
  min-height: 400px;
}

.archive-empty-icon {
  font-size: 80px;
  margin-bottom: var(--spacing-lg);
  opacity: 0.5;
}

.archive-empty-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md) 0;
}

.archive-empty-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
  margin: 0;
}

/* Archived Cards List */
.archive-cards-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.archived-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.archived-card:hover {
  border-color: var(--border-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.archived-card-main {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex: 1;
}

.archived-card-icon {
  font-size: 40px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.archived-card-info {
  flex: 1;
}

.archived-card-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.archived-card-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}

.archived-card-separator {
  color: var(--text-tertiary);
}

.archived-card-level {
  font-weight: 600;
  color: var(--accent-primary);
}

.archived-card-time {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Archived Card Actions */
.archived-card-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.archived-card-restore-btn,
.archived-card-delete-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.archived-card-restore-btn {
  background: var(--accent-primary);
  color: var(--text-primary);
}

.archived-card-restore-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.archived-card-delete-btn {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}

.archived-card-delete-btn:hover {
  background: var(--error);
  color: var(--text-primary);
}

.archived-card-restore-btn svg,
.archived-card-delete-btn svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  html {
    font-size: 12px;
  }

  .card {
    padding: var(--spacing-md);
  }

  .detail-keyword-input-row {
    flex-direction: column;
  }

  .detail-keyword-add-btn {
    width: 100%;
  }

  /* Archive mobile adjustments */
  .archived-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }

  .archived-card-actions {
    width: 100%;
    flex-direction: column;
  }

  .archived-card-restore-btn,
  .archived-card-delete-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================
   ✅ NEW: Dashboard Components Styles
   ============================================ */

/* Integrated Card (Fixed at top of tracking) */
.integrated-card {
  cursor: pointer;
  position: relative;
  border: 2px solid var(--border-color) !important;
}

.integrated-card::before {
  content: '🔒';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  opacity: 0.5;
}

.integrated-card:hover {
  border-color: var(--accent-primary) !important;
}

.integrated-card.active {
  border-color: var(--accent-primary) !important;
  background: rgba(139, 127, 232, 0.1) !important;
}

/* Prevent drag on integrated card */
.integrated-card[data-fixed="true"] {
  cursor: pointer !important;
  user-select: none;
}

/* Dashboard Empty State */
.dashboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  color: var(--text-secondary);
}

.dashboard-empty-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.dashboard-empty-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
}

.dashboard-empty-hint {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* Dashboard container */
.dashboard-container {
  height: 100%;
  overflow-y: auto;
}

/* Hover effects for stat cards */
.stat-card {
  transition: all 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* Tracking header with button */
.tracking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.tracking-empty-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: var(--spacing-xs);
}


/* ============================================
   VALUE CARD DETAIL - EDIT NAME
   ============================================ */

.detail-title-edit {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.detail-title-input {
  font-size: 24px;
  font-weight: 600;
  padding: 8px 12px;
  border: 2px solid var(--accent-primary);
  border-radius: 6px;
  background: #1C1D22;
  color: #FFFFFF;
  outline: none;
  flex: 1;
}

.detail-title-input:focus {
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px rgba(139, 127, 232, 0.1);
}

/* ============================================
   VALUE CARD DETAIL - EDIT DESCRIPTION
   ============================================ */

.detail-description-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-description-input {
  font-size: 14px;
  padding: 12px;
  border: 2px solid var(--accent-primary);
  border-radius: 6px;
  background: #1C1D22;
  color: #FFFFFF;
  outline: none;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.detail-description-input:focus {
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px rgba(139, 127, 232, 0.1);
}

.detail-description-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ============================================
   VALUE CARD DETAIL - SESSION SEGMENTED BAR (EASY TYPE)
   ============================================ */

.session-progress-wrapper {
  margin-bottom: 16px;
}

.session-progress-label-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

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

.session-segmented-bar {
  display: flex;
  gap: 2px;
  height: 28px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 4px;
  overflow: hidden;
}

.session-segment {
  flex: 1;
  background: var(--bg-tertiary);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.session-segment.completed {
  background: linear-gradient(135deg, #8B7FE8 0%, #9D93EA 100%);
}

.session-progress-percentage {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 4px;
}

/* ============================================
   VALUE CARD DETAIL - TWO BARS (MEDIUM/HARD TYPE)
   ============================================ */

.two-progress-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.two-progress-bars > div {
  /* Spacing between the two progress bars */
}
