@charset "UTF-8";

@import "global.css";              /* */
@import "header_class/header.css"; /* */
@import "main_id/main.css";        /* */


body {
  font-family: Inter, Arial, sans-serif;
  background: #2a2a2a;
  color: #eaeaea;
  line-height: 1.5;
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 10px 0;
}

.section {
  margin: 20px 0;
}

#metrics-container {
  display: none;
}

.goal-metrics {
  margin-top: 16px;
}
.goal-metrics-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.goal-metrics-header select {
  min-width: 220px;
}
.goal-metrics .chart-card { margin-bottom: 16px; }

.metrics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.metric-label {
  font-size: 0.9rem;
  color: #aaa;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-top: 6px;
}

.metrics-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.chart-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.metrics-notes {
  margin: 8px 0 16px;
  color: #888;
}

body.light-mode .metric-card,
body.light-mode .chart-card {
  background: #fff;
  border-color: #ddd;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

body.light-mode .metric-value { color: #222; }
body.light-mode .metric-label { color: #666; }

/* Density adjustments for cards */
body.density-cozy .metric-card, body.density-cozy .chart-card { padding: 12px; }
body.density-compact .metric-card, body.density-compact .chart-card { padding: 8px; border-radius: 8px; }

.metrics-table {
  border: 1px solid #444;
  border-collapse: collapse;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  background: #1f1f1f;
}

.metrics-title {
  font-size: 1.2em;
  font-weight: bold;
  margin: 10px 0;
}

.metrics-table th,
.metrics-table td {
  border: 1px solid #444;
  padding: 8px 12px;
  text-align: center;
}

.metrics-header {
}

.percent {
  font-weight: bold;
  font-size: 1.3em;
  color: #78d7b7;
}


/* Settings */
.settings {
  display: none;
  padding: 20px;
}
.settings-card { max-width: 720px; margin: 0 auto; background: #1f1f1f; border: 1px solid #2a2a2a; border-radius: 12px; padding: 16px; }
.settings-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.settings-header h2 { margin: 0; font-size: 18px; }

/* Profile */
.profile { display: none; padding: 20px; }
.profile-card { max-width: 720px; margin: 0 auto; background: #1f1f1f; border: 1px solid #2a2a2a; border-radius: 12px; padding: 16px; }
.profile-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.profile-avatar { width: 48px; height: 48px; border-radius: 50%; background: #262626; border: 1px solid #333; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.profile-ident { flex: 1; }
.profile-name { font-weight: 700; font-size: 16px; }
.profile-email { color: #9aa0a6; font-size: 13px; }
.profile-plan { background: #232323; border: 1px solid #333; border-radius: 8px; padding: 6px 10px; font-weight: 600; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.profile-item { background: #161616; border: 1px solid #2a2a2a; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.profile-item span { color: #9aa0a6; font-size: 12px; }
.profile-edit { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.profile-edit input[type="date"] { background: #1f1f1f; color: #eaeaea; border: 1px solid #333; border-radius: 6px; padding: 6px 8px; }
.profile-edit .btn { padding: 6px 10px; }
.profile-actions { display: flex; gap: 10px; justify-content: flex-end; }
.profile-actions .btn { border-radius: 8px; padding: 8px 12px; border: 1px solid #333; background: #222; color: #eaeaea; cursor: pointer; }
.profile-actions .btn.danger { background: #2a1f1f; border-color: #3a2a2a; color: #ff8b8b; }

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input {
  display: none;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #666;
  transition: 0.2s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #2196F3;
}
input:checked + .slider:before {
  transform: translateX(26px);
}

/* Light Mode Overrides */
body.light-mode {
  background: #ffffff;
  color: #111111;
}
body.light-mode .header,
body.light-mode .navigation_menu {
  background-color: #f5f5f5;
  color: #000;
}
body.light-mode #main {
  background-color: #ffffff;
  color: #000;
}
body.light-mode .grid-container1,
body.light-mode .pinned_grid-container1,
body.light-mode .completed_grid-container1 {
  background-color: #f7f7f7;
}
body.light-mode .metrics-table {
  background: #fff;
  border-color: #ddd;
}

/* Timer icons display */
#timer_icons {
  font-size: 2em;
  margin-bottom: 10px;
}

#countdown_icon {
  margin-right: 5px;
}

#stopwatch_icon {
  display: none;
  margin-right: 5px;
}

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

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

.pulse {
  animation: pulse 1s ease-in-out infinite;
}

.rotate {
  animation: rotate 2s linear infinite;
}

#elapsed_counter {
  display: none;
}

/* Timer progress circle */
#timer_progress {
  width: 120px;
  height: 120px;
  margin: 10px auto;
}

#timer_progress circle {
  fill: none;
  stroke-width: 8;
}

#timer_bg {
  stroke: #e0e0e0;
}

#timer_circle {
  stroke: red;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}



#main h1 {
  margin-top: 1px;
  margin-bottom: 8px;
}
#pinned_tasks {
  margin-bottom: 30px;
}

/* Quick pinned input + add button inline */
.quick-pinned-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.quick-pinned-row #quick_pinned_input {
  flex: 1 1 auto;
}
.quick-pinned-row .add_button {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #3a3a3a;
  background: #222;
  color: #eaeaea;
  cursor: pointer;
}
.quick-pinned-row .add_button:hover {
  background: #2a2a2a;
}

/* Add Task modern UI */
.add-task-card {
  width: 100%;
  max-width: 720px;
  margin: 24px auto;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.task-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.task-input-row #task {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #3a3a3a;
  background: #151515;
  color: #eaeaea;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.task-input-row #task::placeholder { color: #9a9a9a; }
.task-input-row #task:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.35);
  background: #111;
}
.advanced-toggle {
  min-width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #3a3a3a;
  background: #151515;
  color: #eaeaea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .06s ease-in-out;
}
.advanced-toggle:hover { background: #202020; border-color: #4a4a4a; }
.advanced-toggle:active { transform: scale(0.98); }

.advanced_fields { margin-top: 14px; display: none; }
.advanced_fields .form-actions { margin-top: 16px; display: flex; gap: 8px; }
.advanced_fields button { border-radius: 8px; padding: 10px 14px; border: 1px solid #3a3a3a; background: #222; color: #eaeaea; cursor: pointer; }
.advanced_fields button:hover { background: #272727; }

/* Light mode variants */
body.light-mode .add-task-card { background: #fff; border-color: #e5e5e5; box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
body.light-mode .task-input-row #task { background: #fafafa; color: #111; border-color: #e5e5e5; }
body.light-mode .advanced-toggle { background: #fafafa; color: #111; border-color: #e5e5e5; }
body.light-mode .advanced_fields button { background: #f4f4f4; color: #111; border-color: #e5e5e5; }

/* Option chips and collapsible panels for optional field groups */
.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chip {
  min-width: 36px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid #3a3a3a;
  background: #151515;
  color: #eaeaea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .06s ease-in-out;
}
.chip:hover { background: #202020; border-color: #4a4a4a; }
.chip:active { transform: scale(0.98); }
.chip.active { background: #233a69; border-color: #3563c1; color: #e9f1ff; }

.option-panel { display: none; padding: 12px; margin-top: 8px; border: 1px dashed #3a3a3a; border-radius: 10px; background: #121212; }
.option-panel.open { display: block; }

/* Light mode variants */
body.light-mode .chip { background: #fafafa; color: #111; border-color: #e5e5e5; }
body.light-mode .chip.active { background: #e7efff; border-color: #adc8ff; color: #0b2a6b; }
body.light-mode .option-panel { background: #fff; border-color: #e5e5e5; }

/* Print styles */
.print-header { display: none; }

@media print {
  @page { margin: 12mm; }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .header,
  .navigation_menu,
  #menu_toggle,
  #search_bar,
  .logout,
  #start,
  #loginregister,
  #confirm_delete,
  #quick_pinned_input { display: none !important; }

  button,
  input,
  select,
  textarea,
  .advanced_fields,
  .task-input-row,
  .advanced-toggle,
  .options-btn,
  /* .goal-options-btn hidden; we now show inline ellipsis inside the goal button */
  .goal-options-btn { display: none !important; }

  /* Hide decorative icons and timers */
  .fa,
  [class^="fa-"],
  [class*=" fa-"],
  #timer_icons,
  #timer_progress,
  svg { display: none !important; }

  /* Main area should use full width and no background/border */
  #main {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: #ffffff !important;
  }

  /* Show a simple print header */
  .print-header { display: block !important; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #ccc; }
  .print-header h1 { font-size: 16px; margin: 0 0 2px 0; color: #000; }
  .print-date { font-size: 11px; color: #333; }

  /* Compact typography */
  body { font-size: 10pt; line-height: 1.25; }

  /* Two-column layout for lists */
  #tasks, #pinned_tasks, #completed_tasks {
    column-count: 2;
    column-gap: 8mm;
    column-fill: balance;
  }

  /* Make each task a compact block and avoid column breaks inside */
  .grid-container1, .pinned_grid-container1, .completed_grid-container1 {
    display: block !important;
    width: auto !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2mm 0 !important;
    margin: 0 0 2mm 0 !important;
    border-bottom: 0.4pt solid #ddd !important;
    break-inside: avoid-column;
    page-break-inside: avoid;
  }

  /* Tighter headings */
  #tasks h1, #pinned_tasks h1, #completed_tasks h1 {
    font-size: 12pt;
    margin: 0 0 3mm 0;
    color: #000;
    column-span: all;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Show only essential fields for print */
  .complete_button_div,
  .start_button_div,
  .edit_button_div,
  .delete_button_div,
  .postpone_1h_button_div,
  .postpone_1d_button_div,
  .postpone_1w_button_div,
  .postpone_1m_button_div,
  .tasks_collapse,
  .icon_importance,
  .icon_on_hold,
  .icon_is_pinned,
  .icon_is_recurring,
  .tasks_ptime,
  .tasks_pday,
  .tasks_note,
  .tasks_assignment,
  .tasks_date,
  .tasks_num_dependencies { display: none !important; }

  /* Ensure task line is compact and readable */
  .task { font-size: 10pt; font-weight: 600; color: #000; margin: 0 !important; }

  /* Remove leftover spacing from grid styles */
  .grid-container1 .task { margin-left: 0 !important; }

  /* Prevent URLs from printing next to links */
  a[href]:after { content: "" !important; }
}

/* Density controls */
body.density-comfortable {
  font-size: 16px;
  line-height: 1.5;
}
body.density-cozy {
  font-size: 15px;
  line-height: 1.4;
}
body.density-compact {
  font-size: 13px;
  line-height: 1.25;
}

/* Spacing adjustments */
body.density-cozy #main h1 { margin-top: 0; margin-bottom: 6px; }
body.density-compact #main h1 { margin-top: 0; margin-bottom: 4px; }

body.density-cozy .add-task-card { padding: 12px; }
body.density-compact .add-task-card { padding: 10px; }

body.density-cozy .task-input-row { gap: 8px; }
body.density-compact .task-input-row { gap: 4px; }

body.density-cozy .task-input-row #task { padding: 12px 14px; font-size: 15px; }
body.density-compact .task-input-row #task { padding: 8px 10px; font-size: 13px; }

body.density-cozy .advanced-toggle { min-width: 42px; height: 42px; }
body.density-compact .advanced-toggle { min-width: 34px; height: 34px; }

body.density-cozy .advanced_fields .form-actions { gap: 6px; }
body.density-compact .advanced_fields .form-actions { gap: 3px; }

body.density-cozy .advanced_fields button { padding: 8px 12px; }
body.density-compact .advanced_fields button { padding: 5px 8px; }

/* Generic grid item padding reductions */
body.density-cozy .grid-item { padding: 6px 8px; }
body.density-compact .grid-item { padding: 3px 5px; }

/* Navigation menu spacing */
body.density-cozy .navigation_menu button { padding: 8px 10px; }
body.density-compact .navigation_menu button { padding: 4px 6px; border-radius: 6px; }

/* Table cell padding in metrics */
body.density-cozy .metrics-table th,
body.density-cozy .metrics-table td { padding: 6px 8px; }
body.density-compact .metrics-table th,
body.density-compact .metrics-table td { padding: 4px 6px; }

/* Completion Toast */
#completion_toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: none;
}
#completion_toast .toast_content {
  background: #1f1f1f;
  color: #f0f0f0;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 12px;
}
#completion_toast .toast_actions button {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #262626;
  color: #f0f0f0;
  cursor: pointer;
  margin-left: 6px;
}
#completion_toast .toast_actions button:hover { background: #2f2f2f; }

/* Light mode adjustments */
body.light-mode #completion_toast .toast_content {
  background: #ffffff;
  color: #111111;
  border-color: #ddd;
}
body.light-mode #completion_toast .toast_actions button {
  background: #f5f5f5;
  color: #111111;
}

/* Adjust Completion Modal */
#adjust_completion {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1f1f1f;
  color: #f0f0f0;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px;
  z-index: 3100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  min-width: 280px;
}
#adjust_completion .form-actions button {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #262626;
  color: #f0f0f0;
  cursor: pointer;
  margin-right: 8px;
}
#adjust_completion .form-actions button:hover { background: #2f2f2f; }

body.light-mode #adjust_completion {
  background: #ffffff;
  color: #111111;
  border-color: #ddd;
}
body.light-mode #adjust_completion .form-actions button {
  background: #f5f5f5;
  color: #111111;
}

/* Feedback Modal */
#feedback_modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1f1f1f;
  color: #f0f0f0;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px;
  z-index: 3100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  min-width: 320px;
  max-width: 600px;
}
#feedback_modal .form-row { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
#feedback_modal textarea, #feedback_modal select { background: #1f1f1f; color: #f0f0f0; border: 1px solid #333; border-radius: 8px; padding: 8px; }
#feedback_modal .form-actions { margin-top: 12px; display: flex; gap: 8px; justify-content: flex-end; }
#feedback_modal .form-actions button { padding: 8px 12px; border-radius: 8px; border: 1px solid #333; background: #262626; color: #f0f0f0; cursor: pointer; }
#feedback_modal .form-actions button:hover { background: #2f2f2f; }
body.light-mode #feedback_modal { background: #ffffff; color: #111111; border-color: #ddd; }
body.light-mode #feedback_modal textarea, body.light-mode #feedback_modal select { background: #fff; color: #111; border-color: #ddd; }
body.light-mode #feedback_modal .form-actions button { background: #f5f5f5; color: #111; }

/* Landing: header nav (visible when logged out) */
.landing-nav {
  display: none;
  gap: 16px;
  align-items: center;
}
.landing-nav a {
  color: #eaeaea;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.landing-nav a:hover { background: rgba(255,255,255,0.06); }
.landing-nav .cta {
  background: #2563eb;
  color: #fff;
}
.landing-nav .cta:hover { background: #1e4fc7; }

/* Landing sections */
.landing-hero {
  padding: 80px 20px 40px;
  text-align: center;
  background: radial-gradient(1200px 500px at 50% -50%, rgba(37,99,235,0.25), transparent), #1b1b1b;
  border-bottom: 1px solid #232323;
}
.landing-hero .hero-content { max-width: 900px; margin: 0 auto; }
.landing-hero h1 { font-size: 44px; margin-bottom: 12px; }
.landing-hero p { color: #cfcfcf; }
.landing-hero .hero-ctas { margin-top: 18px; display: flex; gap: 12px; justify-content: center; }

.btn { display: inline-block; padding: 10px 14px; border-radius: 10px; border: 1px solid #2d2d2d; background: #222; color: #eaeaea; text-decoration: none; cursor: pointer; }
.btn:hover { background: #272727; }
.btn.primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn.primary:hover { background: #1e4fc7; }
.btn.secondary { background: #232323; }

.hero-note { margin-top: 10px; color: #9fc5ff; }

.landing-section { padding: 56px 20px; border-top: 1px solid #232323; }
.landing-section h2 { text-align: center; margin-bottom: 24px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.features-grid .card {
  background: #1f1f1f; border: 1px solid #2a2a2a; border-radius: 12px; padding: 16px; text-align: left;
}
.features-grid .card i { font-size: 22px; color: #77b0ff; }
.features-grid .card h3 { margin-top: 8px; margin-bottom: 6px; }
.features-grid .card.premium i { color: #ffb84d; }
.features-grid .card.premium { border-color: #554015; box-shadow: 0 4px 16px rgba(255,184,77,0.08); }

.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto;
}
.price-card { background: #1f1f1f; border: 1px solid #2a2a2a; border-radius: 12px; padding: 16px; }
.price-card.highlighted { border-color: #3563c1; box-shadow: 0 10px 30px rgba(37,99,235,0.15); }
.price-card .price { font-size: 32px; font-weight: 700; margin: 6px 0 6px; }
.price-card .price-alt { margin: 0 0 12px; color: #9aa0a6; }
.price-card .savings { color: #78d7b7; font-weight: 600; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 12px; }
.price-card li { margin: 6px 0; color: #cfcfcf; }
.price-card li i { color: #78d7b7; margin-right: 6px; }
.price-card .fine-print { color: #9a9a9a; font-size: 12px; margin-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid #232323; padding: 24px 20px; background: #161616; }
.site-footer .footer-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.site-footer .links a { color: #cfcfcf; text-decoration: none; margin-right: 12px; }
.site-footer .links a:hover { color: #fff; }
.site-footer .brand { font-weight: 700; }
.site-footer .legal { color: #8b8b8b; font-size: 12px; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Light mode variants for landing */
body.light-mode .landing-hero { background: radial-gradient(1200px 500px at 50% -50%, rgba(37,99,235,0.15), transparent), #f8faff; border-bottom-color: #e9eef8; }
body.light-mode .landing-section { border-top-color: #ececec; }
body.light-mode .features-grid .card, body.light-mode .price-card { background: #fff; border-color: #eaeaea; }
body.light-mode .site-footer { background: #fbfbfb; border-top-color: #e9e9e9; }
body.light-mode .landing-nav a { color: #111; }
body.light-mode .landing-nav .cta { color: #fff; }

/* Visibility rules: when logged out, hide app chrome and show landing nav */
body:not(.authenticated) .navigation_menu,
body:not(.authenticated) #menu_toggle,
body:not(.authenticated) #search_bar,
body:not(.authenticated) .user-avatar { display: none !important; }
body:not(.authenticated) .landing-nav { display: flex; }

/* When authenticated, hide landing nav */
body.authenticated .landing-nav { display: none; }
body.authenticated .user-avatar { display: inline-flex; }

/* Unauthenticated layout: full-width landing, hide app columns */
body:not(.authenticated) #main {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  border-radius: 0;
  grid-template-columns: 1fr;
}
body:not(.authenticated) #left_col,
body:not(.authenticated) #splitter,
body:not(.authenticated) #calendar_panel { display: none !important; }

/* Ensure the landing wrapper uses full width */
#loginregister {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0;
  grid-column: 1 / -1;
}

/* Revamped Auth UX */
.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.auth-card {
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 16px;
}
.auth-card h3 { margin: 0 0 8px; }
.auth-card p.subtle { color: #9aa0a6; margin: 0 0 12px; }
.auth-card .row { display: block; }
.auth-card input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #333; background: #151515; color: #eaeaea; margin: 6px 0; }
.auth-actions { display: flex; gap: 10px; margin-top: 10px; }
.auth-actions .btn { flex: 1; text-align: center; }

/* Light mode */
body.light-mode .auth-card { background: #fff; border-color: #eaeaea; }
body.light-mode .auth-card input { background: #fafafa; color: #111; border-color: #ddd; }

/* Compact password helper (hidden until typing) */
#message { display: none; font-size: 13px; padding: 10px; margin-top: 8px; border-radius: 8px; }
#message h3 { display: none; }
#message p { padding: 4px 22px; font-size: 13px; display: inline-block; margin: 2px 8px 2px 0; position: relative; }
#message p:before { left: 0 !important; }

/* Footer groups */
.site-footer .links { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.site-footer .link-group { min-width: 140px; display: flex; flex-direction: column; gap: 6px; }
.site-footer .group-title { font-weight: 700; font-size: 14px; color: #eaeaea; margin-bottom: 4px; }
.site-footer .link-group a { color: #cfcfcf; text-decoration: none; }
.site-footer .link-group a:hover { color: #fff; }

/* Footer icon link sizing */
.site-footer .link-group a i { font-size: 18px; }
.site-footer .link-group a + a { margin-top: 4px; }
.site-footer .link-group[aria-label="social"] a { margin-right: 10px; }

/* Mobile tweaks */
@media (max-width: 700px) {
  .landing-hero { padding: 56px 16px 28px; }
  .landing-hero h1 { font-size: 28px; }
  .landing-hero .hero-ctas { flex-wrap: wrap; }
  .features-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .auth-grid { grid-template-columns: 1fr; }
  .site-footer .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .site-footer .links { width: 100%; gap: 16px; }
}
@media (max-width: 480px) {
  /* Force exactly two feature cards per row on phones */
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .features-grid > * { min-width: 0; }
  
  /* Prevent header nav overflow on very small screens */
  #logo { width: auto; flex: 0 1 auto; }
  #logo .app-logo { width: 28px; height: 28px; margin-right: 8px; }
  #logo .brand-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; cursor: pointer; }
  .landing-nav { min-width: 0; flex: 1 1 auto; gap: 8px; justify-content: flex-end; }
  .landing-nav a { padding: 6px 10px; white-space: nowrap; }
  .landing-nav a:not(.cta) { display: none; }
}

/* Additional compact tightening */
body.density-compact #main { padding: 12px; gap: 8px; }
body.density-compact .navigation_menu { padding: 8px; }
body.density-compact .navigation_menu > div { margin-bottom: 6px; }
body.density-compact #menu_filter_buttons button,
body.density-compact #menu_goal_buttons button { margin-bottom: 3px; }
body.density-compact #tasks { margin-top: 16px; margin-bottom: 20px; }
body.density-compact #pinned_tasks { margin-bottom: 16px; }
body.density-compact .grid-container1,
body.density-compact .pinned_grid-container1,
body.density-compact .completed_grid-container1 {
  margin-bottom: 6px;
  padding: 6px 8px;
  grid-column-gap: 6px;
  column-gap: 6px;
  border-radius: 10px;
}

/* Tasks header layout: title left, count right */
#tasks .tasks-header, #pinned_tasks .tasks-header, #completed_tasks .tasks-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
#tasks .tasks-header .tasks-title, #pinned_tasks .tasks-header .tasks-title, #completed_tasks .tasks-header .tasks-title { flex: 1 1 auto; }
#tasks .tasks-header .tasks-count, #pinned_tasks .tasks-header .tasks-count, #completed_tasks .tasks-header .tasks-count { flex: 0 0 auto; opacity: 0.9; font-size: 0.8em; }

/* Compact mode tweaks */
body.density-compact #tasks .tasks-header { gap: 6px; }
body.density-compact #tasks .tasks-header .tasks-count,
body.density-compact #pinned_tasks .tasks-header .tasks-count,
body.density-compact #completed_tasks .tasks-header .tasks-count { font-size: 0.75em; }

/* Password visibility toggle */
.password-field {
  position: relative;
}
.password-field input[type="password"],
.password-field input[type="text"] {
  padding-right: 38px;
}
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #9aa0a6;
  cursor: pointer;
}
.toggle-password:hover { color: #c5c9cc; }
body.light-mode .toggle-password { color: #6b7280; }
body.light-mode .toggle-password:hover { color: #374151; }

/* Legal pages */
.legal-container { max-width: 900px; margin: 32px auto; padding: 0 20px; }
.legal-article h1 { font-size: 36px; margin-bottom: 8px; }
.legal-article h2 { font-size: 20px; margin-top: 20px; }
.legal-article p, .legal-article li { line-height: 1.7; color: #cfcfcf; }
body.light-mode .legal-article p, body.light-mode .legal-article li { color: #222; }

/* --- Guided Tour --- */
.tour-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 9998; }
.tour-tooltip { position: absolute; background: #1f1f1f; color: #eaeaea; border: 1px solid #333; border-radius: 10px; padding: 14px 16px; max-width: 320px; box-shadow: 0 8px 28px rgba(0,0,0,0.45); z-index: 9999; }
.tour-title { font-weight: 700; margin-bottom: 6px; }
.tour-text { font-size: 14px; color: #cfcfcf; margin-bottom: 10px; }
.tour-actions { display: flex; gap: 8px; justify-content: flex-end; }
.tour-btn { background: #232323; color: #eaeaea; border: 1px solid #333; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.tour-btn.tour-next { background: #2b2d42; border-color: #3a3c55; color: #78d7b7; font-weight: 600; }
body.light-mode .tour-overlay { background: rgba(0,0,0,0.35); }
body.light-mode .tour-tooltip { background: #fff; color: #222; border-color: #ddd; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
body.light-mode .tour-text { color: #333; }

/* Guided Tour interaction refinements */
.tour-overlay { pointer-events: auto; cursor: pointer; }
.tour-tooltip { cursor: default; pointer-events: auto; }


/* Highlight target */
.tour-highlight {
  position: relative;
  z-index: 10000; /* above overlay tooltip z-index 9999 */
  box-shadow: 0 0 0 3px #78d7b7, 0 0 0 6px rgba(120, 215, 183, 0.25);
  border-radius: 8px;
}

/* Guided Tour highlight box (layout-safe) */
#tour_highlight {
  position: fixed;
  z-index: 9998; /* above backdrop but below tooltip (9999) */
  pointer-events: none;
  border-radius: 8px;
  box-shadow: 0 0 0 3px #78d7b7, 0 0 0 8px rgba(120, 215, 183, 0.25);
  display: none;
}

/* Header layout and search styling */
.header { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid #232323; background: #1b1b1b; position: sticky; top: 0; z-index: 100; }
body.light-mode .header { background: #fbfbfb; border-bottom-color: #e9e9e9; }

#menu_toggle.menu-toggle { background: transparent; border: none; color: inherit; font-size: 20px; padding: 6px 8px; border-radius: 8px; }
#menu_toggle.menu-toggle:hover { background: rgba(255,255,255,0.06); }
body.light-mode #menu_toggle.menu-toggle:hover { background: rgba(0,0,0,0.04); }

#logo { flex: 0 0 auto; display: flex; align-items: center; min-width: 0; }
#logo .brand-link { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: inherit; white-space: nowrap; cursor: pointer; }
#logo .app-logo { width: 24px; height: 24px; margin-right: 4px; flex: 0 0 auto; }
#logo h1 { font-size: 18px; line-height: 1; margin: 0; font-weight: 700; }

#search_bar { flex: 1 1 420px; display: flex; align-items: center; min-width: 0; margin-left: 0; }
#search_bar label { display: none; }
#search_bar input#search {
  width: 100%;
  min-width: 0;
  padding: 10px 12px 10px 36px;
  border-radius: 999px;
  border: 1px solid #2d2d2d;
  background-color: #151515;
  color: #eaeaea;
  outline: 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='%239aa0a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px 16px;
}
#search_bar input#search::placeholder { color: #9aa0a6; }
#search_bar input#search:focus { border-color: #3a6ee8; box-shadow: 0 0 0 3px rgba(58,110,232,0.25); }

body.light-mode #search_bar input#search { background-color: #fafafa; color: #111; border-color: #ddd; }
body.light-mode #search_bar input#search::placeholder { color: #777; }

.landing-nav { min-width: 0; flex: 0 0 auto; gap: 10px; justify-content: flex-end; }

@media (max-width: 700px) {
  .header { gap: 4px; padding: 8px 10px; }
  #logo .app-logo { width: 20px; height: 20px; }
  #logo h1 { font-size: 16px; }
  #search_bar { margin-left: 2px; }
}

/* Goals header options buttons */
#goal_sort_toggle.options-btn,
#goals_menu_button.options-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
}
#goal_sort_toggle.options-btn:hover,
#goals_menu_button.options-btn:hover { background: rgba(255,255,255,0.06); }
body.light-mode #goal_sort_toggle.options-btn:hover,
body.light-mode #goals_menu_button.options-btn:hover { background: rgba(0,0,0,0.05); }

.goals-header { display: flex; align-items: center; gap: 8px; }
.goals-header .dropdown-container { display: inline-flex; align-items: center; gap: 6px; position: relative; }

/* Navigation menu button sizing */
.navigation_menu button {
  width: auto;
  max-width: 100%;
}

/* Assignment grouping on home view */
.assignment-header {
  /* margin: 16px 0 8px; */
  padding-left: 8px;
  background: linear-gradient(180deg, #242424, #1c1c1c);
  border: 1px solid #333;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #eaeaea;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.assignment-header .assignment-title { flex: 1 1 auto; }
.assignment-header .assignment-count { flex: 0 0 auto; opacity: 0.9; font-size: 0.85em; }
.assignment-header:hover {
  background: linear-gradient(180deg, #2c2c2c, #222);
}
.assignment-group {
  /* margin: 6px 0 14px 0;
  padding: 4px 6px 2px; */
  border-left: 3px solid #2f6feb;
}
/* Assignment header menu */
.assignment-header .assignment-options { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; }
.assignment-header .assignment-options .assignment-options-btn {
  border: 1px solid #333;
  background: #202020;
  color: #eaeaea;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}
.assignment-header .assignment-options .assignment-options-btn:hover { background: #262626; }
.assignment-header .assignment-options .assignment-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 8px;
  min-width: 160px;
  padding: 6px;
  z-index: 20;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
.assignment-header .assignment-options .assignment-dropdown .assignment-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #eaeaea;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
}
.assignment-header .assignment-options .assignment-dropdown .assignment-item:hover { background: #2a2a2a; }
body.light-mode .assignment-header { background: linear-gradient(180deg, #f4f4f4, #eaeaea); border-color: #ddd; color: #111; }
body.light-mode .assignment-header:hover { background: linear-gradient(180deg, #ededed, #e3e3e3); }
body.light-mode .assignment-group { border-left-color: #2f6feb; }
body.light-mode .assignment-header .assignment-options .assignment-options-btn { background: #f5f5f5; border-color: #ddd; color: #111; }
body.light-mode .assignment-header .assignment-options .assignment-dropdown { background: #fff; border-color: #ddd; box-shadow: 0 6px 14px rgba(0,0,0,0.12); }
body.light-mode .assignment-header .assignment-options .assignment-dropdown .assignment-item { color: #111; }
