/* Declarații de bază pentru Font Awesome Duotone */
.clear-btn i {
  --fa-primary-color: #6098e1;
  --fa-secondary-color: #7c7979;
  transition: filter 0.2s ease, transform 0.2s, color 0.2s;
}

html {
  overflow-x: hidden;
  background-color: #f9f9f9;
}

html.dark-mode,
html.dark-mode body {
  background-color: #0a0a0a !important;
  color: #f1f5f9;
}

/* Eliminate transition flash / flashbang during initial page load */
html:not(.theme-ready) *,
html:not(.theme-ready) *::before,
html:not(.theme-ready) *::after {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
  -ms-transition: none !important;
  transition: none !important;
}

body {
  font-family: Arial, Helvetica, Tahoma, Verdana;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #f9f9f9;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.card {
  background: #fff;
  padding: 30px;
  margin-bottom: 50px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 850px;
  height: 80%;
  display: flex;
  flex-direction: column;
  position: relative;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1),
    background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

.tabs-container {
  position: absolute;
  top: -26px;
  left: 10px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  z-index: 10;
}

.tabs-container-right {
  position: absolute;
  top: -26px;
  right: 10px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  z-index: 100;
}

.tabs-container-right:has(.order-dropdown.expanded),
.tabs-container-right.has-expanded-dropdown {
  z-index: 50000;
}

.tab-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: flex-end;
}

.tab-dropdown-wrapper:has(.order-dropdown.expanded),
.tab-dropdown-wrapper.has-expanded {
  z-index: 50001;
}

.right-tab {
  background-color: #f0f4fa;
  border-radius: 6px 6px 0 0;
}

.right-tab:not(.active):hover {
  background-color: #e5ebf2;
}

/* === ORDER BY & IMPORT/EXPORT DROPDOWNS === */
.order-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  z-index: 50002;
  padding: 6px 0;
  min-width: 210px;
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, padding 0.25s ease;
  pointer-events: none;
}

#importExportDropdown {
  right: auto;
  left: 0;
}

#orderDropdown {
  right: 0;
  left: auto;
}

.extra-tab.active-order-bg {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  border-bottom: none !important;
}

.order-dropdown.expanded {
  max-height: 600px;
  opacity: 1;
  padding: 6px 0 0;
  pointer-events: auto;
  z-index: 50002;
}

.order-option {
  padding: 9px 16px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-option:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.order-option.active {
  color: #2563eb;
  background: #eff6ff;
  font-weight: 600;
}

.order-option .order-check-icon {
  margin-left: auto;
  font-size: 12px;
  color: #2563eb;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.order-option.active .order-check-icon {
  opacity: 1;
  transform: scale(1);
}

.arrow-icon {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.order-option.expanded .arrow-icon {
  transform: rotate(180deg);
}

.sub-section {
  display: none;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 12px;
  margin: 0;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, padding 0.25s ease;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.sub-section.expanded {
  display: block;
  max-height: 400px;
  opacity: 1;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

/* Order By Filter Pills (Classes, IDs, Tags) */
.order-filter-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  background: #ffffff;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.order-filter-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  color: #0f172a;
}

.order-filter-pill.active {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #2563eb !important;
  font-weight: 600;
  box-shadow: 0 0 0 1px #2563eb;
}

.order-filter-pill .pill-check {
  margin-left: auto;
  font-size: 11px;
  color: #2563eb;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.order-filter-pill.active .pill-check {
  opacity: 1;
  transform: scale(1);
}

.order-slider-wrapper {
  margin-top: 0;
}

.range-display {
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: all 0.2s;
}

.range-display:hover {
  border-bottom-color: #3498db;
  color: #3498db !important;
}

.edit-inputs input {
  width: 45px;
  font-size: 11px;
  padding: 1px 3px;
  border: 1px solid #ccc;
  border-radius: 3px;
  text-align: center;
  outline: none;
}

.edit-inputs input[type="time"] {
  width: 60px;
}

/* Hide spin buttons on number inputs */
.edit-inputs input::-webkit-outer-spin-button,
.edit-inputs input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.edit-inputs input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.range-slider {
  position: relative;
  width: 100%;
  height: 20px;
}

.slider-track-bg {
  position: absolute;
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 2px;
}

.slider-track-fill {
  position: absolute;
  height: 4px;
  background: #3498db;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 2px;
}

.range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  margin: 0;
  outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #3498db;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

.range-slider input[type="range"]:active::-webkit-slider-thumb {
  z-index: 11;
}

.date-hidden {
  display: none !important;
}

.extra-tab,
.filter-tab {
  background: #fff;
  padding: 5px 9px;
  border: 1px solid #e0e0e0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #777;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.extra-tab.active {
  transform: translateY(-4px);
  z-index: 5;
}

.extra-tab:not(.active):hover {
  background-color: #f8f9fa;
}

/* Task counter aliniat la stânga */
.task-counter {
  text-align: left;
  font-size: 13px;
  color: #777;
  margin-top: 8px;
  margin-bottom: 10px;
  margin-left: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

h2 {
  font-size: 28px;
  text-align: center;
  margin: 0px;
  margin-bottom: 15px;
}

.todo {
  background-color: #1a1a1a;
  color: #fff;
  padding: 4px 14px;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.todo:hover {
  background-color: #333;
  transform: scale(1.05);
}

.list-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  overflow-x: visible;
}

.content-wrapper {
  border-radius: 8px;
  padding: 26px 10px 0 10px;
}

.section-title {
  font-size: 14px;
  text-align: center;
  margin: 0 0 4px;
  color: #555;
  padding: 6px 0;
}

.items.is-animating>.item {
  pointer-events: none;
}

.item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
  animation: fadeIn 0.4s ease-in-out;
  transition: opacity 0.4s ease, height 0.4s ease, padding 0.4s ease, background 0.3s ease, border-color 0.3s ease;
  overflow: visible;
  border-radius: 6px;
}

/* Task Important State */
.item.important {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
  padding-left: 8px;
  padding-right: 8px;
}

html.dark-mode .item.important {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

/* Expired Task: Entire task background is RED, overriding important blue */
.item.task-expired,
.item.important.task-expired {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  padding-left: 8px;
  padding-right: 8px;
}

html.dark-mode .item.task-expired,
html.dark-mode .item.important.task-expired {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}

/* Edit Mode Selection (Normal Task) */
.item.selected {
  background: rgba(34, 197, 94, 0.12);
  border-color: #86efac;
  padding-left: 8px;
  padding-right: 8px;
}

html.dark-mode .item.selected {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
}

/* Edit Mode Selection on Expired Task: Gradient from Red to Green */
.item.task-expired.selected,
.item.important.task-expired.selected {
  background: linear-gradient(135deg, #fecaca 0%, #bbf7d0 100%) !important;
  border-color: #f87171 !important;
}

html.dark-mode .item.task-expired.selected,
html.dark-mode .item.important.task-expired.selected {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(34, 197, 94, 0.35) 100%) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

.item.item-hidden {
  display: none !important;
  opacity: 0;
  height: 0;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
}

.item:last-child {
  border-bottom: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FIX: Checkbox păstrează spațiul, ascuns în modul editare */
.item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  flex-shrink: 0;
  display: flex;
  transition: opacity 0.3s ease;
}

.items.is-editing .item input[type="checkbox"] {
  display: none;
}

/* FIX: Drag-handle în poziția checkbox-ului */
.drag-handle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  color: #aaa;
  cursor: grab;
  flex-shrink: 0;
}

.items.is-editing .drag-handle {
  display: flex;
}

.drag-handle i {
  pointer-events: none;
}

.item.item-hidden .drag-handle,
.item.item-hidden input[type="checkbox"] {
  display: none;
}

.item.dragging {
  opacity: 0.5;
  background: #f0f0f0;
}

.item.drag-over {
  border-top: 2px solid #007bff;
}

.items::-webkit-scrollbar {
  width: 6px;
}

.items::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 3px;
}

.items::-webkit-scrollbar-thumb:hover {
  background: #888;
}

.textbox-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.items.is-editing .item .textbox-wrapper {
  gap: 0px;
}

textarea.textbox {
  flex: 1;
  min-height: 25px;
  max-height: 200px;
  resize: none;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  overflow: hidden;
  transition: height 0.5s ease;
}

textarea.textbox:focus {
  border-color: #28a745;
  background: #f8fff9;
  max-height: none;
}

textarea.textbox.checked {
  text-decoration: line-through;
  color: #888;
}

.clear-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.clear-btn:hover {
  background: rgba(96, 152, 225, 0.12);
  transform: scale(1.08);
}

.item:hover .clear-btn.visible,
.clear-btn.restore-mode {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.delete-task-btn {
  background: none;
  border: none;
  font-size: 15px;
  color: #ef4444;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 6px;
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.delete-task-btn:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
  transform: scale(1.1);
}

.item:hover .delete-task-btn {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.important-icon {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 15px;
  color: #dc3545;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.important-icon:hover {
  background: rgba(220, 53, 69, 0.12);
  transform: scale(1.1);
}

.item:hover .important-icon,
.item.important .important-icon {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Edit mode: Clear/restore, arrow, delete, and important buttons are ALWAYS visible */
.items.is-editing .item .clear-btn,
.items.is-editing .item .task-item-arrow-btn,
.items.is-editing .item .delete-task-btn,
.items.is-editing .item .important-icon {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Task Selection Styling */
.item {
  cursor: pointer;
}

.item.is-selected {
  background: rgba(34, 197, 94, 0.08);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #22c55e, 0 0 10px rgba(34, 197, 94, 0.2);
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html.dark-mode .item.is-selected {
  background: rgba(34, 197, 94, 0.14);
  box-shadow: inset 0 0 0 2px #22c55e, 0 0 12px rgba(34, 197, 94, 0.25);
}

/* Important task when selected: smooth visible gradient from blue to green (90% span) */
.item.important.is-selected {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0.08) 20%, rgba(34, 197, 94, 0.14) 80%, rgba(34, 197, 94, 0.22) 100%) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 0 0 2px #22c55e, 0 0 10px rgba(34, 197, 94, 0.2) !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

html.dark-mode .item.important.is-selected,
body.dark-mode .item.important.is-selected {
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.22) 0%, rgba(0, 210, 255, 0.10) 20%, rgba(34, 197, 94, 0.16) 80%, rgba(34, 197, 94, 0.26) 100%) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 0 0 2px #22c55e, 0 0 12px rgba(34, 197, 94, 0.3) !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* Task Metadata Row & Badges */
.task-content-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.task-extra-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
}

.task-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  line-height: 1.3;
}

html.dark-mode .task-meta-chip {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

/* On-Task Live Countdown Chip */
.task-countdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  line-height: 1.3;
  transition: all 0.2s ease;
}

.task-countdown-chip i {
  font-size: 10px;
}

.task-countdown-chip.task-countdown-green {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.task-countdown-chip.task-countdown-yellow {
  background: #fefce8;
  color: #a16207;
  border-color: #fef08a;
}

.task-countdown-chip.task-countdown-red {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.task-countdown-chip.task-countdown-expired {
  background: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}

.task-countdown-chip.task-countdown-completed {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

html.dark-mode .task-countdown-chip {
  background: #27272a;
  color: #d4d4d8;
  border-color: #3f3f46;
}

html.dark-mode .task-countdown-chip.task-countdown-green {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

html.dark-mode .task-countdown-chip.task-countdown-yellow {
  background: rgba(234, 179, 8, 0.16);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.35);
}

html.dark-mode .task-countdown-chip.task-countdown-red {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

html.dark-mode .task-countdown-chip.task-countdown-expired {
  background: #18181b;
  color: #71717a;
  border-color: #27272a;
}

.task-meta-chip.task-deadline-chip {
  background: #f8fafc;
  color: #334155;
}

html.dark-mode .task-meta-chip.task-deadline-chip {
  background: #0f172a;
  color: #cbd5e1;
}

.task-meta-chip.task-countdown-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
}

/* Countdown color states */
.task-countdown-green {
  color: #16a34a !important;
  border-color: rgba(22, 163, 74, 0.3) !important;
}

.task-countdown-yellow {
  color: #d97706 !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
}

.task-countdown-red {
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}

.task-countdown-expired {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.task-countdown-completed {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

.task-location-link {
  color: #2563eb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.task-location-link:hover {
  text-decoration: underline;
}

html.dark-mode .task-location-link {
  color: #60a5fa;
}

.task-notes-btn {
  background: none;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 13px;
  padding: 0;
  flex-shrink: 0;
}

.task-notes-btn:hover {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  transform: scale(1.1);
}

.task-subtasks-expand-bar {
  display: flex;
  align-items: center;
  margin-top: 3px;
  padding: 1px 0;
  user-select: none;
}

.task-subtasks-toggle-btn {
  background: none;
  border: none;
  border-radius: 4px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.task-subtasks-toggle-btn:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.task-subtasks-toggle-btn .subtask-arrow {
  font-size: 10px;
  transition: transform 0.25s ease;
}

.task-subtasks-toggle-btn.expanded .subtask-arrow {
  transform: rotate(180deg);
}

html.dark-mode .task-subtasks-toggle-btn {
  color: #94a3b8;
}

html.dark-mode .task-subtasks-toggle-btn:hover {
  color: #93c5fd;
  background: rgba(255, 255, 255, 0.08);
}

/* Subtasks list rendered underneath task */
.task-subtasks-container {
  margin-top: 6px;
  margin-left: 12px;
  padding-left: 10px;
  border-left: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

html.dark-mode .task-subtasks-container {
  border-left-color: #334155;
}

.task-subtask-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.task-subtask-item:hover {
  background-color: rgba(37, 99, 235, 0.05);
}

html.dark-mode .task-subtask-item {
  color: #cbd5e1;
}

html.dark-mode .task-subtask-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.task-subtask-item input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  cursor: pointer;
}

.task-subtask-num,
.subtask-num-label {
  font-weight: 600;
  color: #64748b;
  font-size: 12px;
  min-width: 18px;
  user-select: none;
}

html.dark-mode .task-subtask-num,
html.dark-mode .subtask-num-label {
  color: #94a3b8;
}

.task-subtask-text {
  flex: 1;
  user-select: none;
}

.task-subtask-text.checked {
  text-decoration: line-through;
  color: #94a3b8;
}

.task-subtask-input {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 13px;
  color: inherit;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.task-subtask-input:hover {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.4);
}

.task-subtask-input:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

html.dark-mode .task-subtask-input:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

html.dark-mode .task-subtask-input:focus {
  background: #1e1e1e;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  color: #f1f5f9;
}

.task-subtask-input.checked {
  text-decoration: line-through;
  color: #94a3b8;
  opacity: 0.7;
}

.task-subtask-mark-all-btn {
  align-self: flex-start;
  margin-top: 4px;
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.task-subtask-mark-all-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

html.dark-mode .task-subtask-mark-all-btn {
  border-color: #3f3f46;
  color: #60a5fa;
  background: #18181b;
}

html.dark-mode .task-subtask-mark-all-btn:hover {
  background: #27272a;
  color: #93c5fd;
  border-color: #60a5fa;
}

.subtask-mark-all-btn {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.subtask-mark-all-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

html.dark-mode .subtask-mark-all-btn {
  border-color: #3f3f46;
  color: #60a5fa;
  background: #18181b;
}

html.dark-mode .subtask-mark-all-btn:hover {
  background: #27272a;
  color: #93c5fd;
  border-color: #60a5fa;
}

/* Edit Bar locked state */
.edit-bar-locked {
  opacity: 0.45;
  pointer-events: none !important;
  filter: grayscale(0.6);
  user-select: none;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: #fff;
  padding: 5px 0;
  flex-shrink: 0;
  margin-top: auto;
}

.btn {
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  min-width: 100px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.btn.edit {
  background: #007bff;
  color: #fff;
}

.btn.edit:hover {
  background: #469df7;
}

.btn.delete-mode {
  background-color: #dc3545;
  color: #fff;
}

.btn.delete-mode:hover {
  background-color: #f06573;
}

.btn.restore-mode {
  background-color: #007bff;
  color: #fff;
}

.btn.restore-mode:hover {
  background-color: #3399ff;
}

.btn.delete-all-mode {
  background-color: #dc3545;
  color: #fff;
}

.btn.delete-all-mode:hover {
  background-color: #c82333;
}

.btn.add {
  background: #28a745;
  color: #fff;
}

.btn.add:hover {
  background: #218838;
}

.btn.middle-btn {
  background: #6c757d;
  color: #fff;
  min-width: 160px;
}

.btn.middle-btn:hover {
  background: #5a6268;
}

.btn.middle-btn.delete-all {
  background-color: #dc3545;
}

.btn.middle-btn.delete-all:hover {
  background-color: #f06573;
}

.btn.middle-btn.mark-all {
  background-color: #28a745;
}

.btn.middle-btn.mark-all:hover {
  background-color: #218838;
}

/* Hide middle button when Important tab is active or in schedule view */
body:has(.filter-tab[data-filter="important"].active) #middleBtn,
.card:has(.filter-tab[data-filter="important"].active) #middleBtn,
.card.is-schedule-mode #middleBtn {
  display: none !important;
}

.btn.disabled {
  background: #ccc !important;
  color: #6c6868 !important;
  cursor: default !important;
}

button:disabled {
  background-color: #ccc !important;
  color: #797575 !important;
  opacity: 0.7 !important;
  cursor: default !important;
}

.status {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 26px;
  color: #f1c40f;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status.visible {
  opacity: 1;
}

[contenteditable] {
  border-radius: 6px;
  outline: 0px solid rgb(178, 189, 182);
}

[contenteditable]:focus {
  outline: 1px solid rgb(178, 189, 182);
  background: #f4fff4;
}

#titlu {
  display: inline;
  text-align: center;
  padding: 6px 31px;
  color: #bdb7b7;
  transition: 0.2s;
}

#titlu:focus {
  color: #000000;
}

.sectiontitle {
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
}

.empty-state-message {
  text-align: center;
  color: #888;
  font-size: 1.1em;
  padding: 10px 20px 10px 20px;
  font-style: italic;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.empty-state-message.visible {
  opacity: 1;
}

footer {
  position: fixed;
  bottom: 20px;
  font-size: 14px;
  color: #a79f9f;
  text-align: center;
  width: 100%;
  left: 0;
}

.footer-links {
  margin-bottom: 10px;
  font-size: 15px;
}

.footer-links a {
  color: #a79f9f;
  text-decoration: none;
  margin: 0 8px;
  cursor: pointer;
}

.footer-links a:hover {
  text-decoration: underline;
}

footer * {
  cursor: default;
}

/* === SIDEBAR === */
.sidebar {
  width: 280px;
  background: #f4f4f4;
  padding: 15px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-sizing: border-box;
  transition: transform 0.35s ease;
  position: fixed;
  /* Changed to fixed to stay on left */
  left: 0;
  top: 0;
  z-index: 2000;
}

.sidebar.closed {
  transform: translateX(-100%);
}

/* === TOGGLE BUTTON === */
.toggle-btn {
  position: absolute;
  top: 50%;
  right: -36px;
  transform: translateY(-50%);
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 10px;
  width: 40px;
  height: 70px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
  user-select: none;
  z-index: 2001;
}

.toggle-btn:hover {
  background: #eee;
}

.toggle-btn i {
  font-size: 1.2em;
  color: #444;
  transition: transform 0.3s ease;
  user-select: none;
  pointer-events: none;
}

.sidebar.closed .toggle-btn i {
  transform: rotate(180deg);
}

/* === HEADER === */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 38px;
  margin-bottom: 12px;
  padding: 0 2px;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 1.05em;
  font-weight: 700;
  user-select: none;
  color: #1e293b;
  min-height: 28px;
  line-height: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.sidebar-filter-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.sidebar-filter-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 12px;
}

.sidebar-filter-toggle-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.sidebar-filter-wrapper.open .sidebar-filter-toggle-btn {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: rotate(90deg);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.sidebar-filter-expand {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  background: #f8fafc;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  z-index: 100;
  animation: filterFlyout 0.15s ease-out;
}

@keyframes filterFlyout {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(6px);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.filter-opt-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  min-width: 26px;
  height: 24px;
  user-select: none;
}

.filter-opt-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.filter-opt-btn.active {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.filter-opt-btn[data-filter="all"].active {
  background: #2563eb;
  color: #ffffff !important;
  border-color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.filter-opt-btn[data-filter="todo"].active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e293b;
}

.filter-opt-btn[data-filter="todo"].active i {
  color: #2563eb !important;
}

.filter-opt-btn[data-filter="schedule"].active {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #1e293b;
}

.filter-opt-btn[data-filter="schedule"].active i {
  color: #8b5cf6 !important;
}

body.dark-mode .sidebar-header h3 {
  color: #f8fafc;
}

body.dark-mode .sidebar-filter-toggle-btn {
  border-color: #333;
  background: #1e1e1e;
  color: #ccc;
}

body.dark-mode .sidebar-filter-toggle-btn:hover {
  background: #2a2a2a;
  color: #ffffff;
  border-color: #444;
}

body.dark-mode .sidebar-filter-wrapper.open .sidebar-filter-toggle-btn {
  background: #2a2a2a;
  color: #ffffff;
  border-color: #444;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

body.dark-mode .sidebar-filter-expand {
  background: #1e1e1e;
  border-color: #333;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

body.dark-mode .filter-opt-btn {
  color: #aaa;
}

body.dark-mode .filter-opt-btn:hover {
  background: #2a2a2a;
  color: #ffffff;
}

body.dark-mode .filter-opt-btn.active {
  background: #1e1e1e;
  color: #f1f5f9;
  border-color: #333;
}

body.dark-mode .filter-opt-btn[data-filter="all"].active {
  background: #2f2f2f;
  color: #ffffff !important;
  border-color: #4a4a4a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .filter-opt-btn[data-filter="todo"].active {
  background: #151e2e;
  border-color: #1d4ed8;
  color: #f1f5f9;
}

body.dark-mode .filter-opt-btn[data-filter="todo"].active i {
  color: #60a5fa !important;
}

body.dark-mode .filter-opt-btn[data-filter="schedule"].active {
  background: #20152e;
  border-color: #6d28d9;
  color: #f1f5f9;
}

body.dark-mode .filter-opt-btn[data-filter="schedule"].active i {
  color: #a78bfa !important;
}

/* === LIST === */
.list-container-sidebar {
  /* Renamed to avoid conflict with main app list-container */
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 15px;
  padding-right: 5px;
}

ul.class-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

ul.class-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff;
  overflow-x: hidden;
  transition: background 0.25s ease, transform 0.2s ease;
}

ul.class-list li:hover {
  background: #eee;
}

ul.class-list a {
  flex-grow: 1;
  text-decoration: none;
  color: #333;
  font-size: 0.95em;
  display: block;
}

ul.class-list input {
  flex-grow: 1;
  padding: 6px 8px;
  font-size: 0.95em;
  border: 1px solid #ccc;
  border-radius: 5px;
  min-height: 32px;
  box-sizing: border-box;
}

/* === ICON BUTTONS === */
.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1em;
  color: #555;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
  user-select: none;
}

/* Apar pe hover pentru clasele normale */
.class-list li:hover .icon-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Mereu vizibile pentru clasa selectată */
.class-list li.selected .icon-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Invizibile în timpul editării */
.class-list li.editing .icon-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hover efecte */
.edit-btn:hover i {
  color: #1e90ff;
  transform: translateX(-2px) rotate(-6deg);
}

.delete-btn:hover i {
  color: #e74c3c;
  transform: scale(1.08);
}

/* === CLASĂ SELECTATĂ === */
.class-list li.selected {
  background: #d0d0d0 !important;
  transition: background 0.25s ease;
  border-left: 4px solid #1e90ff;
}

/* === FOOTER / ADD === */
.add-class {
  background: #ddd;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
  user-select: none;
}

.add-class:hover {
  background: #bbb;
}

.footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.footer-actions button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: white;
  transition: background 0.2s ease, opacity 0.2s ease;
  user-select: none;
}

.footer-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}

.clear-all-btn {
  background: #e74c3c;
}

.clear-all-btn:hover:not(:disabled) {
  background: #ff6b6b;
}

.restore-btn {
  background: #3498db;
}

.restore-btn:hover:not(:disabled) {
  background: #5dade2;
}

/* === DRAG === */
.drag-placeholder {
  background: rgba(100, 100, 100, 0.1);
  border: 2px dashed #aaa;
  border-radius: 6px;
  margin: 8px 0;
  transition: all 0.2s ease;
}

li.dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

/* === HIGHLIGHT BAR (linia albastră animată) === */
.highlight-bar {
  position: absolute;
  left: 0;
  width: 4px;
  background: #3498db;
  border-radius: 4px;
  transition: top 0.45s cubic-bezier(0.25, 1, 0.5, 1),
    height 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

/* === GRI animat pentru clasa selectată === */
.class-list li.selected {
  background: linear-gradient(90deg, #d9d9d9 0%, #e2e2e2 100%);
  position: relative;
  overflow: hidden;
  transition: background 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

/* === STIL PENTRU EROARE UNICITATE === */
.error-message {
  color: #e74c3c;
  font-size: 0.8em;
  margin-top: 4px;
  padding-left: 8px;
  /* Aliniere sub input */
  display: none;
  /* Ascuns implicit */
}

/* Stil pentru elementul <li> atunci când conține o eroare de editare */
.class-list li.editing-error {
  border: 1px solid #e74c3c !important;
  background: #ffebeb !important;
}

.clear-btn:hover i {
  filter: hue-rotate(-20deg) saturate(150%) brightness(0.9);
  --fa-primary-color: #dc3545;
  --fa-secondary-color: #dc3545;
  transform: scale(1.05);
}

.section-title:empty:before {
  content: attr(data-placeholder);
  color: #bdb7b7;
  pointer-events: none;
}

.clear-btn,
.clear-btn.restore-mode {
  position: relative;
  cursor: pointer;
}

/* === TOOLTIPS === */
/* Bottom action buttons in card: tooltip on top */
.actions .btn[data-tooltip],
.btn[data-tooltip],
.close-right-panel[data-tooltip] {
  position: relative;
  z-index: 1500;
}

.actions .btn[data-tooltip]:hover::after,
.btn[data-tooltip]:hover::after,
.close-right-panel[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 18, 0.92);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Task row buttons (Clear, Delete, Important): tooltip positioned BELOW the buttons */
.clear-btn[data-tooltip],
.delete-task-btn[data-tooltip],
.important-icon[data-tooltip],
.item .clear-btn[data-tooltip],
.item .delete-task-btn[data-tooltip],
.item .important-icon[data-tooltip] {
  position: relative;
  z-index: 2;
}

.clear-btn[data-tooltip]:hover,
.delete-task-btn[data-tooltip]:hover,
.important-icon[data-tooltip]:hover,
.item .clear-btn[data-tooltip]:hover,
.item .delete-task-btn[data-tooltip]:hover,
.item .important-icon[data-tooltip]:hover {
  z-index: 25;
}

.clear-btn[data-tooltip]:hover::after,
.delete-task-btn[data-tooltip]:hover::after,
.important-icon[data-tooltip]:hover::after,
.item .clear-btn[data-tooltip]:hover::after,
.item .delete-task-btn[data-tooltip]:hover::after,
.item .important-icon[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 18, 0.92);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.delete-task-btn[data-tooltip]:hover::after,
.item .delete-task-btn[data-tooltip]:hover::after {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.clear-btn[data-tooltip]:hover::after,
.item .clear-btn[data-tooltip]:hover::after {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* Position rightmost important button tooltip aligned right to prevent horizontal overflow */
.important-icon[data-tooltip]:hover::after,
.item .important-icon[data-tooltip]:hover::after {
  left: auto;
  right: 0;
  transform: none;
}

@keyframes shake-error {

  0%,
  100% {
    transform: translateX(0);
    box-shadow: none;
  }

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

  50% {
    transform: translateX(4px);
    box-shadow: 0 0 8px 1px rgba(220, 53, 69, 0.4);
  }

  75% {
    transform: translateX(-4px);
  }
}

.item.invalid-check-animation .textbox {
  animation: shake-error 0.5s ease-in-out;
}

.item.important {
  background: #fff8f8;
  border-left: 4px solid #e74c3c;
}

.item.important .important-icon {
  color: #e74c3c;
}

.important-icon {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 5px;
  margin-left: 5px;
  transition: color 0.2s;
}

.important-icon:hover {
  color: #e74c3c;
}

h2,
.btn,
footer,
.sidebar-toggle {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.items:not(.is-editing) .important-icon {
  display: none;
}

.item.important {
  position: relative;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-left: 2px solid #222;
  border-right: 2px solid #222;
  border-radius: 10px;
}

@keyframes shake-exclamation {
  0% {
    transform: scale(1);
    color: #e63946;
  }

  20% {
    transform: rotate(-18deg) scale(1.4);
    color: #f7b32b;
  }

  40% {
    transform: rotate(18deg) scale(1.3);
  }

  60% {
    transform: rotate(-11deg) scale(1.4);
  }

  80% {
    transform: rotate(11deg) scale(1.25);
  }

  100% {
    transform: rotate(0deg) scale(1);
    color: #e63946;
  }
}

.important-icon.active i {
  animation: shake-exclamation 0.75s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Restored missing CSS styles */

.card.shifted-left {
  transform: translateX(-240px);
}

.right-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: #f8f9fa;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1),
    background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.right-panel.active {
  transform: translateX(0);
}

.right-panel-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 3.5px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.close-right-panel {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #888;
  padding: 5px;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-right-panel:hover {
  color: #dc3545;
  transform: rotate(90deg);
}

.right-panel-content {
  padding: 16px 16px 50px 16px;
  pointer-events: auto;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 150, 150, 0.4) transparent;
}

.right-panel-content::-webkit-scrollbar {
  width: 6px;
}

.right-panel-content::-webkit-scrollbar-thumb {
  background-color: rgba(150, 150, 150, 0.4);
  border-radius: 4px;
}

/* Delete Alert Container - Styled */
.delete-alert {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, calc(100% + 30px));
  max-width: 740px;
  width: 90%;
  min-height: 70px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  padding: 8px 0;
}

.delete-alert.active {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.delete-alert-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.delete-alert-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.delete-alert-countdown {
  font-size: 28px;
  font-weight: bold;
  color: #dc3545;
  margin: 0 20px;
  min-width: 45px;
  text-align: center;
}

.delete-alert-actions {
  display: flex;
  gap: 10px;
}

.delete-alert-actions button {
  padding: 6px 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm {
  background: #dc3545;
  color: #fff;
}

.btn-confirm:hover {
  background: #c82333;
}

.btn-cancel {
  background: #6c757d;
  color: #fff;
}

.btn-cancel:hover {
  background: #5a6268;
}

.delete-alert-progress {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  position: relative;
  overflow: hidden;
}

.delete-alert-progress-bar {
  height: 100%;
  background: #007bff;
  width: 100%;
  transition: none;
}

/* Dark mode Delete Alert */
body.dark-mode .delete-alert {
  background: #181818 !important;
  border: 1px solid #2d2d2d !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75) !important;
}

body.dark-mode .delete-alert-text {
  color: #f1f5f9 !important;
}

body.dark-mode .delete-alert-countdown {
  color: #ef4444 !important;
}

body.dark-mode .btn-confirm {
  background: #dc2626 !important;
  color: #ffffff !important;
}

body.dark-mode .btn-confirm:hover {
  background: #b91c1c !important;
}

body.dark-mode .btn-cancel {
  background: #27272a !important;
  color: #d4d4d8 !important;
  border: 1px solid #3f3f46 !important;
}

body.dark-mode .btn-cancel:hover {
  background: #3f3f46 !important;
  color: #ffffff !important;
}

body.dark-mode .delete-alert-progress {
  background: #27272a !important;
}

body.dark-mode .delete-alert-progress-bar {
  background: #3b82f6 !important;
}

.important-icon {
  background: none;
  border: none;
  color: #535252;
  cursor: pointer;
  margin-left: 8px;
  font-size: 1.15em;
  transition: color 0.2s, transform 0.2s;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.important-icon:hover {
  color: #e63946;
  transform: scale(1.1);
}

.important-icon.active {
  color: #e63946;
}

.task.important {
  border: 2px solid #222;
  box-shadow: 0 0 8px #e63946;
}

/* Important tasks always show full textarea height */
.item.important .textbox {
  max-height: none !important;
}

/* === TIME OPTIONS STYLING === */
.btn-time-toggle {
  background: #6c757d;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
  width: 100%;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.btn-time-text {
  flex: 1;
  text-align: center;
}

.time-arrow {
  position: absolute;
  right: 20px;
}

.btn-time-toggle:hover {
  background: #5a6268;
}

.btn-time-toggle .time-arrow {
  transition: transform 0.3s ease;
}

.btn-time-toggle.expanded .time-arrow {
  transform: rotate(180deg);
}

.time-options {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  background: transparent;
  padding: 0;
}

.time-options.expanded {
  max-height: 1200px;
  opacity: 1;
  margin-top: 14px;
  padding: 0;
}

.deadline-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 4px 0 14px 0;
  letter-spacing: 0.3px;
}

.time-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.time-section:last-child {
  margin-bottom: 0;
}

.section-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 10px;
}

.time-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.time-section-header-row .section-label,
.time-section-header-row .section-label-with-icon {
  margin-bottom: 0;
}

.time-mode-pill-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  padding: 2px;
  gap: 2px;
}

.time-mode-pill {
  border: none;
  background: transparent;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 9999px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  line-height: 1.2;
}

.time-mode-pill:hover {
  color: #1e293b;
}

.time-mode-pill.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.time-quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.time-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.2s ease;
  user-select: none;
  box-sizing: border-box;
}

.time-action-btn:hover:not(:disabled) {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.time-action-btn:active:not(:disabled) {
  background: #cbd5e1;
}

.time-action-btn:disabled,
.time-action-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.location-clear-btn {
  margin: 0;
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.location-clear-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}

body.dark-mode .location-clear-btn,
html.dark-mode .location-clear-btn {
  background: #1e1e1e;
  color: #cbd5e1;
  border-color: #333;
}

body.dark-mode .location-clear-btn:hover,
html.dark-mode .location-clear-btn:hover {
  background: #2a2a2a;
  color: #ffffff;
  border-color: #555;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.toggle-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

input:checked+.toggle-slider {
  background-color: #10b981;
}

input:checked+.toggle-slider:before {
  transform: translateX(18px);
}

.input-container {
  position: relative;
}

.single-input,
.duo-input {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.single-input {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: scaleY(0);
  transform-origin: top;
  transition: all 0.3s ease;
}

.single-input.active {
  opacity: 1;
  max-height: 100px;
  transform: scaleY(1);
}

.duo-input {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: scaleY(0);
  transform-origin: top;
  transition: all 0.3s ease;
  display: flex;
  gap: 10px;
}

.duo-input.active {
  opacity: 1;
  max-height: 100px;
  transform: scaleY(1);
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.time-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.time-input:focus {
  border-color: #3b82f6;
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.time-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* === VISUALS SECTION === */
.visuals-title {
  margin-top: 18px;
  margin-bottom: 10px;
}

.visuals-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-top: 0;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.visual-option {
  margin-bottom: 14px;
}

.visual-option:last-child {
  margin-bottom: 0;
}

.visual-checkbox-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  justify-content: flex-start;
}

.visual-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #10b981;
}

.visual-label {
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.deadline-display {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
  background-color: #f1f5f9;
  color: #334155;
  cursor: default;
}

.deadline-display:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
}

.deadline-display::placeholder {
  color: #94a3b8;
}

/* === CALENDAR ICONS === */
.section-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  line-height: 1;
}

.section-label-with-icon .section-label {
  margin-bottom: 0;
  line-height: 1;
  display: inline-block;
}

.input-label-with-icon {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.calendar-icon-btn,
.calendar-icon-btn-small {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
  vertical-align: middle;
  line-height: 1;
}

.calendar-icon-btn {
  font-size: 14px;
}

.calendar-icon-btn-small {
  font-size: 13px;
}

.calendar-icon-btn:hover,
.calendar-icon-btn-small:hover {
  color: #2563eb;
  transform: scale(1.1);
}

.date-picker-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Hide/show calendar icons based on mode */
.calendar-icon-main-hidden {
  display: none;
}

.calendar-icons-duo-hidden {
  display: none;
}

/* === GAME MENU ANIMATIONS & STYLES (EASTER EGG) === */

@keyframes slideOutLeft {
  to {
    transform: translateX(-150%);
    opacity: 0;
  }
}

@keyframes slideOutRight {
  to {
    transform: translateX(150%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-150%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(150%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-out-left {
  animation: slideOutLeft 1.2s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.slide-out-right {
  animation: slideOutRight 1.2s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.slide-in-left {
  animation: slideInLeft 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.slide-in-right {
  animation: slideInRight 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

body.game-mode {
  overflow: hidden;
  /* Prevent scrolling during animation */
}

/* Game Menu Overlay */
.game-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  /* Elements slide out leaving blank */
  z-index: 10000;
  opacity: 0;
  transition: opacity 1s ease-in;
  pointer-events: none;
}

.game-menu.visible {
  opacity: 1;
  pointer-events: auto;
}

.game-title {
  font-family: 'Press Start 2P', 'Courier New', monospace;
  /* Arcade Font */
  font-size: 3rem;
  /* Slightly smaller to fit */
  color: #333;
  margin-bottom: 40px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 2px 2px 0px #eee, 4px 4px 0px #ddd;
  text-align: center;
  line-height: 1.5;
}

.game-menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 300px;
}

.game-btn {
  padding: 15px 0;
  font-size: 1.2rem;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-weight: bold;
  color: #333;
  background: white;
  border: 3px solid #333;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 4px 4px 0px #333;
  text-align: center;
}

.game-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #333;
  background-color: #f0f0f0;
}

.game-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #333;
}

/* Canvas & In-Game UI */
#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10010;
  /* Above menu buttons when active */
  background: #000;
  /* Space background */
}

#addLocationBtn {
  background-color: #ccc;
  /* Darker gray */
  border-color: #bbb;
  color: #333;
}

#addLocationBtn:hover {
  background-color: #bbb;
}

#mapContainer {
  width: 100%;
  height: 200px;
  min-height: 200px;
  /* Force height */
  margin-top: 15px;
  border-radius: 8px;
  border: 2px solid #ccc;
  /* Thicker border to be visible */
  z-index: 10;
  background-color: #e9e9e9;
  /* Gray background to show if map fails to load */
  display: block;
  /* Ensure block display */
}

/* My Location Button */
.my-location-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background-color: #333;
  /* Dark theme to match app */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.my-location-btn:hover {
  background-color: #444;
}

/* Fix for Leaflet tiles rendering in some contexts (Leftover but harmless) */
.leaflet-container {
  font-family: 'Poppins', sans-serif;
}

/* Expandable Options Logic */
.time-options {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.time-options.expanded {
  max-height: 2500px;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
}

.btn-time-toggle .time-arrow {
  transition: transform 0.3s ease;
}

.btn-time-toggle.expanded .time-arrow {
  transform: rotate(180deg);
}

/* IMPORT / EXPORT DROPDOWN ZONES */
.export-option {
  padding: 8px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
  color: #333;
  border-radius: 5px;
}

.export-option:hover {
  background-color: #e9ecef;
  color: #007bff;
}

.drag-drop-zone {
  border: 2px dashed #007bff;
  border-radius: 8px;
  padding: 20px 10px;
  text-align: center;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.drag-drop-zone.dragover {
  background-color: #e2e6ea;
  border-color: #28a745;
}

.drag-drop-zone.invalid {
  border-color: #dc3545;
  background-color: #f8d7da;
  animation: shake 0.5s;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

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

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}

/* DRAG AND DROP VISUAL HINTS */
.item.dragging {
  opacity: 0.6;
  background-color: #f1f8ff;
  border: 1px dashed #007bff;
  transform: scale(0.98);
}

.task-placeholder {
  height: 50px;
  background-color: #f8f9fa;
  border: 2px dashed #007bff;
  border-radius: 8px;
  margin-bottom: 10px;
  opacity: 0.6;
  pointer-events: none;
  /* Ignore mouse events to keep dragover stable */
}

/* Attributes & Tags Items Styling */
.attribute-item {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f1f3f5;
  border: 1px solid #dee2e6;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #495057;
  transition: background-color 0.2s;
  margin-right: 6px;
  margin-bottom: 6px;
  animation: slideDownFadeIn 0.3s ease-out forwards;
}

.attribute-item.removing {
  animation: popOut 0.3s ease-in forwards;
}

@keyframes slideDownFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  40% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* Attributes UI Animations */
.class-flip-container {
  perspective: 600px;
  position: relative;
  width: 100%;
  height: 38px;
}

.class-flip-inner {
  width: 100%;
  height: 100%;
  position: absolute;
  transition: transform 0.5s ease-in-out;
  transform-style: preserve-3d;
}

.class-flip-inner.flipped {
  transform: rotateX(-180deg);
}

.class-flip-front,
.class-flip-back {
  width: 100%;
  height: 100%;
  position: absolute;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  top: 0;
  left: 0;
}

.class-flip-front {
  display: flex !important;
}

.class-flip-back {
  transform: rotateX(180deg);
  display: flex !important;
}

.class-fade-input {
  transition: background-color 0.4s ease, color 0.4s ease;
}

.class-fade-input.saved {
  background-color: #28a745 !important;
  color: white !important;
  border-color: #28a745 !important;
}

.attribute-item:hover {
  background-color: #e9ecef;
}

.delete-attribute-btn {
  background: none;
  border: none;
  color: #adb5bd;
  cursor: pointer;
  padding: 0 0 0 10px;
  font-size: 14px;
  transition: color 0.2s;
}

.delete-attribute-btn:hover {
  color: #dc3545;
}

/* Custom Select Styling */
.custom-dropdown-list {
  scrollbar-width: thin;
}

.custom-select-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f5;
  transition: background-color 0.2s;
}

.custom-select-option:hover {
  background-color: #f1f8ff;
}

.custom-select-option:last-child {
  border-bottom: none;
}

.delete-class-btn {
  background: none;
  border: none;
  color: #adb5bd;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-class-btn:hover {
  color: #dc3545;
  background-color: #ffeef0;
}

/* Subtasks Styling */
.subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 10px;
  animation: slideDownFadeIn 0.3s ease-out forwards;
}

.subtask-item.removing {
  animation: popOut 0.3s ease-in forwards;
}

.subtask-item input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #333;
}

.subtask-item input[type="text"].checked {
  text-decoration: line-through;
  color: #888;
}

.subtask-item input[type="text"]:focus {
  border-bottom: 1px solid #007bff;
}

.subtask-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Attachments Styling */
.url-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 10px;
  animation: slideDownFadeIn 0.3s ease-out forwards;
}

.url-item.removing {
  animation: popOut 0.3s ease-in forwards;
}

.url-item img.favicon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

.url-item a.url-link {
  flex: 1;
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.url-item a.url-link:hover {
  text-decoration: underline;
}

/* Priority Styling */
.priority-btn.active.Low {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.priority-btn.active.Medium {
  background-color: #fff3cd;
  color: #856404;
  border-color: #ffeeba;
}

.priority-btn.active.High {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

/* --- NIGHT MODE TOGGLE SWITCH & THEME OVERRIDES --- */

.theme-switch-wrapper,
.top-controls-wrapper {
  position: absolute;
  top: 25px;
  right: 35px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
}

/* --- FLAG LANGUAGE SWITCHER --- */
.lang-switcher-container {
  position: relative;
  display: inline-block;
  user-select: none;
}

.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.lang-switcher-btn:hover {
  background: #f8fafc;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.lang-flag-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.flag-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lang-code-text {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.5px;
}

.lang-chevron {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.lang-switcher-container.open .lang-chevron {
  transform: rotate(180deg);
}

/* Language Dropdown Menu */
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 196px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10001;
  animation: langDropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes langDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.lang-dropdown-item:hover {
  background: #f1f5f9;
}

.lang-dropdown-item.active {
  background: #eff6ff;
}

.dropdown-flag-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.dropdown-lang-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.lang-dropdown-item.active .dropdown-lang-name {
  color: #2563eb;
}

.dropdown-lang-code {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.lang-dropdown-item.active .dropdown-lang-code {
  color: #3b82f6;
}

/* Dark Mode Overrides for Language Switcher */
body.dark-mode .lang-switcher-btn {
  background: #1e1e1e;
  border-color: #333333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

body.dark-mode .lang-switcher-btn:hover {
  background: #282828;
  border-color: #444444;
}

body.dark-mode .lang-code-text {
  color: #f0f0f0;
}

body.dark-mode .lang-chevron {
  color: #a1a1aa;
}

body.dark-mode .lang-dropdown-menu {
  background: #141414;
  border-color: #262626;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
}

body.dark-mode .lang-dropdown-item:hover {
  background: #222222;
}

body.dark-mode .lang-dropdown-item.active {
  background: #007bff;
}

body.dark-mode .dropdown-lang-name {
  color: #f0f0f0;
}

body.dark-mode .lang-dropdown-item.active .dropdown-lang-name {
  color: #ffffff;
}

body.dark-mode .dropdown-lang-code {
  color: #888888;
}

body.dark-mode .lang-dropdown-item.active .dropdown-lang-code {
  color: #ffffff;
}

/* Visibility Control Toggles */
html.hide-language-button #langSwitcherContainer,
html.hide-language-button .lang-switcher-container,
body.hide-language-button #langSwitcherContainer,
body.hide-language-button .lang-switcher-container {
  display: none !important;
}

html.hide-theme-button .theme-switch,
body.hide-theme-button .theme-switch {
  display: none !important;
}

/* Global Smooth Theme Transitions */
body,
.sidebar,
.list-container-sidebar,
.class-item,
.task-item,
.edit-bar,
.tabs-container .tab,
.tabs-container-right .right-tab,
.settings-modal-dialog,
.settings-modal-header,
.settings-modal-body,
.settings-modal-footer,
.settings-nav-tab,
.settings-radio-card,
.settings-toggle-row,
.settings-select,
.calendar-card,
.format-option-btn,
.formats-live-preview-box,
.lang-switcher-btn,
.lang-dropdown-menu,
.top-settings-btn,
.delete-alert,
.modal-content,
.search-input {
  transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.theme-slider {
  background-color: #f0f4fa;
  border: 1px solid #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  box-sizing: border-box;
  overflow: hidden;
}

.theme-slider .icon-sun {
  color: #f39c12;
  font-size: 14px;
  z-index: 1;
}

.theme-slider .icon-moon {
  color: #f1c40f;
  font-size: 14px;
  z-index: 1;
}

.theme-slider:before {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  bottom: 3px;
  content: "";
  height: 26px;
  left: 3px;
  position: absolute;
  transition: .4s;
  width: 26px;
  z-index: 2;
}

input:checked+.theme-slider {
  background-color: #1e1e1e;
  border-color: #333333;
}

input:checked+.theme-slider:before {
  transform: translateX(26px);
  background-color: #141414;
}

.theme-slider.round {
  border-radius: 34px;
}

.theme-slider.round:before {
  border-radius: 50%;
}

/* --- DARK MODE GLOBAL OVERRIDES --- */
body.dark-mode {
  background: #0a0a0a;
  /* Point 1: Even darker background */
  color: #f0f0f0;
  /* Point 1: Brighter, more readable text */
}

body.dark-mode .card,
body.dark-mode .schedule-legend-card {
  background: #141414;
  /* Point 1: Darker card */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

body.dark-mode .schedule-legend-card,
html.dark-mode .schedule-legend-card {
  background: #141414;
  color: #f8fafc;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

/* Point 7: Fix white scroll fade out at bottom of main card */
body.dark-mode .list-container::after {
  background: linear-gradient(to bottom, rgba(20, 20, 20, 0), rgba(20, 20, 20, 1));
}

/* Point 7: Dark Scrollbar */
body.dark-mode ::-webkit-scrollbar {
  width: 10px;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: #1a1a1a;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #444;
}

body.dark-mode .sidebar {
  background: #141414;
  border-right: 1px solid #222;
}

/* Point 2: Task manager classes (sidebar list items) - FIXED SELECTORS */
body.dark-mode .class-list li {
  background-color: #1e1e1e !important;
  color: #ccc !important;
  border: 1px solid #333 !important;
}

body.dark-mode .class-list li.selected {
  background-color: #0d2a4a !important;
  /* Point 2: Dark blue active state */
  color: #fff !important;
  border-color: #1a4a7a !important;
}

body.dark-mode .class-list li.selected a {
  color: #fff !important;
}

body.dark-mode .class-list li:hover:not(.selected) {
  background-color: #252525 !important;
  /* Point 5: Slight hover brightness */
}

body.dark-mode .toggle-btn {
  background: #222 !important;
  color: #eee !important;
  /* Point 3: Brighter arrow */
  border: 1px solid #111 !important;
  /* Point 3: Darker border */
}

body.dark-mode button.add-class {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #fff;
}

body.dark-mode button.add-class:hover {
  background: #2a2a2a;
}

body.dark-mode .extra-tab {
  background-color: #1e1e1e;
  color: #aaa;
  border-color: #333;
}

body.dark-mode .extra-tab.active {
  background-color: #141414;
  color: #fff;
  border-bottom: 1px solid #141414;
}

body.dark-mode .right-tab {
  background-color: #1e1e1e;
}

/* Point 5: Dropdown neutral dark theme */
body.dark-mode .order-dropdown {
  background: #1e1e1e !important;
  border-color: #333 !important;
  color: #f0f0f0 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .order-option,
body.dark-mode .export-option {
  color: #ccc !important;
  background-color: transparent !important;
}

body.dark-mode .order-option:hover,
body.dark-mode .export-option:hover {
  background-color: #2a2a2a !important;
  color: #ffffff !important;
}

body.dark-mode .order-option.active {
  color: #ffffff !important;
  background-color: #282828 !important;
  font-weight: 600;
}

body.dark-mode .order-option.active .order-check-icon {
  color: #ffffff !important;
}

body.dark-mode .sub-section {
  background-color: #141414 !important;
  border-top-color: #2a2a2a !important;
  border-bottom-color: #2a2a2a !important;
}

body.dark-mode .order-slider-wrapper {
  border-color: #2a2a2a;
}

/* Dark Mode for Filter Pills */
body.dark-mode .order-filter-pill {
  background: #1e1e1e !important;
  color: #ccc !important;
  border-color: #333 !important;
}

body.dark-mode .order-filter-pill:hover {
  background: #2a2a2a !important;
  border-color: #444 !important;
  color: #ffffff !important;
}

body.dark-mode .order-filter-pill.active {
  background: #2f2f2f !important;
  color: #ffffff !important;
  border-color: #555 !important;
  box-shadow: 0 0 0 1px #555 !important;
}

body.dark-mode .order-filter-pill.active .pill-check {
  color: #ffffff !important;
}

/* Dark Mode for Sliders */
body.dark-mode .slider-track-bg {
  background: #333 !important;
}

body.dark-mode .slider-track-fill {
  background: #777 !important;
}

body.dark-mode .range-slider input[type="range"]::-webkit-slider-thumb {
  background: #eee !important;
  border: 2px solid #222 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .slider-group label {
  color: #ccc !important;
}

body.dark-mode .range-display {
  color: #ffffff !important;
}

body.dark-mode .range-display:hover {
  border-bottom-color: #ffffff !important;
  color: #ffffff !important;
}

body.dark-mode .edit-inputs input {
  background: #141414 !important;
  border: 1px solid #333 !important;
  color: #ffffff !important;
}

/* Point 9: Dark Task Items & Checkboxes */
body.dark-mode .item {
  background-color: #141414;
  /* Darker tasks */
  border: 1px solid #141414;
  color: #f0f0f0;
}

body.dark-mode .item input[type="checkbox"] {
  accent-color: #3498db;
  filter: invert(1) hue-rotate(180deg) brightness(0.8);
  /* Point 9: Darkened checkbox effect */
}

body.dark-mode .item input[type="text"] {
  color: #f0f0f0;
  background-color: transparent;
}

body.dark-mode .item input[type="text"]:focus {
  background-color: #222;
  color: #fff;
}

/* Point 9: Important Task Visibility - Enhanced */
body.dark-mode .item.important {
  background-color: #2a1f0a !important;
  border-color: #e67e22 !important;
  box-shadow: inset 0 0 15px rgba(230, 126, 34, 0.3);
}

/* Fix: Section Title background turning white on focus */
body.dark-mode .section-title[contenteditable="true"]:focus {
  background-color: #222 !important;
  color: #fff !important;
  outline: none;
}

body.dark-mode .item.selected {
  border: 1.5px solid #0d2a4a;
  background-color: #081625;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: #f0f0f0 !important;
}

/* Point 8: Logo To Do background darker */
body.dark-mode .todo {
  background-color: #1a1a1a !important;
  color: #fff !important;
}

/* Point 6: Edit panel white spots */
body.dark-mode .right-panel {
  background: #141414;
  border-left: 1px solid #222;
}

body.dark-mode .right-panel-header {
  background: #1c1c1c !important;
  /* Fix Point 6: White header */
  border-bottom: 1px solid #333;
}

body.dark-mode .right-panel .btn-time-toggle {
  background: #222;
  color: #f0f0f0;
  border: 1px solid #333;
}

body.dark-mode .time-options {
  background: #1e1e1e;
  border-color: #333;
}

body.dark-mode .time-input,
body.dark-mode .custom-select {
  background: #141414;
  border-color: #333;
  color: #f0f0f0;
}

/* Point 6: Subtasks/Add Class buttons in edit panel */
body.dark-mode .btn.add {
  background-color: #1e1e1e;
  border: 1px solid #333;
  color: #fff;
}

body.dark-mode .subtask-item,
body.dark-mode .url-item,
body.dark-mode .attribute-item {
  background: #222 !important;
  /* Darker sub-items */
  border-color: #333 !important;
  color: #f0f0f0 !important;
}

body.dark-mode .url-link {
  color: #64b5f6;
}

body.dark-mode .priority-btn {
  background: #1e1e1e !important;
  color: #ccc !important;
  border-color: #333 !important;
}

body.dark-mode .drag-drop-zone {
  border-color: #333;
  background: #141414;
}

body.dark-mode .task-placeholder {
  border-color: #444;
  background: #222;
}

/* --- FINAL DARK MODE REFINEMENTS --- */
/* Fix for persistent white zones in task inputs and bottom actions */
body.dark-mode textarea.textbox,
body.dark-mode .textbox-wrapper {
  background: transparent !important;
  background-color: transparent !important;
  color: #f0f0f0 !important;
}

/* Ensure focus state is also dark */
body.dark-mode textarea.textbox:focus {
  background-color: #222 !important;
  background: #222 !important;
  color: #fff !important;
  border-color: #3498db !important;
}

/* Footer actions area background fix */
body.dark-mode .actions {
  background: #141414 !important;
  background-color: #141414 !important;
  border-top: 1px solid #333;
}

/* Center and side action containers */
body.dark-mode .left-actions,
body.dark-mode .center-actions,
body.dark-mode .right-actions {
  background: transparent !important;
}

/* Active tab color in dark mode (less eye-straining) */
body.dark-mode .filter-tab.active {
  background-color: #0d3a6a !important;
  border-color: #1a4a7a !important;
}

/* Middle button refine */
body.dark-mode .btn.middle-btn {
  background-color: #222 !important;
  color: #ccc !important;
  border: 1px solid #333 !important;
}

body.dark-mode .btn.middle-btn:hover:not(:disabled) {
  background-color: #333 !important;
  color: #fff !important;
}

/* Logo "To Do" refinement */
body.dark-mode .todo {
  background-color: #1a1a1a !important;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.05);
}

/* Global Footer Polish */
body.dark-mode .global-footer {
  background-color: #0a0a0a !important;
  color: #888 !important;
  border-top: 1px solid #222;
}

body.dark-mode .global-footer a {
  color: #64b5f6 !important;
}

body.dark-mode .global-footer a:hover {
  color: #90caf9 !important;
  text-decoration: underline;
}

/* Tasks done text color */
body.dark-mode textarea.textbox.checked {
  color: #636363 !important;
  text-decoration: line-through;
}

/* --- PHASE 2 DARK MODE REFINEMENTS --- */

/* Task Manager (Sidebar) */
body.dark-mode .class-list li {
  color: #fff !important;
  /* Make class text bright/visible */
}

body.dark-mode .clear-all-btn,
body.dark-mode .restore-btn,
body.dark-mode .delete-all-btn {
  background-color: #1a1a1a !important;
  /* Darken Restore/Clear All buttons */
  border-color: #333 !important;
  color: #ccc !important;
}

body.dark-mode .clear-all-btn:hover,
body.dark-mode .restore-btn:hover,
body.dark-mode .delete-all-btn:hover {
  background-color: #252525 !important;
}

/* Footer & Logo */
body.dark-mode .global-footer a {
  color: #bbb !important;
  /* Reverting to old footer style, remove blue */
}

body.dark-mode .global-footer a:hover {
  color: #fff !important;
  text-decoration: underline;
}

body.dark-mode .todo {
  background-color: #000000 !important;
  /* 100% black logo background */
}

/* Edit & Clear Buttons */
body.dark-mode .btn.edit {
  background-color: #0056b3 !important;
  /* Darker edit button */
  color: #fff !important;
}

body.dark-mode .clear-btn i {
  --fa-primary-color: #3c6aa6 !important;
  /* Darker clear button */
  --fa-secondary-color: #555 !important;
}

/* Hovers (Windows, Tasks) - Make it darker */
body.dark-mode .item:hover {
  background-color: #1a1a1a !important;
  /* Extremely subtle/no hover brighten */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
}


body.dark-mode .export-option:hover {
  background-color: #2a2a2a !important;
  /* Darker dropdown hover */
}

/* Order By Active (blue but darker) */
body.dark-mode .filter-tab.active-order-bg {
  background-color: #0b2e59 !important;
  /* Darker blue active tab */
  border-color: #0b2e59 !important;
}

/* ========================================================= */
/* === CLASS TYPE BADGES & SIDEBAR DIFFERENTIATION === */
/* ========================================================= */
.class-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all 0.2s ease;
}

.class-list li.filtered-out {
  display: none !important;
}

.class-type-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.class-type-icon.todo-icon {
  color: #3b82f6;
}

.class-type-icon.schedule-icon {
  color: #8b5cf6;
}

/* All done badge for completed classes - Minimalist Anti-AI design */
.class-all-done-badge {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f2;
  color: #3b6e4c;
  border: 1px solid #d6e2d9;
  margin-left: auto;
  margin-right: 4px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  transition: all 0.2s ease;
  line-height: 1.2;
  flex-shrink: 0;
}

body.dark-mode .class-all-done-badge {
  background: rgba(46, 82, 57, 0.25);
  color: #92baa0;
  border: 1px solid rgba(146, 186, 160, 0.2);
}

li[data-class-type="schedule"] {
  border-left: 3px solid #8b5cf6 !important;
}

li[data-class-type="todo"] {
  border-left: 3px solid #3b82f6 !important;
}

/* ========================================================= */
/* === ADD CLASS MODAL === */
/* ========================================================= */
.class-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
}

.class-modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.class-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.class-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.class-modal-title i {
  font-size: 22px;
  color: #2563eb;
  background: #eff6ff;
  padding: 10px;
  border-radius: 12px;
}

.class-modal-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.class-modal-title span {
  font-size: 12px;
  color: #64748b;
  display: block;
}

.class-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

.class-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.class-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.class-modal-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: -6px;
}

.class-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.class-type-card {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 14px;
  cursor: pointer;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.2s ease;
}

.class-type-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.class-type-card.active {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.class-type-card[data-type="schedule"].active {
  border-color: #8b5cf6;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.class-type-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.class-type-icon-wrapper.todo {
  background: #dbeafe;
  color: #1d4ed8;
}

.class-type-icon-wrapper.schedule {
  background: #ede9fe;
  color: #6d28d9;
}

.class-type-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-type {
  font-size: 10px;
  padding: 2px 6px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 9999px;
}

.badge-type.schedule {
  background: #ede9fe;
  color: #5b21b6;
}

.class-type-desc {
  margin: 0;
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}

.class-type-check {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 16px;
  color: #cbd5e1;
  transition: color 0.2s;
}

.class-type-card.active .class-type-check {
  color: #2563eb;
}

.class-type-card[data-type="schedule"].active .class-type-check {
  color: #7c3aed;
}

.class-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.class-input-wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: #ffffff;
}

.class-input-wrapper i {
  color: #64748b;
  font-size: 15px;
}

.class-name-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

.class-modal-error {
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.class-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.btn-modal-cancel {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-modal-create {
  background: #2563eb;
  border: none;
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-modal-create:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

/* Dark mode Add Class modal (Pure Black Theme) */
body.dark-mode .class-modal-overlay {
  background: rgba(0, 0, 0, 0.75);
}

body.dark-mode .class-modal-dialog {
  background: #141414 !important;
  border: 1px solid #262626 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
  color: #f0f0f0 !important;
}

body.dark-mode .class-modal-header {
  background: #181818 !important;
  border-bottom: 1px solid #222222 !important;
}

body.dark-mode .class-modal-title i {
  background: #1e1e1e !important;
  color: #3b82f6 !important;
}

body.dark-mode .class-modal-title h3 {
  color: #ffffff !important;
}

body.dark-mode .class-modal-title span {
  color: #a1a1aa !important;
}

body.dark-mode .class-modal-close {
  background: #1e1e1e !important;
  border: 1px solid #2a2a2a !important;
  color: #a1a1aa !important;
}

body.dark-mode .class-modal-close:hover {
  background: #262626 !important;
  color: #ffffff !important;
  border-color: #383838 !important;
}

body.dark-mode .class-modal-label {
  color: #e4e4e7 !important;
}

body.dark-mode .class-type-card {
  background: #1a1a1a !important;
  border: 2px solid #262626 !important;
}

body.dark-mode .class-type-card:hover {
  background: #222222 !important;
  border-color: #383838 !important;
}

body.dark-mode .class-type-card.active {
  background: rgba(0, 123, 255, 0.15) !important;
  border-color: #007bff !important;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
}

body.dark-mode .class-type-card[data-type="schedule"].active {
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25) !important;
}

body.dark-mode .class-type-icon-wrapper.todo {
  background: #1e1e1e !important;
  color: #3b82f6 !important;
}

body.dark-mode .class-type-icon-wrapper.schedule {
  background: #1e1e1e !important;
  color: #a855f7 !important;
}

body.dark-mode .class-type-name {
  color: #ffffff !important;
}

body.dark-mode .class-type-desc {
  color: #a1a1aa !important;
}

body.dark-mode .class-type-check {
  color: #444444 !important;
}

body.dark-mode .class-type-card.active .class-type-check {
  color: #007bff !important;
}

body.dark-mode .class-type-card[data-type="schedule"].active .class-type-check {
  color: #8b5cf6 !important;
}

body.dark-mode .class-input-wrapper {
  background: #1a1a1a !important;
  border: 1.5px solid #262626 !important;
}

body.dark-mode .class-input-wrapper:focus-within {
  background: #1e1e1e !important;
  border-color: #007bff !important;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2) !important;
}

body.dark-mode .class-input-wrapper i {
  color: #a1a1aa !important;
}

body.dark-mode .class-name-input {
  color: #ffffff !important;
}

body.dark-mode .class-name-input::placeholder {
  color: #71717a !important;
}

body.dark-mode .btn-modal-cancel {
  background: #1e1e1e !important;
  border: 1px solid #2a2a2a !important;
  color: #a1a1aa !important;
}

body.dark-mode .btn-modal-cancel:hover {
  background: #262626 !important;
  color: #ffffff !important;
  border-color: #383838 !important;
}

body.dark-mode .btn-modal-create {
  background: #007bff !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35) !important;
}

body.dark-mode .btn-modal-create:hover {
  background: #0056b3 !important;
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.45) !important;
}

/* ========================================================= */
/* === SCHEDULE VIEW (ORAR / TIMETABLE) === */
/* ========================================================= */
.schedule-view-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.schedule-days-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.schedule-day-tab {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.schedule-day-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.schedule-day-tab.active {
  background: #007bff;
  color: #ffffff;
  border-color: #007bff;
}

.schedule-day-tab.all-days-tab {
  margin-left: auto;
  background: #f0f7ff;
  color: #007bff;
  border-color: #bfdbfe;
}

.schedule-day-tab.all-days-tab.active {
  background: #007bff;
  color: #ffffff;
  border-color: #007bff;
}

/* Schedule Live Tracker Banner */
.schedule-live-tracker {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.tracker-status-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f0f7ff;
  color: #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tracker-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 200px;
}

.tracker-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.tracker-subtitle {
  font-size: 12px;
  color: #64748b;
}

.schedule-quick-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-tool-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.schedule-tool-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.schedule-tool-btn.primary {
  background: #007bff;
  border-color: #007bff;
  color: #ffffff;
}

.schedule-tool-btn.primary:hover {
  background: #0069d9;
  border-color: #0069d9;
}

.schedule-tool-btn.danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

/* Schedule Add Form Box */
.schedule-add-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schedule-add-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-active-day-label {
  font-size: 11px;
  font-weight: 700;
  color: #007bff;
  background: #f0f7ff;
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
}

.schedule-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-time-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
}

.time-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-field label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.time-field input[type="time"] {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}

.time-sep {
  color: #94a3b8;
  font-weight: bold;
}

.schedule-title-field {
  flex: 1;
  min-width: 180px;
}

.schedule-title-field input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.schedule-title-field input:focus {
  border-color: #007bff;
  background: #ffffff;
}

.schedule-form-row.secondary-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-notes-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 10px;
  min-width: 150px;
}

.schedule-notes-field i {
  color: #94a3b8;
  font-size: 12px;
}

.schedule-notes-field input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #0f172a;
  outline: none;
}

.schedule-category-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-category-picker label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.schedule-category-picker select {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  outline: none;
  cursor: pointer;
}

.schedule-submit-btn {
  background: #007bff;
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.schedule-submit-btn:hover {
  background: #0069d9;
}

/* Schedule Slots List */
.schedule-slots-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-slots-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schedule-slot-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.schedule-slot-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.schedule-slot-card.cat-blue::before {
  background: #007bff;
}

.schedule-slot-card.cat-purple::before {
  background: #8b5cf6;
}

.schedule-slot-card.cat-green::before {
  background: #10b981;
}

.schedule-slot-card.cat-amber::before {
  background: #f59e0b;
}

.schedule-slot-card.cat-rose::before {
  background: #f43f5e;
}

.schedule-slot-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.schedule-slot-card.completed {
  opacity: 0.6;
  background: #f8fafc;
}

.schedule-slot-card.completed .slot-title {
  text-decoration: line-through;
  color: #94a3b8;
}

.slot-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #007bff;
}

.slot-time-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.slot-time-badge i {
  color: #007bff;
  font-size: 10px;
}

.slot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slot-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.slot-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-day-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #f0f7ff;
  color: #007bff;
  padding: 1px 5px;
  border-radius: 4px;
}

.slot-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.slot-delete-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.slot-delete-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.schedule-empty-state {
  text-align: center;
  padding: 30px 20px;
  background: #ffffff;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
  color: #64748b;
}

.schedule-empty-state i {
  font-size: 32px;
  color: #cbd5e1;
  margin-bottom: 8px;
  display: block;
}

.schedule-empty-state h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #0f172a;
}

.schedule-empty-state p {
  margin: 0;
  font-size: 12px;
}

/* === AUTO SCHEDULE IMPORT MODAL STYLES === */
.auto-schedule-dialog {
  max-width: 900px;
}

.auto-schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  height: 100%;
}

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

.auto-schedule-input-col,
.auto-schedule-preview-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auto-schedule-label {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.url-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.url-input-row input {
  flex: 1;
}

.raw-schedule-textarea {
  width: 100%;
  height: 180px;
  resize: vertical;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 10px;
  box-sizing: border-box;
}

.auto-schedule-actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.file-upload-btn {
  margin: 0;
  cursor: pointer;
}

.parsed-slots-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  flex: 1;
  min-height: 220px;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.parsed-empty-state {
  margin: auto;
  text-align: center;
  padding: 24px;
  color: #64748b;
  font-size: 12px;
}

.parsed-empty-state i {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

.parsed-slot-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.parsed-slot-item.deselected {
  opacity: 0.5;
  text-decoration: line-through;
}

.parsed-slot-day {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #f0f7ff;
  color: #007bff;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.parsed-slot-time {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.parsed-slot-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.parsed-slot-title {
  font-weight: 600;
  color: #0f172a;
}

.parsed-slot-loc {
  font-size: 11px;
  color: #64748b;
}

/* === DARK MODE SCHEDULE OVERRIDES === */
body.dark-mode .schedule-live-tracker,
body.dark-mode .schedule-add-box,
body.dark-mode .schedule-slot-card,
body.dark-mode .schedule-empty-state {
  background: #1a1a1a !important;
  border-color: #262626 !important;
  color: #f0f0f0 !important;
}

body.dark-mode .tracker-status-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

body.dark-mode .tracker-title,
body.dark-mode .schedule-add-title,
body.dark-mode .slot-title,
body.dark-mode .auto-schedule-label,
body.dark-mode .parsed-slot-title,
body.dark-mode .parsed-slot-time,
body.dark-mode .schedule-empty-state h4 {
  color: #ffffff !important;
}

body.dark-mode .tracker-subtitle,
body.dark-mode .slot-meta,
body.dark-mode .schedule-empty-state p,
body.dark-mode .parsed-empty-state,
body.dark-mode .parsed-slot-loc {
  color: #a1a1aa !important;
}

body.dark-mode .schedule-tool-btn {
  background: #222222;
  border-color: #333333;
  color: #e4e4e7;
}

body.dark-mode .schedule-tool-btn:hover {
  background: #2a2a2a;
  color: #ffffff;
}

body.dark-mode .schedule-tool-btn.primary {
  background: #007bff;
  border-color: #007bff;
  color: #ffffff;
}

body.dark-mode .schedule-tool-btn.primary:hover {
  background: #0069d9;
}

body.dark-mode .schedule-day-tab {
  background: #1e1e1e;
  border-color: #2a2a2a;
  color: #a1a1aa;
}

body.dark-mode .schedule-day-tab:hover {
  background: #262626;
  color: #ffffff;
}

body.dark-mode .schedule-day-tab.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

body.dark-mode .schedule-day-tab.all-days-tab {
  background: #222222;
  color: #93c5fd;
  border-color: #333333;
}

body.dark-mode .schedule-day-tab.all-days-tab.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

body.dark-mode .schedule-active-day-label,
body.dark-mode .slot-day-tag,
body.dark-mode .parsed-slot-day {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: #1e3a8a;
}

body.dark-mode .schedule-time-inputs,
body.dark-mode .schedule-notes-field,
body.dark-mode .schedule-title-field input,
body.dark-mode .schedule-category-picker select,
body.dark-mode .parsed-slots-container,
body.dark-mode .parsed-slot-item {
  background: #141414 !important;
  border-color: #262626 !important;
  color: #f0f0f0 !important;
}

body.dark-mode .time-field input[type="time"],
body.dark-mode .schedule-notes-field input {
  color: #ffffff !important;
}

body.dark-mode .slot-time-badge {
  background: #222222 !important;
  border-color: #333333 !important;
  color: #cbd5e1 !important;
}

body.dark-mode .slot-time-badge i {
  color: #3b82f6;
}

body.dark-mode .schedule-slot-card:hover,
body.dark-mode .parsed-slot-item:hover {
  background: #222222 !important;
  border-color: #383838 !important;
}


/* Edit Panel Elements */
body.dark-mode #addNewTaskBtn {
  background-color: #175e26 !important;
  /* Dark green add task button */
  color: #fff !important;
  border-color: #11421a !important;
}

/* Time Manager & Panels - Fix White Stuff */
body.dark-mode .time-section,
body.dark-mode .visuals-section,
body.dark-mode .priority-container,
body.dark-mode #newUrlForm,
body.dark-mode #customClassDropdown {

  border-color: #333 !important;
}

body.dark-mode #newUrlForm input,
body.dark-mode .visual-option input {
  background-color: #1e1e1e !important;
  color: #f0f0f0 !important;
  border-color: #333 !important;
}

/* Attributes: Add Class */
body.dark-mode #createClassBtn {
  background-color: #222 !important;
  /* Dark gray */
  background: #222 !important;
  color: #ddd !important;
  border-color: #444 !important;
}

body.dark-mode #createClassBtn:hover {
  background-color: #333 !important;
  background: #333 !important;
}

body.dark-mode .custom-dropdown-list div {
  background-color: #1e1e1e !important;
  color: #f0f0f0 !important;
}

body.dark-mode .custom-dropdown-list div:hover {
  background-color: #2a2a2a !important;
}

/* Additions & Attachments */
body.dark-mode #addUrlBtn {
  background-color: #222 !important;
  /* Darken attachment button */
  color: #ddd !important;
  border-color: #333 !important;
}

/* Priority Buttons (darker tone) */
body.dark-mode .priority-btn {
  background-color: #1a1a1a !important;
  background: #1a1a1a !important;
  color: #bbb !important;
  border-color: #333 !important;
}

body.dark-mode .priority-btn:hover {
  background-color: #252525 !important;
  background: #252525 !important;
}

body.dark-mode .priority-btn.selected {
  background-color: #333 !important;
  background: #333 !important;
  color: #fff !important;
}

/* --- PHASE 3 DARK MODE REFINEMENTS --- */

/* 1. Sidebar Class Text */
body.dark-mode .class-list li,
body.dark-mode .class-list li a {
  color: #ffffff !important;
  /* Brighter white */
}

/* 2. Restore and Clear All Buttons */
body.dark-mode .restore-btn {
  background-color: #0d2a4a !important;
  /* Dark Blue */
  color: #ffffff !important;
  border-color: #0b1d36 !important;
}

body.dark-mode .restore-btn:hover {
  background-color: #154070 !important;
}

body.dark-mode .clear-all-btn,
body.dark-mode .delete-all-btn {
  background-color: #5c0f0f !important;
  /* Dark Red */
  color: #ffffff !important;
  border-color: #3b0a0a !important;
}

body.dark-mode .clear-all-btn:hover,
body.dark-mode .delete-all-btn:hover {
  background-color: #851616 !important;
}

/* 3. Windows & Tabs Inactive background flash */
body.dark-mode .extra-tab {
  background-color: #1e1e1e !important;
  color: #ccc !important;
}

body.dark-mode .extra-tab:hover {
  background-color: #2a2a2a !important;
  color: #ffffff !important;
}

/* Ensure the active 'Order By' tab is dark blue */
body.dark-mode .extra-tab.active,
body.dark-mode #orderByTab.active {
  background-color: #0b2e59 !important;
  /* Darker blue */
  border-color: #0b2e59 !important;
  color: #ffffff !important;
}

/* 4. Footer Line visual fix */
body.dark-mode hr {
  border-color: #222 !important;
}

body.dark-mode .global-footer {
  border-top: 2px solid #141414 !important;
  /* Blend it with the interface */
}

/* 5. Important Task & Icon Styling (Dark Mode - Neon Blue) */
body.dark-mode .item.important:not(.is-selected) {
  background-color: rgb(10, 30, 59) !important;
  /* Deeper navy blue background */
  border: 1px solid #88a6e1 !important;
  /* Base blue border for neon effect */
  border-left: 3px solid #00d2ff !important;
  /* Neon blue side borders */
  border-right: 3px solid #00d2ff !important;
  box-shadow: inset 0 0 15px rgba(0, 208, 255, 0.1), 0 0 10px rgba(0, 210, 255, 0.1) !important;
  /* Stronger neon glossy effect */
  margin: 10px 0 !important;
  border-radius: 8px !important;
}

body.dark-mode .item.important i.fa-star {
  color: #00d2ff !important;
  text-shadow: 0 0 10px rgba(0, 210, 255, 1) !important;
}

/* 6. Time Manager White Spots */
body.dark-mode .deadline-display,
body.dark-mode .range-min-input,
body.dark-mode .range-max-input,
body.dark-mode input[type="number"],
body.dark-mode input[type="text"],
body.dark-mode input[type="url"],
body.dark-mode input[type="date"],
body.dark-mode input[type="time"] {
  background-color: #1e1e1e !important;
  color: #f0f0f0 !important;
  border-color: #333 !important;
}

/* Re-ensure transparent textboxes for task items are not broken */
body.dark-mode .item input[type="text"] {
  background-color: transparent !important;
  border-color: transparent !important;
}

body.dark-mode ::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

/* 7. Subtasks Xmark Positioning Fix (Applies globally to avoid layout shift) */
.subtask-item {
  position: relative;
  padding-right: 35px !important;
}

.subtask-item i.fa-xmark {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  margin: 0 !important;
}

/* 8. Attachments 'Done' Button */
body.dark-mode #saveUrlBtn {
  background-color: #175e26 !important;
  /* Dark Green */
  color: #ffffff !important;
  border-color: #11421a !important;
}

/* 9. Priority Colors specific mapping */
body.dark-mode .priority-btn.active.Low {
  background-color: #175e26 !important;
  /* Dark Green */
  color: #ffffff !important;
  border-color: #11421a !important;
}

body.dark-mode .priority-btn.active.Medium {
  background-color: #8a6c08 !important;
  /* Dark Yellow */
  color: #ffffff !important;
  border-color: #634d05 !important;
}

body.dark-mode .priority-btn.active.High {
  background-color: #731118 !important;
  /* Dark Red */
  color: #ffffff !important;
  border-color: #4a0b10 !important;
}

/* --- PHASE 4 FURTHER REFINEMENTS --- */

/* Native scrollbars and checkboxes color scheme */
body.dark-mode {
  color-scheme: dark;
}

/* Edit panel and time manager dark mode card separation */
body.dark-mode .right-panel {
  background: #0e0e0e !important;
  border-left: 1px solid #222222 !important;
}

body.dark-mode .time-options {
  background: transparent !important;
}

body.dark-mode .time-section,
body.dark-mode .visuals-section {
  background: #181818 !important;
  border: 1px solid #292929 !important;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.dark-mode .deadline-title {
  color: #f1f5f9 !important;
}

body.dark-mode .section-label {
  color: #cbd5e1 !important;
}

body.dark-mode .input-label {
  color: #94a3b8 !important;
}

body.dark-mode .visual-label {
  color: #e2e8f0 !important;
}

body.dark-mode .time-mode-pill-group {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode .time-mode-pill {
  color: #94a3b8 !important;
}

body.dark-mode .time-mode-pill:hover {
  color: #f1f5f9 !important;
}

body.dark-mode .time-mode-pill.active {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .time-action-btn {
  background: #242424 !important;
  border: 1px solid #383838 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .time-action-btn:hover:not(:disabled) {
  background: #2e2e2e !important;
  border-color: #4a4a4a !important;
  color: #ffffff !important;
}

body.dark-mode .time-action-btn:active:not(:disabled) {
  background: #333333 !important;
}

body.dark-mode .time-action-btn:disabled,
body.dark-mode .time-action-btn[disabled] {
  opacity: 0.35 !important;
}

body.dark-mode .calendar-icon-btn,
body.dark-mode .calendar-icon-btn-small {
  color: #94a3b8;
}

body.dark-mode .calendar-icon-btn:hover,
body.dark-mode .calendar-icon-btn-small:hover {
  color: #60a5fa;
}

body.dark-mode .location-clear-btn {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
}

body.dark-mode .location-clear-btn:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
}

body.dark-mode .toggle-container {
  border-top: 1px dashed #292929 !important;
}

body.dark-mode .toggle-label {
  color: #94a3b8 !important;
}

body.dark-mode .toggle-slider {
  background-color: #333333 !important;
}

body.dark-mode input:checked+.toggle-slider {
  background-color: #10b981 !important;
}

body.dark-mode .right-panel-content .time-input,
body.dark-mode .right-panel-content input[type="text"],
body.dark-mode .right-panel-content input[type="number"],
body.dark-mode .right-panel-content textarea {
  background-color: #0f0f0f !important;
  border: 1px solid #333333 !important;
  color: #f8fafc !important;
  border-radius: 6px;
}

body.dark-mode .right-panel-content .time-input:focus,
body.dark-mode .right-panel-content input[type="text"]:focus,
body.dark-mode .right-panel-content textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

body.dark-mode .deadline-display {
  background-color: #111111 !important;
  border: 1px solid #333333 !important;
  color: #e2e8f0 !important;
  border-radius: 6px;
}

body.dark-mode .btn-time-toggle {
  background: #181818 !important;
  color: #f1f5f9 !important;
  border: 1px solid #292929 !important;
}

body.dark-mode .btn-time-toggle:hover {
  background: #222222 !important;
  border-color: #3a3a3a !important;
}

body.dark-mode #locationOptions.expanded,
body.dark-mode #attributesOptions.expanded,
body.dark-mode #additionsOptions.expanded {
  background: #181818 !important;
  border: 1px solid #292929 !important;
  border-radius: 10px;
  padding: 14px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Remove white border from ALL task items in dark mode and fix hover border-radius */
body.dark-mode .item {
  border: 0 solid #1a1a1a !important;
  /* Very dark border to blend in */
  background-color: #141414 !important;
  /* Match card exactly */
  border-radius: 5px;
}

body.dark-mode .item:hover {
  border-radius: 5px !important;
}

/* Ensure the text inputs inside tasks don't have borders */
body.dark-mode .item input[type="text"] {
  border: none !important;
  background-color: transparent !important;
}


/* Time Manager Toggles darker in dark mode */
body.dark-mode .toggle-slider {
  background-color: #444 !important;
}

body.dark-mode .toggle-slider:before {
  background-color: #888 !important;
}

body.dark-mode input:checked+.toggle-slider {
  background-color: #175e26 !important;
  /* match done button dark green */
}

body.dark-mode input:checked+.toggle-slider:before {
  background-color: #fff !important;
}


/* Bright Mode Important Task Override (Blue without neon) */
.item.important:not(.is-selected) {
  background-color: #e3f2fd !important;
  /* light blue */
  border-top: 1px solid #cce5ff !important;
  border-bottom: 1px solid #cce5ff !important;
  border-left: 5px solid #007bff !important;
  border-right: 5px solid #007bff !important;
  box-shadow: none !important;
  margin: 10px 0 !important;
  border-radius: 8px !important;
}

.item.important i.fa-star {
  color: #007bff !important;
  text-shadow: none !important;
}

/* Global Footer Adjustments */
body.dark-mode hr {
  display: none !important;
  /* Completely hide the HR line in dark mode as requested */
}

.global-footer {
  margin-top: auto !important;
  /* This resets it to original spacing naturally */
}

body.dark-mode .global-footer {
  border-top: none !important;
  /* Ensure no borders are added back */
}

/* === SIDEBAR (TASK MANAGER) === */
.sidebar {
  width: 280px;
  background: #f4f4f4;
  padding: 15px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-sizing: border-box;
  transition: transform 0.35s ease;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
}

.sidebar.closed {
  transform: translateX(-100%);
}

.toggle-btn {
  position: absolute;
  top: 50%;
  right: -36px;
  transform: translateY(-50%);
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 0 10px 10px 0;
  width: 36px;
  height: 70px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
  user-select: none;
}

.toggle-btn:hover {
  background: #eee;
}

.toggle-btn i {
  font-size: 1.2em;
  color: #444;
  transition: transform 0.3s ease;
  user-select: none;
  pointer-events: none;
}

.sidebar.closed .toggle-btn i {
  transform: rotate(180deg);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 1.05em;
  font-weight: bold;
  user-select: none;
}

.list-container-sidebar,
.list-container {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 15px;
  padding-right: 5px;
}

ul.class-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  position: relative;
}

ul.class-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff;
  overflow-x: hidden;
  transition: background 0.25s ease, transform 0.2s ease;
}

ul.class-list li:hover {
  background: #eee;
}

ul.class-list a {
  flex-grow: 1;
  text-decoration: none;
  color: #333;
  font-size: 0.95em;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

ul.class-list input {
  flex-grow: 1;
  padding: 6px 8px;
  font-size: 0.95em;
  border: 1px solid #ccc;
  border-radius: 5px;
  min-height: 32px;
  box-sizing: border-box;
}

.sidebar .icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1em;
  color: #555;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
  user-select: none;
}

.class-list li:hover .icon-btn,
.class-list li.selected .icon-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.class-list li.editing .icon-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

.sidebar .edit-btn:hover i {
  color: #1e90ff;
  transform: translateX(-2px) rotate(-6deg);
}

.sidebar .delete-btn:hover i {
  color: #e74c3c;
  transform: scale(1.08);
}

.class-list li.selected {
  background: linear-gradient(90deg, #d9d9d9 0%, #e2e2e2 100%) !important;
  position: relative;
  overflow: hidden;
  transition: background 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.add-class {
  background: #ddd;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
  user-select: none;
  transition: background 0.2s ease;
}

.add-class:hover {
  background: #bbb;
}

.sidebar .footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.sidebar .footer-actions button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: white;
  transition: background 0.2s ease, opacity 0.2s ease;
  user-select: none;
}

.sidebar .footer-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}

.sidebar .clear-all-btn {
  background: #e74c3c;
}

.sidebar .clear-all-btn:hover:not(:disabled) {
  background: #ff6b6b;
}

.sidebar .restore-btn {
  background: #3498db;
}

.sidebar .restore-btn:hover:not(:disabled) {
  background: #5dade2;
}

.sidebar .drag-placeholder {
  background: rgba(100, 100, 100, 0.1);
  border: 2px dashed #aaa;
  border-radius: 6px;
  margin: 8px 0;
  transition: all 0.2s ease;
}

.sidebar li.dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

.sidebar .highlight-bar {
  position: absolute;
  left: 0;
  width: 4px;
  background: #3498db;
  border-radius: 4px;
  transition: top 0.45s cubic-bezier(0.25, 1, 0.5, 1),
    height 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.sidebar .error-message {
  color: #e74c3c;
  font-size: 0.8em;
  margin-top: 4px;
  padding-left: 8px;
  display: none;
}

.class-list li.editing-error {
  border: 1px solid #e74c3c !important;
  background: #ffebeb !important;
}

/* Dark Mode Sidebar */
body.dark-mode .sidebar {
  background: #181818;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
  color: #fff;
}

body.dark-mode .sidebar-header h3 {
  color: #fff;
}

body.dark-mode .toggle-btn {
  background: #222;
  border-color: #333;
}

body.dark-mode .toggle-btn i {
  color: #ccc;
}

body.dark-mode ul.class-list li {
  background: #252525;
  color: #eee;
}

body.dark-mode ul.class-list li:hover {
  background: #303030;
}

body.dark-mode ul.class-list a {
  color: #eee;
}

body.dark-mode ul.class-list input {
  background: #181818;
  color: #fff;
  border-color: #444;
}

body.dark-mode .class-list li.selected {
  background: linear-gradient(90deg, #2d2d2d 0%, #383838 100%) !important;
}

body.dark-mode .add-class {
  background: #2c2c2c;
  color: #eee;
}

body.dark-mode .add-class:hover {
  background: #3c3c3c;
}

body.dark-mode .sidebar .icon-btn {
  color: #aaa;
}

/* ==========================================
   SETTINGS MODAL (MINIMALIST & COLOR HARMONIZED)
   ========================================== */
.settings-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.settings-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.settings-modal-dialog {
  background: #ffffff;
  width: 95vw;
  max-width: 1160px;
  height: 88vh;
  max-height: 860px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.98);
  transition: transform 0.2s ease;
}

.settings-modal-backdrop.active .settings-modal-dialog {
  transform: scale(1);
}

.settings-modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.settings-modal-title-group h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-modal-title-group h2 i {
  color: #007bff;
  font-size: 1rem;
}

.settings-modal-subtitle {
  margin: 4px 0 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

.settings-modal-close {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.settings-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Settings Navbar Tabs */
.settings-navbar-wrapper {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 18px 0 18px;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
}

.settings-nav-tab.is-locked {
  cursor: not-allowed;
  opacity: 0.7;
}

.settings-beta-pill {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.connect-card {
  cursor: default;
}

.connect-status {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.connect-btn {
  margin-left: auto;
  border: 1px solid #111827;
  background: #111827;
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.connect-btn:hover {
  background: #000000;
}

body.dark-mode .settings-beta-pill,
html.dark-mode .settings-beta-pill {
  background: #3f2e12;
  color: #fde68a;
}

body.dark-mode .connect-btn,
html.dark-mode .connect-btn {
  background: #f4f4f5;
  color: #111827;
  border-color: #f4f4f5;
}

.settings-nav-tabs {
  display: flex;
  gap: 6px;
  width: 100%;
  flex-wrap: nowrap;
  align-items: flex-end;
}

.settings-navbar-wrapper::-webkit-scrollbar,
.settings-nav-tabs::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.settings-nav-tab {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  position: relative;
  top: 1px;
}

.settings-nav-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.settings-nav-tab.active {
  background: #ffffff;
  color: #007bff;
  border-color: #e2e8f0;
  border-top: 2px solid #007bff;
  border-bottom: 1px solid #ffffff;
  z-index: 2;
}

.settings-nav-tab i {
  font-size: 0.82rem;
}

/* Modal Body & Tab Panes */
.settings-modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
  background: #ffffff;
}

.settings-tab-pane {
  display: none;
}

.settings-tab-pane.active {
  display: block;
  animation: settingsFadeIn 0.2s ease-out;
}

@keyframes settingsFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 7px;
}

.settings-section-title i {
  color: #007bff;
  font-size: 0.9rem;
}

.settings-section-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}

/* Calendar Cards Grid */
.calendar-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.calendar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s ease;
  user-select: none;
}

.calendar-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.calendar-card.active {
  background: #f0f7ff;
  border-color: #007bff;
}

.calendar-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.calendar-card.active .calendar-card-name {
  color: #007bff;
}

.calendar-card-year {
  font-size: 0.78rem;
  color: #007bff;
  font-weight: 600;
}

.calendar-card-origin {
  font-size: 0.72rem;
  color: #64748b;
}

/* Settings Custom Language Dropdown */
.settings-lang-dropdown {
  position: relative;
  width: 100%;
  user-select: none;
}

.settings-lang-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.settings-lang-btn:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.settings-lang-dropdown.open .settings-lang-btn {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.settings-lang-name-display {
  flex: 1;
  text-align: left;
}

.settings-lang-chevron {
  font-size: 11px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.settings-lang-dropdown.open .settings-lang-chevron {
  transform: rotate(180deg);
}

.settings-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: settingsFadeIn 0.18s ease-out;
}

.settings-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.settings-lang-option:hover {
  background: #f1f5f9;
}

.settings-lang-option.active {
  background: #eff6ff;
}

.settings-lang-option.active .dropdown-lang-name {
  color: #007bff;
  font-weight: 700;
}

.settings-lang-option.active .dropdown-lang-code {
  color: #007bff;
}

/* Time Live Badge */
.time-live-badge {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-family: monospace, system-ui;
  font-size: 0.78rem;
  font-weight: 700;
  color: #007bff;
  background: rgba(0, 123, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

/* Combined Formats Live Preview Box */
.formats-live-preview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formats-preview-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.formats-preview-chip {
  align-self: flex-start;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.formats-preview-main {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

/* Format Options Grid */
.format-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
}

.format-option-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  transition: all 0.15s ease;
}

.format-option-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.format-option-btn.active {
  background: #f0f7ff;
  border-color: #007bff;
}

.format-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.format-option-btn.active .format-title {
  color: #007bff;
}

.format-sample {
  font-size: 0.74rem;
  color: #64748b;
}

/* Radio Cards & Options Row */
.settings-options-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.settings-radio-card {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.settings-radio-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.settings-radio-card input[type="radio"] {
  margin-right: 10px;
  accent-color: #007bff;
  cursor: pointer;
}

.settings-radio-card:has(input[type="radio"]:checked) {
  background: #f0f7ff;
  border-color: #007bff;
}

.radio-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-card-content strong {
  font-size: 0.84rem;
  color: #0f172a;
}

.settings-radio-card:has(input[type="radio"]:checked) .radio-card-content strong {
  color: #007bff;
}

.radio-card-content small {
  font-size: 0.74rem;
  color: #64748b;
}

/* Settings Toggle Rows */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  gap: 14px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.settings-toggle-row:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.toggle-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-row-info strong {
  font-size: 0.85rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-row-info strong i {
  color: #007bff;
  font-size: 0.85rem;
}

.toggle-row-info span {
  font-size: 0.76rem;
  color: #64748b;
}

.settings-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.settings-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 22px;
}

.settings-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.settings-switch input:checked+.settings-switch-slider {
  background-color: #007bff;
}

.settings-switch input:checked+.settings-switch-slider:before {
  transform: translateX(18px);
}

/* Settings Links Grid */
.settings-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.settings-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: inherit;
  box-sizing: border-box;
}

.settings-link-card:hover {
  background: #f8fafc;
  border-color: #007bff;
  box-shadow: 0 4px 14px rgba(0, 123, 255, 0.1);
  transform: translateY(-2px);
}

.link-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.link-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.link-card-body strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.link-card-body span {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
}

.link-card-arrow {
  font-size: 0.8rem;
  color: #94a3b8;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.settings-link-card:hover .link-card-arrow {
  color: #007bff;
  transform: translate(2px, -2px);
}

/* Modal Footer */
.settings-modal-footer {
  padding: 12px 22px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.settings-btn-secondary {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #000000;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.settings-btn-secondary i {
  color: #000000;
}

.settings-btn-secondary:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.settings-btn-secondary:hover i {
  color: #dc2626;
}

.settings-btn-primary {
  background: #007bff;
  border: 1px solid #007bff;
  color: #ffffff;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.25);
}

.settings-btn-primary:hover {
  background: #0069d9;
  border-color: #0069d9;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35);
}

/* ==========================================
   DARK MODE - SETTINGS MODAL (EXACT PALETTE)
   ========================================== */
body.dark-mode .settings-modal-backdrop {
  background: rgba(0, 0, 0, 0.75);
}

body.dark-mode .settings-modal-dialog {
  background: #141414;
  border-color: #262626;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

body.dark-mode .settings-modal-header {
  background: #141414;
  border-bottom-color: #222222;
}

body.dark-mode .settings-modal-title-group h2 {
  color: #ffffff;
}

body.dark-mode .settings-modal-title-group h2 i {
  color: #3b82f6;
}

body.dark-mode .settings-modal-subtitle {
  color: #a1a1aa;
}

body.dark-mode .settings-modal-close {
  background: #1e1e1e;
  border-color: #2a2a2a;
  color: #a1a1aa;
}

body.dark-mode .settings-modal-close:hover {
  background: #262626;
  color: #ffffff;
  border-color: #383838;
}

body.dark-mode .settings-navbar-wrapper {
  background: #181818;
  border-bottom-color: #222222;
}

body.dark-mode .settings-nav-tab {
  background: #1e1e1e;
  border-color: #2a2a2a;
  color: #a1a1aa;
}

body.dark-mode .settings-nav-tab:hover {
  background: #262626;
  color: #ffffff;
}

body.dark-mode .settings-nav-tab.active {
  background: #141414;
  color: #3b82f6;
  border-color: #222222;
  border-top: 2px solid #3b82f6;
  border-bottom: 1px solid #141414;
}

body.dark-mode .settings-modal-body {
  background: #141414;
}

body.dark-mode .settings-section-title {
  color: #f4f4f5;
}

body.dark-mode .settings-section-title i {
  color: #3b82f6;
}

body.dark-mode .settings-section-desc {
  color: #a1a1aa;
}

body.dark-mode .calendar-card,
body.dark-mode .format-option-btn,
body.dark-mode .settings-radio-card,
body.dark-mode .settings-toggle-row,
body.dark-mode .settings-link-card {
  background: #1a1a1a;
  border-color: #262626;
}

body.dark-mode .calendar-card:hover,
body.dark-mode .format-option-btn:hover,
body.dark-mode .settings-radio-card:hover,
body.dark-mode .settings-toggle-row:hover,
body.dark-mode .settings-link-card:hover {
  background: #222222;
  border-color: #3b82f6;
}

body.dark-mode .link-card-body strong {
  color: #ffffff;
}

body.dark-mode .link-card-body span {
  color: #a1a1aa;
}

body.dark-mode .link-card-arrow {
  color: #71717a;
}

body.dark-mode .settings-link-card:hover .link-card-arrow {
  color: #3b82f6;
}

body.dark-mode .calendar-card.active,
body.dark-mode .format-option-btn.active,
body.dark-mode .settings-radio-card:has(input[type="radio"]:checked) {
  background: rgba(59, 130, 246, 0.12);
  border-color: #3b82f6;
}

body.dark-mode .calendar-card-name,
body.dark-mode .format-title,
body.dark-mode .radio-card-content strong,
body.dark-mode .toggle-row-info strong {
  color: #ffffff;
}

body.dark-mode .calendar-card.active .calendar-card-name,
body.dark-mode .format-option-btn.active .format-title,
body.dark-mode .settings-radio-card:has(input[type="radio"]:checked) .radio-card-content strong {
  color: #3b82f6;
}

body.dark-mode .calendar-card-origin,
body.dark-mode .format-sample,
body.dark-mode .radio-card-content small,
body.dark-mode .toggle-row-info span,
body.dark-mode .preview-label {
  color: #a1a1aa;
}

body.dark-mode .toggle-row-info strong i {
  color: #3b82f6;
}

body.dark-mode .settings-select {
  background-color: #1a1a1a;
  border-color: #262626;
  color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

body.dark-mode .settings-select:hover {
  background-color: #222222;
  border-color: #333333;
}

body.dark-mode .settings-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.dark-mode .settings-select option {
  background-color: #1a1a1a;
  color: #ffffff;
}

body.dark-mode .settings-lang-btn {
  background-color: #1a1a1a;
  border-color: #262626;
  color: #ffffff;
}

body.dark-mode .settings-lang-btn:hover {
  background-color: #222222;
  border-color: #333333;
}

body.dark-mode .settings-lang-dropdown.open .settings-lang-btn {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

body.dark-mode .settings-lang-chevron {
  color: #a1a1aa;
}

body.dark-mode .settings-lang-menu {
  background: #141414;
  border-color: #262626;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
}

body.dark-mode .settings-lang-option {
  color: #f0f0f0;
}

body.dark-mode .settings-lang-option:hover {
  background: #222222;
}

body.dark-mode .settings-lang-option.active {
  background: rgba(0, 123, 255, 0.15);
}

body.dark-mode .settings-lang-option.active .dropdown-lang-name,
body.dark-mode .settings-lang-option.active .dropdown-lang-code {
  color: #3b82f6;
}

body.dark-mode .time-live-badge {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

body.dark-mode .formats-live-preview-box {
  background: #1a1a1a;
  border-color: #262626;
}

body.dark-mode .formats-preview-chip {
  background: #2a2a2a;
  color: #a1a1aa;
}

body.dark-mode .formats-preview-main {
  color: #ffffff;
}

body.dark-mode .settings-switch-slider {
  background-color: #333333;
}

body.dark-mode .settings-switch input:checked+.settings-switch-slider {
  background-color: #3b82f6;
}

body.dark-mode .settings-modal-footer {
  background: #141414;
  border-top-color: #222222;
}

body.dark-mode .settings-btn-secondary {
  background: #1e1e24;
  border-color: #3e3e4c;
  color: #f1f5f9;
}

body.dark-mode .settings-btn-secondary i {
  color: #f1f5f9;
}

body.dark-mode .settings-btn-secondary:hover {
  background: #3f1d24;
  border-color: #7f1d1d;
  color: #f87171;
}

body.dark-mode .settings-btn-secondary:hover i {
  color: #f87171;
}

.settings-config-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-btn-secondary.settings-config-btn {
  width: auto;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  gap: 6px;
  background: rgba(17, 17, 17, 0.06);
  border-color: rgba(17, 17, 17, 0.16);
  color: #111111;
}

.settings-btn-secondary.settings-config-btn i {
  color: inherit;
  font-size: 0.72rem;
}

.settings-btn-secondary.settings-config-btn:hover,
.settings-btn-secondary.settings-config-btn:hover i {
  background: rgba(17, 17, 17, 0.12);
  border-color: rgba(17, 17, 17, 0.28);
  color: #111111;
  transform: translateY(-1px);
}

body.dark-mode .settings-btn-secondary.settings-config-btn,
html.dark-mode .settings-btn-secondary.settings-config-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f4f4f5;
}

body.dark-mode .settings-btn-secondary.settings-config-btn i,
html.dark-mode .settings-btn-secondary.settings-config-btn i {
  color: inherit;
}

body.dark-mode .settings-btn-secondary.settings-config-btn:hover,
html.dark-mode .settings-btn-secondary.settings-config-btn:hover,
body.dark-mode .settings-btn-secondary.settings-config-btn:hover i,
html.dark-mode .settings-btn-secondary.settings-config-btn:hover i {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

body.dark-mode .settings-btn-primary {
  background: #007bff;
  border-color: #007bff;
  color: #ffffff;
}

body.dark-mode .settings-btn-primary:hover {
  background: #0069d9;
  border-color: #0069d9;
}

/* ==========================================
   === ACCESSIBILITY WIDGET (A11Y) ===
   ========================================== */

.a11y-widget-container {
  position: fixed;
  top: 15px;
  right: 290px;
  bottom: auto;
  left: auto;
  z-index: 999999;
}

.a11y-trigger-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #2563eb;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  outline: none;
}

.a11y-trigger-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1d4ed8;
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.18);
}

.a11y-trigger-btn:active {
  cursor: grabbing;
  transform: scale(0.96);
}

body.dark-mode .a11y-trigger-btn {
  background: #18181c;
  color: #60a5fa;
  border-color: #2e2e38;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

body.dark-mode .a11y-trigger-btn:hover {
  background: #24242c;
  border-color: #3b82f6;
  color: #93c5fd;
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.28);
}

.a11y-panel {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 380px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transform-origin: bottom left;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.a11y-panel.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.a11y-panel-header {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.a11y-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.a11y-header-title i {
  font-size: 24px;
  color: #007bff;
}

.a11y-header-title h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.a11y-header-title span {
  font-size: 0.72rem;
  color: #64748b;
  display: block;
}

.a11y-close-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.a11y-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.a11y-panel-body {
  padding: 14px 16px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Sections */
.a11y-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.a11y-section:last-child {
  border-bottom: none;
  padding-bottom: 14px;
}

.a11y-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.a11y-section-header i {
  font-size: 13px;
  color: #007bff;
}

.a11y-section-header h4 {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #334155;
}

.a11y-mini-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-bottom: 4px;
  text-align: center;
  width: 100%;
}

/* Text Size & General Control Cards */
.a11y-control-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.a11y-card-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.a11y-card-info strong {
  display: block;
  font-size: 0.8rem;
  color: #1e293b;
}

.a11y-card-info small {
  font-size: 0.7rem;
  color: #64748b;
}

.a11y-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ffffff;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.a11y-scale-btn {
  background: transparent;
  border: none;
  font-size: 0.74rem;
  font-weight: 600;
  color: #334155;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.a11y-scale-btn:hover {
  background: #f1f5f9;
  color: #007bff;
}

.a11y-scale-btn.active {
  background: #007bff;
  color: #ffffff;
}

/* Color Swatches */
.a11y-color-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
}

.a11y-color-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.a11y-color-btn:hover {
  transform: scale(1.2);
}

.a11y-color-btn.active {
  box-shadow: 0 0 0 2px #007bff;
  transform: scale(1.15);
}

.a11y-row-dual {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.a11y-row-dual .a11y-feature-btn {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 54px;
  height: auto;
  box-sizing: border-box;
  padding: 8px 4px;
}

.a11y-row-dual .a11y-feature-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.a11y-align-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 0 0 auto;
  box-sizing: border-box;
}

/* Feature Toggle Grid */
.a11y-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.a11y-feature-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
}

.a11y-feature-btn i {
  font-size: 17px;
  color: #475569;
  transition: color 0.2s ease;
}

.a11y-feature-btn span {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.2;
}

.a11y-feature-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.a11y-feature-btn.active {
  background: #007bff;
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.35);
}

.a11y-feature-btn.active i {
  color: #ffffff !important;
}

.a11y-feature-btn.active span {
  color: #ffffff !important;
}

.a11y-beta-badge {
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  background: #e0e7ff;
  color: #4338ca !important;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1 !important;
  margin-top: 1px;
  text-transform: uppercase;
}

.a11y-feature-btn.active .a11y-beta-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
}

body.dark-mode .a11y-beta-badge {
  background: #312e81;
  color: #c7d2fe !important;
}

body.dark-mode .a11y-feature-btn.active .a11y-beta-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
}

/* Bionic Reading Fixation */
.bionic-bold {
  font-weight: 750 !important;
  color: inherit !important;
}

.a11y-colorblind-block {
  margin-top: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.a11y-colorblind-block .a11y-btn-group {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
  box-sizing: border-box;
}

.a11y-colorblind-block .a11y-scale-btn {
  width: 100%;
  min-width: 0;
  padding: 5px 2px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Panel Footer */
.a11y-panel-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.a11y-reset-all-btn {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #000000 !important;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.a11y-reset-all-btn i {
  color: #000000 !important;
}

.a11y-reset-all-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626 !important;
}

.a11y-reset-all-btn:hover i {
  color: #dc2626 !important;
}

/* Dark Mode Accessibility Widget */
body.dark-mode .a11y-panel {
  background: #1e1e24;
  border-color: #2e2e38;
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.dark-mode .a11y-panel-header,
body.dark-mode .a11y-panel-footer,
body.dark-mode .a11y-control-card,
body.dark-mode .a11y-colorblind-block {
  background: #18181c;
  border-color: #2e2e38;
}

body.dark-mode .a11y-section {
  border-bottom-color: #2e2e38;
}

body.dark-mode .a11y-header-title h3,
body.dark-mode .a11y-card-info strong,
body.dark-mode .a11y-section-header h4 {
  color: #f1f5f9;
}

body.dark-mode .a11y-header-title span,
body.dark-mode .a11y-card-info small,
body.dark-mode .a11y-mini-label {
  color: #94a3b8;
}

body.dark-mode .a11y-close-btn {
  background: #2a2a34;
  border-color: #3e3e4c;
  color: #cbd5e1;
}

body.dark-mode .a11y-btn-group {
  background: #141418;
  border-color: #3e3e4c;
}

body.dark-mode .a11y-scale-btn {
  color: #cbd5e1;
}

body.dark-mode .a11y-scale-btn:hover {
  background: #24242c;
  color: #38bdf8;
}

body.dark-mode .a11y-feature-btn {
  background: #18181c;
  border-color: #2e2e38;
}

body.dark-mode .a11y-feature-btn i {
  color: #94a3b8;
}

body.dark-mode .a11y-feature-btn span {
  color: #cbd5e1;
}

body.dark-mode .a11y-feature-btn:hover {
  background: #24242c;
  border-color: #3e3e4c;
}

body.dark-mode .a11y-feature-btn.active {
  background: #007bff;
  border-color: #007bff;
  box-shadow: 0 2px 10px rgba(0, 123, 255, 0.45);
}

body.dark-mode .a11y-feature-btn.active i,
body.dark-mode .a11y-feature-btn.active span {
  color: #ffffff !important;
}

body.dark-mode .a11y-reset-all-btn {
  background: #24242c;
  border-color: #3e3e4c;
  color: #cbd5e1;
}

/* ==========================================
   === ACCESSIBILITY ACTIVE MODIFIERS ===
   ========================================== */

/* 1. High Contrast */
body.a11y-high-contrast {
  background-color: #000000 !important;
  color: #ffff00 !important;
}

body.a11y-high-contrast .card,
body.a11y-high-contrast .right-panel,
body.a11y-high-contrast .sidebar,
body.a11y-high-contrast .settings-modal-dialog,
body.a11y-high-contrast .item,
body.a11y-high-contrast .time-options {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 2px solid #ffff00 !important;
}

body.a11y-high-contrast h1,
body.a11y-high-contrast h2,
body.a11y-high-contrast h3,
body.a11y-high-contrast h4,
body.a11y-high-contrast p,
body.a11y-high-contrast a,
body.a11y-high-contrast span,
body.a11y-high-contrast label,
body.a11y-high-contrast textarea,
body.a11y-high-contrast input {
  color: #ffff00 !important;
}

body.a11y-high-contrast .btn,
body.a11y-high-contrast .filter-tab,
body.a11y-high-contrast .clear-btn {
  border: 2px solid #ffff00 !important;
  background: #000000 !important;
  color: #ffffff !important;
}

/* 2. Monochrome / Grayscale */
body.a11y-grayscale {
  filter: grayscale(100%) !important;
}

/* 3. Color Blindness Filters */
body.a11y-protanopia {
  filter: url('#protanopia-filter') !important;
}

body.a11y-deuteranopia {
  filter: url('#deuteranopia-filter') !important;
}

body.a11y-tritanopia {
  filter: url('#tritanopia-filter') !important;
}

body.a11y-invert {
  filter: invert(1) hue-rotate(180deg) !important;
}

/* Compound Filter Combinations */
body.a11y-grayscale.a11y-invert {
  filter: grayscale(100%) invert(1) hue-rotate(180deg) !important;
}

body.a11y-protanopia.a11y-invert {
  filter: url('#protanopia-filter') invert(1) hue-rotate(180deg) !important;
}

body.a11y-deuteranopia.a11y-invert {
  filter: url('#deuteranopia-filter') invert(1) hue-rotate(180deg) !important;
}

body.a11y-tritanopia.a11y-invert {
  filter: url('#tritanopia-filter') invert(1) hue-rotate(180deg) !important;
}

body.a11y-protanopia.a11y-grayscale {
  filter: url('#protanopia-filter') grayscale(100%) !important;
}

body.a11y-deuteranopia.a11y-grayscale {
  filter: url('#deuteranopia-filter') grayscale(100%) !important;
}

body.a11y-tritanopia.a11y-grayscale {
  filter: url('#tritanopia-filter') grayscale(100%) !important;
}

body.a11y-protanopia.a11y-grayscale.a11y-invert {
  filter: url('#protanopia-filter') grayscale(100%) invert(1) hue-rotate(180deg) !important;
}

body.a11y-deuteranopia.a11y-grayscale.a11y-invert {
  filter: url('#deuteranopia-filter') grayscale(100%) invert(1) hue-rotate(180deg) !important;
}

body.a11y-tritanopia.a11y-grayscale.a11y-invert {
  filter: url('#tritanopia-filter') grayscale(100%) invert(1) hue-rotate(180deg) !important;
}

/* 4. OpenDyslexic - Authentic Dyslexia Font */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.3/open-dyslexic-regular.woff') format('woff'),
    url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.3/open-dyslexic-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.3/open-dyslexic-bold.woff') format('woff'),
    url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.3/open-dyslexic-bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

body.a11y-dyslexia-font,
body.a11y-dyslexia-font *:not(i):not([class*="fa-"]):not([class*="fa"]):not([class*="icon"]):not(svg):not(path) {
  font-family: 'OpenDyslexic', 'Comic Sans MS', sans-serif !important;
  letter-spacing: 0.03em !important;
}

/* 4b. Bold Text */
body.a11y-bold-text,
body.a11y-bold-text *:not(i):not([class*="fa-"]):not([class*="fa"]):not([class*="icon"]):not(svg):not(path) {
  font-weight: 700 !important;
}

/* 5. Highlight Links & Clickable Elements - Pronounced, glowing outline and distinct underline */
body.a11y-highlight-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 3px !important;
  text-underline-offset: 4px !important;
  text-decoration-color: #0284c7 !important;
  outline: 3px solid #0284c7 !important;
  outline-offset: 3px !important;
  border-radius: 4px !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25) !important;
}

body.a11y-highlight-links button,
body.a11y-highlight-links [role="button"],
body.a11y-highlight-links .filter-tab,
body.a11y-highlight-links .category-tab {
  outline: 3px solid #0284c7 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25) !important;
}

body.a11y-highlight-links input[type="checkbox"] {
  outline: 3px solid #0284c7 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.3) !important;
}

body.a11y-highlight-links [contenteditable="true"] {
  outline: 3px dashed #0284c7 !important;
  outline-offset: 2px !important;
}

body.dark-mode.a11y-highlight-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 3px !important;
  text-underline-offset: 4px !important;
  text-decoration-color: #38bdf8 !important;
  outline: 3px solid #38bdf8 !important;
  outline-offset: 3px !important;
  border-radius: 4px !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.35) !important;
}

body.dark-mode.a11y-highlight-links button,
body.dark-mode.a11y-highlight-links [role="button"],
body.dark-mode.a11y-highlight-links .filter-tab,
body.dark-mode.a11y-highlight-links .category-tab {
  outline: 3px solid #38bdf8 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.35) !important;
}

body.dark-mode.a11y-highlight-links input[type="checkbox"] {
  outline: 3px solid #38bdf8 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4) !important;
}

body.dark-mode.a11y-highlight-links [contenteditable="true"] {
  outline: 3px dashed #38bdf8 !important;
  outline-offset: 2px !important;
}

/* 5b. Authentic Circular Magnifying Glass Lens */
.a11y-magnifier-lens {
  position: fixed;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 6px solid #1e293b;
  background: #ffffff;
  box-shadow: 0 0 0 2px #94a3b8, 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 0 16px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 10000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  text-align: center;
  user-select: none;
  overflow: hidden;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s ease;
}

.a11y-magnifier-lens::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(0, 0, 0, 0.12) 100%);
  pointer-events: none;
  z-index: 10;
}

.a11y-magnifier-lens::after {
  content: '';
  position: absolute;
  bottom: -18px;
  right: -18px;
  width: 16px;
  height: 48px;
  background: linear-gradient(135deg, #475569, #0f172a);
  border: 2px solid #64748b;
  border-radius: 4px;
  transform: rotate(-45deg);
  transform-origin: top left;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.a11y-magnifier-lens .magnifier-content {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  word-break: break-word;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

body.dark-mode .a11y-magnifier-lens {
  border-color: #3f3f46;
  background: #09090b;
  box-shadow: 0 0 0 2px #71717a, 0 16px 40px rgba(0, 0, 0, 0.8), inset 0 0 16px rgba(255, 255, 255, 0.1);
}

body.dark-mode .a11y-magnifier-lens .magnifier-content {
  color: #f8fafc;
}

/* Hide system cursor only when Reading Magnifier is active (leaving widget cursor normal) */
body.a11y-magnifier-active,
body.a11y-magnifier-active *:not(#a11yPanel):not(#a11yPanel *):not(.a11y-widget-container):not(.a11y-widget-container *):not(.a11y-panel):not(.a11y-panel *):not(#a11yTriggerBtn):not(#a11yTriggerBtn *) {
  cursor: none !important;
}

body.a11y-magnifier-active .a11y-widget-container,
body.a11y-magnifier-active .a11y-widget-container *,
body.a11y-magnifier-active .a11y-panel,
body.a11y-magnifier-active .a11y-panel * {
  cursor: auto !important;
}

/* 6. Big Cursor */
body.a11y-big-cursor,
body.a11y-big-cursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><path fill="%23000000" stroke="%23ffffff" stroke-width="2" d="M3 2l24 16-13 3-5 12z"/></svg>'), auto !important;
}

/* 7. Reading Guide Line */
.a11y-reading-guide {
  position: fixed;
  left: 0;
  right: 0;
  height: 4px;
  background: #007bff;
  box-shadow: 0 0 12px rgba(0, 123, 255, 0.9), 0 0 4px rgba(0, 123, 255, 1);
  pointer-events: none;
  z-index: 100000;
  transition: top 0.05s linear;
}

/* 8. Spacing Modifiers - Applied specifically to text content, NOT to UI tabs/buttons */
body.a11y-h-space-med p,
body.a11y-h-space-med h1,
body.a11y-h-space-med h2,
body.a11y-h-space-med h3,
body.a11y-h-space-med h4,
body.a11y-h-space-med .item,
body.a11y-h-space-med .task-text,
body.a11y-h-space-med .textbox,
body.a11y-h-space-med textarea,
body.a11y-h-space-med .notes-content,
body.a11y-h-space-med .tutorial-content,
body.a11y-h-space-med label {
  letter-spacing: 0.08em !important;
  word-spacing: 0.14em !important;
}

body.a11y-h-space-wide p,
body.a11y-h-space-wide h1,
body.a11y-h-space-wide h2,
body.a11y-h-space-wide h3,
body.a11y-h-space-wide h4,
body.a11y-h-space-wide .item,
body.a11y-h-space-wide .task-text,
body.a11y-h-space-wide .textbox,
body.a11y-h-space-wide textarea,
body.a11y-h-space-wide .notes-content,
body.a11y-h-space-wide .tutorial-content,
body.a11y-h-space-wide label {
  letter-spacing: 0.15em !important;
  word-spacing: 0.22em !important;
}

body.a11y-v-space-med p,
body.a11y-v-space-med .item,
body.a11y-v-space-med .task-text,
body.a11y-v-space-med .textbox,
body.a11y-v-space-med textarea,
body.a11y-v-space-med .notes-content,
body.a11y-v-space-med .tutorial-content {
  line-height: 1.75 !important;
}

body.a11y-v-space-wide p,
body.a11y-v-space-wide .item,
body.a11y-v-space-wide .task-text,
body.a11y-v-space-wide .textbox,
body.a11y-v-space-wide textarea,
body.a11y-v-space-wide .notes-content,
body.a11y-v-space-wide .tutorial-content {
  line-height: 2.2 !important;
}

/* Immunity for tabs, buttons, navigation and compact UI from distortion */
.extra-tab,
.filter-tab,
.top-controls-wrapper,
.top-controls-wrapper *,
.a11y-widget-container,
.a11y-widget-container *,
.lang-switcher-btn,
.theme-switch,
.order-dropdown,
.order-dropdown *,
.sidebar-view-toggle,
button,
i,
.fa-solid,
.fa {
  letter-spacing: normal !important;
  word-spacing: normal !important;
  line-height: normal !important;
}

/* Protection for Card Tabs structure */
.tabs-container {
  position: absolute;
  top: -26px;
  left: 10px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  z-index: 10;
  overflow: visible;
}

.tabs-container-right {
  position: absolute;
  top: -26px;
  right: 10px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  z-index: 100;
  overflow: visible;
}

.tabs-container-right:has(.order-dropdown.expanded),
.tabs-container-right.has-expanded-dropdown {
  z-index: 50000;
}

.tab-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: flex-end;
}

.extra-tab,
.filter-tab {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  line-height: normal !important;
  padding: 5px 8px !important;
  font-size: 11.5px !important;
}

body.a11y-font-scale-115 .extra-tab,
body.a11y-font-scale-115 .filter-tab {
  padding: 4px 6px !important;
  font-size: 10.5px !important;
}

body.a11y-font-scale-130 .extra-tab,
body.a11y-font-scale-130 .filter-tab {
  padding: 3px 5px !important;
  font-size: 10px !important;
}

/* 9. Text Colors (Applied to all content including tasks, textareas, headers and inputs) */
body.a11y-text-black,
body.a11y-text-black *,
body.a11y-text-black p,
body.a11y-text-black span,
body.a11y-text-black textarea,
body.a11y-text-black textarea.textbox,
body.a11y-text-black input,
body.a11y-text-black [contenteditable="true"],
body.a11y-text-black .item,
body.a11y-text-black .item *,
body.a11y-text-black .schedule-slot-card,
body.a11y-text-black .schedule-slot-card * {
  color: #000000 !important;
}

body.a11y-text-yellow,
body.a11y-text-yellow *,
body.a11y-text-yellow p,
body.a11y-text-yellow span,
body.a11y-text-yellow textarea,
body.a11y-text-yellow textarea.textbox,
body.a11y-text-yellow input,
body.a11y-text-yellow [contenteditable="true"],
body.a11y-text-yellow .item,
body.a11y-text-yellow .item *,
body.a11y-text-yellow .schedule-slot-card,
body.a11y-text-yellow .schedule-slot-card * {
  color: #eab308 !important;
}

body.a11y-text-blue,
body.a11y-text-blue *,
body.a11y-text-blue p,
body.a11y-text-blue span,
body.a11y-text-blue textarea,
body.a11y-text-blue textarea.textbox,
body.a11y-text-blue input,
body.a11y-text-blue [contenteditable="true"],
body.a11y-text-blue .item,
body.a11y-text-blue .item *,
body.a11y-text-blue .schedule-slot-card,
body.a11y-text-blue .schedule-slot-card * {
  color: #0284c7 !important;
}

body.a11y-text-green,
body.a11y-text-green *,
body.a11y-text-green p,
body.a11y-text-green span,
body.a11y-text-green textarea,
body.a11y-text-green textarea.textbox,
body.a11y-text-green input,
body.a11y-text-green [contenteditable="true"],
body.a11y-text-green .item,
body.a11y-text-green .item *,
body.a11y-text-green .schedule-slot-card,
body.a11y-text-green .schedule-slot-card * {
  color: #059669 !important;
}

/* 10. Text Alignment */
body.a11y-align-left,
body.a11y-align-left h1,
body.a11y-align-left h2,
body.a11y-align-left .card h2,
body.a11y-align-left h3,
body.a11y-align-left h4,
body.a11y-align-left p,
body.a11y-align-left .item,
body.a11y-align-left textarea.textbox,
body.a11y-align-left .textbox,
body.a11y-align-left .section-title,
body.a11y-align-left .sectiontitle,
body.a11y-align-left #titlu,
body.a11y-align-left .task-counter,
body.a11y-align-left .schedule-live-tracker,
body.a11y-align-left .schedule-day-title {
  text-align: left !important;
}

body.a11y-align-center,
body.a11y-align-center h1,
body.a11y-align-center h2,
body.a11y-align-center .card h2,
body.a11y-align-center h3,
body.a11y-align-center h4,
body.a11y-align-center p,
body.a11y-align-center .item,
body.a11y-align-center textarea.textbox,
body.a11y-align-center .textbox,
body.a11y-align-center .section-title,
body.a11y-align-center .sectiontitle,
body.a11y-align-center #titlu,
body.a11y-align-center .task-counter,
body.a11y-align-center .schedule-live-tracker,
body.a11y-align-center .schedule-day-title {
  text-align: center !important;
}

body.a11y-align-right,
body.a11y-align-right h1,
body.a11y-align-right h2,
body.a11y-align-right .card h2,
body.a11y-align-right h3,
body.a11y-align-right h4,
body.a11y-align-right p,
body.a11y-align-right .item,
body.a11y-align-right textarea.textbox,
body.a11y-align-right .textbox,
body.a11y-align-right .section-title,
body.a11y-align-right .sectiontitle,
body.a11y-align-right #titlu,
body.a11y-align-right .task-counter,
body.a11y-align-right .schedule-live-tracker,
body.a11y-align-right .schedule-day-title {
  text-align: right !important;
}

body.a11y-align-justify,
body.a11y-align-justify h1,
body.a11y-align-justify h2,
body.a11y-align-justify .card h2,
body.a11y-align-justify h3,
body.a11y-align-justify h4,
body.a11y-align-justify p,
body.a11y-align-justify .item,
body.a11y-align-justify textarea.textbox,
body.a11y-align-justify .textbox,
body.a11y-align-justify .section-title,
body.a11y-align-justify .sectiontitle,
body.a11y-align-justify #titlu,
body.a11y-align-justify .task-counter,
body.a11y-align-justify .schedule-live-tracker,
body.a11y-align-justify .schedule-day-title {
  text-align: justify !important;
}

/* 11. Reduce Motion */
body.a11y-reduce-motion *,
body.a11y-reduce-motion *::before,
body.a11y-reduce-motion *::after {
  animation: none !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition: none !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Font Scale levels */
body.a11y-font-scale-90 {
  zoom: 0.9;
}

body.a11y-font-scale-115 {
  zoom: 1.15;
}

body.a11y-font-scale-130 {
  zoom: 1.3;
}

/* ==========================================
   === TOP SETTINGS BUTTON & EDIT BAR DARK MODE ===
   ========================================== */

.top-settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  font-size: 15px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  margin-left: 2px;
}

.top-settings-btn:hover {
  background: #f1f5f9;
  color: #007bff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
  transform: translateY(-1px);
}

.top-settings-btn:hover .top-gear-icon {
  transform: rotate(60deg);
}

.top-gear-icon {
  transition: transform 0.4s ease;
}

body.dark-mode .top-settings-btn {
  background: #1e1e1e;
  border-color: #333333;
  color: #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode .top-settings-btn:hover {
  background: #2a2a2a;
  color: #3b82f6;
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

/* Sidebar Class Type Icons */
.class-type-icon {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
}

.class-type-icon.todo-icon {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.class-type-icon.schedule-icon {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

body.dark-mode .class-type-icon.todo-icon {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.2);
}

body.dark-mode .class-type-icon.schedule-icon {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.2);
}

/* Global Animation & Widget Visibility Rules */
html.hide-a11y-widget .a11y-widget-container,
body.hide-a11y-widget .a11y-widget-container {
  display: none !important;
}

body.disable-animations *,
body.disable-animations *::before,
body.disable-animations *::after {
  animation: none !important;
  transition: none !important;
}

/* ==========================================
   === ACCESSIBILITY WIDGET (MINIMALIST ANTI-AI) ===
   ========================================== */
.a11y-widget-container {
  position: fixed;
  top: 15px;
  right: 290px;
  bottom: auto;
  left: auto;
  z-index: 999999;
  font-family: inherit;
  touch-action: none;
  user-select: none;
}

.a11y-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: #ffffff;
  color: #007bff;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, background 0.2s, border-color 0.2s, color 0.2s;
  outline: none;
  user-select: none;
  padding: 0;
}

.a11y-trigger-btn:active {
  cursor: grabbing;
}

.a11y-trigger-btn.is-dragging {
  cursor: grabbing !important;
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0.95;
}

.a11y-trigger-btn i.fa-universal-access {
  font-size: 26px;
  color: #007bff;
  transition: transform 0.2s ease, color 0.2s ease;
}

.a11y-trigger-btn:hover {
  background: #f8fafc;
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 123, 255, 0.25);
}

.a11y-trigger-btn:hover i.fa-universal-access {
  transform: scale(1.08);
  color: #0056b3;
}

/* Dark Mode Adaptation for Widget */
body.dark-mode .a11y-trigger-btn {
  background: #141414;
  color: #3b82f6;
  border-color: #3f3f46;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
}

body.dark-mode .a11y-trigger-btn i.fa-universal-access {
  color: #3b82f6;
}

body.dark-mode .a11y-trigger-btn:hover {
  background: #1e1e1e;
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

body.dark-mode .a11y-trigger-btn:hover i.fa-universal-access {
  color: #60a5fa;
}

/* Responsive adjustment for top controls on small screens */
/* Responsive adjustment for top controls on small screens */
@media (max-width: 680px) {
  .a11y-widget-container {
    top: 14px;
    right: 180px;
  }
}

/* ==========================================================================
   SIDEBAR VIEW TOGGLE (TO DO & SCHEDULE) - Minimalist, Icons Only
   ========================================================================== */
.sidebar-view-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-mode .sidebar-view-toggle {
  background: #141414;
  border-color: #262626;
}

.sidebar-view-btn {
  flex: 1;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.sidebar-view-btn:hover {
  color: #007bff;
  background: rgba(0, 123, 255, 0.08);
}

.sidebar-view-btn.active {
  background: #007bff;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

body.dark-mode .sidebar-view-btn {
  color: #a1a1aa;
}

body.dark-mode .sidebar-view-btn:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

body.dark-mode .sidebar-view-btn.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   SCHEDULE VIEW CONTAINER (ORAR / TIMETABLE)
   ========================================================================== */
.schedule-view-container {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  padding: 16px 20px;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  box-sizing: border-box;
  animation: fadeInSchedule 0.25s ease forwards;
}

@keyframes fadeInSchedule {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Live Tracker Banner */
.schedule-live-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

body.dark-mode .schedule-live-tracker {
  background: linear-gradient(135deg, #18181b 0%, #121214 100%);
  border-color: #27272a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tracker-status-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: rgba(0, 123, 255, 0.12);
  color: #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

body.dark-mode .tracker-status-icon {
  background: rgba(59, 130, 246, 0.16);
  color: #3b82f6;
}

.tracker-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.tracker-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

body.dark-mode .tracker-title {
  color: #f8fafc;
}

.tracker-subtitle {
  font-size: 13px;
  color: #64748b;
}

body.dark-mode .tracker-subtitle {
  color: #a1a1aa;
}

.schedule-live-tracker .tracker-status-icon,
.schedule-live-tracker .tracker-info {
  display: none !important;
}

.schedule-live-tracker,
body.dark-mode .schedule-live-tracker,
html.dark-mode .schedule-live-tracker {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  justify-content: flex-end;
}

.schedule-quick-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-tool-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.schedule-tool-btn.primary {
  background: #007bff;
  color: #ffffff;
  border-color: #007bff;
}

.schedule-tool-btn.primary:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.schedule-tool-btn.danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}

.schedule-tool-btn.danger:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

body.dark-mode .schedule-tool-btn {
  background: #1f1f23;
  border-color: #3f3f46;
  color: #e2e8f0;
}

body.dark-mode .schedule-tool-btn:hover {
  background: #27272a;
  border-color: #52525b;
}

body.dark-mode .schedule-tool-btn.primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

body.dark-mode .schedule-tool-btn.primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

body.dark-mode .schedule-tool-btn.danger {
  background: #2a1515;
  border-color: #5c1d1d;
  color: #f87171;
}

body.dark-mode .schedule-tool-btn.danger:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Day Selector Tabs */
.schedule-days-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.schedule-day-tab {
  flex: 1;
  min-width: 74px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.schedule-day-tab:hover {
  background: #f8fafc;
  color: #007bff;
  border-color: #cbd5e1;
}

.schedule-day-tab.active {
  background: #007bff;
  color: #ffffff;
  border-color: #007bff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.25);
}

body.dark-mode .schedule-day-tab {
  background: #18181b;
  border-color: #27272a;
  color: #a1a1aa;
}

body.dark-mode .schedule-day-tab:hover {
  background: #27272a;
  color: #3b82f6;
}

body.dark-mode .schedule-day-tab.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* Add Slot Box */
.schedule-add-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dark-mode .schedule-add-box {
  background: #141414;
  border-color: #27272a;
}

.schedule-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schedule-add-title {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.dark-mode .schedule-add-title {
  color: #e2e8f0;
}

.schedule-active-day-label {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
}

body.dark-mode .schedule-active-day-label {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.schedule-add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-time-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-time-inputs .time-field {
  display: flex;
  align-items: center;
  gap: 4px;
}

.schedule-time-inputs .time-field label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

body.dark-mode .schedule-time-inputs .time-field label {
  color: #a1a1aa;
}

.schedule-time-inputs input[type="time"] {
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #f8fafc;
  color: #0f172a;
}

body.dark-mode .schedule-time-inputs input[type="time"] {
  background: #1f1f23;
  border-color: #3f3f46;
  color: #f8fafc;
}

.schedule-title-field {
  flex: 1;
  min-width: 200px;
}

.schedule-title-field input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
}

body.dark-mode .schedule-title-field input {
  background: #1f1f23;
  border-color: #3f3f46;
  color: #f8fafc;
}

.schedule-notes-field {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

body.dark-mode .schedule-notes-field {
  background: #1f1f23;
  border-color: #3f3f46;
}

.schedule-notes-field i {
  color: #94a3b8;
  font-size: 12px;
}

.schedule-notes-field input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 0;
  font-size: 13px;
  color: #0f172a;
  outline: none;
}

body.dark-mode .schedule-notes-field input {
  color: #f8fafc;
}

.schedule-category-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-category-picker label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

body.dark-mode .schedule-category-picker label {
  color: #a1a1aa;
}

.schedule-category-picker select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
}

body.dark-mode .schedule-category-picker select {
  background: #1f1f23;
  border-color: #3f3f46;
  color: #f8fafc;
}

.schedule-submit-btn {
  padding: 7px 14px;
  background: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.schedule-submit-btn:hover {
  background: #0056b3;
}

body.dark-mode .schedule-submit-btn {
  background: #3b82f6;
}

body.dark-mode .schedule-submit-btn:hover {
  background: #2563eb;
}

/* Slots List */
.schedule-slots-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-slot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.schedule-slot-item:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.dark-mode .schedule-slot-item {
  background: #141414;
  border-color: #27272a;
}

body.dark-mode .schedule-slot-item:hover {
  border-color: #3f3f46;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.schedule-slot-item.is-current {
  border-left: 4px solid #007bff;
  background: rgba(0, 123, 255, 0.04);
}

body.dark-mode .schedule-slot-item.is-current {
  border-left: 4px solid #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.schedule-slot-item.is-done {
  opacity: 0.6;
}

.schedule-slot-time {
  min-width: 100px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.dark-mode .schedule-slot-time {
  color: #f8fafc;
}

.schedule-slot-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.schedule-slot-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

body.dark-mode .schedule-slot-title {
  color: #f8fafc;
}

.schedule-slot-location {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.dark-mode .schedule-slot-location {
  color: #a1a1aa;
}

.schedule-slot-badge {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  line-height: 1.3;
}

/* Light Mode - Muted, elegant editorial tones */
.schedule-slot-badge.blue {
  background: #f0f4f9;
  color: #2b4c7e;
  border-color: #d2deeb;
}

.schedule-slot-badge.green {
  background: #f1f5f2;
  color: #2e5c3a;
  border-color: #d3dfd7;
}

.schedule-slot-badge.purple {
  background: #f5f2f8;
  color: #593e78;
  border-color: #ddd4e7;
}

.schedule-slot-badge.amber {
  background: #faf6ee;
  color: #7a541c;
  border-color: #ecdcc8;
}

.schedule-slot-badge.rose {
  background: #faf2f2;
  color: #7b3238;
  border-color: #edd5d7;
}

/* Dark Mode - Soft, low-contrast, non-neon matte tones */
body.dark-mode .schedule-slot-badge.blue {
  background: rgba(43, 76, 126, 0.22);
  color: #93b3dc;
  border-color: rgba(147, 179, 220, 0.22);
}

body.dark-mode .schedule-slot-badge.green {
  background: rgba(46, 92, 58, 0.22);
  color: #8eb99a;
  border-color: rgba(142, 185, 154, 0.22);
}

body.dark-mode .schedule-slot-badge.purple {
  background: rgba(89, 62, 120, 0.22);
  color: #bfa9d8;
  border-color: rgba(191, 169, 216, 0.22);
}

body.dark-mode .schedule-slot-badge.amber {
  background: rgba(122, 84, 28, 0.22);
  color: #cfb186;
  border-color: rgba(207, 177, 134, 0.22);
}

body.dark-mode .schedule-slot-badge.rose {
  background: rgba(123, 50, 56, 0.22);
  color: #d19ba0;
  border-color: rgba(209, 155, 160, 0.22);
}

.schedule-slot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-slot-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.schedule-slot-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.schedule-slot-btn.delete:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

body.dark-mode .schedule-slot-btn {
  border-color: #27272a;
  color: #a1a1aa;
}

body.dark-mode .schedule-slot-btn:hover {
  background: #27272a;
  color: #ffffff;
}

body.dark-mode .schedule-slot-btn.delete:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.schedule-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  gap: 8px;
}

body.dark-mode .schedule-empty-state {
  background: #141414;
  border-color: #27272a;
}

.schedule-empty-state i {
  font-size: 32px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.schedule-empty-state h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

body.dark-mode .schedule-empty-state h4 {
  color: #f8fafc;
}

.schedule-empty-state p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  max-width: 420px;
}

body.dark-mode .schedule-empty-state p {
  color: #a1a1aa;
}

/* ==========================================================================
   AUTO SCHEDULE MODAL (SMART IMPORT)
   ========================================================================== */
.auto-schedule-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: fadeInModal 0.2s ease forwards;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.auto-schedule-dialog {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

body.dark-mode .auto-schedule-dialog {
  background: #141414;
  border-color: #27272a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.auto-schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

body.dark-mode .auto-schedule-header {
  background: #18181b;
  border-color: #27272a;
}

.auto-schedule-header .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auto-schedule-header .header-left i {
  font-size: 20px;
  color: #007bff;
}

body.dark-mode .auto-schedule-header .header-left i {
  color: #3b82f6;
}

.auto-schedule-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

body.dark-mode .auto-schedule-header h3 {
  color: #f8fafc;
}

.auto-schedule-header p {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #64748b;
}

body.dark-mode .auto-schedule-header p {
  color: #a1a1aa;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.dark-mode .modal-close-btn:hover {
  background: #27272a;
  color: #ffffff;
}

.auto-schedule-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.auto-schedule-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}

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

.auto-schedule-input-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auto-schedule-input-col .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auto-schedule-input-col label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.dark-mode .auto-schedule-input-col label {
  color: #e2e8f0;
}

.input-with-action {
  display: flex;
  gap: 6px;
}

.input-with-action input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #f8fafc;
  color: #0f172a;
}

body.dark-mode .input-with-action input {
  background: #1f1f23;
  border-color: #3f3f46;
  color: #f8fafc;
}

.input-with-action .action-btn {
  padding: 8px 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.input-with-action .action-btn:hover {
  background: #007bff;
  color: #ffffff;
  border-color: #007bff;
}

body.dark-mode .input-with-action .action-btn {
  background: #1f1f23;
  border-color: #3f3f46;
  color: #e2e8f0;
}

body.dark-mode .input-with-action .action-btn:hover {
  background: #3b82f6;
  border-color: #3b82f6;
}

.raw-schedule-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-family: monospace;
  line-height: 1.4;
  background: #f8fafc;
  color: #0f172a;
  resize: vertical;
  box-sizing: border-box;
}

body.dark-mode .raw-schedule-textarea {
  background: #1f1f23;
  border-color: #3f3f46;
  color: #f8fafc;
}

.file-upload-box input[type="file"] {
  width: 100%;
  font-size: 12px;
  color: #64748b;
}

body.dark-mode .file-upload-box input[type="file"] {
  color: #a1a1aa;
}

.parse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.parse-btn:hover {
  background: #0056b3;
}

body.dark-mode .parse-btn {
  background: #3b82f6;
}

body.dark-mode .parse-btn:hover {
  background: #2563eb;
}

/* Right column preview */
.auto-schedule-preview-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

body.dark-mode .preview-header h4 {
  color: #f8fafc;
}

.preview-hint {
  font-size: 11px;
  color: #64748b;
}

body.dark-mode .preview-hint {
  color: #a1a1aa;
}

.parsed-slots-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px;
}

.no-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 20px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  gap: 8px;
}

body.dark-mode .no-preview-placeholder {
  background: #18181b;
  border-color: #27272a;
}

.no-preview-placeholder i {
  font-size: 28px;
  color: #94a3b8;
}

.no-preview-placeholder p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

body.dark-mode .no-preview-placeholder p {
  color: #a1a1aa;
}

.parsed-slot-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

body.dark-mode .parsed-slot-card {
  background: #18181b;
  border-color: #27272a;
}

.parsed-slot-check input {
  cursor: pointer;
  margin-top: 3px;
}

.parsed-slot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.parsed-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.parsed-slot-day {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #007bff;
}

body.dark-mode .parsed-slot-day {
  color: #3b82f6;
}

.parsed-slot-time {
  font-size: 12px;
  font-family: monospace;
  font-weight: 600;
  color: #0f172a;
}

body.dark-mode .parsed-slot-time {
  color: #f8fafc;
}

.parsed-slot-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

body.dark-mode .parsed-slot-title {
  color: #f8fafc;
}

.parsed-slot-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.dark-mode .parsed-slot-meta {
  color: #a1a1aa;
}

.auto-schedule-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

body.dark-mode .auto-schedule-footer {
  background: #18181b;
  border-color: #27272a;
}

.btn-cancel {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.btn-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.dark-mode .btn-cancel {
  border-color: #3f3f46;
  color: #a1a1aa;
}

body.dark-mode .btn-cancel:hover {
  background: #27272a;
  color: #ffffff;
}

.btn-apply {
  padding: 8px 16px;
  background: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-apply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-apply:not(:disabled):hover {
  background: #0056b3;
}

body.dark-mode .btn-apply {
  background: #3b82f6;
}

body.dark-mode .btn-apply:not(:disabled):hover {
  background: #2563eb;
}

.schedule-view-container:not(.is-schedule-editing) .schedule-add-box,
.schedule-view-container:not(.is-schedule-editing) .schedule-slot-actions,
.schedule-view-container:not(.is-schedule-editing) #openAutoScheduleModalBtn,
.schedule-view-container #clearAllSlotsBtn {
  display: none;
}

.settings-lang-menu {
  max-height: min(50vh, 320px);
  overflow-y: auto;
}

/* Arabic, Persian, Hebrew: text runs right to left. The sidebar stays a fixed panel, mirrored to the right. */
html[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
}

html[dir="rtl"] .sidebar.closed {
  transform: translateX(100%);
}

html[dir="rtl"] .toggle-btn {
  right: auto;
  left: -36px;
  border-radius: 10px 0 0 10px;
  border-right: none;
  border-left: 1px solid #ccc;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
}

html[dir="rtl"] .sidebar:not(.closed) .toggle-btn i {
  transform: rotate(180deg);
}

html[dir="rtl"] .sidebar.closed .toggle-btn i {
  transform: rotate(0deg);
}

html[dir="rtl"] .tabs-container {
  left: auto !important;
  right: 10px !important;
}

html[dir="rtl"] .tabs-container-right {
  right: auto !important;
  left: 10px !important;
}

html[dir="rtl"] .order-dropdown {
  right: auto !important;
  left: 0 !important;
}

html[dir="rtl"] .top-controls-wrapper,
html[dir="rtl"] .theme-switch-wrapper {
  right: auto;
  left: 35px;
}

html[dir="rtl"] .a11y-widget-container {
  right: auto;
  left: 290px;
}

/* Schedule mode hiding of task tabs */
.card.is-schedule-mode .tabs-container,
.card.is-schedule-mode .tabs-container-right {
  display: none !important;
}

.schedule-tabs-right {
  display: none;
  position: absolute;
  top: -26px;
  right: 10px;
  align-items: flex-end;
  gap: 4px;
  z-index: 100;
}

.card.is-schedule-mode .schedule-tabs-right {
  display: flex;
}

.schedule-tabs-right:has(.order-dropdown.expanded) {
  z-index: 50000;
}

.sched-plan {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sched-plan-day h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.sched-plan-info {
  grid-area: info;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.sched-plan-linkcol {
  grid-area: link;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.sched-plan-card .sched-access-lead {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.sched-plan-linkcol.is-empty {
  display: none;
}

.sched-plan-linkcol .sched-slot-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.sched-plan-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: start;
  justify-self: end;
  justify-content: flex-start;
  gap: 8px;
  max-width: 260px;
  min-width: 0;
}

.sched-plan-side:has(.sched-task-progress) {
  padding-top: 40px;
}

.sched-task-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 220px;
  text-align: right;
}

.sched-plan-card .sched-task-progress p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.sched-task-ratio {
  font-variant-numeric: tabular-nums;
}

.sched-task-jump {
  display: inline;
  max-width: 100%;
  padding: 0;
  border: none;
  background: none;
  color: #2563eb;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
  text-decoration: underline;
  cursor: pointer;
}

.sched-task-progress.is-done,
.sched-plan-card .sched-task-progress.is-done p,
.sched-slot-tasks.is-done {
  color: #2563eb;
}

.sched-plan-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(128px, 0.72fr) auto;
  grid-template-areas: "info link side";
  gap: 12px 16px;
  align-items: start;
  padding: 12px 72px 12px 16px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  border-left: 8px solid var(--slot-color, #93c5fd);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
}

.sched-plan-card:not(:has(.sched-slot-link)) {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "info side";
}

.sched-plan-time {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.sched-plan-body {
  min-width: 0;
}

.sched-plan-side {
  grid-area: side;
}

.sched-plan-card strong {
  display: block;
  font-size: 16px;
}

.sched-plan-card p {
  margin: 4px 0 0;
  line-height: 1.4;
}

.sched-slot-link,
.sched-slot-tasks {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.sched-slot-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.sched-slot-tasks {
  color: #64748b;
  font-weight: 500;
}

body.dark-mode .sched-access-lead,
html.dark-mode .sched-access-lead {
  color: #a1a1aa;
}

body.dark-mode .sched-slot-link,
html.dark-mode .sched-slot-link {
  color: #93c5fd;
}

body.dark-mode .sched-plan-linkcol .sched-slot-link,
html.dark-mode .sched-plan-linkcol .sched-slot-link {
  color: #dbeafe;
  background: rgba(147, 197, 253, 0.14);
  border-color: rgba(147, 197, 253, 0.45);
}

body.dark-mode .sched-slot-tasks,
html.dark-mode .sched-slot-tasks,
body.dark-mode .sched-plan-card .sched-task-progress p,
html.dark-mode .sched-plan-card .sched-task-progress p {
  color: #a1a1aa;
}

body.dark-mode .sched-task-jump,
html.dark-mode .sched-task-jump {
  color: #93c5fd;
}

body.dark-mode .sched-plan-card .sched-task-progress p.is-done .sched-task-jump,
html.dark-mode .sched-plan-card .sched-task-progress p.is-done .sched-task-jump {
  color: #60a5fa;
}

body.dark-mode .sched-task-progress.is-done,
html.dark-mode .sched-task-progress.is-done,
body.dark-mode .sched-plan-card .sched-task-progress.is-done p,
html.dark-mode .sched-plan-card .sched-task-progress.is-done p,
body.dark-mode .sched-slot-tasks.is-done,
html.dark-mode .sched-slot-tasks.is-done {
  color: #60a5fa;
}

.sched-plan-meta {
  color: #475569;
  font-size: 13px;
}

.sched-day-done,
.sched-week-empty {
  margin: 4px 0 0;
  font-size: 16px;
}

.sched-plan.is-optimised {
  flex: 1 1 auto;
  min-height: 100%;
}

#scheduleLayoutHost:has(> .sched-plan.is-optimised) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.sched-plan.is-optimised .sched-next-day {
  margin-top: auto;
  opacity: 0.28;
}

.sched-plan.is-optimised .sched-next-day:hover {
  opacity: 0.7;
}

.sched-next-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 12px auto 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 22px;
  opacity: 0.28;
  cursor: pointer;
}

.sched-next-hint {
  display: block;
  margin: 6px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 15px;
  opacity: 0.72;
  cursor: pointer;
  text-align: left;
}

.sched-next-hint:hover {
  opacity: 1;
  text-decoration: underline;
}

@keyframes sched-arrow-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

.sched-next-day i {
  display: inline-block;
  animation: sched-arrow-bob 1.15s ease-in-out infinite;
}

.sched-plan-card .sched-plan-count {
  position: absolute;
  top: 12px;
  right: 72px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(22, 163, 74, 0.35);
  border-radius: 6px;
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sched-plan-count i {
  font-size: 13px;
  color: inherit;
}

.sched-plan-count.is-yellow {
  background: rgba(202, 138, 4, 0.14);
  border-color: rgba(202, 138, 4, 0.45);
  color: #a16207;
}

.sched-plan-count.is-red {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
  color: #b91c1c;
}

.sched-plan-count.is-ended {
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: #94a3b8;
  font-weight: 600;
}

.sched-plan-count.is-ended i,
.sched-plan-count.is-live i {
  display: none;
}

.sched-plan-count.is-live {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}

.sched-plan-tools {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
}

.sched-plan-card:hover .sched-plan-tools,
.sched-plan-card:focus-within .sched-plan-tools {
  opacity: 1;
  pointer-events: auto;
}

.sched-plan-x,
.sched-plan-edit {
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #71717a;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.sched-plan-edit:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body.dark-mode .sched-plan-edit:hover,
html.dark-mode .sched-plan-edit:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f4f5;
}

.sched-plan-x:hover {
  background: rgba(248, 113, 113, 0.14);
  color: #dc2626;
}

.card.is-schedule-mode .actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.card.is-schedule-mode .left-actions {
  justify-self: start;
}

.card.is-schedule-mode .center-actions {
  justify-self: center;
  display: flex;
  justify-content: center;
}

.card.is-schedule-mode .right-actions {
  justify-self: end;
}

#scheduleAddEventBtn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 148px;
  background: #0f766e;
  color: #f8fafc;
}

.card.is-schedule-mode #scheduleAddEventBtn {
  display: inline-flex;
}

.card.is-schedule-mode #scheduleAddEventBtn[hidden] {
  display: none !important;
}

#scheduleAddEventBtn:hover {
  background: #0d9488;
}

/* Japanese font & vertical writing */
html[lang="ja"],
html[lang="ja"] body {
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

/* Quick Japanese Vertical Writing (Tategaki) Toggle Button */
.ja-vertical-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ja-vertical-toggle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.05);
}

.ja-vertical-toggle-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.35);
}

body.dark-mode .ja-vertical-toggle-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode .ja-vertical-toggle-btn:hover {
  background: #334155;
  color: #f8fafc;
}

body.dark-mode .ja-vertical-toggle-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

/* Japanese Tategaki (Vertical Writing) Style for Task Items */
body.ja-vertical-writing textarea.textbox {
  writing-mode: vertical-rl;
  text-orientation: upright;
  min-height: 85px;
  height: 85px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  padding: 8px 6px;
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, "Hiragino Kaku Gothic ProN", sans-serif;
  overflow-x: auto;
  overflow-y: hidden;
}

body.ja-vertical-writing .item {
  align-items: flex-start;
  padding: 12px 0;
}

body.ja-vertical-writing .item input[type="checkbox"] {
  margin-top: 6px;
}

body.ja-vertical-writing .drag-handle {
  margin-top: 6px;
}

body.ja-vertical-writing .textbox-wrapper {
  align-items: flex-start;
}

body.ja-vertical-writing .clear-btn,
body.ja-vertical-writing .delete-task-btn,
body.ja-vertical-writing .important-icon {
  margin-top: 4px;
}

.beta-data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.beta-later-note {
  margin: 8px 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #9a6700;
}

.beta-unavailable {
  opacity: 0.72;
}

html.dark-mode .beta-later-note {
  color: #f5c16c;
}

.schedule-view-container.needs-setup > :not(#scheduleSetupStage),
.schedule-view-container.is-reworking > :not(#scheduleSetupStage) {
  display: none !important;
}

.schedule-setup-stage {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  min-height: 420px;
  width: 100%;
  padding: 8px 4px 16px;
  box-sizing: border-box;
}

.schedule-view-container.needs-setup .schedule-setup-stage,
.schedule-view-container.is-reworking .schedule-setup-stage {
  display: flex;
}

.schedule-setup-stage[hidden],
.schedule-setup-offer[hidden],
.schedule-editor[hidden] {
  display: none !important;
}

.schedule-setup-offer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.schedule-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: #111827;
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
  animation: sched-btn-in 0.4s ease both, sched-btn-float 2.6s ease-in-out 0.4s infinite;
}

.schedule-create-btn:hover {
  background: #1f2937;
}

.schedule-setup-offer.is-leaving .schedule-create-btn {
  animation: sched-btn-out 0.22s ease forwards;
}

@keyframes sched-btn-in {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes sched-btn-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes sched-btn-out {
  to { opacity: 0; transform: scale(0.72); }
}

.schedule-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.schedule-editor.is-entering {
  animation: sched-editor-in 0.38s ease both;
}

@keyframes sched-editor-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.schedule-editor-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.schedule-editor-block > label {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.schedule-editor-block input[type="text"],
.schedule-editor-block input[type="url"],
.schedule-editor-block input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
}

.schedule-editor-block input[type="date"] {
  max-width: 220px;
}

body.dark-mode .schedule-editor-block input[type="date"],
html.dark-mode .schedule-editor-block input[type="date"] {
  color-scheme: dark;
}

body.dark-mode .schedule-editor-block input[type="date"]::-webkit-calendar-picker-indicator,
html.dark-mode .schedule-editor-block input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 1;
}

.schedule-editor-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.schedule-editor-preview-head h3 {
  margin: 0;
  font-size: 15px;
}

.schedule-preview-hint,
.schedule-preview-empty {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.schedule-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.schedule-format-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  color: #0f172a;
  text-align: left;
}

.schedule-format-card span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.schedule-format-card.selected {
  border-color: #8b5cf6;
  background: #f5f3ff;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

#schedulePreviewHost,
.schedule-layout-host {
  overflow-x: auto;
}

.schedule-layout-host:empty,
#scheduleSavedLegend:empty {
  display: none;
}

.uni-table {
  width: 100%;
  height: 1px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  min-width: 640px;
  table-layout: fixed;
}

.uni-table tr {
  height: 112px;
}

.uni-table th:first-child {
  width: 68px;
}

.uni-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.4;
  padding: 4px 2px 10px;
  color: #0f172a;
}

.uni-caption-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.uni-caption-title a {
  color: inherit;
  text-decoration: none;
}

.uni-caption-title a:hover {
  text-decoration: underline;
}

.uni-caption-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.uni-caption-week {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
  color: #334155;
}

.uni-week-nav {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.uni-week-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.slot-time-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slot-time-line input {
  flex: 1;
  min-width: 0;
}

.slot-time-clear {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.uni-table th,
.uni-table td {
  border: 1px solid #e2e8f0;
  vertical-align: top;
}

.uni-table th {
  background: #f8fafc;
  font-weight: 700;
  padding: 6px;
  color: #334155;
  white-space: nowrap;
}

.uni-cell {
  position: relative;
  min-width: 0;
  height: 1px;
  background: #ffffff;
  cursor: pointer;
  padding: 0;
  vertical-align: top;
  overflow: hidden;
}

.uni-cell:hover {
  background: #f8fafc;
}

.uni-stack {
  position: absolute;
  inset: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.uni-half {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  overflow: hidden;
  box-sizing: border-box;
}

.uni-half.even {
  border-top: 1px dashed #94a3b8;
}

.uni-half > b {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #64748b;
}

.uni-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  color: #0f172a;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.uni-card strong {
  font-size: 12px;
}

.uni-card span,
.uni-card em {
  font-size: 11px;
  font-style: normal;
  color: #334155;
}

.uni-table.is-readonly .uni-card {
  cursor: default;
}

.uni-card-tip {
  position: fixed;
  z-index: 10060;
  max-width: min(340px, 72vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #111827;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.uni-card-tip[hidden] {
  display: none !important;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.schedule-legend-card {
  position: absolute;
  top: 28px;
  left: 0;
  transform: translateX(calc(-100% - 16px));
  width: 196px;
  max-height: min(68vh, 620px);
  overflow: auto;
  box-sizing: border-box;
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 14px 12px;
  z-index: 30;
}

.schedule-legend-card[hidden] {
  display: none !important;
}

.schedule-legend-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.schedule-legend-card .schedule-legend {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  margin-top: 10px;
}

.schedule-legend-card .legend-item {
  border-radius: 8px;
}

.schedule-legend-card .legend-item input[type="text"] {
  width: auto;
  flex: 1;
  min-width: 0;
  color: inherit;
}

.schedule-legend-card .legend-add {
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
}

.legend-item input[type="text"] {
  width: 110px;
  border: none;
  background: transparent;
  font-size: 12px;
}

.legend-remove {
  width: 18px;
  height: 18px;
  margin-left: auto;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.legend-remove:hover {
  color: #dc2626;
  background: #fee2e2;
}

body.dark-mode .legend-remove,
html.dark-mode .legend-remove {
  color: #d4d4d8;
}

body.dark-mode .legend-remove:hover,
html.dark-mode .legend-remove:hover {
  color: #fecaca;
  background: #3f1d1d;
}

.legend-add,
.legend-swatch {
  border: 1px dashed #cbd5e1;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.legend-swatch {
  border-style: solid;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.slot-editor-backdrop[hidden] {
  display: none !important;
}

.slot-editor-dialog {
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  animation: sched-editor-in 0.24s ease both;
}

.slot-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slot-editor-head h3,
.slot-editor-dialog label,
.slot-editor-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.slot-editor-dialog label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#slotEditLinkRow {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#slotEditLinkRow[hidden],
#slotEditWeeksRow[hidden],
#slotEditOnceRow[hidden],
#slotEditRangeRow[hidden],
#slotEditDaysBlock[hidden] {
  display: none !important;
}

.slot-task-class-pick {
  margin-top: 6px;
}

.slot-editor-dialog input[type="text"],
.slot-editor-dialog input[type="url"],
.slot-editor-dialog input[type="time"],
.slot-editor-dialog input[type="date"],
.slot-editor-dialog input[type="number"],
.slot-editor-dialog select,
.slot-editor-dialog textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
}

.slot-editor-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: #475569;
}

.slot-editor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-editor-row label {
  flex: 1;
  min-width: 120px;
}

.slot-choice-row,
.slot-editor-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.slot-custom-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.slot-custom-row input {
  flex: 1;
}

.slot-custom-row button,
.slot-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.slot-choice.is-custom {
  margin-top: 4px;
}

.slot-choice-hit {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.slot-choice-x {
  position: absolute;
  top: -8px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 1;
}

.slot-choice.is-type,
.slot-choice.is-type.selected {
  background: var(--choice-color, #dbeafe);
  color: var(--choice-ink, #111827);
  border-color: transparent;
}

.slot-choice.is-type.selected {
  box-shadow: 0 0 0 2px #111827;
}

.slot-type-color {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.28);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}

.slot-type-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.slot-type-color::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.slot-editor-dialog .slot-save-btn {
  grid-column: 2;
  justify-self: center;
  width: auto;
  border-radius: 4px;
  animation: none;
  box-shadow: none;
  padding: 8px 18px;
  font-size: 13px;
  line-height: 1.2;
  transition: transform 0.2s ease, background 0.2s ease;
}

.slot-editor-dialog .slot-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.28);
  background: #1f2937;
}

.slot-choice.selected {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

body.dark-mode .slot-choice,
html.dark-mode .slot-choice,
body.dark-mode .slot-custom-row button,
html.dark-mode .slot-custom-row button {
  background: #1c1c1c;
  color: #f4f4f5;
  border-color: #3f3f46;
}

body.dark-mode .slot-choice.selected,
html.dark-mode .slot-choice.selected {
  background: #f4f4f5;
  color: #111827;
  border-color: #f4f4f5;
}

body.dark-mode .slot-choice.is-type,
html.dark-mode .slot-choice.is-type,
body.dark-mode .slot-choice.is-type.selected,
html.dark-mode .slot-choice.is-type.selected {
  background: var(--choice-color, #dbeafe);
  color: var(--choice-ink, #111827);
  border-color: transparent;
}

body.dark-mode .slot-choice.is-type.selected,
html.dark-mode .slot-choice.is-type.selected {
  box-shadow: 0 0 0 2px #f8fafc;
}

body.dark-mode .slot-choice-x,
html.dark-mode .slot-choice-x {
  background: #f4f4f5;
  color: #111827;
  border-color: #f4f4f5;
}

body.dark-mode .slot-editor-dialog .slot-save-btn,
html.dark-mode .slot-editor-dialog .slot-save-btn {
  background: #3a3a3a;
  color: #f4f4f5;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

body.dark-mode .slot-editor-dialog .slot-save-btn:hover,
html.dark-mode .slot-editor-dialog .slot-save-btn:hover {
  background: #4a4a4a;
  color: #ffffff;
}

body.dark-mode .slot-editor-dialog input[type="time"],
html.dark-mode .slot-editor-dialog input[type="time"],
body.dark-mode .slot-editor-dialog input[type="date"],
html.dark-mode .slot-editor-dialog input[type="date"] {
  color-scheme: dark;
}

body.dark-mode .slot-editor-dialog input[type="time"]::-webkit-calendar-picker-indicator,
html.dark-mode .slot-editor-dialog input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 1;
}

.slot-editor-days label {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.slot-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 168px;
  margin-top: 6px;
  overflow: auto;
}

.slot-editor-dialog .slot-task-list label {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.slot-task-list input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.slot-task-class,
.slot-task-empty {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.slot-task-class {
  margin-top: 8px;
}

body.dark-mode .slot-editor-dialog .schedule-preview-hint,
html.dark-mode .slot-editor-dialog .schedule-preview-hint,
body.dark-mode .slot-task-class,
html.dark-mode .slot-task-class,
body.dark-mode .slot-task-empty,
html.dark-mode .slot-task-empty {
  color: #a1a1aa;
}

.slot-editor-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slot-editor-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 28px;
}

#slotEditDelete {
  grid-column: 1;
  justify-self: start;
}

#slotEditDelete[hidden] {
  display: none !important;
}

.item.is-schedule-linked {
  position: relative;
}

.item.is-schedule-linked::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.22);
  z-index: 2;
  pointer-events: none;
  animation: sched-mark-pulse 2.8s ease-in-out infinite;
}

@keyframes sched-mark-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.7);
    opacity: 1;
  }
}

.month-cal-head,
.month-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.month-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.month-cal-nav button,
.month-day {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
}

.month-day {
  min-height: 64px;
  padding: 4px;
  text-align: left;
}

.month-day.selected {
  border-color: #8b5cf6;
  background: #f5f3ff;
}

.month-day.has-items strong {
  color: #6d28d9;
}

.schedule-view-container[data-schedule-format="workweek"] .schedule-day-tab[data-day="saturday"],
.schedule-view-container[data-schedule-format="workweek"] .schedule-day-tab[data-day="sunday"],
.schedule-view-container[data-schedule-format="usv"] .schedule-days-bar,
.schedule-view-container[data-schedule-format="week"] .schedule-days-bar,
.schedule-view-container[data-schedule-format="workweek"] .schedule-days-bar,
.schedule-view-container[data-schedule-format="calendar"] .schedule-days-bar,
.schedule-view-container[data-schedule-format="agenda"] .schedule-day-tab[data-day="all"],
.schedule-view-container[data-schedule-format="usv"] .schedule-slots-list,
.schedule-view-container[data-schedule-format="week"] .schedule-slots-list,
.schedule-view-container[data-schedule-format="workweek"] .schedule-slots-list,
.schedule-view-container[data-schedule-format="agenda"] .schedule-slots-list,
.schedule-view-container[data-schedule-format="usv"] .schedule-add-box,
.schedule-view-container[data-schedule-format="week"] .schedule-add-box,
.schedule-view-container[data-schedule-format="workweek"] .schedule-add-box,
.schedule-view-container[data-schedule-format="agenda"] .schedule-add-box {
  display: none;
}

body.dark-mode .schedule-editor-block,
html.dark-mode .schedule-editor-block,
body.dark-mode .slot-editor-dialog,
html.dark-mode .slot-editor-dialog,
body.dark-mode .legend-item,
html.dark-mode .legend-item,
body.dark-mode .uni-cell,
html.dark-mode .uni-cell,
body.dark-mode .month-day,
html.dark-mode .month-day {
  background: #141414;
  border-color: #2a2a2a;
  color: #f8fafc;
}

body.dark-mode .legend-add,
html.dark-mode .legend-add {
  background: #1c1c1c;
  color: #f4f4f5;
  border-color: #3f3f46;
}

body.dark-mode .schedule-editor-block > label,
html.dark-mode .schedule-editor-block > label,
body.dark-mode .uni-table caption,
html.dark-mode .uni-table caption,
body.dark-mode .slot-editor-dialog label,
html.dark-mode .slot-editor-dialog label,
body.dark-mode .slot-editor-label,
html.dark-mode .slot-editor-label,
body.dark-mode .slot-editor-head h3,
html.dark-mode .slot-editor-head h3 {
  color: #f8fafc;
}

body.dark-mode .uni-card,
html.dark-mode .uni-card {
  background: color-mix(in srgb, var(--slot-color, #93c5fd) 26%, #161616) !important;
  color: #f4f4f5 !important;
  border-color: color-mix(in srgb, var(--slot-color, #93c5fd) 48%, #2c2c2c) !important;
}

body.dark-mode .uni-caption-week,
html.dark-mode .uni-caption-week {
  color: #e2e8f0;
}

body.dark-mode .sched-plan-card,
html.dark-mode .sched-plan-card {
  background: #161616;
  border-color: #2c2c2c;
  border-left-color: var(--slot-color, #93c5fd);
  color: #f4f4f5;
}

body.dark-mode .sched-plan-meta,
html.dark-mode .sched-plan-meta {
  color: #cbd5e1;
}

body.dark-mode .sched-plan-count,
html.dark-mode .sched-plan-count,
body.dark-mode .sched-plan-count.is-green,
html.dark-mode .sched-plan-count.is-green {
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

body.dark-mode .sched-plan-count.is-yellow,
html.dark-mode .sched-plan-count.is-yellow {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.5);
  color: #facc15;
}

body.dark-mode .sched-plan-count.is-red,
html.dark-mode .sched-plan-count.is-red {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.5);
  color: #f87171;
}

body.dark-mode .sched-plan-count.is-ended,
html.dark-mode .sched-plan-count.is-ended {
  background: transparent;
  border-color: transparent;
  color: #71717a;
}

body.dark-mode .sched-plan-count.is-live,
html.dark-mode .sched-plan-count.is-live {
  background: rgba(147, 197, 253, 0.14);
  border-color: rgba(147, 197, 253, 0.45);
  color: #93c5fd;
}

body.dark-mode .sched-plan-x:hover,
html.dark-mode .sched-plan-x:hover {
  color: #f87171;
}

body.dark-mode .uni-card strong,
html.dark-mode .uni-card strong,
body.dark-mode .uni-card span,
body.dark-mode .uni-card em,
html.dark-mode .uni-card span,
html.dark-mode .uni-card em {
  color: #ffffff;
}

body.dark-mode .uni-half > b,
html.dark-mode .uni-half > b {
  color: #e2e8f0;
}

body.dark-mode .uni-half.even,
html.dark-mode .uni-half.even {
  border-top-color: #94a3b8;
}

body.dark-mode .uni-table th,
html.dark-mode .uni-table th,
body.dark-mode .schedule-format-card,
html.dark-mode .schedule-format-card {
  background: #1c1c1c;
  color: #f8fafc;
  border-color: #333;
}

body.dark-mode .schedule-create-btn,
html.dark-mode .schedule-create-btn {
  background: #f8fafc;
  color: #111827;
}



/* === SLEEK FLOATING SIDE ARROWS STRIP (OUTSIDE CARD, ALIGNED WITH TASKS) === */
.task-side-arrows-strip {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  width: 44px;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  overflow: visible;
  box-sizing: border-box;
}

.side-arrow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  pointer-events: auto;
}

.side-task-arrow-btn {
  width: 36px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer !important;
  outline: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  pointer-events: auto !important;
  z-index: 55;
}

.side-task-arrow-btn * {
  pointer-events: none;
}

.side-task-arrow-btn i {
  font-size: 14px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.side-task-arrow-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
  transform: translateX(3px);
}

.side-task-arrow-btn:active {
  transform: scale(0.92);
}

html.dark-mode .side-task-arrow-btn,
body.dark-mode .side-task-arrow-btn {
  background: #1e1e24;
  border-color: #3f3f46;
  color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

html.dark-mode .side-task-arrow-btn:hover,
body.dark-mode .side-task-arrow-btn:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

/* === ANIMATED TASK DETAILS MODAL (CLEAN & NON-NEON) === */
.task-details-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.task-details-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.task-details-modal-card {
  background: #ffffff;
  width: 540px;
  max-width: 100%;
  max-height: 88vh;
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

.task-details-modal-backdrop.active .task-details-modal-card {
  transform: scale(1) translateY(0);
}

html.dark-mode .task-details-modal-card,
body.dark-mode .task-details-modal-card {
  background: #18181b;
  border: 1px solid #27272a;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  color: #f4f4f5;
}

.task-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px 20px;
  border-bottom: 1px solid #e2e8f0;
}

html.dark-mode .task-details-header,
body.dark-mode .task-details-header {
  border-bottom-color: #27272a;
}

.task-details-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-details-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.2px;
}

.task-details-badge.status.completed {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

html.dark-mode .task-details-badge.status.completed,
body.dark-mode .task-details-badge.status.completed {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

.task-details-badge.status.in-process {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

html.dark-mode .task-details-badge.status.in-process,
body.dark-mode .task-details-badge.status.in-process {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
}

.task-details-badge.priority {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}

html.dark-mode .task-details-badge.priority,
body.dark-mode .task-details-badge.priority {
  background: rgba(234, 179, 8, 0.16);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.35);
}

.task-details-created-tag {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

html.dark-mode .task-details-created-tag,
body.dark-mode .task-details-created-tag {
  background: #27272a;
  color: #a1a1aa;
  border-color: #3f3f46;
}

.task-details-close-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer !important;
  pointer-events: auto !important;
  color: #64748b;
  font-size: 16px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 10;
}

.task-details-close-btn * {
  pointer-events: none;
}

.task-details-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html.dark-mode .task-details-close-btn:hover,
body.dark-mode .task-details-close-btn:hover {
  background: #27272a;
  color: #f4f4f5;
}

/* Clear All Info Button in Edit Bar */
.btn-clear-all-info {
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #b91c1c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.btn-clear-all-info:hover {
  background: #b91c1c;
  border-color: #991b1b;
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.btn-clear-all-info:active {
  transform: scale(0.98);
}

html.dark-mode .btn-clear-all-info,
body.dark-mode .btn-clear-all-info {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}

html.dark-mode .btn-clear-all-info:hover,
body.dark-mode .btn-clear-all-info:hover {
  background: #dc2626;
}

/* Floating App Notifications / Toasts */
.app-notifications-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100vw - 48px);
  pointer-events: none;
}

.app-toast-item {
  pointer-events: auto;
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

.app-toast-item.removing {
  opacity: 0;
  transform: translateX(40px) scale(0.95);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.app-toast-icon {
  font-size: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.app-toast-item.warning {
  border-left: 4px solid #f59e0b;
}

.app-toast-item.warning .app-toast-icon {
  color: #f59e0b;
}

.app-toast-item.expired {
  border-left: 4px solid #ef4444;
}

.app-toast-item.expired .app-toast-icon {
  color: #ef4444;
}

.app-toast-item.info {
  border-left: 4px solid #3b82f6;
}

.app-toast-item.info .app-toast-icon {
  color: #3b82f6;
}

.app-toast-item.success {
  border-left: 4px solid #16a34a;
}

.app-toast-item.success .app-toast-icon {
  color: #16a34a;
}

.app-toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.app-toast-msg {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}

.app-toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-toast-delete {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s ease;
}

.btn-toast-delete:hover {
  background: #dc2626;
}

.btn-toast-keep {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toast-keep:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html.dark-mode .btn-toast-keep {
  border-color: #3f3f46;
  color: #a1a1aa;
}

html.dark-mode .btn-toast-keep:hover {
  background: #27272a;
  color: #f4f4f5;
}

.app-toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 14px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.app-toast-close:hover {
  color: #0f172a;
}

/* Top Controls Notifications Button */
.top-notifications-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  font-size: 15px;
  position: relative;
  transition: all 0.2s ease;
}

.top-notifications-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
  transform: scale(1.05);
}

html.dark-mode .top-notifications-btn {
  border-color: rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

html.dark-mode .top-notifications-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

html.hide-notifications-button .top-notifications-btn {
  display: none !important;
}

.notifications-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

html.dark-mode .notifications-badge {
  border-color: #18181b;
}

/* Notifications History Modal Item */
.notif-history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.notif-history-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

html.dark-mode .notif-history-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark-mode .notif-history-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.notif-history-item.warning {
  border-left: 3px solid #f59e0b;
}

.notif-history-item.expired {
  border-left: 3px solid #ef4444;
}

.notif-history-item.info {
  border-left: 3px solid #3b82f6;
}

.notif-item-icon {
  font-size: 15px;
  margin-top: 2px;
  flex-shrink: 0;
}

.notif-history-item.warning .notif-item-icon { color: #f59e0b; }
.notif-history-item.expired .notif-item-icon { color: #ef4444; }
.notif-history-item.info .notif-item-icon { color: #3b82f6; }

.notif-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

html.dark-mode .notif-item-title {
  color: #f1f5f9;
}

.notif-item-time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.notif-item-msg {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}

html.dark-mode .notif-item-msg {
  color: #94a3b8;
}

.notif-item-del {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.notif-item-del:hover {
  color: #ef4444;
}

.btn-clear-all-info.disabled,
.btn-clear-all-info:disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none;
  filter: grayscale(0.4);
  box-shadow: none;
}

html.dark-mode .app-toast-item,
body.dark-mode .app-toast-item {
  background: #18181b;
  border-color: #27272a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

html.dark-mode .app-toast-title,
body.dark-mode .app-toast-title {
  color: #f4f4f5;
}

html.dark-mode .app-toast-msg,
body.dark-mode .app-toast-msg {
  color: #a1a1aa;
}

html.dark-mode .app-toast-close:hover,
body.dark-mode .app-toast-close:hover {
  color: #f4f4f5;
}

.task-details-body {
  padding: 14px 20px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

/* Details Section Card */
.task-details-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: sectionFadeIn 0.25s ease both;
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html.dark-mode .task-details-section,
body.dark-mode .task-details-section {
  background: #202024;
  border-color: #2e2e34;
}

.details-sec-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

html.dark-mode .details-sec-title,
body.dark-mode .details-sec-title {
  color: #94a3b8;
}

.details-sec-title i {
  color: #3b82f6;
  font-size: 12px;
}

html.dark-mode .details-sec-title i,
body.dark-mode .details-sec-title i {
  color: #60a5fa;
}

/* Clean Classes & IDs Badges (Muted, Elegant, Non-Neon) */
.details-classes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-class-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.detail-class-pill .pill-id {
  color: #0369a1;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 600;
}

html.dark-mode .detail-class-pill,
body.dark-mode .detail-class-pill {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}

html.dark-mode .detail-class-pill .pill-id,
body.dark-mode .detail-class-pill .pill-id {
  color: #7dd3fc;
}

/* Clean Tags Badges (Muted, Elegant, Non-Neon) */
.details-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

html.dark-mode .detail-tag-pill,
body.dark-mode .detail-tag-pill {
  background: #18181b;
  color: #cbd5e1;
  border-color: #27272a;
}

/* Deadline & Countdown Layout */
.details-time-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.details-deadline-text,
.details-tz-text {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

html.dark-mode .details-deadline-text,
html.dark-mode .details-tz-text,
body.dark-mode .details-deadline-text,
body.dark-mode .details-tz-text {
  color: #cbd5e1;
}

.details-deadline-text i,
.details-tz-text i {
  color: #3b82f6;
  font-size: 13px;
  width: 14px;
}

.details-countdown-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  width: fit-content;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.details-countdown-box.status-ok {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.details-countdown-box.status-warning {
  background: #fefce8;
  color: #a16207;
  border-color: #fef08a;
}

.details-countdown-box.status-expired {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

html.dark-mode .details-countdown-box {
  background: #27272a;
  color: #d4d4d8;
  border-color: #3f3f46;
}

html.dark-mode .details-countdown-box.status-ok {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

html.dark-mode .details-countdown-box.status-warning {
  background: rgba(234, 179, 8, 0.16);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.35);
}

html.dark-mode .details-countdown-box.status-expired {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

/* Editable Location in Modal */
.details-location-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.details-location-input {
  flex: 1;
  min-width: 180px;
  padding: 7px 11px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.details-location-input:focus {
  border-color: #3b82f6;
}

html.dark-mode .details-location-input {
  background: #18181b;
  border-color: #3f3f46;
  color: #f4f4f5;
}

html.dark-mode .details-location-input:focus {
  border-color: #60a5fa;
}

.details-maps-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.details-maps-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}

/* Live Google Maps Interactive Viewers */
.panel-map-wrapper {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  margin-top: 10px;
  background: #f1f5f9;
}

.panel-map-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.details-map-wrapper {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-top: 10px;
  background: #f8fafc;
}

.details-map-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

html.dark-mode .panel-map-wrapper,
body.dark-mode .panel-map-wrapper,
html.dark-mode .details-map-wrapper,
body.dark-mode .details-map-wrapper {
  border-color: #3f3f46;
  background: #18181b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Editable Notes Textarea in Modal */
.details-notes-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 200px;
  padding: 8px 11px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease;
}

.details-notes-textarea:focus {
  border-color: #3b82f6;
}

html.dark-mode .details-notes-textarea {
  background: #18181b;
  border-color: #3f3f46;
  color: #f4f4f5;
}

html.dark-mode .details-notes-textarea:focus {
  border-color: #60a5fa;
}

/* Editable Links in Modal */
.modal-links-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

html.dark-mode .modal-link-item {
  background: #18181b;
  border-color: #2e2e34;
}

.modal-link-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.modal-link-item-left a {
  color: #2563eb;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-link-item-left a:hover {
  text-decoration: underline;
}

html.dark-mode .modal-link-item-left a {
  color: #60a5fa;
}

.modal-link-delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.modal-link-delete-btn:hover {
  background: rgba(239, 68, 68, 0.12);
}

.modal-add-link-form {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.modal-add-link-input {
  flex: 1;
  min-width: 130px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.modal-add-link-input:focus {
  border-color: #3b82f6;
}

html.dark-mode .modal-add-link-input {
  background: #18181b;
  border-color: #3f3f46;
  color: #f4f4f5;
}

html.dark-mode .modal-add-link-input:focus {
  border-color: #60a5fa;
}

.modal-add-link-btn {
  padding: 6px 12px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.modal-add-link-btn:hover {
  background: #1d4ed8;
}

html.dark-mode .modal-add-link-btn {
  background: #3b82f6;
}

html.dark-mode .modal-add-link-btn:hover {
  background: #2563eb;
}


.new-url-form-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 5px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
}

html.dark-mode .new-url-form-panel,
body.dark-mode .new-url-form-panel {
  background: #1e1e1e;
  border-color: #333;
}

.url-done-btn {
  background: #16a34a;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background-color 0.2s ease;
}

.url-done-btn:hover {
  background: #15803d;
}

.side-deadline {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.side-deadline i {
  color: #2563eb;
}

html.dark-mode .side-deadline {
  color: #f1f5f9;
}

html.dark-mode .side-deadline i {
  color: #60a5fa;
}

.side-countdown {
  font-size: 13px;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Segoe UI Mono', monospace;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.25s ease;
}

/* Countdown status colors: Verde (OK), Galben (Warning), Roșu (Expired) */
.side-countdown.status-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

html.dark-mode .side-countdown.status-ok {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}

.side-countdown.status-warning {
  background: rgba(234, 179, 8, 0.14);
  color: #ca8a04;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

html.dark-mode .side-countdown.status-warning {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.35);
}

.side-countdown.status-expired {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

html.dark-mode .side-countdown.status-expired {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.side-notes-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.side-notes-btn:hover {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  transform: scale(1.08);
}

html.dark-mode .side-notes-btn {
  background: #1e1e1e;
  border-color: #333;
  color: #cbd5e1;
}

html.dark-mode .side-notes-btn:hover {
  background: #3b82f6;
  border-color: #2563eb;
  color: #ffffff;
}

html.dark-mode .side-chip-empty,
body.dark-mode .side-chip-empty {
  color: #475569;
}

.side-info-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 10px;
  color: #94a3b8;
  gap: 8px;
  font-size: 13px;
}

.side-info-empty i {
  font-size: 28px;
  color: #cbd5e1;
}

html.dark-mode .side-info-empty,
body.dark-mode .side-info-empty {
  color: #64748b;
}

html.dark-mode .side-info-empty i,
body.dark-mode .side-info-empty i {
  color: #334155;
}

/* Location Actions Row & Buttons */
.location-actions-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 8px !important;
  margin-bottom: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.location-actions-row .my-location-btn,
.location-actions-row .location-clear-btn,
.my-location-btn,
.location-clear-btn {
  flex: 1 1 0% !important;
  width: 50% !important;
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  border: none !important;
  transition: background-color 0.2s ease !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* My location button: BLACK / DARK */
.location-actions-row .my-location-btn,
.my-location-btn {
  background-color: #1e1e1e !important;
  color: #ffffff !important;
}

.location-actions-row .my-location-btn:hover,
.my-location-btn:hover {
  background-color: #333333 !important;
  color: #ffffff !important;
}

/* Clear location button: SOLID RED */
.location-actions-row .location-clear-btn,
.location-clear-btn {
  background-color: #dc3545 !important;
  color: #ffffff !important;
}

.location-actions-row .location-clear-btn:hover,
.location-clear-btn:hover {
  background-color: #c82333 !important;
  color: #ffffff !important;
}

html.dark-mode .location-actions-row .my-location-btn,
html.dark-mode .my-location-btn {
  background-color: #27272a !important;
  color: #ffffff !important;
}

html.dark-mode .location-actions-row .my-location-btn:hover,
html.dark-mode .my-location-btn:hover {
  background-color: #3f3f46 !important;
  color: #ffffff !important;
}

html.dark-mode .location-actions-row .location-clear-btn,
html.dark-mode .location-clear-btn {
  background-color: #dc3545 !important;
  color: #ffffff !important;
}

html.dark-mode .location-actions-row .location-clear-btn:hover,
html.dark-mode .location-clear-btn:hover {
  background-color: #c82333 !important;
  color: #ffffff !important;
}

/* Delete All (Tags & Subtasks) Buttons */
.delete-all-wrapper {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.delete-all-btn {
  background-color: #dc3545;
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease;
}

.delete-all-btn:hover {
  background-color: #c82333;
  color: #ffffff;
}

html.dark-mode .delete-all-btn {
  background-color: #dc3545;
  color: #ffffff;
}

html.dark-mode .delete-all-btn:hover {
  background-color: #c82333;
}

/* Multi-Class Assignment Pills (Muted, Elegant, Non-Neon) */
.assigned-class-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.assigned-class-pill:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.assigned-class-pill.active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.assigned-class-pill .class-name-text {
  font-weight: 600;
}

.assigned-class-pill .class-id-text {
  color: #0369a1;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

html.dark-mode .assigned-class-pill,
body.dark-mode .assigned-class-pill {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

html.dark-mode .assigned-class-pill:hover,
body.dark-mode .assigned-class-pill:hover {
  background: #334155;
  border-color: #475569;
}

html.dark-mode .assigned-class-pill.active,
body.dark-mode .assigned-class-pill.active {
  background: #0f2744;
  border-color: #38bdf8;
  color: #bae6fd;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

html.dark-mode .assigned-class-pill .class-id-text,
body.dark-mode .assigned-class-pill .class-id-text {
  color: #7dd3fc;
}

.assigned-class-pill .delete-assigned-class-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

/* ==========================================================================
   NOTIFICATIONS HISTORY MODAL & BADGE SYSTEM
   ========================================================================== */

.notif-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.25s ease;
  box-sizing: border-box;
}

.notif-modal-backdrop.active {
  opacity: 1;
}

.notif-modal-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  width: 92%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  box-sizing: border-box;
}

.notif-modal-backdrop.active .notif-modal-card {
  transform: scale(1);
}

html.dark-mode .notif-modal-card {
  background: #18181b;
  color: #f8fafc;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.notif-modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  box-sizing: border-box;
}

html.dark-mode .notif-modal-header {
  background: #27272a;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.notif-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-modal-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

html.dark-mode .notif-modal-icon-circle {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.notif-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

html.dark-mode .notif-modal-title {
  color: #f8fafc;
}

.notif-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-notif-clear-all {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-notif-clear-all:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

html.dark-mode .btn-notif-clear-all {
  background: #3f3f46;
  border-color: #52525b;
  color: #e4e4e7;
}

html.dark-mode .btn-notif-clear-all:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: #ef4444;
}

.notif-modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.notif-modal-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

html.dark-mode .notif-modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

html.dark-mode .notif-modal-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.notif-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  box-sizing: border-box;
}

/* Empty State Card */
.notif-empty-state-wrap {
  text-align: center;
  padding: 36px 16px;
}

.notif-empty-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
}

html.dark-mode .notif-empty-icon-circle {
  background: rgba(255, 255, 255, 0.06);
  color: #71717a;
}

.notif-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

html.dark-mode .notif-empty-title {
  color: #e2e8f0;
}

.notif-empty-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

html.dark-mode .notif-empty-sub {
  color: #94a3b8;
}

/* Notif Item Card */
.notif-history-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.notif-history-item:hover {
  background: #f1f5f9;
}

html.dark-mode .notif-history-item {
  background: #27272a;
  border-color: #3f3f46;
}

html.dark-mode .notif-history-item:hover {
  background: #323238;
}

.notif-history-item.warning {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.notif-history-item.expired {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.notif-history-item.info {
  border-left: 4px solid #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.notif-item-icon {
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.notif-history-item.warning .notif-item-icon { color: #f59e0b; }
.notif-history-item.expired .notif-item-icon { color: #ef4444; }
.notif-history-item.info .notif-item-icon { color: #3b82f6; }

.notif-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.notif-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.dark-mode .notif-item-title {
  color: #f1f5f9;
}

.notif-item-time {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
}

.notif-item-msg {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}

html.dark-mode .notif-item-msg {
  color: #cbd5e1;
}

.notif-item-del {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.notif-item-del:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Bell Button & Exact Count Badge */
.top-notifications-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  font-size: 15px;
  position: relative;
  transition: all 0.2s ease;
}

.top-notifications-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
  transform: scale(1.05);
}

html.dark-mode .top-notifications-btn {
  border-color: rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

html.dark-mode .top-notifications-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

html.hide-notifications-button .top-notifications-btn {
  display: none !important;
}

.notifications-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.45);
  box-sizing: border-box;
  line-height: 1;
}

html.dark-mode .notifications-badge {
  border-color: #18181b;
}

/* ==========================================================================
   IMPORT / EXPORT FORMAT GUIDE & EXAMPLES
   ========================================================================== */

.btn-import-examples-guide {
  width: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px dashed #93c5fd;
  background: rgba(239, 246, 255, 0.7);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-import-examples-guide:hover {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

html.dark-mode .btn-import-examples-guide {
  background: rgba(30, 58, 138, 0.25);
  border-color: #3b82f6;
  color: #93c5fd;
}

html.dark-mode .btn-import-examples-guide:hover {
  background: rgba(30, 58, 138, 0.45);
  color: #bfdbfe;
}

.import-format-nav {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

html.dark-mode .import-format-nav {
  background: #27272a;
  border-color: #3f3f46;
}

.import-fmt-tab {
  flex: 1;
  padding: 7px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.import-fmt-tab:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.import-fmt-tab.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

html.dark-mode .import-fmt-tab {
  color: #a1a1aa;
}

html.dark-mode .import-fmt-tab:hover {
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.06);
}

html.dark-mode .import-fmt-tab.active {
  background: #3f3f46;
  color: #60a5fa;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.import-example-display-box {
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
}

.import-example-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.import-example-box-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.btn-copy-code-example {
  background: #334155;
  border: 1px solid #475569;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-copy-code-example:hover {
  background: #2563eb;
  border-color: #3b82f6;
}

.import-example-code-pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #e2e8f0;
  max-height: 240px;
  user-select: text;
}

.import-schema-guide-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

html.dark-mode .import-schema-guide-box {
  background: #27272a;
  border-color: #3f3f46;
}

html.dark-mode .import-schema-guide-box h4 {
  color: #f1f5f9 !important;
}

html.dark-mode .import-schema-guide-box ul {
  color: #cbd5e1 !important;
}

@import "responsive.css";
