#preloader {
  --preloader-progress: 0%;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 2147483647;
  background:
    radial-gradient(circle at 16% 20%, rgba(56, 189, 248, 0.22), transparent 46%),
    radial-gradient(circle at 84% 78%, rgba(59, 130, 246, 0.2), transparent 44%),
    linear-gradient(155deg, var(--bg, #f5f8ff) 0%, var(--bg-elevated, #ffffff) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#preloader::before,
#preloader::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  animation: preloader-float 4.2s ease-in-out infinite;
}

#preloader::before {
  width: 240px;
  height: 240px;
  left: -70px;
  top: -65px;
  background: rgba(14, 165, 233, 0.24);
}

#preloader::after {
  width: 280px;
  height: 280px;
  right: -90px;
  bottom: -90px;
  background: rgba(59, 130, 246, 0.2);
  animation-delay: -2.1s;
}

#spinner {
  position: relative;
  width: 156px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  animation: preloader-logo-breathe 1.45s ease-in-out infinite;
}

#spinner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/CC_LLC.png") center / contain no-repeat;
  filter: grayscale(1) brightness(1.35);
  opacity: 0.24;
}

#spinner > img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: inset(calc(100% - var(--preloader-progress, 0%)) 0 0 0);
  filter: drop-shadow(0 10px 22px rgba(14, 165, 233, 0.32));
  transition: clip-path 90ms linear;
}

#preloader-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(100%, 24rem);
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-align: center;
}

.preloader-copy {
  max-width: 18rem;
  color: rgba(226, 232, 240, 0.84);
  font-size: 0.97rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.preloader-copy.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.preloader-copy strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #f8fafc;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

@keyframes preloader-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(10px, -8px, 0);
  }
}

body.preloader-complete #preloader {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@keyframes preloader-logo-breathe {
  0%,
  100% {
    transform: scale(0.98);
  }

  50% {
    transform: scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  #spinner,
  #preloader::before,
  #preloader::after {
    animation: none;
  }
}

body.preloader-active #preloader {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
}

body.preloader-active {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  #spinner {
    width: 126px;
  }

  #preloader-shell {
    width: min(100%, 20rem);
  }
}

/* Login Stuff */
.login-form,
.register-form,
.reset-form {
  display: none;
}

#content {
  opacity: 1;
  visibility: visible;
}

body:not(.preloader-complete) #preloader ~ #content {
  opacity: 0;
  visibility: hidden;
}

body.preloader-complete #content {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease;
}

body:not(.preloader-complete) nav.navbar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.avatar-icon {
  width: 40px;
  height: 40px;
}

/** Task Stuff **/

.card {
  border: 1px solid var(--border);
  background-color: var(--bg-elevated);
  color: var(--fg);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.profile-card-shell {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.profile-hero {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(32, 201, 151, 0.12));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.profile-identity {
  min-width: 0;
}

.profile-hero .profile-email {
  color: var(--muted, #6c757d);
}

.profile-avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  background: var(--bg-elevated);
}

.profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-panel {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.profile-avatar-sm {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.profile-form .form-control,
.profile-form-inline .form-check-input {
  background-color: var(--bg);
  border-color: var(--border);
}

.profile-form .form-control:focus,
.profile-form-inline .form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

.profile-actions {
  justify-content: flex-end;
}

.profile-page {
  max-width: 1200px;
}

.profile-panel h6 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--muted, #6c757d);
}

.profile-panel .section-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-meta dt {
  font-weight: 600;
  color: var(--muted, #6c757d);
}

.profile-meta dd {
  font-size: 1rem;
}

.badge-soft {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
  border: 1px solid rgba(13, 110, 253, 0.2);
  font-weight: 600;
}

.badge-soft.success {
  background: rgba(32, 201, 151, 0.14);
  color: #198754;
  border-color: rgba(32, 201, 151, 0.3);
}

@media (max-width: 992px) {
  .profile-card-shell {
    border-radius: 18px;
  }

  .profile-hero {
    padding: 20px;
  }

  .profile-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .profile-hero {
    text-align: center;
    align-items: center;
  }

  .profile-hero .profile-email {
    justify-content: center;
  }

  .profile-actions {
    justify-content: center;
  }

  .profile-panel {
    padding: 16px;
  }
}

@media (max-width: 576px) {
  .profile-card-shell .card-body {
    padding: 18px;
  }

  .profile-avatar-lg {
    width: 80px;
    height: 80px;
  }

  .profile-hero h2 {
    font-size: 1.4rem;
  }
}

.card-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
  /* Darker color for the title */
}

.card-text {
  font-size: 14px;
  color: #777;
}

.task-card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease-in-out;
  border-radius: 10px;
  /* Rounded corners */
}

.task-card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  /* Hover effect */
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  /* Make sure the card-body takes full height */
  position: relative;
  padding: 20px;
}

/*Completed Task stuff */

.completed-task-card {
  background-color: #f4f4f9;
  /* Lighter background for completed tasks */
}

.completion-tiles {
  font-size: 0.8em;
  color: #55a455;
  /* Greenish color for the completion date */
  margin-top: 15px;
}

/* Note Stuff */
/* Sticky note styling */
.sticky-note-card {
  position: relative;
  background: var(--note-bg, #fff8b8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  height: 100%;
  min-height: 220px;
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collaborator-chip {
  background: #f8f9fa;
  border-color: #e1e6eb !important;
  color: #0d1b2a;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
}

.sticky-note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.14), 0 6px 14px rgba(0, 0, 0, 0.1);
}

.sticky-note-card .card-header {
  background: transparent;
  border: none;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.sticky-note-card .card-body {
  position: relative;
  flex: 1;
  z-index: 2;
  background: transparent;
}

.category-group .card-container,
.category-group .sticky-note-card {
  height: 100%;
}

.sticky-yellow {
  --note-bg: #fff6b3;
}

.sticky-blue {
  --note-bg: #d8ecff;
}

.sticky-pink {
  --note-bg: #ffe0ef;
}

.sticky-green {
  --note-bg: #ddf8e8;
}

.sticky-purple {
  --note-bg: #efe2ff;
}

.sticky-orange {
  --note-bg: #ffe6cc;
}

.sticky-mint {
  --note-bg: #e3fff5;
}

/* Preserve sticky note styling in dark mode */
body.dark-mode .sticky-note-card {
  background: var(--note-bg, #fff8b8) !important;
  color: #1f2933 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22), 0 4px 10px rgba(0, 0, 0, 0.18);
}

.plex-card {
  min-height: calc(var(--dashboard-card-height-unit) * var(--card-height, 1));
  max-height: calc(var(--dashboard-card-height-unit) * var(--card-height, 1));
}

.plex-card .card-body {
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 100%;
}

.plex-feed-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  max-height: calc(300px * var(--card-height, 1));
}

.plex-feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  max-height: calc(300px * var(--card-height, 1));
}

.plex-feed-list .plex-entry + .plex-entry {
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  padding-top: 12px;
}

.plex-feed::-webkit-scrollbar {
  width: 6px;
}

.plex-feed::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb, rgba(0, 0, 0, 0.15));
  border-radius: 10px;
}

/* End Note Stuff */
.date-container {
  display: flex;
  /* Make the children sit side-by-side */
  justify-content: space-between;
  /* Distribute space between children equally */
  background-color: #f5f5f5;
  /* Light gray background color */
  padding: 8px;
  /* Some padding around the text */
  border-radius: 4px;
  /* Rounded corners */
}

/* Counter cards */
.counter-card {
  border: 1px solid var(--border, #e5e7eb);
  background: linear-gradient(145deg, var(--bg-elevated, #ffffff), var(--bg-hover, #f7f9fc));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.counter-card[role="button"] {
  cursor: pointer;
}

.counter-card[role="button"]:focus-visible {
  outline: 3px solid var(--primary, #3498db);
  outline-offset: 2px;
}

.counter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.counter-modal-heading {
  margin: 0;
  font-weight: 800;
  color: var(--fg, #111827);
}

.counter-modal-subtitle {
  color: var(--fg-muted, #6b7280);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.counter-category-pill {
  background: var(--bg-muted, #eef2f7);
  color: var(--fg, #111827);
  padding: 8px 12px;
  font-weight: 700;
}

.counter-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.counter-stat-card {
  background: var(--bg-muted, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 12px;
}

.counter-stat-label {
  color: var(--fg-muted, #6b7280);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.counter-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--fg, #111827);
  line-height: 1.2;
}

.counter-description-block {
  background: var(--bg-muted, #f7f9fc);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.counter-description-text {
  margin: 0;
  color: var(--fg, #111827);
  line-height: 1.5;
}

.counter-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.counter-meta-item {
  background: var(--bg-muted, #f3f4f6);
  border-radius: 10px;
  padding: 10px 12px;
}

.counter-meta-label {
  color: var(--fg-muted, #6b7280);
  font-size: 0.85rem;
}

.counter-meta-value {
  font-weight: 700;
  color: var(--fg, #111827);
}

.counter-updates-section {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, var(--bg-elevated, #ffffff), var(--bg-muted, #f7f9fc));
}

.counter-edit-panel {
  padding: 16px;
}

@media (max-width: 768px) {
  .counter-stat-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .counter-meta-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.counter-card .card-body {
  padding: 16px;
}

.counter-card .card-body > .d-flex > div {
  min-width: 0;
}

.counter-card .card-title,
.counter-card .counter-category-badge {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.counter-card .card-title {
  margin-top: 0.45rem;
  color: var(--fg, #111827);
  font-weight: 700;
  line-height: 1.25;
}

.counter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1);
}

.counter-category-badge {
  background-color: color-mix(in srgb, var(--primary, #2563eb) 10%, var(--bg-elevated, #ffffff));
  color: color-mix(in srgb, var(--primary, #2563eb) 22%, var(--fg, #111827));
  border: 1px solid color-mix(in srgb, var(--primary, #2563eb) 24%, var(--border, #d0d7e2));
  letter-spacing: 0.02em;
  font-weight: 700;
  padding: 6px 10px;
}

.counter-milestone-badge,
#counterMilestoneBadge {
  background-color: color-mix(in srgb, var(--primary, #2563eb) 12%, var(--bg-elevated, #ffffff)) !important;
  color: var(--fg, #111827) !important;
  border: 1px solid color-mix(in srgb, var(--primary, #2563eb) 26%, transparent);
  font-weight: 700;
}

body:is(.light-mode, .theme-light) .counter-category-badge {
  background-color: color-mix(in srgb, var(--primary, #2563eb) 14%, #ffffff);
  color: color-mix(in srgb, var(--primary, #2563eb) 18%, #111827);
  border-color: color-mix(in srgb, var(--primary, #2563eb) 32%, #d0d7e2);
}

body:is(.light-mode, .theme-light) .counter-milestone-badge,
body:is(.light-mode, .theme-light) #counterMilestoneBadge {
  background-color: color-mix(in srgb, var(--primary, #2563eb) 18%, #ffffff) !important;
  color: color-mix(in srgb, var(--primary, #2563eb) 20%, #111827) !important;
  border-color: color-mix(in srgb, var(--primary, #2563eb) 34%, #c7d2fe);
}

.counter-updated {
  background-color: var(--bg-muted, #eef2f7);
  color: var(--fg-muted, #6b7280);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-radius: 999px;
}

.counter-description {
  font-size: 0.9rem;
  color: var(--fg-muted, #6b7280);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.counter-value-panel {
  background-color: var(--bg-muted, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
}

.counter-value-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--fg, #111827);
  line-height: 1.1;
}

.counter-subtext {
  color: var(--fg-muted, #6b7280);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.counter-stat-row {
  margin-top: 10px;
  align-items: center;
}

.counter-stat {
  font-size: 0.9rem;
  color: var(--fg-muted, #6b7280);
}

.counter-trend {
  font-weight: 700;
}

.counter-trend.positive-trend {
  color: var(--success, #2ecc71);
}

.counter-trend.negative-trend {
  color: var(--danger, #e74c3c);
}

.counter-trend.neutral-trend {
  color: var(--fg-muted, #6b7280);
}

.counter-actions .btn {
  border-color: var(--border, #d1d5db);
  color: var(--fg, #111827);
  font-weight: 700;
  min-width: 42px;
  padding: 6px 10px;
}

.counter-actions .btn:hover,
.counter-actions .btn:focus {
  background-color: var(--bg-hover, #e5e7eb);
  color: var(--fg, #111827);
}

.counter-actions .btn:disabled {
  opacity: 0.6;
}

/* Compact counter grid */
.counter-page .category-group > [class*="col-"] {
  display: flex;
}

.counter-page .category-group .card-container {
  display: flex;
  width: 100%;
}

.counter-page .counter-card {
  height: 100%;
  margin-bottom: 0 !important;
  width: 100%;
}

.counter-page .counter-card .card-body {
  display: flex;
  flex-direction: column;
  padding: 17px 18px 16px;
}

.counter-page .counter-card .card-title {
  font-size: 1.08rem;
  margin-top: 0.35rem;
}

.counter-page .counter-card .counter-category-badge,
.counter-page .counter-card .counter-milestone-badge {
  font-size: 0.72rem;
  padding: 5px 9px;
}

.counter-page .counter-card .counter-description {
  font-size: 0.82rem;
  line-height: 1.35;
  margin-bottom: 0.8rem !important;
  max-height: 2.7em;
}

.counter-page .counter-card .counter-value-panel {
  margin: 10px 0;
  padding: 12px 14px;
}

.counter-page .counter-card .counter-value-number {
  font-size: 2.15rem;
  line-height: 1;
}

.counter-page .counter-card .counter-subtext,
.counter-page .counter-card .counter-stat {
  font-size: 0.8rem;
}

.counter-page .counter-card .counter-stat-row {
  margin-top: 9px;
}

.counter-page .counter-card .counter-actions {
  margin-top: 10px;
}

.counter-page .counter-card .counter-actions .text-muted {
  font-size: 0.76rem;
}

.page-content-container {
  padding-top: 1.5rem;
}

.page-title {
  color: var(--fg, #111827);
}

body.dark-mode .page-title {
  color: #e5e7eb;
}

.unified-page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.unified-page-title-wrap {
  width: 100%;
  text-align: center;
}

.unified-page-title-wrap .page-title,
.unified-page-title-wrap h1,
.unified-page-title-wrap h2 {
  margin-bottom: 0;
}

.unified-page-subtitle {
  margin-bottom: 0;
}

.unified-page-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Keep top header action menus above page-level filter controls. */
.unified-page-actions .dropdown {
  position: relative;
  z-index: 1025;
}

.unified-page-actions .dropdown-menu {
  z-index: 1030;
}

:root {
  --app-action-btn-height: 2.25rem;
  --app-action-btn-pad-y: 0.45rem;
  --app-action-btn-pad-x: 0.9rem;
  --app-action-btn-gap: 0.45rem;
  --app-action-btn-radius: var(--app-filter-toggle-radius, var(--bs-border-radius, 0.375rem));
  --app-action-btn-font-size: 0.95rem;
}

.btn.app-action-btn {
  min-width: 9rem;
  min-height: var(--app-action-btn-height) !important;
  padding: var(--app-action-btn-pad-y) var(--app-action-btn-pad-x) !important;
  border-width: 1px !important;
  border-style: solid;
  border-radius: var(--app-action-btn-radius) !important;
  font-size: var(--app-action-btn-font-size) !important;
  font-weight: 500;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--app-action-btn-gap);
  white-space: nowrap;
}

.btn.app-action-btn.mobile-icon-action .action-label {
  display: inline;
}

@media (max-width: 640px) {
  .unified-page-header {
    gap: 1rem;
  }

  .unified-page-actions {
    justify-content: center;
    align-items: center;
  }

  .unified-page-actions > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .unified-page-actions .dropdown-menu {
    max-width: min(320px, calc(100vw - 16px));
  }

  .unified-page-actions .btn.app-action-btn.mobile-icon-action {
    min-width: 2.35rem !important;
    width: 2.35rem !important;
    min-height: 2.35rem !important;
    padding: 0.45rem !important;
    gap: 0 !important;
    flex: 0 0 auto;
  }

  .unified-page-actions .btn.app-action-btn.mobile-icon-action .action-label {
    display: none;
  }

  .unified-page-actions .btn.app-action-btn.mobile-icon-action.dropdown-toggle::after {
    display: none;
  }

}

.btn.app-action-btn[class*="-filter-toggle"] {
  min-width: 9rem;
}

.btn.app-action-btn[class*="-filter-toggle"],
.btn.mobile-task-toolbar-btn {
  min-height: var(--app-action-btn-height) !important;
  padding: var(--app-action-btn-pad-y) var(--app-action-btn-pad-x) !important;
  border-width: 1px !important;
  border-style: solid;
  border-radius: var(--app-action-btn-radius) !important;
  font-size: var(--app-action-btn-font-size) !important;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: var(--app-action-btn-gap);
}

:root {
  --app-filter-panel-width: 420px;
  --app-filter-panel-radius: 16px;
  --app-filter-panel-padding: 14px;
  --app-filter-panel-bg: var(--bg-elevated, #ffffff);
  --app-filter-panel-surface: var(--bg-muted, #f5f7fb);
  --app-filter-panel-text: var(--fg, #111827);
  --app-filter-panel-muted: var(--fg-muted, #6b7280);
  --app-filter-panel-border: var(--border, #d0d7de);
  --app-filter-panel-hover: var(--bg-hover, rgba(0, 0, 0, 0.06));
  --app-filter-panel-accent: var(--primary, #4f79ff);
  --app-filter-panel-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

:is(.event-filter-toggle, .activity-filter-toggle, .grocery-filter-toggle, .recipe-filter-toggle, .transaction-filter-toggle, .counter-filter-toggle, .task-filter-toggle, .time-filter-toggle, #partFilterToggle) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--app-filter-toggle-radius, 0.375rem);
  padding: 0.45rem 0.9rem;
}

:is(.event-filter-count, .activity-filter-count, .grocery-filter-count, .recipe-filter-count, .transaction-filter-count, .counter-filter-count, .task-filter-count, .time-filter-count, .inv-filter-count) {
  background: var(--app-filter-panel-accent) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 2px 8px !important;
  font-size: 0.75rem !important;
  line-height: 1 !important;
  min-width: 1.2rem;
  min-height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

:is(.event-filter-panel, .activity-filter-panel, .grocery-filter-panel, .recipe-filter-panel, .transaction-filter-panel, .counter-filter-panel, .task-filter-panel, .inv-filter-panel) {
  width: min(var(--app-filter-panel-width), 92vw) !important;
}

:is(.event-filter-panel, .activity-filter-panel, .grocery-filter-panel, .recipe-filter-panel, .transaction-filter-panel, .counter-filter-panel, .task-filter-panel, .time-filter-panel, .inv-filter-panel, #mobileTaskFilterMenu) {
  background: var(--app-filter-panel-bg) !important;
  color: var(--app-filter-panel-text) !important;
  border: 1px solid var(--app-filter-panel-border) !important;
  border-radius: var(--app-filter-panel-radius) !important;
  box-shadow: var(--app-filter-panel-shadow) !important;
  padding: var(--app-filter-panel-padding) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  max-height: min(78vh, 760px) !important;
  overscroll-behavior: contain;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

:is(.event-filter-panel.open, .activity-filter-panel.open, .grocery-filter-panel.open, .recipe-filter-panel.open, .transaction-filter-panel.open, .counter-filter-panel.open, .task-filter-panel.open, .time-filter-panel.open) {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

:is(.event-filter-section, .activity-filter-section, .grocery-filter-section, .recipe-filter-section, .transaction-filter-section, .counter-filter-section, .task-filter-section, .mobile-task-filter-section, .inv-filter-section) {
  margin-bottom: 12px;
}

:is(.event-filter-title, .activity-filter-title, .grocery-filter-title, .recipe-filter-title, .transaction-filter-title, .counter-filter-title, .task-filter-title, .mobile-task-filter-label, .inv-filter-title) {
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
  color: var(--app-filter-panel-text) !important;
}

:is(.event-filter-search-inline, .activity-filter-search-inline, .grocery-filter-search-inline, .recipe-filter-search-inline, .counter-filter-search-inline, .task-filter-search-inline, .mobile-task-search-inline, .inv-filter-search-inline) {
  display: flex;
  align-items: center;
  gap: 8px;
}

:is(.event-filter-list, .activity-filter-list, .counter-filter-list, .task-filter-list, .transaction-filter-list) {
  max-height: 200px !important;
  overflow-y: auto !important;
  border: 1px solid var(--app-filter-panel-border) !important;
  border-radius: 10px !important;
  padding: 6px !important;
  background: var(--app-filter-panel-surface) !important;
}

:is(.event-filter-item, .activity-filter-item, .counter-filter-item, .task-filter-item, .transaction-filter-item) {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
}

:is(.event-filter-item:hover, .activity-filter-item:hover, .counter-filter-item:hover, .task-filter-item:hover, .transaction-filter-item:hover) {
  background: var(--app-filter-panel-hover) !important;
}

:is(.event-filter-grid, .activity-filter-grid, .transaction-filter-grid, .task-filter-grid) {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

:is(.event-filter-pill, .activity-filter-pill, .recipe-filter-pill, .transaction-filter-pill, .task-filter-pill) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--app-filter-panel-surface) !important;
  border: 1px solid var(--app-filter-panel-border) !important;
  font-size: 0.85rem;
}

:is(.event-filter-actions, .activity-filter-actions, .grocery-filter-actions, .recipe-filter-actions, .transaction-filter-actions, .counter-filter-actions, .task-filter-actions, .time-filter-actions) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  flex-shrink: 0;
  padding-top: 12px !important;
  margin-top: 4px !important;
  border-top: 1px solid var(--app-filter-panel-border) !important;
  background: transparent !important;
}

:is(.event-filter-panel, .activity-filter-panel, .grocery-filter-panel, .recipe-filter-panel, .transaction-filter-panel, .counter-filter-panel, .task-filter-panel, .time-filter-panel, .inv-filter-panel, #mobileTaskFilterMenu) .form-control,
:is(.event-filter-panel, .activity-filter-panel, .grocery-filter-panel, .recipe-filter-panel, .transaction-filter-panel, .counter-filter-panel, .task-filter-panel, .time-filter-panel, .inv-filter-panel, #mobileTaskFilterMenu) .form-select,
:is(.event-filter-panel, .activity-filter-panel, .grocery-filter-panel, .recipe-filter-panel, .transaction-filter-panel, .counter-filter-panel, .task-filter-panel, .time-filter-panel, .inv-filter-panel, #mobileTaskFilterMenu) .form-check-input {
  background: var(--app-filter-panel-bg) !important;
  color: var(--app-filter-panel-text) !important;
  border-color: var(--app-filter-panel-border) !important;
}

:is(.event-filter-panel, .activity-filter-panel, .grocery-filter-panel, .recipe-filter-panel, .transaction-filter-panel, .counter-filter-panel, .task-filter-panel, .time-filter-panel, .inv-filter-panel, #mobileTaskFilterMenu) .form-control::placeholder {
  color: var(--app-filter-panel-muted) !important;
}

:is(.event-filter-panel, .activity-filter-panel, .grocery-filter-panel, .recipe-filter-panel, .transaction-filter-panel, .counter-filter-panel, .task-filter-panel, .time-filter-panel, .inv-filter-panel, #mobileTaskFilterMenu) .form-check-input:checked {
  background-color: var(--app-filter-panel-accent) !important;
  border-color: var(--app-filter-panel-accent) !important;
}

body:is(.task-page, .activity-page, .counter-page, .event-page, .budget-page) :is(.event-filter-panel, .activity-filter-panel, .counter-filter-panel, .task-filter-panel, .transaction-filter-panel, .mobile-task-filter-menu, .mobile-task-flyout-menu) {
  background: #1a1f26 !important;
  color: #e6e9ef !important;
  border-color: #2e3642 !important;
}

body:is(.task-page, .activity-page, .counter-page, .event-page, .budget-page) :is(.event-filter-panel, .activity-filter-panel, .counter-filter-panel, .task-filter-panel, .transaction-filter-panel, .mobile-task-filter-menu, .mobile-task-flyout-menu) .form-control,
body:is(.task-page, .activity-page, .counter-page, .event-page, .budget-page) :is(.event-filter-panel, .activity-filter-panel, .counter-filter-panel, .task-filter-panel, .transaction-filter-panel, .mobile-task-filter-menu, .mobile-task-flyout-menu) .form-select,
body:is(.task-page, .activity-page, .counter-page, .event-page, .budget-page) :is(.event-filter-panel, .activity-filter-panel, .counter-filter-panel, .task-filter-panel, .transaction-filter-panel, .mobile-task-filter-menu, .mobile-task-flyout-menu) .form-check-input {
  background-color: #1a1f26 !important;
  color: #e6e9ef !important;
  border-color: #2e3642 !important;
}

body:is(.task-page, .activity-page, .counter-page, .event-page, .budget-page) :is(.event-filter-panel, .activity-filter-panel, .counter-filter-panel, .task-filter-panel, .transaction-filter-panel, .mobile-task-filter-menu, .mobile-task-flyout-menu) .form-control::placeholder {
  color: #9fb2c3 !important;
}

body:is(.task-page, .activity-page, .counter-page, .event-page, .budget-page) :is(.event-filter-panel, .activity-filter-panel, .counter-filter-panel, .task-filter-panel, .transaction-filter-panel, .mobile-task-filter-menu, .mobile-task-flyout-menu) .form-check-input:checked {
  background-color: #5b8dff !important;
  border-color: #5b8dff !important;
}

:is(.app-filter-clear-btn, .app-filter-done-btn) {
  min-width: 7rem;
  justify-content: center;
}

#mobileTaskFilterDoneBtn {
  margin: 4px calc(-1 * var(--app-filter-panel-padding)) calc(-1 * var(--app-filter-panel-padding));
  border: 0;
  border-top: 1px solid var(--app-filter-panel-border) !important;
  border-radius: 0 0 var(--app-filter-panel-radius) var(--app-filter-panel-radius);
  background: var(--app-filter-panel-accent);
  color: #fff;
  font-weight: 600;
  justify-content: center;
}

#mobileTaskFilterDoneBtn:hover,
#mobileTaskFilterDoneBtn:focus-visible {
  background: color-mix(in srgb, var(--app-filter-panel-accent) 88%, black 12%);
}

@media (max-width: 640px) {
  :is(.event-filter-panel, .activity-filter-panel, .grocery-filter-panel, .recipe-filter-panel, .transaction-filter-panel, .counter-filter-panel, .time-filter-panel, .inv-filter-panel, #mobileTaskFilterMenu) {
    position: fixed !important;
    left: 50vw !important;
    right: auto !important;
    top: 50dvh !important;
    width: min(var(--app-filter-panel-width), calc(var(--app-scaled-viewport-width, 100vw) - 16px)) !important;
    max-width: calc(var(--app-scaled-viewport-width, 100vw) - 16px) !important;
    max-height: calc(var(--app-scaled-viewport-height, 100dvh) - 16px) !important;
    transform: translate(-50%, -50%) !important;
    box-sizing: border-box !important;
  }

  .time-filter-panel {
    width: min(820px, calc(var(--app-scaled-viewport-width, 100vw) - 16px)) !important;
  }
}

body.dark-mode .date-container {
  background-color: #1f2933;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.floating-add-btn {
  position: fixed;
  right: 24px;
  bottom: calc(24px + var(--app-safe-area-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  z-index: 1040;
}

body.dark-mode .floating-add-btn {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body.dark-mode .btn-close {
  filter: invert(1) grayscale(100%);
  opacity: 0.85;
}

body.dark-mode .btn-close:hover,
body.dark-mode .btn-close:focus {
  opacity: 1;
}

.text-center {
  text-align: center;
}

.description {
  margin-bottom: 10px;
  /* Space between description and due date */
  font-size: 0.9em;
  color: #555;
  /* Lighter color for the description */
}

.due-date-tiles {
  font-size: 0.8em;
  color: #777;
  /* Lighter color for the due date */
  margin-top: 15px;
}

.view-details {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.view-details:hover {
  color: #2176bd;
}

#taskDescription {
  word-wrap: break-word;
}

.task-dropdown .btn-outline-secondary {
  width: 100%;
  /* Make the button fill the card footer */
  text-align: left;
  /* Align the status text to the left */
  border-top-left-radius: 0;
  /* Make the button corners match the card */
  border-top-right-radius: 0;
}

/* Quote card */
.quote-card .card {
  background: linear-gradient(135deg, #fffef9, #f5f9ff);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.quote-card .quote-text {
  font-size: 1.05rem;
  font-style: italic;
  color: #1f2a44;
  line-height: 1.5;
}

.quote-card .quote-source {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Klipy GIF card */
.klipy-gif-card .card {
  background: linear-gradient(135deg, #fff6f6, #f3fff8);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.klipy-gif-card .card-body {
  gap: 0.75rem;
  justify-content: flex-start;
  min-height: 0;
}

.klipy-gif-card .klipy-gif-header {
  padding-right: 2.75rem;
}

.klipy-gif-card .klipy-gif-controls {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
}

.klipy-gif-card .klipy-gif-control {
  min-width: 0;
  width: 100%;
}

.klipy-gif-card .klipy-gif-controls .btn {
  white-space: nowrap;
}

.klipy-gif-card .klipy-gif-control .form-control {
  min-width: 0;
}

@media (max-width: 576px) {
  .klipy-gif-card .klipy-gif-controls {
    grid-template-columns: 1fr;
  }
}

.klipy-gif-card .klipy-gif-frame {
  flex: 1 1 160px;
  min-height: 140px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.klipy-gif-card .klipy-gif-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

.klipy-gif-card .klipy-gif-status {
  text-align: center;
  padding: 0.5rem;
}


.task-dropdown .dropdown-toggle::after {
  float: right;
  /* Position the dropdown arrow on the right */
}

.task-dropdown .btn-success {
  width: 100%;
  /* Make the button fill the card footer */
  text-align: left;
  /* Align the status text to the left */
  border-top-left-radius: 0;
  /* Make the button corners match the card */
  border-top-right-radius: 0;
  color: white;
  /* Text color for the button */
}

/*Event Stuff */
.countdown-display {
  display: grid;
  grid-template-rows: repeat(2, auto);
  /* Two rows: one for values, one for labels */
  grid-template-columns: repeat(4, 1fr);
  /* Four columns: days, hours, minutes, seconds */
}

.time-unit.values,
.time-unit.labels {
  display: contents;
  /* This makes the parent div kind of "disappear" and only its children are laid out in the grid. */
}

.days-value,
.hours-value,
.minutes-value,
.seconds-value,
.time-label {
  text-align: center;
  /* Centers the text within each grid cell */
  padding: 5px;
  /* Add some space around each item */
}

/*End Event Stuff */

/*Search Field */
.filter-search-container {
  display: flex;
  justify-content: flex-start;
  /* If you want them to spread out across the container */
  align-items: center;
  /* Vertically centers the items in the container */
  flex-wrap: nowrap;
  gap: 1.5rem;
}

.events-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.filter-search-wrapper {
  flex: 1 1 0;
  min-width: 280px;
}

.minimized-toggle-wrapper {
  flex: 0 0 auto;
  align-self: flex-start;
}

.minimized-toggle-wrapper .btn {
  white-space: nowrap;
}

.filter-container {
  position: relative;
  /* Set position context for dropdown */
  display: flex;
  align-items: center;
}

.search-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 40px;
  /* Adjust this if needed */
  height: 40px;
  overflow: hidden;
  transition: width 0.5s;
  margin-bottom: 0;
}

.search-input {
  width: 100%;
  height: 100%;
  border: 1px solid #ccc;
  padding: 5px 10px 5px 40px;
  border-radius: 20px;
  background-color: white;
  opacity: 0;
  transition: opacity 0.5s;
}

.expanded {
  width: 200px;
}

.expanded .search-input {
  opacity: 1;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  z-index: 2;
  font-size: 24px;
  width: 30px;
  height: 30px;
}

.x-icon {
  position: absolute;
  top: 50%;
  right: 10px;
  /* Adjust this to position the X icon at the desired location within the search input */
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  z-index: 3;
  /* Ensure this is above the other elements */
  font-size: 24px;
  /* Adjust this to change the size of the X icon */
}

/*End Search Stuff */

/* Start Filter Stuff */
.dropdown-container {
  position: absolute;
  top: 100%;
  left: 0;
  /* Align it with the start of the filter-container */
  z-index: 10;
  width: 250px;
  transition: 0.3s ease-out;
  margin-top: -29px;
  margin-left: 40px;
}

.category-filter {
  margin-left: 10px;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 5px;
  border: 1px solid #ccc;
  margin-bottom: 15px;
  border-radius: 20px;
}

#categoryFilter {
  width: 100%;
  height: 40px;
  /* you might need to adjust this based on your needs */
  border: 1px solid #ccc;
  padding: 5px 10px;
  border-radius: 20px;
  background-color: white;
  font-size: 16px;
  /* adjust if needed */
  -webkit-appearance: none;
  /* to remove default appearance on WebKit browsers */
  -moz-appearance: none;
  /* to remove default appearance on Firefox */
  appearance: none;
  /* for other browsers */
  cursor: pointer;
  margin-top: 5px;
}

.category-name {
  display: none;
}

.counter-filter-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 1011;
}

.counter-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--app-filter-toggle-radius, 0.375rem);
  padding: 0.45rem 0.9rem;
}

.counter-filter-count {
  background: var(--primary, #3498db);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  line-height: 1;
}

.counter-filter-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(360px, 90vw);
  background: var(--bg-elevated, #ffffff);
  color: var(--fg, #111827);
  border: 1px solid var(--border, #d0d7de);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  padding: 14px;
  display: none;
  z-index: 1020;
}

.counter-filter-panel.open {
  display: block;
}

.counter-filter-section {
  margin-bottom: 12px;
}

.counter-filter-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg, #111827);
}

.counter-filter-search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.counter-filter-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border, #d0d7de);
  border-radius: 10px;
  padding: 6px;
  background: var(--bg-muted, #f5f7fb);
}

.counter-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
}

.counter-filter-item:hover {
  background: var(--bg-hover, #eef2f7);
}

.counter-filter-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border, #d0d7de);
  padding-top: 10px;
}

.counter-filter-panel .form-control,
.counter-filter-panel .form-select,
.counter-filter-panel .form-check-input {
  background-color: var(--bg-elevated, #ffffff);
  border-color: var(--border, #d0d7de);
  color: var(--fg, #111827);
}

.counter-filter-panel .form-control::placeholder {
  color: var(--fg-muted, #6b7280);
}

.counter-filter-panel .form-check-input:checked {
  background-color: var(--primary, #3498db);
  border-color: var(--primary, #3498db);
}

@media (max-width: 640px) {
  .filter-search-container {
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 0 auto 0.8rem;
  }

  .filter-search-container .counter-filter-wrapper {
    margin-left: auto;
    margin-right: auto;
  }

  .counter-filter-panel {
    position: fixed;
    left: 50vw;
    right: auto;
    top: 50dvh;
    transform: translate(-50%, -50%);
    width: min(360px, calc(var(--app-scaled-viewport-width, 100vw) - 16px));
    max-width: calc(var(--app-scaled-viewport-width, 100vw) - 16px);
    max-height: calc(var(--app-scaled-viewport-height, 100dvh) - 16px);
    overflow-y: auto;
    box-sizing: border-box;
  }
}

/* End Filter Stuff */

.btn-primary {
  background-color: var(--primary, #3498db);
  border-color: var(--primary, #3498db);
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover, #2176bd);
  border-color: var(--primary-hover, #2176bd);
}

.btn-danger {
  background-color: #e74c3c;
  border-color: #e74c3c;
  transition: background-color 0.3s ease;
}

.btn-danger:hover {
  background-color: #c0392b;
  border-color: #c0392b;
}

.btn-success {
  background-color: #2ecc71;
  border-color: #2ecc71;
  transition: background-color 0.3s ease;
}

.btn-success:hover {
  background-color: #27ae60;
  border-color: #27ae60;
}

/* Modal Styles */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eaeaea;
}

.modal-title {
  margin: 0;
  flex-grow: 1;
  font-weight: 600;
}

#taskNameInput {
  width: 100%;
}

#taskShareButton {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

#taskShareButton img {
  height: 15px;
  width: 15px;
  filter: brightness(0.6);
  transition: filter 0.3s ease;
}

#taskShareButton:hover img {
  filter: brightness(1);
}

#taskDescriptionEdit,
#taskCategoryEdit,
#taskStatusEdit,
#taskDueDateInput {
  margin-top: 10px;
}

#commentsList {
  margin-top: 15px;
}

.comment-entry {
  margin-top: 20px;
}

#addCommentForm textarea {
  margin-bottom: 10px;
}

.modal-body {
  padding: 20px;
}

.modal-body h6 {
  margin-bottom: 10px;
}

.modal-body p {
  margin-bottom: 5px;
}

.modal-body .form-control {
  /* margin-bottom: 10px; */
}

.modal-footer button {
  margin-left: 10px;
}

.modal-footer button:first-child {
  margin-left: 0;
}

.modal-footer .btn-primary {
  background-color: #3498db;
  border-color: #3498db;
  transition: background-color 0.3s ease;
}

.modal-footer .btn-primary:hover {
  background-color: #2176bd;
  border-color: #2176bd;
}

.modal-footer .btn-danger {
  background-color: #e74c3c;
  border-color: #e74c3c;
  transition: background-color 0.3s ease;
}

.modal-footer .btn-danger:hover {
  background-color: #c0392b;
  border-color: #c0392b;
}

.modal-footer .btn-success {
  background-color: #2ecc71;
  border-color: #2ecc71;
  transition: background-color 0.3s ease;
}

.modal-footer .btn-success:hover {
  background-color: #27ae60;
  border-color: #27ae60;
}

.app-record-activity-dialog {
  width: min(920px, calc(var(--app-scaled-viewport-width, 100vw) - 16px));
  max-width: calc(var(--app-scaled-viewport-width, 100vw) - 16px);
  max-height: calc(var(--app-scaled-viewport-height, 100dvh) - 16px);
}

.app-record-activity-dialog .modal-content {
  min-height: min(640px, calc(var(--app-scaled-viewport-height, 100dvh) - 32px));
}

.record-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(420px, calc(var(--app-scaled-viewport-height, 100dvh) - 240px));
  overflow-y: auto;
  padding-right: 0.25rem;
}

.record-activity-item {
  border: 1px solid var(--border, #d6dee8);
  border-radius: 14px;
  background: var(--bg-elevated, #fff);
  padding: 0.85rem 0.95rem;
}

.record-activity-item-title {
  font-weight: 600;
  color: var(--fg, #111827);
}

.record-activity-item-meta {
  font-size: 0.82rem;
  color: var(--fg-muted, #64748b);
  margin-top: 0.15rem;
}

.record-activity-item-body {
  font-size: 0.92rem;
  color: var(--fg, #111827);
  margin-top: 0.5rem;
  white-space: pre-wrap;
}

@media (max-width: 767.98px) {
  .app-record-activity-dialog {
    width: calc(var(--app-scaled-viewport-width, 100vw) - 16px);
    max-width: calc(var(--app-scaled-viewport-width, 100vw) - 16px);
  }

  .app-record-activity-dialog .modal-content {
    min-height: auto;
  }
}

/* -------------------------------------------------------------------------- */
/* Dark Mode                                                                  */
/* -------------------------------------------------------------------------- */

/* Base light palette */
body,
body.light-mode,
body.theme-light {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-hover: #e7edf5;
  --bg-muted: #eef3f8;
  --fg: #111827;
  --fg-muted: #64748b;
  --border: #d6dee8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --success-hover: #15803d;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --warning: #d97706;
  --link: #2563eb;
  --link-hover: #1d4ed8;

  background-color: var(--bg);
  color: var(--fg);
}

/* Base palette */
body.dark-mode {
  --bg: #111418;
  --bg-elevated: #1a1f26;
  --bg-hover: #222832;
  --bg-muted: #191d23;
  --fg: #e6e9ef;
  --fg-muted: #b8bdc7;
  --border: #2e3642;
  --primary: #5b8dff;
  --primary-hover: #3f71e6;
  --success: #4cc38a;
  --success-hover: #36a773;
  --danger: #ff6b81;
  --danger-hover: #ff4d6a;
  --warning: #f6c344;
  --link: #85c2ff;
  --link-hover: #a1d2ff;

  background-color: var(--bg) !important;
  color: var(--fg) !important;
}

body:is(.task-page, .activity-page, .counter-page, .budget-page, .event-page) {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-hover: #e7edf5;
  --bg-muted: #eef3f8;
  --fg: #111827;
  --fg-muted: #64748b;
  --border: #d6dee8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --success-hover: #15803d;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --warning: #d97706;
  --link: #2563eb;
  --link-hover: #1d4ed8;
}

body.theme-dark {
  --bg: #111418;
  --bg-elevated: #1a1f26;
  --bg-hover: #222832;
  --bg-muted: #191d23;
  --fg: #e6e9ef;
  --fg-muted: #b8bdc7;
  --border: #2e3642;
  --primary: #5b8dff;
  --primary-hover: #3f71e6;
  --success: #4cc38a;
  --success-hover: #36a773;
  --danger: #ff6b81;
  --danger-hover: #ff4d6a;
  --warning: #f6c344;
  --link: #85c2ff;
  --link-hover: #a1d2ff;
}

body.theme-forest {
  --bg: #0f1a14;
  --bg-elevated: #16241c;
  --bg-hover: #1d2f23;
  --bg-muted: #122018;
  --fg: #e8f3eb;
  --fg-muted: #b5d0bf;
  --border: #274232;
  --primary: #63c487;
  --primary-hover: #4fa872;
  --success: #7bd37c;
  --success-hover: #61b862;
  --danger: #ff7a8a;
  --danger-hover: #ff5d71;
  --warning: #e8c86c;
  --link: #8bd7aa;
  --link-hover: #a4e5be;
}

body.theme-ocean {
  --bg: #0d1823;
  --bg-elevated: #142536;
  --bg-hover: #1c3144;
  --bg-muted: #112130;
  --fg: #e3f2ff;
  --fg-muted: #b7cbe0;
  --border: #1f3a52;
  --primary: #56b9ff;
  --primary-hover: #3f9eda;
  --success: #4fd4c2;
  --success-hover: #3cb8a8;
  --danger: #ff7d8f;
  --danger-hover: #ff6176;
  --warning: #f1cf6a;
  --link: #7bc8ff;
  --link-hover: #9ad8ff;
}

body.theme-sunset {
  --bg: #1b1317;
  --bg-elevated: #241a21;
  --bg-hover: #2e2028;
  --bg-muted: #20161c;
  --fg: #f6e9ec;
  --fg-muted: #d9c2c9;
  --border: #3e2a31;
  --primary: #ff8fb1;
  --primary-hover: #f27298;
  --success: #f0c674;
  --success-hover: #d8ac58;
  --danger: #ff6b6b;
  --danger-hover: #ff5252;
  --warning: #f7d28c;
  --link: #ffadc6;
  --link-hover: #ffd1df;
}

body.theme-midnight {
  --bg: #0a0e1a;
  --bg-elevated: #11182a;
  --bg-hover: #18223a;
  --bg-muted: #0f1424;
  --fg: #e3e9ff;
  --fg-muted: #b7c2e6;
  --border: #24304a;
  --primary: #6e8dff;
  --primary-hover: #5474e6;
  --success: #4ad1b7;
  --success-hover: #36b29c;
  --danger: #ff6f91;
  --danger-hover: #ff5078;
  --warning: #f0c36a;
  --link: #9fb6ff;
  --link-hover: #c4d1ff;
}

body.theme-sherbert {
  --bg: #201012;
  --bg-elevated: #2a181c;
  --bg-hover: #332024;
  --bg-muted: #261417;
  --fg: #fff2e8;
  --fg-muted: #f0cfc0;
  --border: #3c242a;
  --primary: #ff9f6e;
  --primary-hover: #ff8452;
  --success: #ffd166;
  --success-hover: #f4b94f;
  --danger: #ff7c8a;
  --danger-hover: #ff5e70;
  --warning: #f9d67d;
  --link: #ffb48c;
  --link-hover: #ffd3b5;
}

body.theme-nineties {
  --bg: #0f0d19;
  --bg-elevated: #18162a;
  --bg-hover: #212036;
  --bg-muted: #141224;
  --fg: #e9e4ff;
  --fg-muted: #c1b8f0;
  --border: #312f4a;
  --primary: #6ef2d0;
  --primary-hover: #4fd9b4;
  --success: #8cf27c;
  --success-hover: #6fd35f;
  --danger: #ff7de3;
  --danger-hover: #ff5bcf;
  --warning: #f7dd6f;
  --link: #9df3ff;
  --link-hover: #c4f7ff;
}

body.theme-aurora {
  --bg: #0b1515;
  --bg-elevated: #122020;
  --bg-hover: #1a2a2b;
  --bg-muted: #0f1c1c;
  --fg: #e8fff8;
  --fg-muted: #bde3d8;
  --border: #203633;
  --primary: #65e0c2;
  --primary-hover: #4cc5a8;
  --success: #7de695;
  --success-hover: #5fc777;
  --danger: #ff84a1;
  --danger-hover: #ff6688;
  --warning: #e7d86c;
  --link: #92f7d4;
  --link-hover: #b8ffe6;
}

body.theme-desert {
  --bg: #1a120b;
  --bg-elevated: #24170e;
  --bg-hover: #2d1e14;
  --bg-muted: #1f140c;
  --fg: #f5e6d3;
  --fg-muted: #d8c2a5;
  --border: #3a2515;
  --primary: #d49a6a;
  --primary-hover: #c48154;
  --success: #c2b280;
  --success-hover: #ab9d6d;
  --danger: #e0795d;
  --danger-hover: #c9654b;
  --warning: #e2c178;
  --link: #f1b988;
  --link-hover: #ffd7a7;
}

body.theme-pastel {
  --bg: #141016;
  --bg-elevated: #1c1720;
  --bg-hover: #251f29;
  --bg-muted: #17131a;
  --fg: #f8f4ff;
  --fg-muted: #d6cde6;
  --border: #2f2535;
  --primary: #c7a6ff;
  --primary-hover: #b38fe6;
  --success: #a8e6cf;
  --success-hover: #8bd8b9;
  --danger: #ff9fb3;
  --danger-hover: #ff7f9a;
  --warning: #ffe0a3;
  --link: #b2d7ff;
  --link-hover: #d4e8ff;
}

body.theme-cyberpunk {
  --bg: #0b0a10;
  --bg-elevated: #131226;
  --bg-hover: #1c1a33;
  --bg-muted: #100f1d;
  --fg: #e9e6ff;
  --fg-muted: #b7b2df;
  --border: #2f2a4d;
  --primary: #ff6ac1;
  --primary-hover: #e052a7;
  --success: #4ee3c3;
  --success-hover: #37c6a8;
  --danger: #ff4d6d;
  --danger-hover: #e63a59;
  --warning: #f5d547;
  --link: #7ad7ff;
  --link-hover: #a1e4ff;
}

body.theme-metallic {
  --bg: #202747;
  --bg-elevated: #2b3663;
  --bg-hover: #34467a;
  --bg-muted: #253056;
  --fg: #ede8f5;
  --fg-muted: #c8d2e9;
  --border: #4a5f95;
  --primary: #7091e6;
  --primary-hover: #5a79ce;
  --success: #98ace8;
  --success-hover: #8298d6;
  --danger: #d57f95;
  --danger-hover: #bc6a80;
  --warning: #adbbda;
  --link: #9ab3ff;
  --link-hover: #bccdff;
}

body.theme-vintage {
  --bg: #1f3039;
  --bg-elevated: #244855;
  --bg-hover: #2c5a69;
  --bg-muted: #213f4a;
  --fg: #fbe9d0;
  --fg-muted: #d7c7b2;
  --border: #3e6372;
  --primary: #e64833;
  --primary-hover: #cb3d2b;
  --success: #90aead;
  --success-hover: #799593;
  --danger: #b25f4f;
  --danger-hover: #964f42;
  --warning: #f1b483;
  --link: #9ec9c8;
  --link-hover: #c0e2e1;
}

body.theme-collected {
  --bg: #00282d;
  --bg-elevated: #003135;
  --bg-hover: #024950;
  --bg-muted: #013c43;
  --fg: #afdde5;
  --fg-muted: #8fc8d1;
  --border: #1c646d;
  --primary: #0fa4af;
  --primary-hover: #0b8d96;
  --success: #42bbc4;
  --success-hover: #34a1a9;
  --danger: #964734;
  --danger-hover: #7f3c2c;
  --warning: #d2aa73;
  --link: #64d4dc;
  --link-hover: #92e5ea;
}

body.theme-mechanical {
  --bg: #141619;
  --bg-elevated: #1b1f28;
  --bg-hover: #2c2e3a;
  --bg-muted: #171b23;
  --fg: #e2e5f2;
  --fg-muted: #b3b4bd;
  --border: #3a3f53;
  --primary: #0a21c0;
  --primary-hover: #081a99;
  --success: #3d52d0;
  --success-hover: #3345af;
  --danger: #6875b8;
  --danger-hover: #5663a0;
  --warning: #96a0cb;
  --link: #6f83ff;
  --link-hover: #94a4ff;
}

/* Links */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) a,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .navbar-brand,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-link {
  color: var(--link) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) a:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-link:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-link:focus {
  color: var(--link-hover) !important;
}

/* Text utilities */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .text-muted,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .form-text {
  color: var(--fg-muted) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) hr,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .dropdown-divider {
  border-color: var(--border) !important;
  opacity: 1;
}

/* Containers */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .card,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .list-group-item,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .dropdown-menu,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .modal-content,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .offcanvas,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .accordion-item,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .toast,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .table,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .popover-body {
  background-color: var(--bg-elevated) !important;
  color: var(--fg) !important;
  border-color: var(--border) !important;
  box-shadow: none;
}

/* Preserve sticky note colors over generic card styling in dark mode */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .card.sticky-note-card {
  background: var(--note-bg, #fff8b8) !important;
  color: #1f2933 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22), 0 4px 10px rgba(0, 0, 0, 0.18);
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .card.notebook-line-note {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  color: var(--fg) !important;
  box-shadow: none !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .modal-header,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .modal-footer,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .accordion-button {
  background-color: var(--bg-muted) !important;
  color: var(--fg) !important;
  border-color: var(--border) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .accordion-button:not(.collapsed) {
  background-color: var(--bg-hover) !important;
  color: var(--fg) !important;
  box-shadow: none;
}

/* Navbar */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .navbar,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .navbar.bg-primary,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .navbar.bg-gradient {
  background: var(--bg-muted) !important;
  border-bottom: 1px solid var(--border);
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .dropdown-menu {
  background: var(--bg-elevated, var(--bs-body-bg, #fff)) !important;
  background-color: var(--bg-elevated, var(--bs-body-bg, #fff)) !important;
  background-image: none !important;
  border-color: var(--border) !important;
  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .dropdown-item {
  color: var(--fg) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .dropdown-item:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .dropdown-item:focus,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .dropdown-item.active,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .dropdown-item:active {
  background-color: var(--bg-hover) !important;
  color: var(--fg) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-tabs .nav-link,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-pills .nav-link {
  color: var(--fg) !important;
  border-color: var(--border) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-tabs .nav-link.active,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-pills .nav-link.active,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-pills .show>.nav-link {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

/* Tables */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .table> :not(caption)>*>* {
  color: var(--fg) !important;
  background-color: transparent;
  border-color: var(--border) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .table-striped>tbody>tr:nth-of-type(odd)>* {
  background-color: var(--bg-muted) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .table-hover>tbody>tr:hover>* {
  background-color: var(--bg-hover) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .table thead th {
  background-color: var(--bg-hover) !important;
  color: var(--fg) !important;
}

/* Forms */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .form-control,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .form-select,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .input-group-text,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .form-check-input,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .form-control:focus,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .form-select:focus {
  background-color: var(--bg-muted) !important;
  color: var(--fg) !important;
  border-color: var(--border) !important;
  box-shadow: none;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .form-control::placeholder {
  color: var(--fg-muted) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* Buttons */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn {
  background-color: var(--bg-muted);
  color: var(--fg) !important;
  border-color: var(--border) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn:focus {
  background-color: var(--bg-hover);
  color: var(--fg) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-primary:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-primary:focus {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-success {
  background-color: var(--success) !important;
  border-color: var(--success) !important;
  color: #0b2617 !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-success:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-success:focus {
  background-color: var(--success-hover) !important;
  border-color: var(--success-hover) !important;
  color: #081a11 !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-danger {
  background-color: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-danger:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-danger:focus {
  background-color: var(--danger-hover) !important;
  border-color: var(--danger-hover) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-warning {
  background-color: var(--warning) !important;
  border-color: var(--warning) !important;
  color: #3d2f05 !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-warning:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-warning:focus {
  background-color: #e0ad2f !important;
  border-color: #e0ad2f !important;
  color: #2c2204 !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-secondary {
  background-color: #3b4656 !important;
  border-color: #3b4656 !important;
  color: #f0f3f8 !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-secondary:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-secondary:focus {
  background-color: #313a47 !important;
  border-color: #313a47 !important;
  color: #f0f3f8 !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-light {
  background-color: var(--bg-hover) !important;
  border-color: var(--border) !important;
  color: var(--fg) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-light:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-light:focus {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--fg) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-primary:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-primary:focus {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-secondary,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-light {
  color: var(--fg) !important;
  border-color: var(--border) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-secondary:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-secondary:focus,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-light:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-outline-light:focus {
  background-color: var(--bg-hover) !important;
  border-color: var(--border) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-link {
  color: var(--link) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-link:hover,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .btn-link:focus {
  color: var(--link-hover) !important;
}

/* Badges, alerts, pills */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .badge.bg-light,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .badge.bg-secondary {
  background-color: var(--bg-muted) !important;
  color: var(--fg) !important;
}


body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .alert {
  background-color: var(--bg-muted) !important;
  border-color: var(--border) !important;
  color: var(--fg) !important;
}

/* Misc */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .table-responsive,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .list-group,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .nav-tabs,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .breadcrumb,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .progress {
  background-color: transparent !important;
  color: var(--fg) !important;
  border-color: var(--border) !important;
}

@media (max-width: 640px) {
  .nav-tabs,
  .nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-tabs::-webkit-scrollbar,
  .nav-pills::-webkit-scrollbar {
    display: none;
  }

  .nav-tabs .nav-link,
  .nav-pills .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .pagination .page-link {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border) !important;
  color: var(--fg) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .pagination .page-link:hover {
  background-color: var(--bg-hover) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .badge,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .progress-bar {
  border-color: transparent !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .progress-bar {
  background-color: var(--primary) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .bg-light,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .table-light,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .list-group-item-light {
  background-color: var(--bg-muted) !important;
  color: var(--fg) !important;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .shadow,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .shadow-sm,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .shadow-lg {
  box-shadow: none !important;
}

/* FullCalendar dark theme for the shared dark/themed palettes */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc {
  --fc-page-bg-color: #0f1418;
  --fc-neutral-bg-color: #131a20;
  --fc-neutral-text-color: #b7c0c8;
  --fc-border-color: #22303a;

  --fc-button-text-color: #e6edf3;
  --fc-button-bg-color: #1f2a33;
  --fc-button-border-color: #2a3a46;
  --fc-button-hover-bg-color: #243341;
  --fc-button-hover-border-color: #365063;
  --fc-button-active-bg-color: #2b3b49;
  --fc-button-active-border-color: #4b6a82;

  --fc-today-bg-color: rgba(102, 153, 204, 0.15);

  --fc-event-bg-color: #2a71d0;
  --fc-event-border-color: #2a71d0;
  --fc-event-text-color: #ffffff;
}

/* Grid, toolbar, text tweaks */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc .fc-toolbar-title {
  color: #e6edf3;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc-theme-standard td,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc-theme-standard th {
  border-color: var(--fc-border-color);
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc-col-header-cell-cushion,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc-daygrid-day-number {
  color: #c9d1d9;
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc .fc-daygrid-day.fc-day-today {
  background-color: var(--fc-today-bg-color);
}

/* Keep links readable in dark mode (event titles, day numbers) */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc a {
  color: inherit;
}

/* Month/Week/Day switch buttons look like dark Bootstrap */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc .fc-button {
  background-color: var(--fc-button-bg-color);
  border-color: var(--fc-button-border-color);
  color: var(--fc-button-text-color);
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc .fc-button:hover {
  background-color: var(--fc-button-hover-bg-color);
  border-color: var(--fc-button-hover-border-color);
}

body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc .fc-button.fc-button-active {
  background-color: var(--fc-button-active-bg-color);
  border-color: var(--fc-button-active-border-color);
}

/* Scrollgrid border + bg to match cards */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .fc-theme-standard .fc-scrollgrid {
  border-color: var(--fc-border-color);
  background: var(--fc-page-bg-color);
}

/* Dashboard card header for themed dark palettes */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .card-header {
  background-color: #1b242c;
  /* darker panel header */
  border-bottom: 1px solid #2a3a46;
  color: #e6edf3;
  /* text matches calendar */
}

/* Title text in headers */
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .card-header h6,
body:is(.dark-mode, [class*="theme-"]:not(.theme-light)) .card-header .text-primary {
  color: #c9d1d9 !important;
  /* stop bootstrap from forcing blue */
}

/* Calendar header layout helpers */
.calendar-card .calendar-header {
  gap: 0.75rem;
}

.fc .fc-toolbar-title {
  font-size: 1.25em;
  margin: 0px;
}

/* Quote/GIF cards + dashboard watchlist headers should adapt to every theme */
body.dark-mode .quote-card .card,
body[class*="theme-"]:not(.theme-light) .quote-card .card {
  background: linear-gradient(135deg, var(--bg-muted, #fffef9), var(--bg-elevated, #f5f9ff));
  border-color: var(--border, rgba(0, 0, 0, 0.05));
}

body.dark-mode .quote-card .quote-text,
body[class*="theme-"]:not(.theme-light) .quote-card .quote-text {
  color: var(--fg, #1f2a44) !important;
}

body.dark-mode .quote-card .quote-source,
body[class*="theme-"]:not(.theme-light) .quote-card .quote-source {
  color: var(--fg-muted, #6c757d) !important;
}

body.dark-mode .quote-card strong,
body.dark-mode .quote-card h6,
body[class*="theme-"]:not(.theme-light) .quote-card strong,
body[class*="theme-"]:not(.theme-light) .quote-card h6 {
  color: var(--fg, #1f2a44) !important;
}

body.dark-mode .klipy-gif-card .card,
body[class*="theme-"]:not(.theme-light) .klipy-gif-card .card {
  background: linear-gradient(135deg, var(--bg-muted, #fff6f6), var(--bg-elevated, #f3fff8));
  border-color: var(--border, rgba(0, 0, 0, 0.05));
}

body.dark-mode .klipy-gif-card .klipy-gif-frame,
body[class*="theme-"]:not(.theme-light) .klipy-gif-card .klipy-gif-frame {
  background: var(--bg-elevated, rgba(0, 0, 0, 0.03));
  border-color: var(--border, rgba(0, 0, 0, 0.08));
}

body.dark-mode .klipy-gif-card .klipy-gif-status,
body[class*="theme-"]:not(.theme-light) .klipy-gif-card .klipy-gif-status {
  color: var(--fg-muted, #6c757d) !important;
}

body.dark-mode [data-type="asset_watchlists"] .card-header,
body[class*="theme-"]:not(.theme-light) [data-type="asset_watchlists"] .card-header {
  background-color: var(--bg-muted, #ffffff);
  border-bottom-color: var(--border, #e0e0e0);
  color: var(--fg, inherit);
}

body.dark-mode [data-type="asset_watchlists"] .card-header h6,
body.dark-mode [data-type="asset_watchlists"] .card-header .text-primary,
body[class*="theme-"]:not(.theme-light) [data-type="asset_watchlists"] .card-header h6,
body[class*="theme-"]:not(.theme-light) [data-type="asset_watchlists"] .card-header .text-primary {
  color: var(--fg, #1f2a44) !important;
}

body.dark-mode [data-type="asset_watchlists"] .card-header small,
body.dark-mode [data-type="asset_watchlists"] .card-header .text-muted,
body[class*="theme-"]:not(.theme-light) [data-type="asset_watchlists"] .card-header small,
body[class*="theme-"]:not(.theme-light) [data-type="asset_watchlists"] .card-header .text-muted {
  color: var(--fg-muted, #6c757d) !important;
}

/* Calendar Widget */
body.dark-mode .calendar-card,
body.dark-mode .calendar-card * {
    color: var(--fg) !important;
}

/* Upcoming bills calendar */
.bills-calendar-card .bills-calendar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bills-calendar-card .calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bills-calendar-card .calendar-header-label {
  text-align: center;
}

.bills-calendar-card .calendar-month-label {
  font-weight: 600;
}

.bills-calendar-card .calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #6c757d;
}

body.dark-mode .bills-calendar-card .calendar-weekdays {
  color: rgba(255, 255, 255, 0.6);
}

.bills-calendar-card .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}

.bills-calendar-card .calendar-day {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  padding: 0.35rem 0.45rem;
  min-height: 86px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.dark-mode .bills-calendar-card .calendar-day {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.bills-calendar-card .calendar-day.is-outside {
  opacity: 0.4;
}

.bills-calendar-card .calendar-day.is-today {
  border-color: rgba(13, 110, 253, 0.5);
  box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.2);
}

.bills-calendar-card .calendar-day-number {
  font-weight: 600;
  font-size: 0.8rem;
}

.bills-calendar-card .calendar-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.bills-calendar-card .calendar-event {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.2rem 0.35rem;
  border-radius: 0.35rem;
  font-size: 0.7rem;
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.25);
}

.bills-calendar-card .calendar-event .event-amount {
  white-space: nowrap;
  opacity: 0.8;
}

.bills-calendar-card .calendar-more {
  font-size: 0.7rem;
  color: #6c757d;
}

body.dark-mode .bills-calendar-card .calendar-more {
  color: rgba(255, 255, 255, 0.65);
}

.bills-calendar-card .calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #6c757d;
}

body.dark-mode .bills-calendar-card .calendar-legend {
  color: rgba(255, 255, 255, 0.65);
}

.bills-calendar-card .calendar-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.bills-calendar-card .calendar-legend .legend-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(220, 53, 69, 0.6);
}

@media (max-width: 575.98px) {
  .bills-calendar-card .calendar-day {
    min-height: 72px;
    padding: 0.3rem;
  }

  .bills-calendar-card .calendar-weekdays {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
  }
}

/* Ensure headers inside both cards match the rest of the dashboard */
body.dark-mode .calendar-card .card-title,
body.dark-mode .quote-card .card-title {
    color: var(--fg) !important;
}

@media (max-width: 575.98px) {
  .calendar-card .calendar-header {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-card .calendar-header h6 {
    width: 100%;
    text-align: center;
  }

  .calendar-card .calendar-filters {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .calendar-card .calendar-filters .btn {
    flex: 1 1 calc(50% - 0.5rem);
  }

  .calendar-card .fc .fc-toolbar.fc-header-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  .calendar-card .fc .fc-toolbar-chunk {
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
  }

  .calendar-card .fc .fc-toolbar-chunk:nth-child(2) {
    order: -1;
  }

  .calendar-card .fc .fc-toolbar-chunk:first-child,
  .calendar-card .fc .fc-toolbar-chunk:last-child {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .calendar-card .fc .fc-button-group {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .calendar-card .fc .fc-button-group .fc-button {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 0;
  }

  .calendar-card .fc .fc-toolbar-chunk:first-child .fc-button,
  .calendar-card .fc .fc-toolbar-chunk:last-child .fc-button {
    flex: 1 1 auto;
  }


}

/* -------------------------------------------------------------------------- */
/* Scrollbars                                                                 */
/* -------------------------------------------------------------------------- */

:root {
  --app-filter-toggle-radius: var(--bs-border-radius, 0.375rem);
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(0, 0, 0, 0.2);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.32);
}

body.dark-mode,
body[class*="theme-"]:not(.theme-light) {
  --scrollbar-track: rgba(255, 255, 255, 0.06);
  --scrollbar-thumb: rgba(255, 255, 255, 0.18);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.28);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

/* Global alert toasts */
#app-alert-root {
  position: fixed;
  top: calc(var(--navbar-offset, 72px) + 0.75rem);
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  width: min(360px, 100vw - 2rem);
  max-width: calc(100vw - 2rem);
  z-index: 1200;
  pointer-events: none;
  padding: 0 0.25rem;
}

.app-alert-toast {
  pointer-events: auto;
  width: 100%;
  background: var(--bs-body-bg, #ffffff);
  color: var(--bs-body-color, #0f172a);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 180ms ease, opacity 180ms ease;
  transform: translateY(-6px);
  opacity: 0;
}

.app-alert-toast.app-alert-toast--visible {
  transform: translateY(0);
  opacity: 1;
}

.app-alert-toast.app-alert-toast--closing {
  opacity: 0;
  transform: translateY(-12px);
}

.app-alert-message {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

.app-alert-actions {
  text-align: right;
}

.app-alert-action {
  border: none;
  background: var(--bs-primary, #0d6efd);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
  box-shadow: 0 6px 12px rgba(13, 110, 253, 0.25);
}

.app-alert-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.app-alert-action:focus-visible {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 2px;
}

body.dark-mode .app-alert-toast {
  background: #0f172a;
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

body.dark-mode .app-alert-action {
  background: #c084fc;
  color: #0f172a;
  box-shadow: 0 6px 12px rgba(192, 132, 252, 0.35);
}

@media (max-width: 576px) {
  #app-alert-root {
    right: 0.75rem;
    left: 0.75rem;
    align-items: stretch;
  }
}

/* Keep Quill placeholders readable across every theme */
.quill-editor .ql-editor {
  color: var(--fg, #111827);
}

.quill-editor .ql-editor.ql-blank::before {
  color: var(--fg-muted, #6b7280);
  opacity: 0.8;
}

body.workspace-dialog-open {
  overflow: hidden;
}

.workspace-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(14px);
}

body.light-mode .workspace-dialog-backdrop,
body.theme-light .workspace-dialog-backdrop {
  background: rgba(226, 232, 240, 0.58);
}

.workspace-dialog {
  width: min(100%, 520px);
  border-radius: 20px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  background: var(--bg-elevated, var(--bs-body-bg, #ffffff));
  color: var(--fg, #111827);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  padding: 1.1rem 1.15rem 1rem;
}

body.dark-mode .workspace-dialog {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

.workspace-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.workspace-dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-dialog-message {
  margin-top: 0.35rem;
  color: var(--fg-muted, #64748b);
  font-size: 0.95rem;
  white-space: pre-line;
  line-height: 1.5;
}

.workspace-dialog-close {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-muted, #64748b);
  font-size: 1.5rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.workspace-dialog-close:hover {
  background: rgba(148, 163, 184, 0.12);
}

.workspace-dialog-input-row {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.workspace-dialog-input-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted, #64748b);
}

.workspace-dialog-input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  background: var(--bg, #fff);
  color: var(--fg, #111827);
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  outline: none;
}

.workspace-dialog-input:focus {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.workspace-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.workspace-dialog-button {
  appearance: none;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  background: var(--bg, #fff);
  color: var(--fg, #111827);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.workspace-dialog-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.workspace-dialog-cancel {
  background: transparent;
}

.workspace-dialog-confirm {
  background: var(--accent, #2563eb);
  border-color: var(--accent, #2563eb);
  color: var(--accent-contrast, #fff);
}

.workspace-dialog-confirm-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.workspace-dialog.gdrive-picker-dialog {
  width: min(100%, 760px);
  max-height: min(720px, calc(100vh - 2rem));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gdrive-picker-toolbar {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.gdrive-picker-search {
  min-width: 0;
  flex: 1 1 auto;
}

.gdrive-picker-results {
  display: grid;
  gap: 0.65rem;
  overflow: auto;
  padding-right: 0.15rem;
  max-height: min(420px, 52vh);
}

.gdrive-picker-file {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  border-radius: 12px;
  background: var(--bg, #fff);
  color: var(--fg, #111827);
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.25rem;
  cursor: pointer;
}

.gdrive-picker-file:hover,
.gdrive-picker-file:focus-visible {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.gdrive-picker-file-title {
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.gdrive-picker-file-meta,
.gdrive-picker-empty {
  color: var(--fg-muted, #64748b);
  font-size: 0.86rem;
}

body.dark-mode .gdrive-picker-file {
  color: var(--fg, #e5e7eb);
}

body.dark-mode .workspace-dialog-input,
body.dark-mode .workspace-dialog-button,
body.dark-mode .workspace-dialog-close {
  color: var(--fg, #e5e7eb);
}

@media (max-width: 576px) {
  .workspace-dialog {
    border-radius: 18px;
    padding: 1rem;
  }

  .workspace-dialog-actions {
    flex-direction: column-reverse;
  }

  .workspace-dialog-button {
    width: 100%;
  }

  .gdrive-picker-toolbar {
    flex-direction: column;
  }
}
