:root {
  /* Palette: Cherry Matcha */
  --bg-bone: #faf9f6;
  --action-red: #d93f3f;
  --success-green: #8da399;
  --accent-pink: #f3e6e8;
  --text-charcoal: #2a2a2a;
  --shadow-pink: #f2c1d1;

  /* Dimensions */
  --border-width: 1.5px;
  --radius-lg: 24px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-bone);
  color: var(--text-charcoal);
  font-family: "Plus Jakarta Sans", sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Shared Components --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.hidden {
  display: none !important;
}

/* Floating Stickers (Used in Hero & Strategy) */
.sticker {
  position: absolute;
  background: white;
  padding: 0.5rem;
  border: var(--border-width) solid var(--text-charcoal);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  transform: rotate(-3deg);
  z-index: 10;
  font-size: 0.9rem;
}

/* --- Buttons --- */
/* Primary Red Button */
.auth-btn,
.btn-primary {
  width: 100%;
  padding: 1rem;
  background-color: var(--action-red);
  color: white !important;
  font-weight: 600;
  font-size: 1.1rem;
  border: var(--border-width) solid var(--text-charcoal);
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--text-charcoal);
  transition: all 0.2s ease;
  font-family: "Plus Jakarta Sans", sans-serif;
  text-align: center;
  display: inline-block;
  text-decoration: none;
  line-height: 1.2;
}
.auth-btn:hover,
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--text-charcoal);
}
.auth-btn:active,
.btn-primary:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0px var(--text-charcoal);
}

/* --- Tooltips --- */
.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.tooltip-icon {
  color: #999;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.tooltip-container:hover .tooltip-icon {
  color: var(--action-red);
}

.tooltip-text {
  visibility: hidden;
  width: 240px;
  background-color: var(--text-charcoal);
  color: #fff;
  text-align: center;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  margin-left: -120px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--text-charcoal) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* --- Example Vision Buttons --- */
.example-visions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.example-vision-btn {
  background: white;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.example-vision-btn:hover {
  border-color: var(--action-red);
  background: #fff5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.example-vision-btn strong {
  color: var(--text-charcoal);
  font-size: 0.9rem;
}

.example-vision-btn .use-this {
  font-size: 0.75rem;
  color: var(--action-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: auto;
}

/* Secondary White/Pink Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: var(--border-width) solid var(--text-charcoal);
  cursor: pointer;
  background-color: white;
  color: var(--text-charcoal);
  box-shadow: 4px 4px 0px var(--accent-pink);
  font-size: 1rem;
}
.btn-secondary:hover {
  background-color: var(--accent-pink);
}

/* --- Form Elements --- */
.form-group {
  text-align: left;
  margin-bottom: 1.5rem;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea {
  width: 100%;
  padding: 1rem;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 0;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  background: transparent;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
  border-bottom-color: var(--action-red);
  box-shadow: none;
  transform: none;
}
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
  color: #999;
  opacity: 1;
}

/* --- Auth & Onboarding Specific --- */
.auth-card {
  max-width: 600px;
  text-align: left;
  background: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: var(--border-width) solid var(--text-charcoal);
  box-shadow: 12px 12px 0px var(--accent-pink);
  margin: 2rem auto;
}

/* Radio Cards in Onboarding */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.radio-label {
  display: block;
  border: 1.5px solid var(--text-charcoal);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
.radio-label:hover {
  background: #f9f9f9;
}
input[type="radio"] {
  display: none;
}
input[type="radio"]:checked + .radio-label {
  background: var(--action-red);
  color: white;
  border-color: var(--action-red);
}

/* Suggestion Card for AI Review */
.suggestion-card {
  border: 1px dashed var(--text-charcoal);
  background: var(--bg-bone);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

/* --- App Dashboard --- */
.app-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Dashboard Nav */
.app-nav-bar {
  background: var(--bg-bone);
  padding: 1rem 2rem 0;
  display: flex;
  align-items: flex-end;
  border-bottom: var(--border-width) solid var(--text-charcoal);
  gap: 0.5rem;
}
.folder-tab {
  padding: 0.8rem 1.5rem;
  background: #eaeaea;
  border: var(--border-width) solid var(--text-charcoal);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  font-family: "Fraunces", serif;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  position: relative;
  top: 1.5px;
  transition: 0.2s;
}
.folder-tab:hover {
  background: #f0f0f0;
}
.folder-tab.active {
  background: white;
  color: var(--text-charcoal);
  font-weight: 700;
  padding-top: 1rem;
  z-index: 2;
}

/* Dashboard Content */
.app-container {
  flex: 1;
  background: white;
  padding: 2rem;
}
.app-header-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}
.stat-badge {
  background: var(--accent-pink);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--text-charcoal);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-h3 {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Task List */
.task-list-container {
  margin-bottom: 2rem;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  background: white;
  transition: 0.3s;
}
.task-check {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--text-charcoal);
  border-radius: 50%;
  /* Use grid centering to avoid icon baseline/font-metrics misalignment */
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s;
}
.task-check:hover {
  background: #f0f0f0;
}
.task-check i {
  opacity: 0;
  font-size: 16px;
  line-height: 1;
  display: block;
}
.task-item.done .task-check {
  background: var(--success-green);
  border-color: var(--success-green);
}
.task-item.done .task-check i {
  opacity: 1;
  color: white;
}
.task-item.done span {
  text-decoration: line-through;
  opacity: 0.5;
}

/* Focus Timer */
.focus-btn {
  height: 32px;
  width: 32px;
  border-radius: 50px;
  background: white;
  border: 1.5px solid var(--text-charcoal);
  color: var(--action-red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  padding: 0;
  font-weight: 600;
  font-size: 0.9rem;
}
.focus-btn:hover {
  background: var(--accent-pink);
}
.focus-btn.active {
  width: auto;
  padding: 0 1rem;
  background: var(--action-red);
  color: white;
  border-color: var(--action-red);
}

/* Indicators (Right Sidebar) */
.indicator-card {
  background: var(--bg-bone);
  border: var(--border-width) solid var(--text-charcoal);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

/* Virtual Indicator Styling */
.indicator-card.virtual-indicator {
  background: linear-gradient(135deg, var(--bg-bone) 0%, #f5f0e8 100%);
  border-style: dashed;
  border-color: #999;
}

.indicator-card.virtual-indicator::before {
  content: "AUTO";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #888;
  background: #e0e0e0;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.indicator-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
}
.indicator-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}
.glass-tube {
  width: 100%;
  height: 12px;
  background: #e0e0e0;
  border-radius: 50px;
  margin: 0.5rem 0 1rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--text-charcoal);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.liquid {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--success-green), #a3b9af);
  border-radius: 50px;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.ctrl-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--text-charcoal);
  background: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}
.ctrl-btn:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

/* --- Editable Target & Bulk Add Styles --- */
.target-value {
  font-size: 1.5rem;
  color: #999;
  font-family: 'Plus Jakarta Sans';
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.target-value:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-charcoal);
}

.target-value.editing {
  background: white;
  border: 2px solid var(--action-red);
  padding: 0.25rem 0.5rem;
}

.target-input {
  font-size: 1.5rem;
  font-family: 'Plus Jakarta Sans';
  color: var(--text-charcoal);
  border: 2px solid var(--action-red);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  width: 100px;
  text-align: center;
  outline: none;
}

.bulk-add-section {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
  align-items: center;
}

.bulk-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: var(--border-width) solid var(--text-charcoal);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.bulk-input:focus {
  border-color: var(--action-red);
  box-shadow: 2px 2px 0px var(--action-red);
  transform: translate(-1px, -1px);
}

.bulk-add-btn {
  padding: 0.5rem 1rem;
  background: var(--action-red);
  color: white;
  border: var(--border-width) solid var(--text-charcoal);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 2px 2px 0px var(--text-charcoal);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.bulk-add-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--text-charcoal);
}

.bulk-add-btn:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

/* --- Account Tab Styles --- */
.account-section {
  margin-bottom: 2rem;
}

.account-card {
  background: white;
  border: var(--border-width) solid var(--text-charcoal);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 4px 4px 0px var(--accent-pink);
}

.account-card.warning-card {
  border-color: #f5a623;
  box-shadow: 4px 4px 0px #ffe5b4;
}

.account-card.danger-card {
  border-color: var(--action-red);
  box-shadow: 4px 4px 0px #ffe5e5;
}

.message-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
}

.message-box.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #4caf50;
}

.message-box.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
}

.confirmation-step {
  animation: slideDown 0.3s ease;
}

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

/* --- Full-Screen Timer Modal --- */
.timer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

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

.timer-close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.timer-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.timer-content {
  text-align: center;
  color: white;
}

.timer-title {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.timer-display {
  font-family: "Fraunces", serif;
  font-size: 12rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 3rem;
  text-shadow: 0 0 60px rgba(217, 63, 63, 0.3);
  letter-spacing: -0.02em;
}

.timer-controls {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.timer-btn {
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.timer-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.timer-status {
  font-size: 1.2rem;
  opacity: 0.7;
  font-style: italic;
}

/* --- Timer Setup Screen (Initial Screen) --- */
#timer-setup {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

#timer-setup label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  color: white;
  opacity: 0.9;
}

#timer-setup input[type="number"] {
  width: 100%;
  max-width: 200px;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: var(--radius-md);
  font-family: "Fraunces", serif;
  transition: all 0.3s ease;
  margin: 0 auto;
  display: block;
}

#timer-setup input[type="number"]:focus {
  outline: none;
  border-color: var(--action-red);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 4px rgba(217, 63, 63, 0.2);
}

#timer-setup input[type="number"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Quick Options Buttons */
.timer-quick-options {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
  color: white;
}

.timer-quick-options span {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.timer-quick-options button {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin: 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Plus Jakarta Sans", sans-serif;
  transition: all 0.2s ease;
}

.timer-quick-options button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.timer-quick-options button:active {
  transform: translateY(0);
}

/* Sound Checkbox */
.timer-sound-toggle {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-sound-toggle input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--action-red);
}

.timer-sound-toggle label {
  margin: 0;
  font-size: 0.95rem;
  color: white;
  opacity: 0.9;
  cursor: pointer;
}

/* Start Button */
#timer-setup .timer-btn {
  width: 100%;
  justify-content: center;
  margin-top: 2rem;
  padding: 1.2rem 2rem;
  font-size: 1.2rem;
  background: var(--action-red);
  border-color: var(--action-red);
  box-shadow: 0 4px 20px rgba(217, 63, 63, 0.4);
}

#timer-setup .timer-btn:hover {
  background: #c93535;
  border-color: #c93535;
  box-shadow: 0 6px 30px rgba(217, 63, 63, 0.5);
  transform: translateY(-3px);
}

#timer-setup .timer-btn:active {
  transform: translateY(-1px);
}

/* Responsive Timer */
@media (max-width: 768px) {
  .timer-display {
    font-size: 6rem;
  }

  .timer-title {
    font-size: 1.5rem;
  }

  .timer-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .timer-btn {
    width: 100%;
    justify-content: center;
  }

  .timer-close-btn {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  /* Timer Setup Responsive */
  #timer-setup {
    padding: 1.5rem;
    margin: 0 1rem;
  }

  #timer-setup input[type="number"] {
    font-size: 1.5rem;
    padding: 0.8rem;
  }

  .timer-quick-options {
    font-size: 0.85rem;
  }

  .timer-quick-options button {
    padding: 0.5rem 1rem;
    margin: 0 0.3rem 0.5rem 0;
    font-size: 0.9rem;
  }

  .timer-sound-toggle {
    padding: 0.75rem;
  }

  .timer-sound-toggle label {
    font-size: 0.85rem;
  }
}

/* Strategy Cards */
.strategy-vision {
  background: radial-gradient(circle, #f8f8f8 0%, var(--bg-bone) 100%);
  padding: 2rem;
  border: var(--border-width) solid var(--text-charcoal);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}
.equation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.equation-card {
  border: 1px dashed var(--text-charcoal);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  transition: 0.3s;
  border-style: solid;
}
.equation-card:hover {
  box-shadow: 4px 4px 0px var(--accent-pink);
}
.eq-arrow {
  font-size: 1.5rem;
  color: var(--action-red);
  margin: 0 0.5rem;
}

/* --- Custom Tooltips --- */
[data-tooltip] {
  position: relative;
  cursor: help;
  z-index: 100;
}

[data-tooltip]:hover,
[data-tooltip].active {
  z-index: 9999;
}

[data-tooltip]::before,
[data-tooltip]::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 9999;
  pointer-events: none;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  background: var(--text-charcoal);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 250px;
  white-space: normal;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-tooltip]::after {
  content: "";
  border: 6px solid transparent;
  border-top-color: var(--text-charcoal);
  bottom: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Tooltip for info icons */
.info-tooltip {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  z-index: 100;
}

.info-tooltip:hover,
.info-tooltip.active {
  z-index: 9999;
}

.info-tooltip::before,
.info-tooltip::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 9999;
  pointer-events: none;
}

.info-tooltip::before {
  content: attr(data-tooltip);
  background: var(--text-charcoal);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 280px;
  white-space: normal;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  line-height: 1.4;
}

.info-tooltip::after {
  content: "";
  border: 6px solid transparent;
  border-top-color: var(--text-charcoal);
  bottom: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
}

.info-tooltip:hover::before,
.info-tooltip:hover::after,
.info-tooltip.active::before,
.info-tooltip.active::after {
  opacity: 1;
  visibility: visible;
}

/* --- LANDING PAGE SPECIFIC --- */
nav {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: "Fraunces", serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--action-red);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hero */
.hero {
  padding: 4rem 0 6rem;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}
.hero h1 em {
  font-style: italic;
  color: var(--action-red);
}
.hero p {
  font-size: 1.3rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Hero Dashboard Demo */
.hero-dashboard {
  margin-top: 4rem;
  position: relative;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  background: white;
  border: var(--border-width) solid var(--text-charcoal);
  border-radius: var(--radius-lg);
  box-shadow: 12px 12px 0px var(--accent-pink);
  overflow: hidden;
  text-align: left;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.dash-header {
  background: var(--accent-pink);
  padding: 1rem 1.5rem;
  border-bottom: var(--border-width) solid var(--text-charcoal);
  display: flex;
  gap: 0.5rem;
}
.dash-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--text-charcoal);
  background: white;
}
.dash-dot.red {
  background: var(--action-red);
}
.dash-dot.green {
  background: var(--success-green);
}
.dash-content {
  padding: 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}
.progress-block {
  background: var(--bg-bone);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--text-charcoal);
  text-align: center;
  margin-bottom: 1rem;
}

/* About Section */
.about-section {
  padding: 6rem 0;
  background: white;
  border-top: var(--border-width) solid var(--text-charcoal);
  border-bottom: var(--border-width) solid var(--text-charcoal);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}
.feature-card {
  background: var(--bg-bone);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--text-charcoal);
  margin-bottom: 1rem;
  position: relative;
}
.feature-card::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  right: -4px;
  bottom: -4px;
  background: var(--accent-pink);
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--text-charcoal);
  z-index: -1;
}

/* Use Cases Collage */
.use-cases {
  padding: 6rem 0;
  overflow: hidden;
}
.collage-container {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.center-msg {
  text-align: center;
  z-index: 5;
  background: white;
  padding: 3rem;
  border: var(--border-width) solid var(--text-charcoal);
  border-radius: 50%;
  width: 350px;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 10px 10px 0px var(--success-green);
}
.persona-card {
  position: absolute;
  background: white;
  padding: 1.5rem;
  border: var(--border-width) solid var(--text-charcoal);
  width: 250px;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}
.persona-card:hover {
  z-index: 10;
  transform: scale(1.05);
}
.persona-1 {
  top: 5%;
  left: 10%;
  transform: rotate(-5deg);
}
.persona-2 {
  bottom: 10%;
  left: 15%;
  transform: rotate(3deg);
}
.persona-3 {
  top: 10%;
  right: 10%;
  transform: rotate(4deg);
}
.persona-4 {
  bottom: 5%;
  right: 15%;
  transform: rotate(-2deg);
}

/* Contact Section */
.contact {
  padding: 4rem 0;
  text-align: center;
  background: var(--accent-pink);
  border-top: var(--border-width) solid var(--text-charcoal);
}
.contact-form {
  max-width: 500px;
  margin: 2rem auto;
  text-align: left;
}

/* Aurora Animation */
.aurora-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  border: var(--border-width) solid var(--text-charcoal);
  position: relative;
  overflow: hidden;
  background: #f8f8f8;
  z-index: 1;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: aurora-move 15s infinite alternate ease-in-out;
  z-index: -1;
}
.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--success-green);
  top: -100px;
  left: -100px;
  animation-duration: 12s;
}
.blob-2 {
  width: 350px;
  height: 350px;
  background: var(--accent-pink);
  bottom: -50px;
  right: -50px;
  animation-duration: 18s;
  animation-delay: -5s;
}
.blob-3 {
  width: 300px;
  height: 300px;
  background: #d93f3f;
  opacity: 0.15;
  top: 30%;
  left: 30%;
  filter: blur(60px);
  animation-duration: 20s;
}
@keyframes aurora-move {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(30px, 20px) scale(1.1) rotate(20deg);
  }
  100% {
    transform: translate(-20px, 40px) scale(0.9) rotate(-10deg);
  }
}
.aurora-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-charcoal);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }
  .dash-content {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .collage-container {
    height: auto;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0;
  }
  .persona-card {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 400px;
  }
  .center-msg {
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: 2rem;
  }
  .sticker {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 2rem;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
  .container {
    padding: 0 1rem;
  }
  .auth-btn,
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
  .logo {
    font-size: 1.5rem;
  }

  /* Auth Card Mobile - Add side margins */
  .auth-card {
    margin: 1rem;
    padding: 2rem 1.5rem;
    width: calc(100% - 2rem);
  }

  /* App Dashboard Mobile */
  .app-nav-bar {
    overflow-x: auto;
    padding: 1rem 1rem 0;
  }
  .folder-tab {
    flex-shrink: 0;
  }
  .app-container {
    padding: 1rem;
  }
  .app-header-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
  .dashboard-title {
    font-size: 1.5rem;
  }
  .app-header-block > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
  }
  .stat-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .dash-h3 {
    font-size: 1.25rem;
  }
  .task-item {
    padding: 0.75rem;
  }
  .indicator-card h2 {
    font-size: 2rem;
  }
  .strategy-vision {
    padding: 1.5rem 1rem;
  }
  .strategy-vision-title {
    font-size: 1.1rem;
  }
  .equation-grid {
    grid-template-columns: 1fr;
  }
  .equation-card {
    flex-direction: column;
    text-align: center;
  }
  .eq-arrow {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background: white;
  border: 1.5px solid var(--text-charcoal);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
  min-width: 300px;
}

.toast.success {
  border-color: var(--success-green);
  box-shadow: 4px 4px 0px var(--success-green);
}

.toast.success .toast-icon {
  color: var(--success-green);
}

.toast.error {
  border-color: var(--action-red);
  box-shadow: 4px 4px 0px var(--action-red);
}

.toast.error .toast-icon {
  color: var(--action-red);
}

.toast.info {
  border-color: #666;
  box-shadow: 4px 4px 0px #666;
}

.toast.info .toast-icon {
  color: #666;
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.toast-message {
  font-size: 0.85rem;
  color: #666;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 1.2rem;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: 0.2s;
}

.toast-close:hover {
  background: #f0f0f0;
  color: var(--text-charcoal);
}

.toast.removing {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* --- Password Strength Indicator --- */
.password-strength {
  margin-top: 0.5rem;
}

.strength-meter {
  display: flex;
  gap: 4px;
  margin-bottom: 0.5rem;
}

.strength-segment {
  flex: 1;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.strength-segment.active-1 {
  background: #ff4d4d;
}
.strength-segment.active-2 {
  background: #ff944d;
}
.strength-segment.active-3 {
  background: #ffcc4d;
}
.strength-segment.active-4 {
  background: #4dff4d;
}

.strength-text {
  font-size: 0.8rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.strength-text.weak {
  color: #ff4d4d;
}
.strength-text.fair {
  color: #ff944d;
}
.strength-text.good {
  color: #ffcc4d;
}
.strength-text.strong {
  color: #4dff4d;
}

.strength-requirements {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #666;
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.requirement-item i {
  color: #ccc;
  font-size: 0.9rem;
}

.requirement-item.met i {
  color: var(--success-green);
}

.requirement-item.met {
  color: var(--success-green);
}

/* --- Password Toggle --- */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 1.2rem;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: 0.2s;
}

.password-toggle:hover {
  color: var(--text-charcoal);
  background: #f0f0f0;
}

.password-toggle:focus {
  outline: 2px solid var(--action-red);
  outline-offset: 2px;
}

/* --- Empty States --- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-bone);
  border: 1.5px dashed var(--text-charcoal);
  border-radius: var(--radius-md);
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--action-red);
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.empty-state h3 {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-charcoal);
}

.empty-state p {
  color: #666;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-state-small {
  padding: 2rem;
}

.empty-state-small .empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.empty-state-small h3 {
  font-size: 1.2rem;
}

/* --- Mobile Menu --- */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-charcoal);
  padding: 0.5rem;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 1000;
  flex-direction: column;
  padding: 2rem;
  animation: slideInRight 0.3s ease;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-charcoal);
  padding: 0.5rem;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu-link {
  padding: 1rem;
  border: 1.5px solid var(--text-charcoal);
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: "Fraunces", serif;
  font-weight: 600;
  color: var(--text-charcoal);
  text-decoration: none;
  transition: 0.2s;
}

.mobile-menu-link:hover {
  background: var(--accent-pink);
}

.mobile-menu-link.active {
  background: var(--action-red);
  color: white;
  border-color: var(--action-red);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-menu-overlay.open {
  display: block;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* --- Accessibility: Focus States --- */
/* Ensure all interactive elements have visible focus */
a:focus,
button:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus,
select:focus,
[tabindex]:focus {
  outline: 2px solid var(--action-red);
  outline-offset: 2px;
}

/* Text inputs and textareas use bottom-border focus style instead */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
  outline: none;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--action-red);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  * {
    border-width: 2px !important;
  }
}

/* --- Loading States --- */
.btn-loading {
  opacity: 0.7;
  cursor: not-allowed !important;
  pointer-events: none;
  position: relative;
}

.btn-loading .btn-text {
  visibility: hidden;
}

.btn-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top-color: var(--action-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: var(--text-charcoal);
  font-weight: 600;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  height: 100%;
  margin-bottom: 1rem;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
    margin-left: auto;
    margin-bottom: 0.5rem;
  }

  .app-nav-bar {
    padding: 1rem;
  }

  .folder-tab {
    display: none;
  }

  .app-header-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .app-header-block > div:first-child {
    width: 100%;
  }

  .app-header-block > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }

  .stat-badge {
    flex: 1;
    justify-content: center;
  }

  /* Dashboard grid becomes single column */
  .app-container > .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .toast-container {
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .toast {
    min-width: auto;
  }
}

/* --- Task Controls (Filter & Sort) --- */
.task-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-group,
.sort-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label,
.sort-group label {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

/* Styled Select Elements for Filter & Sort */
.filter-group select,
.sort-group select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 500;
  color: var(--text-charcoal);
  background: white;
  border: 1.5px solid var(--text-charcoal);
  border-radius: var(--radius-sm);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232a2a2a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  transition: all 0.2s ease;
  min-width: 140px;
}

.filter-group select:hover,
.sort-group select:hover {
  border-color: var(--action-red);
  box-shadow: 0 2px 4px rgba(217, 63, 63, 0.1);
}

.filter-group select:focus,
.sort-group select:focus {
  outline: none;
  border-color: var(--action-red);
  box-shadow: 0 0 0 3px rgba(217, 63, 63, 0.1);
}

.filter-group select option,
.sort-group select option {
  padding: 0.5rem;
  background: white;
  color: var(--text-charcoal);
}

/* --- Drag Handle --- */
.drag-handle {
  cursor: grab;
  color: #999;
  padding: 0.25rem;
  margin-right: 0.5rem;
  transition: color 0.2s;
}

.drag-handle:hover {
  color: var(--text-charcoal);
}

.drag-handle:active {
  cursor: grabbing;
}

.task-item.dragging {
  opacity: 0.5;
  transform: scale(1.02);
}

/* --- Context Menu --- */
.context-menu {
  position: fixed;
  background: white;
  border: 1.5px solid var(--text-charcoal);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  min-width: 180px;
  animation: fadeIn 0.15s ease;
}

.context-menu-item {
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-charcoal);
  transition: background 0.2s;
}

.context-menu-item:hover {
  background: var(--bg-bone);
}

.context-menu-item i {
  font-size: 1rem;
}

/* --- Quick Actions Menu --- */
.quick-actions-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1.5px solid var(--text-charcoal);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  min-width: 220px;
  margin-top: 0.5rem;
  animation: fadeIn 0.15s ease;
}

.quick-action-item {
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-charcoal);
  transition: background 0.2s;
}

.quick-action-item:hover {
  background: var(--bg-bone);
}

.quick-action-item i {
  font-size: 1rem;
}

/* --- Circular Progress Timer --- */
.timer-circular-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 2rem;
}

.timer-circular-progress {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

.timer-circle-progress {
  fill: none;
  stroke: var(--action-red);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-display-circular {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Fraunces", serif;
  font-size: 4rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 0 30px rgba(217, 63, 63, 0.3);
}

/* --- Session History --- */
.timer-history {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.session-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 150px;
  overflow-y: auto;
}

.session-history-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* --- Confetti Animation --- */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* --- Milestone Timeline --- */
.milestone-timeline {
  position: relative;
  padding-left: 2rem;
}

.milestone-timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ddd;
}

.milestone-timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.milestone-timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid #ddd;
  z-index: 1;
}

.milestone-timeline-item.current .milestone-timeline-dot {
  background: var(--action-red);
  border-color: var(--action-red);
}

.milestone-timeline-item.completed .milestone-timeline-dot {
  background: var(--success-green);
  border-color: var(--success-green);
}

.milestone-timeline-content {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #eee;
}

.milestone-card.completed {
  opacity: 0.7;
}

.milestone-card.completed::after {
  content: "✓";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--success-green);
  font-size: 1.5rem;
  font-weight: bold;
}

/* --- Tab Badges --- */
.tab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--action-red);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 50%;
  min-width: 20px;
  text-align: center;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* --- Smooth Tab Transitions --- */
.folder-tab {
  transition: all 0.3s ease;
}

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

/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .app-nav-bar {
    padding: 1rem;
  }

  .folder-tab {
    display: none;
  }

  .app-header-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .app-header-block > div:first-child {
    width: 100%;
  }

  .app-header-block > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }

  .stat-badge {
    flex: 1;
    justify-content: center;
  }

  /* Dashboard grid becomes single column */
  .app-container > .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .task-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-group,
  .sort-group {
    width: 100%;
  }

  .filter-group select,
  .sort-group select {
    flex: 1;
  }

  .timer-circular-container {
    width: 250px;
    height: 250px;
  }

  .timer-display-circular {
    font-size: 3rem;
  }
}

@media (max-width: 640px) {
  .toast-container {
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .toast {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .auth-card {
    max-width: 100%;
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .container {
    padding: 0 1.5rem;
  }
}

/* ============================================
   MOBILE RESPONSIVENESS FIXES
   ============================================ */

/* --- Dashboard Grid (replaces inline style) --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

/* For large screens: Task list on left, Indicators on right (default order) */
.dashboard-task-column {
  order: 1;
}

.dashboard-indicators-column {
  order: 2;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .dashboard-task-column,
  .dashboard-indicators-column {
    order: initial;
  }
}

/* --- Dashboard Typography Scaling --- */
.dashboard-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.strategy-vision-title {
  font-size: 2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .dashboard-title {
    font-size: 1.8rem !important;
  }
  
  .strategy-vision-title {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 480px) {
  .dashboard-title {
    font-size: 1.5rem !important;
  }
  
  .strategy-vision-title {
    font-size: 1.3rem !important;
  }
}

/* --- Stat Badges Mobile Fix --- */
@media (max-width: 480px) {
  .app-header-block > div:last-child {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  
  .app-header-block .stat-badge {
    width: 100%;
    justify-content: center;
  }
}

/* --- Onboarding Strategy Cards Grid --- */
.strategy-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .strategy-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Onboarding Typography Scaling --- */
.onboarding-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .onboarding-title {
    font-size: 1.8rem !important;
  }
}

@media (max-width: 480px) {
  .onboarding-title {
    font-size: 1.5rem !important;
  }
}

/* --- Indicator Input Cards Grid --- */
.indicator-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .indicator-input-row {
    grid-template-columns: 1fr !important;
  }
}

/* --- Quick Actions Button Mobile Fix --- */
@media (max-width: 480px) {
  button[onclick*="toggleQuickActionsMenu"] {
    width: auto;
    min-width: auto;
    padding: 0.5rem !important;
    margin-left: auto;
  }
  
  button[onclick*="toggleQuickActionsMenu"] .btn-text {
    display: none;
  }
}

/* --- Quick Actions Menu Mobile Fix --- */
@media (max-width: 480px) {
  .quick-actions-menu {
    right: -20px;
    min-width: 200px;
    max-width: calc(100vw - 40px);
  }
}

@media (max-width: 360px) {
  .quick-actions-menu {
    right: 0;
    left: auto;
    min-width: 180px;
  }
}

/* --- Task Item Mobile Improvements --- */
@media (max-width: 480px) {
  .task-item {
    padding: 0.75rem !important;
    gap: 0.75rem;
  }
  
  .task-item span {
    font-size: 0.9rem;
  }
  
  .drag-handle {
    margin-right: 0.25rem;
  }
}

/* --- Indicator Cards Mobile Improvements --- */
@media (max-width: 480px) {
  .indicator-card h2 {
    font-size: 2rem !important;
  }
  
  .indicator-card .target-value {
    font-size: 1.2rem;
  }
  
  .bulk-add-section {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .bulk-add-btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Archive Cards Mobile Fix --- */
@media (max-width: 640px) {
  .archive-cycle-card > div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* --- Strategy Equation Cards Mobile --- */
@media (max-width: 480px) {
  .equation-card {
    padding: 1rem;
  }
  
  .eq-arrow {
    transform: rotate(90deg);
    margin: 0.25rem 0;
  }
}

/* --- Toast Container Mobile --- */
@media (max-width: 480px) {
  .toast-container {
    left: 10px;
    right: 10px;
    top: 10px;
  }
  
  .toast {
    padding: 0.75rem 1rem;
  }
}

/* --- Auth Card Mobile Padding --- */
@media (max-width: 480px) {
  .auth-card {
    margin: 0 0.75rem;
    padding: 1.5rem;
  }
}

/* --- Container Mobile Padding --- */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
}

/* --- App Container Mobile Padding --- */
@media (max-width: 480px) {
  .app-container {
    padding: 1rem 0.75rem;
  }
}

/* --- Future Sprints Cards Mobile --- */
@media (max-width: 640px) {
  .future-sprint-card {
    padding: 0.75rem;
  }
}

/* --- Confirmation Steps Mobile --- */
@media (max-width: 480px) {
  .confirmation-step > div {
    padding: 1rem !important;
  }
  
  .confirmation-step div[style*="display:flex; gap:1rem"] {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .confirmation-step .btn-secondary,
  .confirmation-step .btn-primary {
    width: 100%;
  }
}

/* --- Context Menu Mobile --- */
@media (max-width: 480px) {
  .context-menu {
    min-width: 160px;
  }
  
  .context-menu-item {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* --- Milestone Timeline Mobile --- */
@media (max-width: 480px) {
  .milestone-timeline {
    padding-left: 1.5rem;
  }
  
  .milestone-timeline-item {
    padding-left: 0.75rem;
  }
}

/* --- Timer Modal Mobile Enhancements --- */
@media (max-width: 480px) {
  .timer-circular-container {
    width: 220px;
    height: 220px;
  }
  
  .timer-display-circular {
    font-size: 2.5rem;
  }
  
  .timer-quick-options button {
    padding: 0.4rem 0.8rem;
    margin: 0 0.2rem 0.3rem 0;
  }
}

/* --- Landing Page Hero Mobile --- */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}

/* --- Empty State Mobile --- */
@media (max-width: 480px) {
  .empty-state {
    padding: 2rem 1rem;
  }
  
  .empty-state-icon {
    font-size: 3rem;
  }
  
  .empty-state h3 {
    font-size: 1.2rem;
  }
}

/* --- Example Visions Mobile --- */
@media (max-width: 480px) {
  .example-vision-btn {
    flex: 0 0 200px;
    padding: 0.6rem 0.75rem;
  }
}

/* --- Radio Cards Mobile --- */
@media (max-width: 480px) {
  .option-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* --- Day Column Mobile --- */
@media (max-width: 600px) {
  .day-column {
    min-width: auto;
    width: 100%;
  }
}

/* --- Progress Indicator Mobile --- */
@media (max-width: 400px) {
  .progress-container {
    padding: 0 0.5rem;
  }
  
  .step-label {
    font-size: 0.6rem;
    max-width: 50px;
  }
}

/* --- Tab Badge Mobile --- */
@media (max-width: 480px) {
  .tab-badge {
    min-width: 18px;
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
  }
}
