/* ------------------------------------------------------------------ */
/* Theme: Nature-inspired, light, modern (Cursor / Bitbucket / DDG)   */
/* ------------------------------------------------------------------ */
:root {
  /* Nature palette */
  --color-forest: #1a9f4d;
  --color-sage: #2d8a5e;
  --color-sky: #0284c7;
  --color-ocean: #0ea5e9;
  --color-amber: #ea580c;
  --color-sunset: #f59e0b;

  /* Neutrals - light & warm */
  --color-bg: #f6f8f6;
  --color-surface: #ffffff;
  --color-border: #e5e8e5;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;

  /* Override Bootstrap */
  --bs-primary: var(--color-forest);
  --bs-primary-rgb: 26, 159, 77;
  --bs-link-color: var(--color-sky);
  --bs-link-hover-color: var(--color-ocean);
  --bs-body-bg: var(--color-bg);
  --bs-body-color: var(--color-text);
  --bs-border-color: var(--color-border);
  --bs-secondary: var(--color-text-muted);
  --bs-success: var(--color-sage);
  --bs-info: var(--color-sky);
  --bs-warning: var(--color-sunset);
  --bs-danger: #dc3545;
  --bs-border-radius: 8px;
  --bs-border-radius-sm: 6px;
  --bs-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --bs-box-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ------------------------------------------------------------------ */
/* Global                                                             */
/* ------------------------------------------------------------------ */
body {
  background-color: var(--color-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text);
}

/* ------------------------------------------------------------------ */
/* Navbar - Light, modern                                             */
/* ------------------------------------------------------------------ */
.app-navbar {
  background-color: var(--color-surface) !important;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.app-navbar .navbar-brand {
  color: var(--color-text) !important;
  background: transparent !important;
}
.app-navbar .navbar-brand:hover {
  color: var(--color-forest) !important;
  background: transparent !important;
}

.app-navbar .container-fluid {
  position: relative;
}

.navbar-filter-trigger {
  min-width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.navbar-filter-trigger.has-active-filter {
  box-shadow: 0 0 0 0.2rem rgba(26, 159, 77, 0.2);
}

.global-filter-projects-tree {
  max-height: 18rem;
  overflow: auto;
  background: #fff;
}

.global-filter-project-row {
  display: flex;
  align-items: center;
  min-height: 1.75rem;
}

.global-filter-project-row .form-check-input {
  margin-top: 0;
}

.global-filter-project-spacer {
  width: 14px;
}

.global-filter-project-implied {
  padding: 0.15rem 0 0.35rem;
  font-style: italic;
}

.avatar-menu-trigger {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-menu-trigger:hover {
  background: rgba(0, 0, 0, 0.04);
}

.avatar-menu-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(26, 159, 77, 0.25);
}

.avatar-image,
.avatar-fallback {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
}

.avatar-image {
  object-fit: cover;
}

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-surface);
  background: var(--color-sage);
}

.avatar-menu-static {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.subpage-header-actions {
  gap: 0.6rem !important;
}

/* ------------------------------------------------------------------ */
/* Tabs - Clean underline style                                       */
/* ------------------------------------------------------------------ */
#mainTabs {
  border-bottom: 1px solid var(--color-border);
}
#mainTabs .nav-link {
  color: var(--color-text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  margin-bottom: -1px;
  border-radius: 0;
}
#mainTabs .nav-link:hover {
  color: var(--color-text);
}
#mainTabs .nav-link.active {
  color: var(--color-forest);
  background: transparent;
  border-bottom-color: var(--color-forest);
}

.app-navbar #mainTabs {
  border-bottom: none;
  margin-bottom: 0;
}

.app-navbar #mainTabs.app-header-tabs {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.app-navbar #mainTabs .nav-link {
  padding: 1rem 0.9rem 0.9rem;
}

@media (max-width: 991.98px) {
  .app-navbar #mainTabs.app-header-tabs,
  .app-navbar .d-flex.ms-auto {
    display: none !important;
  }
}

/* Offcanvas more menu (mobile) */
.nav-offcanvas-more .nav-link {
  color: var(--color-text-muted);
  border: none;
  border-radius: var(--bs-border-radius-sm);
  padding: 0.75rem 1rem;
  font-weight: 500;
  text-align: left;
}
.nav-offcanvas-more .nav-link:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.04);
}
.nav-offcanvas-more .nav-link.active {
  color: var(--color-forest);
  background: rgba(26, 159, 77, 0.12);
}

/* Mobile bottom nav */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  /* Lift interactive targets above iOS home-indicator gesture zone */
  padding: 0.3rem 0.35rem 0.35rem;
  padding-bottom: calc(0.55rem + env(safe-area-inset-bottom));
}

.mobile-bottom-nav-link {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 500;
  margin: 0 0.12rem;
  border-radius: 999px;
  padding: 0.4rem 0.5rem;
  border: 1px solid transparent !important;
  line-height: 1;
}

.mobile-bottom-nav-link i {
  font-size: 1rem;
}

.mobile-bottom-nav-label {
  line-height: 1;
}

.mobile-bottom-nav-link.active {
  color: var(--color-forest);
  background: rgba(26, 159, 77, 0.14) !important;
  border-color: rgba(26, 159, 77, 0.25) !important;
}

.mobile-bottom-nav-link:hover,
.mobile-bottom-nav-link:focus {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.04);
}

/* ------------------------------------------------------------------ */
/* Cards - Minimal shadow, rounded                                    */
/* ------------------------------------------------------------------ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow);
}

/* ------------------------------------------------------------------ */
/* Log Time – mobile toolbar (timer + symbol buttons)                   */
/* ------------------------------------------------------------------ */
#time-form .entry-mobile-toolbar,
#globalAddModal #time-form .entry-mobile-toolbar {
  padding: 0.5rem 0;
}
#time-form .entry-mobile-toolbar .entry-timer-status,
#globalAddModal #time-form .entry-mobile-toolbar .entry-timer-status {
  font-size: 0.9rem;
  padding: 0.35em 0.65em;
}
#time-form .entry-mobile-toolbar .btn,
#globalAddModal #time-form .entry-mobile-toolbar .btn {
  min-height: 2.25rem;
  min-width: 2.5rem;
}
#time-form .entry-mobile-toolbar .entry-insert-symbol,
#globalAddModal #time-form .entry-mobile-toolbar .entry-insert-symbol {
  font-weight: 600;
  min-width: 2.5rem;
}

#time-form .entry-submit-bar #entry-submit-btn,
#globalAddModal #time-form .entry-submit-bar #entry-submit-btn {
  min-height: 3rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 999px;
}

#time-form .entry-insert-row .entry-insert-symbol,
#globalAddModal #time-form .entry-insert-row .entry-insert-symbol {
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}

@media (max-width: 576px) {
  #time-form {
    padding-bottom: 5.5rem;
  }

  #time-form .entry-mobile-toolbar,
  #globalAddModal #time-form .entry-mobile-toolbar {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--bs-border-radius);
    background: #f9fbf9;
  }

  #time-form .entry-timer-row,
  #globalAddModal #time-form .entry-timer-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem !important;
    overflow: visible !important;
  }

  #time-form .entry-timer-row .entry-timer-status,
  #globalAddModal #time-form .entry-timer-row .entry-timer-status {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: 1rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
  }

  #time-form .entry-timer-row .btn,
  #globalAddModal #time-form .entry-timer-row .btn {
    min-height: 2.85rem;
    width: 100%;
    font-size: 1.05rem;
    border-width: 2px;
  }

  #time-form .entry-insert-row,
  #globalAddModal #time-form .entry-insert-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem !important;
  }

  #time-form .entry-insert-row .entry-insert-symbol,
  #globalAddModal #time-form .entry-insert-row .entry-insert-symbol {
    min-height: 2.35rem;
    width: 100%;
    font-size: 0.82rem;
    padding: 0.3rem 0.25rem;
  }

  #time-form #entry-description,
  #globalAddModal #time-form #entry-description {
    font-size: 1rem;
    min-height: 7.25rem;
  }

  #time-form .entry-submit-bar,
  #globalAddModal #time-form .entry-submit-bar {
    position: sticky;
    bottom: 0;
    margin: 0 -0.25rem -0.25rem;
    padding: 0.8rem 0.25rem calc(0.8rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--color-surface) 70%, rgba(255, 255, 255, 0));
    z-index: 2;
  }
  #time-form .entry-submit-bar #entry-submit-btn,
  #globalAddModal #time-form .entry-submit-bar #entry-submit-btn {
    width: 100%;
  }
}

/* ------------------------------------------------------------------ */
/* Plan tab – add form (insert row + mention wrapper, match Time)      */
/* ------------------------------------------------------------------ */
#plan-add-form .plan-add-insert-toolbar .entry-insert-row .entry-insert-symbol {
  font-weight: 600;
  min-width: 2.5rem;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}

/* ------------------------------------------------------------------ */
/* Global Add FAB + Modal                                              */
/* ------------------------------------------------------------------ */
.global-add-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
  z-index: 1030;
}

.global-add-fab i {
  font-size: 1.2rem;
}

#globalAddModal .modal-body {
  max-height: min(75vh, 760px);
  overflow-y: auto;
}

#globalAddModal .global-add-section h6 {
  font-weight: 600;
  margin-bottom: 0.9rem;
}

@media (max-width: 991.98px) {
  .app-main-container {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  }

  .global-add-fab {
    bottom: calc(4.35rem + env(safe-area-inset-bottom));
  }
}

#plan-panel .plan-item .plan-date-dropdown-btn {
  border-radius: 999px;
}

#plan-panel .plan-item .plan-date-input {
  width: 9.5rem;
  min-width: 9.5rem;
}

#plan-panel .plan-section .plan-section-hours {
  font-size: 0.9em;
}

#plan-panel .plan-drop-zone {
  padding: 0 !important;
  border: none;
}

#plan-panel .plan-drop-zone .plan-drop-zone-inner {
  height: 6px;
  margin: 0.1rem 0;
  background: transparent;
  border-radius: 999px;
  transition: background 0.15s ease;
}

#plan-panel .plan-drop-zone.drag-over .plan-drop-zone-inner {
  background: var(--bs-primary);
}

@media (max-width: 576px) {
  #plan-panel .plan-add-insert-toolbar .entry-insert-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem !important;
  }

  #plan-panel .plan-add-insert-toolbar .entry-insert-row .entry-insert-symbol {
    min-height: 2.75rem;
    width: 100%;
    font-size: 0.95rem;
    padding: 0.45rem 0.5rem;
  }

  #plan-panel #plan-add-description {
    font-size: 1rem;
    min-height: 7.25rem;
  }

  #plan-panel .plan-item .plan-date-input {
    width: 100%;
    min-width: 0;
  }
}

/* ------------------------------------------------------------------ */
/* Log Time – optional details (date)                                  */
/* ------------------------------------------------------------------ */
.entry-details-toggle:hover {
  color: var(--color-sky) !important;
}
.entry-details-collapse.collapse.show {
  padding-top: 0.25rem;
}
.entry-details-collapse .form-label {
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------ */
/* Form controls - Modern, light                                       */
/* ------------------------------------------------------------------ */
.form-control,
.form-select {
  border-color: var(--color-border);
  border-radius: var(--bs-border-radius-sm);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--color-sky);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn-primary {
  background-color: var(--color-forest);
  border-color: var(--color-forest);
}
.btn-primary:hover {
  background-color: var(--color-sage);
  border-color: var(--color-sage);
}
.btn-outline-secondary {
  border-color: var(--color-border);
  color: var(--color-text-muted);
}
.btn-outline-secondary:hover {
  background-color: var(--color-bg);
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

/* ------------------------------------------------------------------ */
/* Tables                                                              */
/* ------------------------------------------------------------------ */
.table {
  --bs-table-hover-bg: rgba(26, 159, 77, 0.04);
}
#entries-sections-container tr.entry-row {
  cursor: pointer;
}

#time-panel .entries-search-row .input-group-text {
  background: var(--color-bg);
}

#time-panel .entry-day-section .entry-day-total-hours {
  font-size: 0.9em;
}

#time-panel .entries-load-more-wrap .btn {
  min-width: 9rem;
}

/* Page filter bar (Plan / Log / Report) */
.page-filter-bar {
  position: relative;
}
.page-filter-bar .page-filter-input-group {
  max-width: 100%;
}
.page-filter-bar .mention-wrapper .form-control {
  border-radius: 0;
}
.page-filter-bar .page-filter-clear-x {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-left: 1px solid var(--bs-border-color);
}
.page-filter-bar .page-filter-clear-x:not(.d-none) {
  display: inline-block;
}
.global-filter-history-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050;
  max-height: 16rem;
  overflow-y: auto;
  min-width: 100%;
}
.global-filter-history-dropdown[hidden] {
  display: none !important;
}
.global-filter-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border, #dee2e6);
}
.global-filter-history-item:last-child {
  border-bottom: none;
}
.global-filter-history-item:hover,
.global-filter-history-item:focus {
  background-color: var(--bs-secondary-bg);
}
.global-filter-history-item-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-filter-history-item-remove {
  flex-shrink: 0;
  padding: 0.1rem 0.35rem;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--bs-secondary-color);
  background: none;
  border: none;
  border-radius: 0.2rem;
  cursor: pointer;
  opacity: 0.7;
}
.global-filter-history-item-remove:hover {
  color: var(--bs-danger);
  opacity: 1;
}
.global-filter-history-item:hover .global-filter-history-item-remove {
  opacity: 1;
}
.global-filter-history-empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-muted, #6c757d);
}

.table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
}
.table td {
  padding: 0.75rem 1rem;
}

#projects-thead th.project-category-col,
#projects-list td.project-category-col {
  min-width: 120px;
}
#projects-list td.project-category-inherited .project-category-select {
  color: var(--color-text-muted);
}
#projects-list td.project-category-inherited .project-category-select:focus {
  color: var(--color-text);
}

/* Project list drag-and-drop drop zones */
.project-drop-zone td {
  padding: 0 !important;
  border: none;
  vertical-align: middle;
  line-height: 0;
}
.project-drop-zone .project-drop-zone-inner {
  height: 6px;
  margin: 0;
  background: transparent;
  transition: background 0.15s ease;
}
.project-drop-zone.drag-over .project-drop-zone-inner {
  background: var(--bs-primary);
}

/* Project row as drop target: move under this project */
#projects-list tr[data-project-id].drag-over-project {
  background: color-mix(in srgb, var(--bs-primary) 12%, transparent);
}

/* ------------------------------------------------------------------ */
/* Reporting – total hours summary                                    */
/* ------------------------------------------------------------------ */
.report-total-hours {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Sortable table headers (List.js)                                    */
#report-entries-list th.sort,
#cast-sections th.sort {
  cursor: pointer;
  user-select: none;
}
#report-entries-list th.sort:hover,
#cast-sections th.sort:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

/* ------------------------------------------------------------------ */
/* Mention styling - Nature accents                                    */
/* ------------------------------------------------------------------ */
.mention {
  font-weight: 600;
  border-radius: 4px;
  padding: 0 3px;
}
.mention-person {
  color: var(--color-sky);
}
.mention-project {
  color: var(--color-forest);
}
.mention-tag {
  color: var(--color-amber);
}
.mention-hours {
  color: var(--color-ocean);
}

.mention-percent {
  color: var(--color-ocean);
}

.entry-project-percent-hints {
  min-height: 0;
}

.entry-percent-badge {
  font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* Mention autocomplete dropdown                                      */
/* ------------------------------------------------------------------ */
.mention-wrapper {
  position: relative;
}
.mention-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 1050;
  max-height: 200px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--bs-border-radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.mention-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
}
.mention-item:hover,
.mention-item.active {
  background-color: rgba(26, 159, 77, 0.08);
}

/* ------------------------------------------------------------------ */
/* Logo                                                                */
/* ------------------------------------------------------------------ */
.app-logo-nav {
  display: block;
  background: transparent !important;
}
.auth-logo {
  height: 64px;
  width: auto;
}

/* ------------------------------------------------------------------ */
/* Navbar tweaks                                                      */
/* ------------------------------------------------------------------ */
.navbar-brand {
  font-weight: 600;
}
.navbar-brand img {
  vertical-align: middle;
}

/* ------------------------------------------------------------------ */
/* Auth pages (login, signup)                                          */
/* ------------------------------------------------------------------ */
body.bg-light {
  background-color: var(--color-bg) !important;
}
body.bg-light .card {
  background: var(--color-surface);
  border-color: var(--color-border);
}
body.bg-light .form-control {
  border-color: var(--color-border);
}
body.bg-light a {
  color: var(--color-sky);
}
body.bg-light a:hover {
  color: var(--color-ocean);
}

/* ------------------------------------------------------------------ */
/* Ref count badge (projects, people, tags)                            */
/* ------------------------------------------------------------------ */
.ref-count-badge {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}
.ref-count-badge:hover {
  color: var(--color-sky);
  border-color: var(--color-sky);
  background: rgba(2, 132, 199, 0.06);
}

/* ------------------------------------------------------------------ */
/* Badges (People type)                                                */
/* ------------------------------------------------------------------ */
.badge.bg-primary {
  background-color: var(--color-sky) !important;
}
.badge.bg-secondary {
  background-color: var(--color-text-muted) !important;
}

/* ------------------------------------------------------------------ */
/* Alerts                                                              */
/* ------------------------------------------------------------------ */
.alert-danger {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.alert-success {
  background-color: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

/* ------------------------------------------------------------------ */
/* Modals                                                              */
/* ------------------------------------------------------------------ */
.modal-content {
  border: 1px solid var(--color-border);
  border-radius: var(--bs-border-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ------------------------------------------------------------------ */
/* Tab content breathing room                                         */
/* ------------------------------------------------------------------ */
.tab-content {
  padding-bottom: 2rem;
}

/* ------------------------------------------------------------------ */
/* Reporting: left rail and selected state                              */
/* ------------------------------------------------------------------ */
#report-views-list .report-view-item.active {
  background-color: rgba(26, 159, 77, 0.12);
  color: var(--color-forest);
  font-weight: 500;
}
#report-views-list .report-view-item:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.04);
}

/* ------------------------------------------------------------------ */
/* Reporting placeholder                                               */
/* ------------------------------------------------------------------ */
#reporting-panel .display-1 {
  color: var(--color-border) !important;
}

#report-pie-chart {
  height: 360px;
}

@media (max-width: 767.98px) {
  #report-pie-chart {
    height: 260px;
  }
}

/* Goals progress: chevron rotates when row expanded */
.goal-progress-chevron.goal-chevron-expanded,
.goal-list-chevron.goal-chevron-expanded {
  display: inline-block;
  transform: rotate(90deg);
}

/* Goals progress entries: Date and Hours/% shrink, Description uses remaining space */
.goals-progress-entries-table {
  table-layout: fixed;
  width: 100%;
}
.goals-progress-entries-table th:nth-child(1),
.goals-progress-entries-table td:nth-child(1) {
  width: 4.5em;
}
.goals-progress-entries-table th:nth-child(2),
.goals-progress-entries-table td:nth-child(2) {
  width: 6em;
}

/* ------------------------------------------------------------------ */
/* Timeline page: section titles and day labels                       */
/* ------------------------------------------------------------------ */
.timeline-section--upcoming .timeline-section-title,
.timeline-section--recent .timeline-section-title {
  font-size: 1.1rem;
}
.timeline-section-title-toggle {
  user-select: none;
}
.timeline-section-chevron {
  transition: transform 0.2s ease;
}
.timeline-section:has(.collapse.show) .timeline-section-chevron {
  transform: rotate(90deg);
}
.timeline-day-group .timeline-day-label {
  font-size: 0.75rem;
}
.timeline-day-hours {
  text-transform: none;
  font-weight: var(--bs-body-font-weight);
}
.timeline-section-divider {
  margin: 1.25rem 0;
  border: 0;
  border-top: 2px solid var(--color-border);
}

/* iOS-style swipe affordance on timeline rows */
.timeline-item {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.timeline-item-main {
  position: relative;
  z-index: 2;
  background: var(--bs-list-group-bg);
  padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);
  touch-action: pan-y;
}
.timeline-item-actions {
  opacity: 0.8;
}
.timeline-item:hover .timeline-item-actions {
  opacity: 1;
}
.timeline-swipe-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transition: opacity 0.08s linear;
  pointer-events: none;
  z-index: 1;
}
.timeline-swipe-bg-delay {
  justify-content: flex-start;
  background: #0d6efd;
}
.timeline-swipe-bg-delete {
  justify-content: flex-end;
  background: #dc3545;
}
.timeline-item.swiping-right .timeline-swipe-bg-delay {
  opacity: 1;
}
.timeline-item.swiping-left .timeline-swipe-bg-delete {
  opacity: 1;
}
