@font-face {
  font-family: "Rainis Normal";
  src: url("../fonts/Rainis-Normal.woff2") format("woff2"),
    url("../fonts/Rainis-Normal.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-color: #f4f4f4;
  --text-color: #000000;
  --card-bg: #ffffff;
  --item-bg: #e9ecef;
  --item-hover: #dee2e6;
  --border-color: #ddd;
  --header-bg: #f8f9fa;
  --project-bg-1: #f0f0f0;
  --project-bg-2: #f0f0f0;
  --date-scheme: light;
  --date-picker-filter: none;
  --timeline-text-color: #5c5c5c;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --card-bg: #2d2d2d;
  --item-bg: #3d3d3d;
  --item-hover: #4d4d4d;
  --border-color: #404040;
  --header-bg: #2a2a2a;
  --project-bg-1: #1a1a1a;
  --project-bg-2: #1a1a1a;
  --date-scheme: dark;
  --date-picker-filter: invert(1);
  --timeline-text-color: #b7b7b7;
}

[data-theme="light"] {
  --date-scheme: light;
}

.editable {
  border: none;
  outline: none;
  min-width: 50px;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
}

.top-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.top-menu button {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.projects-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: var(--card-bg);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  flex: 1;
}

.project {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  background-color: var(--card-bg);
  display: flex;
  flex-direction: column;
  transition: filter 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.project-header .editable {
  cursor: pointer;
  border: none;
  background-color: transparent;
  font-size: 1.2em;
  padding: 5px;
  outline: none;
  transition: border-bottom 0.2s;
}

.lists-container {
  display: flex;
  gap: 15px;
  padding-top: 10px;
}

.list {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-bg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: filter 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--header-bg);
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  gap: 5px;
  position: relative;
}

.list-header .rearrange-buttons {
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  gap: 5px;
  color: var(--text-color);
  opacity: 0.5;
  font-size: 0.9em;
  align-items: center;
  position: absolute;
  left: 10px;
  z-index: 1;
  width: 40px;
}

.list-header:hover .rearrange-buttons {
  opacity: 1;
}

.rearrange-buttons i {
  padding: 4px;
  transition: opacity 0.2s ease;
}

.rearrange-buttons i:hover {
  opacity: 1;
}

.list-items {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  background-color: var(--item-bg);
  padding: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: filter 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
  cursor: move;
  position: relative;
  word-break: break-word;
  overflow-wrap: break-word;
}

.list-item:hover {
  background-color: var(--item-hover);
}

.drop-highlight {
  background-color: #f0f8ff;
}

.list-item.todo-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.list-item.todo-item .item-name {
  flex: 1;
}

.list-item.todo-item .item-name.strikethrough {
  text-decoration: line-through;
}

.add-item-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.add-item {
  cursor: pointer;
  background: none;
  text-align: center;
  padding: 10px;
  border: dashed 1px;
  border-radius: 5px;
  color: #6c757d;
  flex: 1;
}

.add-item:hover {
  background-color: var(--item-hover);
}

.add-list {
  cursor: pointer;
  background: none;
  text-align: center;
  padding: 10px;
  border: dashed 1px;
  border-radius: 5px;
  color: #6c757d;
}

.add-list:hover {
  background-color: var(--item-hover);
}

.dragging {
  opacity: 0.5;
  cursor: move;
}

.drop-placeholder {
  height: 2px;
  background-color: var(--text-color);
  margin: 10px 0;
  transition: all 0.2s ease;
  position: relative;
  opacity: 0.3;
  border-radius: 1px;
}

.drop-placeholder::before,
.drop-placeholder::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: var(--text-color);
  border-radius: 50%;
  top: -2px;
  opacity: 0.3;
}

.drop-placeholder::before {
  left: -3px;
}

.drop-placeholder::after {
  right: -3px;
}

.list-items {
  min-height: 50px;

  padding: 10px;
}

.list-item.shift-up {
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.list-item.shift-down {
  transform: translateY(100%);
  transition: transform 0.2s ease;
}

.delete-confirm:hover {
  background-color: #000 !important;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

.todo-checkbox {
  accent-color: #28a745;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.list-item button {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.list-item:hover button {
  opacity: 1;
}

#themeToggleBtn {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#themeToggleBtn:hover {
  background-color: #000;
}

[data-theme="dark"] #themeToggleBtn:hover {
  background-color: #666;
}

.item-hover-menu {
  position: absolute;
  top: -30px;
  right: 10px;
  background-color: var(--card-bg);
  padding: 3px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
  gap: 5px;
  z-index: 100;
  align-items: center;
  transition: width 0.2s ease;
}

.item-hover-menu button {
  padding: 3px 6px;
  background-color: var(--item-bg);
  color: var(--text-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: width 0.2s ease;
}

.item-hover-menu button.delete-confirm {
  width: auto;
  padding: 3px 10px;
  white-space: nowrap;
}

.list-item:hover .item-hover-menu {
  display: flex;
}

.item-hover-menu input[data-coloris] {
  position: absolute;
  visibility: hidden;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  pointer-events: none;
  opacity: 0;
}

.item-hover-menu button:hover {
  background-color: var(--item-hover);
}

.item-hover-menu button i {
  font-size: 14px;
}

.item-hover-menu button[data-coloris] {
  padding: 3px 6px !important;
  width: 28px !important;
  height: 28px !important;
  background-color: var(--item-bg) !important;
}

.add-list {
  display: none;
}

.add-list-btn {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.add-list-btn:hover {
  background-color: #000;
}

[data-theme="dark"] .add-list-btn:hover {
  background-color: #666;
}

.project-header button,
.list-header button {
  padding: 5px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 5px;
  transition: width 0.2s ease;
}

.project-header button i,
.list-header button i {
  font-size: 12px;
}

.project-header button.delete-confirm,
.list-header button.delete-confirm {
  width: auto;
  padding: 5px 8px;
  font-size: 12px;
}

.project-header button:hover,
.list-header button:hover {
  background-color: #000;
}

[data-theme="dark"] .project-header button:hover,
[data-theme="dark"] .list-header button:hover {
  background-color: #666;
}

.list.dragging {
  opacity: 0.5;
  cursor: move;
}

.top-menu button:hover {
  background-color: #000;
}

[data-theme="dark"] .top-menu button:hover {
  background-color: #666;
}

#coffeeBtn {
  color: #fff;
  text-decoration: none;
  display: inline-block;
}

.rearrange-buttons {
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  gap: 5px;
  color: var(--text-color);
  opacity: 0.5;
  font-size: 0.9em;
  position: relative;
  margin-right: 8px;
}

.list-header {
  position: relative;
}

.list-header:hover .rearrange-buttons {
  opacity: 1;
}

button:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.editor-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.editor-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  height: 90vh;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--border-color), 0 4px 20px rgba(0, 0, 0, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  flex-direction: column;
  overflow: hidden;
}

.editor-popup .editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--header-bg);
  border-radius: 12px 12px 0 0;
}

.editor-popup .due-date-container {
  border-bottom: 1px solid var(--border-color);
  background: var(--header-bg);
}

[data-theme="dark"] .editor-popup {
  box-shadow: 0 0 0 1px var(--border-color), 0 4px 20px rgba(0, 0, 0, 0.3),
    0 12px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .editor-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.editor-popup #summernote {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.editor-popup .note-editor {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.editor-popup .note-editing-area {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  min-height: 0 !important;
}

.editor-popup .note-editable {
  flex: 1 !important;
  min-height: 0 !important;
  height: 100% !important;
}

.editor-popup .editor-header .close-btn {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.editor-popup .editor-header .close-btn:hover {
  background-color: #000;
}

[data-theme="dark"] .editor-popup .editor-header .close-btn:hover {
  background-color: #666;
}

.editor-popup .editor-header .close-btn i {
  font-size: 14px;
}

.note-editor .note-editable {
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
}

.note-editor .note-toolbar {
  background-color: var(--header-bg) !important;
  border-color: var(--border-color) !important;
}

.note-editor .note-toolbar .note-btn:not(.note-color-btn) {
  background-color: var(--item-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

.note-editor .note-color-palette .note-color-row .note-color-btn {
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  margin: 2px !important;
  border: 1px solid var(--border-color) !important;
}

.note-editor .note-color-palette .note-color-row .note-color-btn:hover {
  border-color: #000 !important;
}

[data-theme="dark"]
  .note-editor
  .note-color-palette
  .note-color-row
  .note-color-btn:hover {
  border-color: #fff !important;
}

.note-editor .note-color-palette {
  padding: 5px !important;
  background-color: var(--card-bg) !important;
}

.note-editor .note-color-reset {
  padding: 5px 8px !important;
  margin: 5px !important;
  width: calc(100% - 10px) !important;
  background-color: var(--item-bg) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--border-color) !important;
}

.note-editor .note-color-reset:hover {
  background-color: var(--item-hover) !important;
}

.note-editor.note-frame {
  display: flex !important;
  flex-direction: column;
  height: 100% !important;
  min-height: 0 !important;
}

.note-editor .note-status-output,
.note-editor .note-statusbar {
  background-color: var(--header-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
  display: none !important;
}

.note-editor .note-dropdown-menu {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

.note-editor .note-dropdown-item {
  color: var(--text-color) !important;
}

.note-editor .note-dropdown-item:hover {
  background-color: var(--item-hover) !important;
}

[data-coloris] {
  padding: 5px !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  background: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

[data-coloris]::before {
  display: none !important;
}

.color-picker-btn .fa-paintbrush {
  font-size: 14px !important;
  color: var(--text-color) !important;
  display: inline-block !important;
  pointer-events: none !important;
}

.item-link {
  color: #0066cc;
  text-decoration: underline;
  cursor: pointer;
}

.item-link:hover {
  color: #0052a3;
}

[contenteditable="true"] .item-link {
  color: inherit;
  text-decoration: none;
  cursor: text;
}

.sub-list {
  margin: 10px 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--card-bg);
  overflow: hidden;
  cursor: move;
}

.sub-list.dragging {
  opacity: 0.5;
  cursor: move;
}

.sub-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
}

.sub-list-header button {
  padding: 5px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 5px;
  transition: width 0.2s ease;
}

.sub-list-header button i {
  font-size: 12px;
}

.sub-list-header button:hover {
  background-color: #000;
}

[data-theme="dark"] .sub-list-header button:hover {
  background-color: #666;
}

.sub-list-header button.delete-confirm {
  width: auto;
  padding: 5px 8px;
  font-size: 12px;
}

.sub-list-items {
  padding: 10px;
  min-height: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-list-item {
  background-color: var(--item-bg);
  padding: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
  cursor: move;

  position: relative;
}

.sub-list-item:hover {
  background-color: var(--item-hover);
}

.sub-list-item.todo-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sub-list-item.todo-item .item-name {
  flex: 1;
}

.sub-list-item.todo-item .item-name.strikethrough {
  text-decoration: line-through;
}

.sub-list-item.shift-up {
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.sub-list-item.shift-down {
  transform: translateY(100%);
  transition: transform 0.2s ease;
}

.sub-list-item.drop-highlight {
  background-color: #f0f8ff;
}

.sub-list-item.dragging {
  opacity: 0.5;
  cursor: move;
}

.sub-list-item.drop-placeholder {
  height: 2px;
  background-color: #555555;
  margin: 10px 0;
  transition: all 0.2s ease;
  position: relative;
}

.sub-list-item.drop-placeholder::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  background-color: #555555;
  border-radius: 50%;
}

.sub-list-item.drop-placeholder::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  background-color: #555555;
  border-radius: 50%;
}

.time-tracker {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 5px;
}

.elapsed-time {
  min-width: 60px;
  font-family: monospace;
  font-size: 0.9em;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.history-table th,
.history-table td {
  padding: 8px;
  text-align: left;
  border: 1px solid var(--border-color);
}

.history-table th {
  background-color: var(--header-bg);
}

.history-search {
  width: calc(100% - 16px);
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--card-bg);
  color: var(--text-color);
}

.history-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 1000px;
  height: 80%;
  background: var(--card-bg);
  z-index: 1000;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
}

.history-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.history-modal .close-btn {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.history-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.history-modal .cleanup-btn {
  padding: 5px 10px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
}

.history-modal .cleanup-btn:hover {
  background-color: #bd2130;
}

.projects-container .project:nth-child(odd) {
  background-color: var(--project-bg-1);
}

.projects-container .project:nth-child(even) {
  background-color: var(--project-bg-2);
}

.timeline-container {
  margin: 15px 0;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  position: relative;
}

.timeline {
  height: 100px;
  background-color: var(--card-bg);
}

.vis-timeline {
  border: none;
  background-color: var(--card-bg);
}

.vis-item {
  background-color: var(--item-bg);
  border-color: var(--border-color);
  color: var(--text-color);
  border-width: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vis-item.vis-selected {
  background-color: var(--item-bg);
  border-color: var(--border-color);
}

.vis-item:hover {
  background-color: var(--item-bg);
  border-color: var(--border-color);
}

.vis-tooltip {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  padding: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  width: 80%;
  max-width: 600px;
}

.project-form input[type="text"],
.project-form input[type="date"] {
  width: calc(100% - 24px);
  padding: 8px 12px;
  margin: 5px 0;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--card-bg);
  color: var(--text-color);
}

.milestones-container {
  margin: 15px 0;
}

.milestone-entry {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.milestone-entry input {
  flex: 1;
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
  gap: 10px;
}

.form-buttons button {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.form-buttons button:hover {
  background-color: #000;
}

[data-theme="dark"] .form-buttons button:hover {
  background-color: #666;
}

.form-buttons button i {
  font-size: 14px;
}

.remove-milestone-btn {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.remove-milestone-btn:hover {
  background-color: #000;
}

[data-theme="dark"] .remove-milestone-btn:hover {
  background-color: #666;
}

.remove-milestone-btn i {
  font-size: 14px;
}

.form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.timeline-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, width 0.2s ease, background-color 0.2s ease;
  opacity: 0;
}

.timeline-container:hover .timeline-delete-btn {
  opacity: 1;
}

.timeline-delete-btn:hover {
  background-color: #000;
}

[data-theme="dark"] .timeline-delete-btn:hover {
  background-color: #666;
}

.timeline-delete-btn.delete-confirm {
  width: auto;
  opacity: 1;
  padding: 5px 10px;
}

.vis-time-axis .vis-text {
  color: var(--timeline-text-color);
  opacity: 0.4;
}

.vis-time-axis .vis-grid.vis-major {
  border-color: var(--border-color);
  opacity: 0.7;
  border-width: 3px;
  height: 100% !important;
}

.vis-item-content {
  position: relative;
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.9em;
  padding: 2px 5px;
  transition: opacity 0.2s ease;
}

.vis-item:hover {
  opacity: 1;
}

.timeline {
  height: 100px;
  background-color: var(--card-bg);
  width: 100%;
  overflow-x: hidden;
}

.vis-time-axis .vis-grid.vis-minor {
  border-color: var(--border-color);
  opacity: 0.4;
}

.vis-time-axis .vis-grid.vis-major {
  border-color: var(--border-color);
  opacity: 0.7;
  border-width: 3px;
  height: 100% !important;
}

.vis-item {
  z-index: 2;
}

[data-theme="dark"] .vis-time-axis .vis-grid.vis-minor {
  opacity: 0.8;
}

[data-theme="dark"] .vis-time-axis .vis-grid.vis-major {
  opacity: 0.7;
}

.vis-current-time {
  background-color: #ff4444;
  width: 2px;
  z-index: 1;
}

.vis-item.vis-dot {
  display: none !important;
}

.vis-item.vis-point {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.timeline-delete-btn i {
  font-size: 14px;
}

.project-form input[type="date"] {
  color-scheme: var(--date-scheme);
}

[data-theme="dark"] {
  --date-scheme: dark;
}

[data-theme="light"] {
  --date-scheme: light;
}

.milestones-container h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-milestone-btn {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.add-milestone-btn:hover {
  background-color: #000;
}

[data-theme="dark"] .add-milestone-btn:hover {
  background-color: #666;
}

.add-milestone-btn i {
  font-size: 14px;
}

.project-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.project-form-header .form-buttons {
  margin-top: 0;
}

.remove-milestone {
  color: var(--text-color);
  opacity: 0.5;
  cursor: pointer;
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-milestone:hover {
  opacity: 1;
}

.note-editor .note-color-palette .note-color-row .note-color-btn {
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  margin: 2px !important;
}

.note-editor .note-color-palette {
  padding: 5px !important;
}

.note-editor .note-color-reset {
  padding: 5px 8px !important;
  margin: 5px !important;
  width: calc(100% - 10px) !important;
  background-color: var(--item-bg) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--border-color) !important;
}

.note-editor .note-color-reset:hover {
  background-color: var(--item-hover) !important;
}

@keyframes pulseButton {
  0% {
    transform: scale(1);
    background-color: #ff4444;
  }

  50% {
    transform: scale(1.05);
    background-color: #ff0000;
  }

  100% {
    transform: scale(1);
    background-color: #ff4444;
  }
}

#autoBackupBtn {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#autoBackupBtn.needs-backup {
  animation: pulseButton 2s infinite;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.logo {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo h1 {
  font-family: "Rainis Normal", Arial, sans-serif;
  font-weight: normal;
  margin: 0;
  font-size: 20px;
}

.logo .tagline {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
}

.top-menu-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.footer {
  text-align: center;
  padding: 10px 0;
  margin-top: auto;
  color: var(--text-color);
  opacity: 0.7;
  font-size: 0.9em;
}

.footer .heart {
  color: #ff4444;
  display: inline-block;
  font-size: 1.5em;
  position: relative;
  top: 2px;
  animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.rearrange-buttons i {
  padding: 4px;
  transition: opacity 0.2s ease;
}

.rearrange-buttons i:hover {
  opacity: 1;
}

.list-header-content {
  display: flex;
  align-items: center;
  flex: 1;
  margin-left: 50px;
}

.list-header .editable {
  flex: 1;
  min-width: 0;
}

.list:first-child .list-header .rearrange-buttons {
  width: 20px;
}

.list:last-child .list-header .rearrange-buttons {
  width: 20px;
}

.list:first-child .list-header-content {
  margin-left: 30px;
}

.list:last-child .list-header-content {
  margin-left: 30px;
}

.rearrange-buttons i {
  padding: 4px;
  transition: opacity 0.2s ease;
  width: 16px;
  text-align: center;
}

.backup-nudge {
  animation: nudge 1s ease-in-out infinite;
  position: relative;
  background-color: #ffd700 !important;
  color: black !important;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-3px);
  }

  75% {
    transform: translateX(3px);
  }
}

.read-more-btn {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 0.8em;
  background-color: var(--item-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
}

.read-more-btn:hover {
  background-color: var(--item-hover);
}

.history-table td {
  max-width: 400px;
  vertical-align: top;
}

.delete-history-btn {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 0.8em;
  background-color: transparent;
  color: var(--text-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.delete-history-btn:hover {
  opacity: 1;
  color: #ff4444;
}

.history-table td {
  position: relative;
}

.history-table tr:hover .delete-history-btn {
  opacity: 0.8;
}

.action-column {
  width: 50px;
  text-align: center;
}

.delete-history-btn {
  padding: 4px 8px;
  font-size: 0.9em;
  background-color: transparent;
  color: var(--text-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.delete-history-btn:hover {
  opacity: 1;
  color: #ff4444;
}

.history-table tr:hover .delete-history-btn {
  opacity: 0.8;
}

.due-date-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  margin: 0;
}

.due-date-container label {
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.8;
}

.due-date-container input[type="date"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--card-bg);
  color: var(--text-color);
  color-scheme: var(--date-scheme);
  font-size: 14px;
}

.due-date-container input[type="date"]::-webkit-calendar-picker-indicator {
  filter: var(--date-picker-filter);
  cursor: pointer;
  padding: 4px;
  margin-right: -4px;
  opacity: 0.7;
  color: var(--text-color);
}

.list-item.due-soon {
  position: relative;
  overflow: visible;
}

.list-item.due-soon::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  background-color: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  z-index: 2;
}

.list-item.overdue {
  position: relative;
  overflow: visible;
}

.list-item.overdue::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  background-color: #ff4444;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.8);
  z-index: 2;
}

.due-date-info {
  margin-left: 8px;
  font-size: 0.85em;
  opacity: 0.9;
  font-style: italic;
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
}

.list-item.due-soon .due-date-info {
  color: #ffd700;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.list-item.overdue .due-date-info {
  color: #ff4444;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.task-content {
  display: inline-block;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.truncated-text {
  display: inline;
  word-break: break-word;
  overflow-wrap: break-word;
}

.full-text {
  display: none;
}

.history-table td {
  word-break: break-word;
  line-height: 1.4;
}

.history-table .read-more-btn {
  background: none;
  border: none;
  color: #0066cc;
  cursor: pointer;
  padding: 0;
  font-size: 0.9em;
  margin-left: 5px;
}

.history-table .read-more-btn:hover {
  text-decoration: underline;
}

.note-editor .note-statusbar {
  display: none !important;
}

.note-editor.note-frame {
  height: calc(100% - 50px) !important;
}

.note-editing-area {
  height: calc(100% - 40px) !important;
}

.note-editable {
  height: 100% !important;
  min-height: unset !important;
}

.note-editing-area:focus-within {
  outline: none !important;
}

.note-editable:focus {
  outline: none !important;
}

.note-editor .note-editing-area .note-editable {
  outline: none !important;
  border: none !important;
}

.note-editor *:focus,
.note-editor *:focus-within,
.note-editor .note-editable,
.note-editor .note-editing-area,
.note-frame *,
.note-frame *:focus,
.note-frame *:focus-within {
  outline: none !important;
  border-color: transparent !important;
}

.note-placeholder,
.note-editable {
  border: none !important;
  box-shadow: none !important;
}

.note-editor .note-dropzone {
  display: none !important;
}

@keyframes steam {
  0% {
    transform: translateY(0) translateX(-50%) scale(1);
    opacity: 0;
  }

  50% {
    transform: translateY(-10px) translateX(-40%) scale(1.2);
    opacity: 0.5;
  }

  100% {
    transform: translateY(-20px) translateX(-30%) scale(1.4);
    opacity: 0;
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-8deg);
  }

  75% {
    transform: rotate(8deg);
  }
}

#coffeeBtn {
  position: relative;
}

#coffeeBtn button {
  transition: transform 0.3s ease;
}

#coffeeBtn button:hover {
  animation: wiggle 0.5s ease-in-out;
}

#coffeeBtn button::before {
  content: "~";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  opacity: 0;
  color: var(--text-color);
}

#coffeeBtn button:hover::before {
  animation: steam 1s ease-in-out infinite;
}

#coffeeBtn button i {
  transition: transform 0.3s ease;
}

#coffeeBtn:hover button i {
  transform: rotate(-15deg);
}

.hide-back-button .introjs-prevbutton {
  display: none !important;
}

.hide-back-button .introjs-tooltipbuttons {
  text-align: right;
}

.welcome-step.introjs-tooltip {
  max-width: 500px !important;
  width: 90% !important;
}

.welcome-step .introjs-tooltiptext {
  padding: 20px !important;
  line-height: 1.6 !important;
  font-size: 1.1em !important;
}

.welcome-step .introjs-tooltip-title {
  font-size: 1.4em !important;
  padding: 20px 20px 0 20px !important;
}

.welcome-step .introjs-tooltipbuttons {
  padding: 20px !important;
}

.introjs-tooltip.welcome-step {
  max-width: 600px !important;
  width: 90% !important;
  min-width: 500px !important;
}

.welcome-step.introjs-tooltip .introjs-tooltiptext {
  padding: 24px !important;
  line-height: 1.6 !important;
  font-size: 1.1em !important;
  text-align: left !important;
}

.welcome-step.introjs-tooltip .introjs-tooltip-title {
  font-size: 1.5em !important;
  padding: 24px 24px 0 24px !important;
  margin-bottom: 12px !important;
}

.welcome-step.introjs-tooltip .introjs-tooltipbuttons {
  padding: 20px !important;
  border-top: 1px solid var(--border-color) !important;
}

.welcome-step.introjs-tooltip {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

@media (max-width: 600px) {
  .welcome-step.introjs-tooltip {
    min-width: unset !important;
    width: calc(100% - 40px) !important;
    margin: 0 20px !important;
  }
}

.introjs-tooltip.welcome-step {
  max-width: 600px !important;
  width: 90% !important;
  min-width: 500px !important;
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}

.welcome-step .introjs-arrow {
  display: none !important;
}

.welcome-step.introjs-tooltip:after,
.welcome-step.introjs-tooltip:before {
  display: none !important;
}

.welcome-step .introjs-tooltiptext {
  text-align: center !important;
}

@media (max-width: 600px) {
  .introjs-tooltip.welcome-step {
    min-width: unset !important;
    width: calc(100% - 40px) !important;
    max-width: none !important;
  }
}

.github-link {
  color: var(--text-color);
  opacity: 0.7;
  margin-left: 5px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.github-link:hover {
  opacity: 1;
}

.github-link i {
  font-size: 1.2em;
  vertical-align: middle;
}

.settings-dropdown {
  position: relative;
  display: inline-block;
}

.settings-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: var(--card-bg);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 8px;
}

.settings-dropdown.active .settings-content {
  display: block;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-radius: 4px;
}

.settings-item:hover {
  background-color: var(--item-bg);
}

.settings-item span {
  color: var(--text-color);
}

.settings-item button {
  padding: 5px 10px;
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.settings-item button:hover {
  background-color: #000;
}

[data-theme="dark"] .settings-item button:hover {
  background-color: #666;
}

.backup-location-item {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 8px;
}

.backup-location-container {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.backup-path {
  font-size: 0.9em;
  color: var(--text-color);
  opacity: 0.8;
  word-break: break-all;
  max-width: 150px;
}

.truncated-text,
.full-text {
  display: inline;
}

.history-table td {
  word-break: break-word;
  line-height: 1.4;
  vertical-align: top;
  padding: 12px 8px;
}

.history-table .read-more-btn {
  background: none;
  border: none;
  color: #0066cc;
  cursor: pointer;
  padding: 2px 5px;
  font-size: 0.9em;
  margin-left: 5px;
}

.history-table .read-more-btn:hover {
  text-decoration: underline;
}

.introjs-tooltip {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.introjs-button {
  background-color: #555555;
  color: white;
  border: none;
  border-radius: 4px;
  text-shadow: none;
  padding: 6px 12px;
}

.introjs-button:hover {
  background-color: #000;
  color: white;
}

[data-theme="dark"] .introjs-button:hover {
  background-color: #666;
}

.introjs-skipbutton {
  color: var(--text-color);
}

.introjs-progress {
  background-color: var(--border-color);
}

.introjs-progressbar {
  background-color: #555555;
}

.introjs-overlay {
  backdrop-filter: blur(10px);
  background-color: rgba(0, 0, 0, 0.5);
}

.introjs-helperLayer {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(0);
}

.introjs-helperLayer::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 12px;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.3)
  );
  z-index: -1;
}

.introjs-tooltiptext {
  color: var(--text-color);
}

.introjs-tooltip-title {
  color: var(--text-color);
  font-weight: bold;
}

.hidden-if-no-project {
  opacity: 0.5;
  pointer-events: none;
}

.hidden-if-no-list {
  opacity: 0.5;
  pointer-events: none;
}

.hidden-if-no-item {
  opacity: 0.5;
  pointer-events: none;
}

.introjs-helperLayer,
.introjs-overlay {
  transition: all 0.3s ease-out !important;
}

.introjs-tooltip {
  z-index: 999999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hide-back-button .introjs-prevbutton {
  display: none !important;
}

.hide-back-button .introjs-tooltipbuttons {
  text-align: right;
}

.locale-selector {
  position: relative;
  width: 100%;
  margin-top: 5px;
}

.locale-selector input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 14px;
}

.locale-selector input:focus {
  outline: none;
  border-color: #555555;
}

.settings-item {
  flex-direction: column;
  align-items: flex-start;
}

.settings-item span {
  margin-bottom: 5px;
  font-weight: 500;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.toggle-switch-modern {
  position: relative;
  width: 50px;
  height: 24px;
  margin: 0;
}

.toggle-switch-checkbox {
  display: none;
}

.toggle-switch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  border: 0 solid #bbb;
  border-radius: 24px;
  margin: 0;
}

.toggle-switch-label:before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 4px;
  background: #ffffff;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 26px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch-checkbox:checked + .toggle-switch-label {
  background-color: #555555;
}

.toggle-switch-checkbox:checked + .toggle-switch-label:before {
  right: 4px;
}

.toggle-switch-label {
  background-color: #555555;
  transition: all 0.3s ease;
}

.theme-toggle i {
  color: var(--text-color);
  font-size: 14px;
}

.due-date-calendar {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card-bg);
  border-radius: 6px;
  padding: 2px;
  font-size: 0.85em;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 45px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: display 0.2s ease;
}

.due-date-calendar .month {
  font-size: 0.7em;
  text-transform: uppercase;
  font-weight: bold;
  background: #555555;
  color: white;
  width: 100%;
  padding: 2px 0;
  letter-spacing: 0.5px;
}

.due-date-calendar .day {
  font-size: 1.2em;
  font-weight: bold;
  line-height: 1.4;
  padding: 2px 0;
  color: var(--text-color);
}

.list-item.overdue .due-date-calendar {
  border-color: #ff4444;
}

.list-item.overdue .due-date-calendar .month {
  background: #ff4444;
}

.list-item.overdue .due-date-calendar .day {
  color: #ff4444;
}

.list-item.due-soon .due-date-calendar {
  border-color: #ffd700;
}

.list-item.due-soon .due-date-calendar .month {
  background: #ffd700;
  color: #000;
}

.list-item.due-soon .due-date-calendar .day {
  color: #000;
}

.due-date-tag {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8em;
  padding: 3px 6px;
  border-radius: 0 0 0 5px;
  background: var(--header-bg);
  white-space: nowrap;
  z-index: 2;
}

.list-item.overdue .due-date-tag {
  background: var(--header-bg);
  border-color: var(--border-color);
}

.list-item.due-soon .due-date-tag {
  background: var(--header-bg);
  border-color: var(--border-color);
}

.list-item.overdue .due-date-tag .month,
.list-item.overdue .due-date-tag .day {
  color: #ff4444;
}

.list-item.due-soon .due-date-tag .month,
.list-item.due-soon .due-date-tag .day {
  color: #ffd700;
}

[data-theme="dark"] .due-date-tag {
  background: var(--header-bg);
}

.due-date-tag .month {
  font-weight: 700;
  color: var(--text-color);
  opacity: 0.7;
}

.due-date-tag .day {
  font-weight: 700;
  color: var(--text-color);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.project-tag {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  white-space: nowrap;
  opacity: 0.9;
}

.tags-container {
  margin: 15px 0;
}

.tags-input-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tags-input {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--card-bg);
  color: var(--text-color);
}

.tag-color-picker {
  padding: 8px !important;
  width: 40px !important;
  height: 40px !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 4px !important;
  background-color: var(--card-bg) !important;
  cursor: pointer !important;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.project-header-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 200px;
}

.color-preview {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s ease;
  background-color: #f4a261;
  display: inline-block;
}

.color-preview:hover {
  transform: scale(1.1);
}

.tag-color-picker {
  display: none !important;
}

.coloris-wrapper {
  display: none !important;
}

.clr-field {
  display: none !important;
}

.clr-picker {
  z-index: 2000 !important;
}

.list-item:hover .due-date-tag {
  display: none;
}

.list-item.due-soon::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  background-color: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  z-index: 2;
}

.list-item.overdue::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  background-color: #ff4444;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.8);
  z-index: 2;
}

.introjs-tooltip {
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

.introjs-tooltiptext,
.introjs-tooltip-title,
.introjs-skipbutton {
  color: var(--text-color) !important;
}

.introjs-button {
  color: white !important;
  background-color: #555555 !important;
  border: none !important;
  text-shadow: none !important;
  border-radius: 4px !important;
}

.introjs-button:hover {
  background-color: #000000 !important;
  color: white !important;
}

[data-theme="dark"] .introjs-button:hover {
  background-color: #666666 !important;
}

.introjs-helperLayer {
  background-color: transparent !important;
  border: 1px solid var(--border-color) !important;
}

.introjs-overlay {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .introjs-overlay {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

.introjs-arrow.top-right,
.introjs-arrow.top-middle,
.introjs-arrow.top {
  border-bottom-color: var(--card-bg) !important;
}

.introjs-arrow.right,
.introjs-arrow.right-middle {
  border-left-color: var(--card-bg) !important;
}

.introjs-arrow.bottom,
.introjs-arrow.bottom-middle,
.introjs-arrow.bottom-right {
  border-top-color: var(--card-bg) !important;
}

.introjs-arrow.left,
.introjs-arrow.left-middle {
  border-right-color: var(--card-bg) !important;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  backdrop-filter: blur(2px);
}

.search-modal {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  background-color: var(--background-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  max-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
}

.search-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--input-background);
  border-radius: 6px;
  padding: 8px 12px;
}

.search-input-wrapper i {
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 16px;
  color: var(--text-color);
}

.shortcut-hint {
  background-color: var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.search-results {
  overflow-y: auto;
  padding: 16px;
}

.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
  gap: 16px;
}

.no-results i {
  font-size: 32px;
}

.results-group {
  margin-bottom: 24px;
}

.results-group h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 8px;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-result:hover {
  background-color: var(--hover-color);
}

.search-result i {
  color: var(--text-muted);
  width: 16px;
  text-align: center;
}

.result-content {
  flex: 1;
  min-width: 0;
}

.result-title {
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-title.completed {
  text-decoration: line-through;
}

.result-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.result-subtitle .due-date {
  background-color: var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

mark {
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 0 2px;
  border-radius: 2px;
}

.highlight {
  animation: highlight 2s ease-out;
}

@keyframes highlight {
  0% {
    background-color: var(--accent-color);
  }
  100% {
    background-color: transparent;
  }
}

.search-result .result-title {
  white-space: normal;
  line-height: 1.4;
  max-height: 4.2em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

mark {
  background-color: var(--accent-color);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 500;
}

.today-view-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: var(--card-bg);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.today-view-header {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-color);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.today-items-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.today-item-card {
  background-color: var(--item-bg);
  padding: 10px 15px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  position: relative;
  word-break: break-word;
  overflow-wrap: break-word;
  border-left: 5px solid var(--accent-color);
}

.today-item-card:hover {
  background-color: var(--item-hover);
}

.today-item-card.completed .item-name {
  text-decoration: line-through;
}

.today-item-info {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 4px;
}

.today-item-content {
  flex: 1;
  margin-left: 10px;
}

.today-item-number {
  font-weight: bold;
  margin-right: 10px;
  color: var(--text-muted);
  min-width: 20px;
  text-align: right;
}

.today-view-container .drop-placeholder {
  height: 2px;
  background-color: var(--text-color);
  margin: 10px 0;
  transition: all 0.2s ease;
  position: relative;
  opacity: 0.3;
  border-radius: 1px;
}

.today-view-container .drop-placeholder::before,
.today-view-container .drop-placeholder::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: var(--text-color);
  border-radius: 50%;
  top: -2px;
  opacity: 0.3;
}

.today-view-container .drop-placeholder::before {
  left: -3px;
}

.today-view-container .drop-placeholder::after {
  right: -3px;
}

.today-view-container .dragging {
  opacity: 0.5;
}

body.showing-projects #todayViewContainer {
  display: none;
}

body.showing-today #projectsContainer {
  display: none;
}

.today-item-number {
  font-weight: bold;
  margin-right: 10px;
  color: var(--text-muted);
  min-width: 20px;
  text-align: right;
}

.today-item-tags {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.item-tag {
  background-color: var(--tag-bg, #777);
  color: var(--tag-text, #fff);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8em;
  white-space: nowrap;
}

.today-item-card.overdue,
.today-item-card.due-soon {
  position: relative;
  overflow: visible;
}

.today-item-card.overdue::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  background-color: #ff4444;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.8);
  z-index: 2;
}

.today-item-card.due-soon::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  background-color: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  z-index: 2;
}

.today-item-card .due-date-tag {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8em;
  padding: 2px;
  border-radius: 0 5px 0 5px;
  background: var(--header-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 2;
  overflow: hidden;
  min-width: 45px;
  text-align: center;
}

.today-item-card .due-date-tag .month {
  font-size: 0.7em;
  text-transform: uppercase;
  font-weight: bold;
  background: #555555;
  color: white;
  width: 100%;
  padding: 2px 0;
  letter-spacing: 0.5px;
}

.today-item-card .due-date-tag .day {
  font-size: 1.2em;
  font-weight: bold;
  line-height: 1.4;
  padding: 2px 0;
  color: var(--text-color);
}

.today-item-card.overdue .due-date-tag .month,
.today-item-card.overdue .due-date-tag .day {
  color: #ff4444;
}

.today-item-card.overdue .due-date-tag .month {
  background: #ff4444;
  color: white;
}

.today-item-card.due-soon .due-date-tag .month,
.today-item-card.due-soon .due-date-tag .day {
  color: #ffd700;
}

.today-item-card.due-soon .due-date-tag .month {
  background: #ffd700;
  color: #000;
}

.top-menu-buttons button.active {
  background-color: var(--accent-color);
  color: var(--background-color);
}
.view-header {
  width: 100%;
  text-align: center;
  margin: 20px 0 10px 0;
  color: var(--text-muted);
  font-size: 1.5em;
  font-weight: 300;
}
.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50vh;
  font-size: 1.5em;
  color: var(--text-muted);
}
.list-item .item-meta-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.8em;
}
.list-item .dependency-icon {
  color: var(--color-danger);
}
.list-item .checklist-progress {
  color: var(--text-muted);
}
.list-item .item-tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.item-tag-on-card {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}
.list-item.blocked {
  opacity: 0.6;
  cursor: not-allowed;
}
.list-item.blocked:hover {
  transform: none;
  box-shadow: none;
}
.editor-popup {
  max-height: 95vh;
  overflow-y: auto;
}
.due-date-container {
  align-items: center;
}
.due-date-container input[type="date"],
.due-date-container select {
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 8px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1em;
}
.small-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2em;
  padding: 0 8px;
  opacity: 0.7;
}
.small-action-btn:hover {
  opacity: 1;
  color: var(--color-danger);
}
#checklistItems li button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0.7;
}
#checklistItems li button:hover {
  opacity: 1;
  color: var(--color-danger);
}
.item-details-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px;
  border-top: 1px solid var(--border-color);
}
.details-row {
  display: flex;
  gap: 20px;
}
.item-tags-container,
.item-dependencies-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.item-checklist-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.item-details-container label {
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--text-color);
}

.tags-input-group,
.dependencies-input-group,
.checklist-input-group {
  display: flex;
  align-items: center;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}
.tags-input-group input,
.dependencies-input-group input,
.checklist-input-group input {
  flex-grow: 1;
  background: none;
  border: none;
  padding: 8px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1em;
}
.tags-input-group input:focus,
.dependencies-input-group input:focus,
.checklist-input-group input:focus {
  outline: none;
}
.checklist-input-group button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 8px;
  font-size: 1.1em;
}
.checklist-input-group button:hover {
  color: var(--accent-color);
}
.dependencies-input-group {
  position: relative;
}
#dependencyItems,
#checklistItems {
  list-style: none;
  padding: 0;
  margin: 5px 0 0 0;
  max-height: 120px;
  overflow-y: auto;
}
#dependencyItems li,
#checklistItems li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 4px;
}
#dependencyItems li.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}
.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  z-index: 1001;
  max-height: 150px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
}
.autocomplete-results div {
  padding: 8px;
  cursor: pointer;
}
.autocomplete-results div:hover {
  background-color: var(--hover-color);
}
.task-tag-palette-container {
  margin-top: 15px;
}
.task-tag-palette-container h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#taskTagPaletteEntries {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.task-tag-palette-entry {
  display: flex;
  align-items: center;
  gap: 10px;
}
.task-tag-name {
  flex: 1;
}
.remove-task-tag {
  cursor: pointer;
  color: var(--color-danger);
}
.today-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.today-item-card .checklist-progress {
  color: var(--text-muted);
  font-size: 0.9em;
  margin-left: 10px;
}
