@keyframes vibrate {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    color: greenyellow;
  }
  50% {
    color: #ffd700;
  }
  100% {
    color: greenyellow;
  }
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/static/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/static/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/static/Inter-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-color: #f8f9fb;
  --text-color: #1f1f1f;
  --card-bg: #ffffff;
  --border-color: #d4d7dd;
  --footer-color: #1f1f1f;
  --alert-text: #3a3a3a;
  --background: rgba(248, 249, 251, 0.9);
  --accent: #2b7bdc;
  --accent-strong: #1f64b8;
  --accent-warm: #e07a2f;
  --nav-bg: #ffffff;
  --shadow: rgba(20, 23, 28, 0.12);
}

body.dark,
html.dark {
  --bg-color: #121212;
  --text-color: #e6e6e6;
  --card-bg: #1e1e1e;
  --border-color: #666666;
  --footer-color: #cfcfcf;
  --alert-text: #e0a96d;
  --background: rgba(30, 30, 30, 0.9);
  --accent: #6fc2b0;
  --accent-strong: #58a896;
  --accent-warm: #d89a63;
  --nav-bg: #171717;
  --shadow: rgba(0, 0, 0, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
}

html.i18n-loading body {
  visibility: hidden;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
}

.container {
  min-height: auto;
  background: var(--bg-color);
  padding: 10px;
}

.todo-app,
.todoing-app,
.todone-app {
  max-width: 100%;
  background-color: var(--card-bg);
  margin: 24px 0;
  padding: 40px 30px 70px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 30px var(--shadow);
}

.todo-app:hover {
  box-shadow: 0 14px 34px rgba(47, 127, 107, 0.22);
}

.todoing-app:hover {
  box-shadow: 0 14px 34px rgba(201, 122, 67, 0.22);
}

.todone-app:hover {
  box-shadow: 0 14px 34px rgba(47, 127, 107, 0.22);
}

.header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.header h2 {
  display: flex;
  align-items: center;
}

.header h2 img {
  width: 20px;
  margin-left: 10px;
}

.task-view-option select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 14px;
  transition:
    background-color 0.2s,
    color 0.2s;
  cursor: pointer;
}

.task-view-option select:focus {
  outline: none;
  border-color: #999;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.do-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--background);
  border-radius: 20px;
  padding-left: 20px;
  margin-bottom: 15px;
  border: 2px solid var(--border-color);
}

input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 20px;
  font-weight: 20px;
  border-radius: 20px;
}

.do-input button {
  border: none;
  outline: none;
  padding: 15px 50px;
  border-radius: 0 20px 20px 0;
  font-size: 20px;
  cursor: pointer;
  background-color: var(--accent);
  color: #fff;
  border-left: 1px solid var(--border-color);
}

.do-input button:hover {
  background-color: var(--accent-strong);
}

input[placeholder] {
  color: var(--text-color);
}

.task-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;
}

.task-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.task-item.overdue {
  border-left: 5px solid red;
}
.task-item.due-soon {
  border-left: 5px solid rgb(215, 185, 63);
}

.task-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tags */
.task-tags {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-bubble {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 8px;

  white-space: nowrap;
  color: #222;
  font-weight: bold;
}

.checkbox-icon {
  flex-shrink: 0;
  height: 25px;
  width: 25px;
  border-radius: 50%;
  background-image: url("../../images/unchecked.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: inline-block;
}

.task-item.checked .checkbox-icon,
.task-item .move-btn.checked {
  background-image: url("../../images/checked.png");
}

.task-text {
  font-size: 20px;
  color: var(--text-color);
}

.task-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.task-controls .delete,
.task-controls .move {
  font-size: 20px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--text-color);
  transition: background-color 0.2s;
}

.task-controls .delete:hover,
.task-controls .move:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.1);
}

.error-message {
  color: red;
  display: none;
  font-size: 12px;
  margin-bottom: 10px;
  padding-left: 20px;
  animation: none;
}

.todo-app {
  display: block;
}
.todoing-app,
.todone-app {
  display: none;
}

/* TOP BUTTON STYLES */
.top-btn-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-btn-nav {
  display: flex;
  gap: 1em;
  flex: 1;
}

.top-btn-nav button,
.top-btn-clr button {
  border: none;
  outline: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
}

.top-btn-nav button {
  background-color: var(--accent);
}

.top-btn-clr button {
  background-color: var(--accent-warm);
}

.top-btn-clr {
  flex: 1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.aside-toggle-btn {
  display: none;
  background-color: var(--accent);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 30px;
  border-radius: 20px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
  margin-top: 10px;
  font-size: 20px;
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-secondary {
  background: #ccc;
  color: #222;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.btn-danger {
  background: #e74c3c;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* SEARCH STYLES */
.search-option {
  display: flex;
  justify-content: center;
  flex: 2;
}

.search-option input {
  border-radius: 10px;
  border: none;
  outline: 1px solid var(--border-color);
  width: 70%;
  background-color: var(--background);
  padding: 8px 12px;
  font-size: 16px;
}

#search-info {
  display: none;
  font-weight: bolder;
  text-align: center;
  font-size: 12px;
  color: var(--alert-text);
  margin-top: 5px;
}

#date-filter-indicator {
  display: none;
  margin: 10px auto;
  padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  max-width: 420px;
  text-align: center;
}

#date-filter-indicator button {
  margin-left: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
}

/* TOP BUTTON EFFECTS */
.top-btn-nav button:hover {
  background-color: var(--accent-strong);
  transform: translateY(-2px);
}

#clearTasksBtn:hover {
  background-color: #b8673a;
  transform: translateY(-2px);
}

.top-btn-nav button:focus,
.top-btn-clr:focus {
  outline: none;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* DRAGGING EFFECTS */
li.dragging {
  opacity: 0.5;
  transform: scale(1.1);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

li {
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

#congratulations {
  font-size: 24px;
  color: green;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  margin-top: 30px;
  animation: pulse 2s infinite;
}

.do-container li:hover,
.doing-container li:hover,
.done-container li:hover {
  border-radius: 20px;
  background-color: rgba(47, 127, 107, 0.08);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.do-container {
  border: 2px dashed transparent;
  transition: border 0.3s;
}

.do-container.drag-over {
  border: 2px dashed #007bff;
  background-color: #f0f8ff;
}

footer {
  display: flex;
  justify-content: center;
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  font-size: small;
  padding: 15px 0;
  color: var(--footer-color);
  position: relative;
}

.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 820px) minmax(0, 1fr);
  gap: 16px;
  margin: 14px auto 0;
  width: 100%;
  max-width: 1500px;
  align-items: start;
}

.board-rhythm {
  grid-column: 1;
  justify-self: start;
  width: 100%;
  max-width: 280px;
  position: sticky;
  top: 160px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px var(--shadow);
  margin-left: 0;
}

.board-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  grid-column: 2;
  justify-self: center;
  margin: 0 auto;
  width: 100%;
  max-width: 820px;
}

.do-container,
.doing-container,
.done-container {
  width: min(720px, 100%);
}

.board-aside {
  grid-column: 3;
  justify-self: end;
  width: 100%;
  max-width: 330px;
  position: sticky;
  top: 150px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px var(--shadow);
  margin-right: 0;
}

.aside-close-btn {
  display: none;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 18px;
  align-self: flex-end;
  cursor: pointer;
}

.aside-card h3 {
  margin-bottom: 8px;
}

.aside-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.aside-title-row button,
.calendar-open-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

#due-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.strip-day {
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-color);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  text-align: left;
  cursor: pointer;
}

.strip-day.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.strip-day-name {
  font-size: 13px;
  font-weight: 700;
}

.strip-day-date {
  font-size: 12px;
  opacity: 0.8;
}

.strip-day-count {
  justify-self: end;
  grid-row: span 2;
  align-self: center;
  min-width: 26px;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.strip-day-done {
  font-size: 11px;
  opacity: 0.75;
  grid-column: 1 / -1;
}

#focus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#insights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insights-item {
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-color);
  border-radius: 10px;
  padding: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.insights-empty {
  font-size: 12px;
  opacity: 0.8;
}

#suggestions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestions-item {
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-color);
  border-radius: 10px;
  padding: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.focus-open {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-color);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  text-align: left;
}

.focus-title {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.focus-reasons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.focus-reason {
  font-size: 10px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 2px 7px;
}

.focus-empty {
  font-size: 12px;
  opacity: 0.8;
}

.recurrence-days {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.recurrence-day {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  background: var(--background);
  color: var(--text-color);
}

.focus-flash {
  animation: flash-task 1s ease;
}

@keyframes flash-task {
  0% {
    box-shadow: 0 0 0 2px transparent;
  }
  35% {
    box-shadow: 0 0 0 2px var(--accent);
  }
  100% {
    box-shadow: 0 0 0 2px transparent;
  }
}

.calendar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.calendar-panel {
  width: min(720px, 95vw);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-header button {
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-color);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
}

.calendar-grid-head,
#calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-grid-head span {
  text-align: center;
  font-size: 12px;
  opacity: 0.75;
}

.calendar-cell {
  min-height: 60px;
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-color);
  border-radius: 8px;
  text-align: left;
  padding: 6px;
  cursor: pointer;
}

.calendar-cell.outside {
  opacity: 0.4;
}

.calendar-cell.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.calendar-cell.today {
  background: rgba(47, 127, 107, 0.15);
}

.calendar-day-number {
  font-weight: 700;
  font-size: 12px;
}

.calendar-count {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
}

.calendar-task-list {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-task-item {
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-color);
  border-radius: 8px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.calendar-empty {
  font-size: 13px;
  opacity: 0.8;
}

.network-status {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 2200;
  background: #0f9d58;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.network-status.offline {
  background: #c43d3d;
}

.move-btn {
  position: absolute;
  left: 20px;
  top: 10px;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background-image: url("../../images/unchecked.png");
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

li.checked .move-btn {
  background-image: url("../../images/checked.png");
}

/* Task Information */
.task-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 50px;
  border-radius: 10px;
  width: 700px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 18px 40px var(--shadow);
}

.modal-content h3 {
  color: var(--text-color);
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--background);
  color: var(--text-color);
}

.modal-buttons button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background-color: var(--accent);
  color: #fff;
}

.modal-buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 20px;
}

.modal-buttons button:hover {
  background-color: var(--accent-strong);
}

.close-modal {
  align-self: flex-end;
  cursor: pointer;
  font-size: 20px;
}

#modalTaskDescription {
  height: 200px;
  resize: none;
}

/* Priority Label Styles */
.priority-indicator {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-right: 40px;
  vertical-align: middle;
}

.priority-low {
  background-color: lightblue;
}

.priority-medium {
  background-color: orange;
}

.priority-high {
  background-color: red;
}

/* dark mode toggle styling is handled by .toggle-btn */

/* Tag filtering */
#tag-filter-indicator {
  display: none;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: var(--card-bg, #f0f0f0);
  color: var(--text-color, #333);
  border-left: 5px solid #007acc;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: all 0.3s ease;
}

#tag-filter-indicator strong {
  font-weight: 600;
  color: #007acc;
}

#clear-tag-filter {
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
  font-weight: bold;
  margin-left: 12px;
  cursor: pointer;
  transition: color 0.2s ease;
}

#clear-tag-filter:hover {
  color: red;
}

#tag-filter-indicator {
  display: none;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: var(--card-bg, #f0f0f0);
  color: var(--text-color, #333);
  border-left: 5px solid #007acc;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: all 0.3s ease;
}

#tag-filter-indicator strong {
  font-weight: 600;
  color: #007acc;
}

#clear-tag-filter {
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
  font-weight: bold;
  margin-left: 12px;
  cursor: pointer;
  transition: color 0.2s ease;
}

#clear-tag-filter:hover {
  color: red;
}

mark {
  background-color: yellow;
  color: black;
  padding: 0 2px;
  border-radius: 2px;
}

.code-block {
  margin-top: 10px;
  background: var(--background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
  overflow-x: auto;
}

/* Notifications list */
.hidden {
  display: none;
}

#overdue-list li,
#duesoon-list li {
  background-color: var(--card-bg);
  padding: 8px 10px;
  margin-bottom: 6px;
  border-left: 5px solid var(--border-color, #ccc);
  border-radius: 4px;
  font-size: 14px;
}

details {
  margin-bottom: 20px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 6px;
  padding: 10px;
  background-color: var(--card-bg);
}

summary {
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
}

summary h2 {
  display: inline;
  font-size: 16px;
  margin: 0;
}

#no-overdue-msg,
#no-duesoon-msg {
  margin-top: 10px;
  display: none;
}

/* ANALYTICS STYLES */
.analytics-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tab-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
}

.tab-btn.active {
  background-color: rgba(47, 127, 107, 0.2);
  color: var(--text-color);
}

.analytics-tab.hidden {
  display: none;
}

.analytics-tab {
  display: block;
}

.chart-card {
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px var(--shadow);
}

.rhythm-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rhythm-actions button {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
}

.rhythm-actions .btn-secondary {
  background: #ccc;
  color: #222;
}

.rhythm-empty {
  font-size: 14px;
  opacity: 0.85;
}

#analytics-content {
  width: 100%;
  padding: 10px;
}

.analytics-tab {
  page-break-after: always;
}

.analytics-tab:last-child {
  page-break-after: auto;
}

.analytics-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 20px;
}

.analytics-grid-multiple {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 20px;
  gap: 20px;
}

.analytics-section {
  margin-bottom: 28px;
}

.section-help {
  margin-top: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  opacity: 0.8;
}

.insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.insight-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px var(--shadow);
}

.insight-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.insight-value {
  font-size: 26px;
  font-weight: 700;
  margin: 6px 0;
}

.insight-sub {
  font-size: 12px;
  opacity: 0.7;
}

/* Warning Styles */
.warning-item {
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1em;
  border: var(--border-color) solid;
}

.warning-details {
  background: var(--background);
  color: var(--text-color);
  padding: 10px;
  margin-top: 5px;
  border-left: 4px solid #e99;
  border-radius: 4px;
  max-width: 90%;
  margin-left: 1.5em;
}

.extend-btn {
  background-color: #6a9d6e;
  color: white;
  font-size: 12px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 5px;
}

.extend-btn:hover {
  background-color: #5b875e;
}

.nested-task {
  margin-top: 5px;
}

.nested-task-summary {
  cursor: pointer;
  display: block;
  padding: 6px;
  background: var(--background);
  color: var(--text-color);
  border-radius: 4px;
  margin-bottom: 4px;
}

.critical {
  background-color: rgba(255, 77, 77, 0.2);
  border-left: 5px solid red;
  color: #a10000;
}

.moderate {
  background-color: rgba(255, 215, 0, 0.2);
  border-left: 5px solid orange;
  color: #a97800;
}

.clear {
  background-color: rgba(77, 184, 139, 0.18);
  border-left: 5px solid var(--accent);
  color: var(--text-color);
}

.warning-icon {
  font-size: 18px;
}

canvas {
  max-width: 300px;
  width: 100%;
  height: auto;
}

.pie-chart {
  max-width: 399px;
  max-height: 399px;
  width: 100%;
  height: auto;
}

#tab-tags .analytics-grid {
  padding: 0;
  margin: 0;
}

#tab-tags .chart-card {
  max-width: 1000px;
  max-height: 400px;
  margin: 0 auto;
  padding: 0;
}

.line-chart {
  max-width: 1000px;
  max-height: 350px;
  width: 100%;
  height: auto;
}

.bar-chart {
  max-width: 400px;
  max-height: 320px;
  width: 100%;
  height: auto;
}

.insights-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.insights-tabs button {
  padding: 10px 10px;
  border: none;
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
}

.insights-tabs button:hover {
  background-color: rgba(47, 127, 107, 0.12);
}

.insights-tabs button.active {
  background-color: rgba(47, 127, 107, 0.2);
  color: var(--text-color);
  transform: scale(1.05);
  box-shadow: 0 0 0 2px rgba(47, 127, 107, 0.45);
}

.insights-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  margin-bottom: 20px;
}

#average-completion-text,
#average-completion-text strong {
  color: var(--text-color);
}

.insights-content .avg-completion,
.insights-content .priority-trends {
  max-height: 300px;
  max-width: 900px;
}

.insights-content .completion-tag {
  max-width: 600px;
}
.insights-chart.hidden {
  display: none;
}

.hidden {
  display: none;
}

#export-tools {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 10px;
}

#export-tools button {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#export-tools button:hover {
  transform: scale(1.02);
  background-color: rgba(47, 127, 107, 0.12);
}

/* LANGUAGE STYLES */
#language-panel .language-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 30px;
}

.language-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.language-button {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.language-button:hover {
  background-color: rgba(47, 127, 107, 0.12);
  transform: scale(1.05);
}

.selected-language {
  background-color: rgba(47, 127, 107, 0.35);
  color: var(--text-color);
}

/* import export styles */
#import-export-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* <-- changed */
  gap: 20px;
  padding: 40px;
  text-align: center;
}

#import-export-panel h2 {
  font-size: 24px;
  margin-bottom: 5px;
}

#import-export-panel label {
  font-weight: bold;
}

#import-export-panel input[type="file"],
#import-export-panel textarea {
  width: 100%;
  max-width: 500px;
}

#import-export-panel textarea {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  resize: none;
  font-size: 14px;
  background-color: var(--card-bg);
  color: var(--text-color);
  height: 400px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#import-export-panel #import-btn,
#import-export-panel #export-btn {
  padding: 5px 20px;
  font-size: 16px;
  background-color: rgb(104, 121, 116);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#import-export-panel #import-btn:hover,
#import-export-panel #export-btn:hover {
  transform: translateY(-2px);
  background-color: rgb(120, 140, 135);
}

#import-status {
  font-size: 14px;
  color: var(--text-color);
}

#import-export-panel hr {
  width: 80%;
  border: 0;
  border-top: 5px solid var(--border-color);
}

.file-input-wrapper {
  display: flex;
  align-items: center;
  background-color: rgba(217, 211, 206, 0.5);
  border-radius: 20px;
  margin-bottom: 15px;
  max-width: 500px;
  width: 100%;
  overflow: hidden;
}

.file-upload-btn {
  padding: 15px 40px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 20px 0 0 20px;
  background-color: rgb(57, 200, 152);
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.file-upload-btn:hover {
  background-color: rgb(120, 214, 182);
}

.file-name-display {
  flex: 1;
  padding: 12px 16px;
  background-color: var(--card-bg);
  border-left: 1px solid #ccc;
  font-size: 14px;
  color: var(--text-color);
  border-radius: 0 20px 20px 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  border-right: 1px solid #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* FAQ Styles */
#faq-panel h2 {
  margin-bottom: 20px;
}

/* simulation styles removed from global floating toggle */

.language-button.active {
  background-color: #333;
  color: #fff;
  border: 2px solid var(--primary-color);
}

.modal-content h3,
.modal-content p {
  color: var(--text-color);
  opacity: 1;
}

/* Responsive Styles */

@media (max-width: 768px) {
  html,
  body {
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
  }
  .analytics-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .top-btn-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .top-btn-nav button {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px;
  }

  .top-btn-clr {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px;
    align-items: center;
    justify-content: space-between;
  }

  .aside-toggle-btn {
    display: inline-block;
  }

  .container {
    padding: 5px;
  }

  /* Input fields – avoid zoom on mobile */
  input[type="search"],
  input[type="text"],
  input,
  textarea {
    font-size: 16px;
  }

  .search-option {
    margin-top: 10px;
  }

  button {
    min-height: 44px;
  }

  .board-layout {
    grid-template-columns: 1fr;
  }

  .board-rhythm {
    position: static;
    top: auto;
  }

  .board-aside {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 90vw);
    height: 100vh;
    z-index: 1500;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    border-radius: 0;
    overflow-y: auto;
  }

  .board-aside.open {
    transform: translateX(0);
  }

  .aside-close-btn {
    display: inline-block;
  }
}

/* Shared navigation */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-color);
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 8px 20px var(--shadow);
}

.nav-brand {
  font-size: 20px;
  font-weight: bold;
}

.nav-brand a {
  color: inherit;
  text-decoration: none;
}

.nav-brand a:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  border-color: rgba(47, 127, 107, 0.35);
  background: rgba(47, 127, 107, 0.08);
}

.nav-links a.active {
  border-color: var(--border-color);
  background: rgba(47, 127, 107, 0.12);
}

/* Page layout */
.page {
  max-width: 1000px;
  margin: 30px auto 60px;
  padding: 0 20px;
}

.page h1 {
  margin-bottom: 20px;
}

.page-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  box-shadow: 0 10px 24px var(--shadow);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.setting-label {
  font-weight: bold;
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-status {
  font-size: 12px;
  opacity: 0.8;
}

.toggle-btn {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-width: 64px;
  text-align: center;
}

.toggle-btn:hover {
  background: rgba(47, 127, 107, 0.12);
}

@media (max-width: 768px) {
  .main-nav {
    padding: 12px 16px;
  }

  .page {
    padding: 0 14px;
  }

  .setting-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
