* {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

:root {
  /* Charcoal Theme (Default) */
  --bg-primary: #1a1a1d;
  --bg-secondary: #2e3335;
  --bg-tertiary: #3e3e42;
  --text-primary: #e8e8e8;
  --text-secondary: #b8b8b8;
  --accent-primary: #6c9bcf;
  --accent-hover: #8ab4d8;
  --border-color: #4a4a4e;
  --input-bg: #252529;
  --tags-column-bg: #28292c;
  --titles-pane-bg: #ffffff;
  --titles-pane-text: #434343;
  --highlight-bg: #252528;
  --content-pane-bg: #1a1a1d;
  --content-text: #e8e8e8;
}

/* Ember Theme - Magma and obsidian */
body[data-theme="ember"] {
  --bg-primary: #0f0907;
  --bg-secondary: #1a1210;
  --bg-tertiary: #2b1e1a;
  --text-primary: #f5d5c8;
  --text-secondary: #c49a88;
  --accent-primary: #e63946;
  --accent-hover: #ff4d5a;
  --border-color: #3d2520;
  --input-bg: #14100d;
  --tags-column-bg: #2a2018;
  --titles-pane-bg: #f5d5c8;
  --titles-pane-text: #434343;
  --highlight-bg: #1f1612;
  --content-pane-bg: #0f0907;
  --content-text: #f5d5c8;
}

/* Rune Theme - Deep purple mystical */
body[data-theme="rune"] {
  --bg-primary: #14121a;
  --bg-secondary: #1f1d2b;
  --bg-tertiary: #2d2a3d;
  --text-primary: #e4dff7;
  --text-secondary: #b5adc9;
  --accent-primary: #8b7bc4;
  --accent-hover: #a594d4;
  --border-color: #3d3850;
  --input-bg: #1a1824;
  --tags-column-bg: #2b2838;
  --titles-pane-bg: #e4dff7;
  --titles-pane-text: #434343;
  --highlight-bg: #1e1c28;
  --content-pane-bg: #14121a;
  --content-text: #e4dff7;
}

/* Aurora Theme - Cool cyan/teal */
body[data-theme="aurora"] {
  --bg-primary: #0f1419;
  --bg-secondary: #1a2430;
  --bg-tertiary: #263545;
  --text-primary: #dff3f7;
  --text-secondary: #a8c5cd;
  --accent-primary: #4ecdc4;
  --accent-hover: #6dddd5;
  --border-color: #334c5c;
  --input-bg: #151e26;
  --tags-column-bg: #253040;
  --titles-pane-bg: #dff3f7;
  --titles-pane-text: #434343;
  --highlight-bg: #161f2a;
  --content-pane-bg: #0f1419;
  --content-text: #dff3f7;
}

/* Mirage Theme - Sunny desert with colorful bedouin markets */
body[data-theme="mirage"] {
  --bg-primary: #faf6f0;
  --bg-secondary: #f0e8dc;
  --bg-tertiary: #e5d9c8;
  --text-primary: #2d2416;
  --text-secondary: #5c4a32;
  --accent-primary: #d97742;
  --accent-hover: #c45a28;
  --border-color: #d4c4b0;
  --input-bg: #f5ede0;
  --tags-column-bg: #f0e8dc;
  --titles-pane-bg: #2d2416;
  --titles-pane-text: #434343;
  --highlight-bg: #f4f5f7;
  --content-pane-bg: #ffffff;
  --content-text: #434343;
}

/* Omega Theme - Palatial white marble with gold treasures */
body[data-theme="omega"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #efefef;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --accent-primary: #d4af37;
  --accent-hover: #e6c24a;
  --border-color: #d9d9d9;
  --input-bg: #fafafa;
  --tags-column-bg: #dcdcdc;
  --titles-pane-bg: #1a1a1a;
  --titles-pane-text: #434343;
  --highlight-bg: #f4f5f7;
  --content-pane-bg: #ffffff;
  --content-text: #434343;
}

body {
  color: var(--text-primary);
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.top-bar {
  background: none;
  padding: 8px;
  display: none;
  align-items: center;
  justify-content: space-between;
  border-radius: 5px;
  margin-bottom: 0px;
  height: 40px;
}

.deadline-prompt-bar {
  overflow: hidden;
  height: 0;
  flex-shrink: 0;
  transition: height 220ms ease;
  display: flex;
  align-items: center;
}

.prompt-bot-wrapper {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 36px;
}

.prompt-bot-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: #fff;
  transition: opacity 150ms ease;
  display: flex;
  align-items: center;
}

.prompt-shield-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: #fff;
  opacity: 0.5;
  display: flex;
  align-items: center;
  transition: opacity 150ms ease;
}

.prompt-shield-icon:hover {
  opacity: 1;
}

/* Intelligence threshold panel */
.intelligence-panel {
  max-height: 0;
  overflow: hidden;
  flex-shrink: 0;
  /* close: wait for content fade-out (150ms) then collapse */
  transition: max-height 220ms ease 150ms;
}

.intelligence-panel--open {
  max-height: 400px;
  /* open: start immediately, no delay */
  transition: max-height 500ms ease 0ms;
}

.intelligence-panel-inner {
  padding: 12px 16px 14px 16px;
  opacity: 0;
  /* fade out instantly when panel starts closing */
  transition: opacity 150ms ease 0ms;
}

.intelligence-panel--open .intelligence-panel-inner {
  opacity: 1;
  transition: opacity 300ms ease 150ms;
}

.ig-sections {
  display: flex;
  gap: 24px;
}

.ig-section {
  flex: 1;
}

.ig-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 16px;
}

.ig-row + .ig-row {
  margin-top: 4px;
}

.ig-cell--title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.ig-cell--desc {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.3;
}

.ig-cell--slider {
  padding-top: 4px;
}

.intelligence-slider-input {
  width: 100%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 16px;
}

.intelligence-slider-input::-webkit-slider-runnable-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1px;
}

.intelligence-slider-input::-moz-range-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1px;
}

.intelligence-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #fff;
  border: none;
  margin-top: -5px;
  cursor: pointer;
}

.intelligence-slider-input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #fff;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

.deadline-prompt-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 3px 12px;
  font-size: 14px;
  color: #fff;
  opacity: 0;
  transition: opacity 150ms ease;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.deadline-prompt-text {
  flex: 0 1 auto;
  white-space: normal;
  margin-right: 101px;
}

.deadline-prompt-task-link {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}


.deadline-prompt-date-input {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  font-size: 13px;
  width: 80px;
  outline: none;
  padding: 1px 4px;
}

.deadline-prompt-date-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.deadline-prompt-btn {
  background: none;
  color: #fff;
  border: 1px solid white;
  border-radius: 4px;
  padding: 3px 12px;
  font-size: 12px;
  cursor: pointer;
}

.deadline-prompt-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  color: #fff;
}

.deadline-prompt-btn--skip {
  opacity: 0.5;
  margin-left: 4px;
}

.deadline-prompt-btn--skip:hover {
  opacity: 1;
}




.new-list-btn {
  width: 100%;
  color: var(--content-text);
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  margin-bottom: 7px;
  padding: 9px;
  background-image:
    linear-gradient(var(--highlight-bg), var(--highlight-bg)),
    linear-gradient(-45deg, rgb(0,166,251), rgb(144,14,253), rgb(251,32,86), rgb(0,166,251));
  background-origin: border-box, border-box;
  background-clip: padding-box, border-box;
  animation: gradientShift 15s ease infinite;
  background-size: auto, 400% 400%;
}

.new-list-btn:hover {
  opacity: 0.85;
}

.main {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  padding: 5px 5px 0 5px;
}

.columns-container {
  display: flex;
  flex-shrink: 0;
}

.column {
  background: var(--tags-column-bg);
  padding: 10px;
  padding-top: 6px;
  min-width: 240px;
  flex-shrink: 0;
}

.tasklist-titles-column {
  background: var(--content-pane-bg);
  padding: 10px;
  padding-top: 6px;
  min-width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.list-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.list-search-wrap .list-search-input {
  margin-bottom: 0;
  padding-right: 26px;
}

.list-search-clear {
  position: absolute;
  right: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--content-text);
  opacity: 0.5;
  display: flex;
  align-items: center;
}

.list-search-clear:hover {
  opacity: 1;
}

.list-search-clear .icon {
  width: 13px;
  height: 13px;
}

.list-search-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  color: var(--content-text);
  background: var(--highlight-bg);
  outline: none;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.list-search-input:focus {
  border-color: var(--border-color);
  background: var(--content-pane-bg);
}

.tag-pill {
  display: inline-block;
  padding: 5px 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  margin: 3px;
  border-radius: 15px;
  cursor: pointer;
  user-select: none;
}

.tasklist .tag-pill {
  background: var(--highlight-bg);
  color: var(--content-text);
  border: 1.5px solid var(--highlight-bg);
}

.tag-pill.active {
  background: var(--accent-primary);
  color: var(--text-primary);
}

.tag-pill .remove-tag {
  margin-left: 5px;
  cursor: pointer;
  color: var(--accent-hover);
}

.tasklist {
  flex: 1;
  background: transparent;
  border-top-right-radius: 11px;
  min-width: 300px;
  border-left: 1px solid var(--border-color);
}

.tasklist-header-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--content-pane-bg);
  padding: 10px;
  border-top-right-radius: 11px;
  flex: 1;
  min-height: 88px;
  box-sizing: border-box;
}

.tasklist-header-spacer {
  --r: 11px;
  width: 11px;
  height: 100%;
  background: var(--content-pane-bg);
  position: relative;
  flex-shrink: 0;
  clip-path: shape(
    from 0 100%,
    hline to calc(100% - 2*var(--r)),
    arc by var(--r) var(--r) of var(--r) cw,
    vline to calc(100% - var(--r)),
    arc by var(--r) var(--r) of var(--r)
  );
}

.tasklist-header-right-1,
.tasklist-header-right-2 {
  background: transparent;
  padding: 5px 10px;
  font-size: 14px;
  color: var(--text-primary);
}

.tasklist-header-right-1 {
  padding-right: 26px;
  padding-top: 9px;
}

.settings-icon {
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 8px;
  opacity: 0.8;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  width: 20px;
  height: 20px;
}

.settings-icon:hover {
  opacity: 1;
}

.settings-pane {
  flex: 1;
  background: var(--tags-column-bg);
  padding: 20px;
  min-width: 300px;
  position: relative;
  overflow-y: auto;
  min-height: 0;
  max-height: calc(100vh - 5px);
  box-sizing: border-box;
  border-top-right-radius: 11px;
  border-left: 1px solid var(--border-color);
}

.settings-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0;
}

.settings-close-btn:hover {
  opacity: 1;
}

.settings-appearance-section {
  margin-bottom: 24px;
}

.settings-section-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.theme-mode-toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  width: 100%;
}

.theme-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.theme-mode-btn:first-child {
  border-right: 1px solid var(--border-color);
}

.theme-mode-btn:hover {
  color: var(--text-primary);
}

.theme-mode-btn--active {
  background: var(--accent-primary);
  color: #fff;
}

.theme-mode-btn--active:hover {
  color: #fff;
}

.theme-mode-btn .icon {
  width: 14px;
  height: 14px;
}

.tags-input {
  min-height: 24px;
  border: none;
  padding: 3px;
  padding-left: 22px;
  padding-bottom: 28px;
  margin-bottom: 0px;
  outline: none;
  color: var(--content-text);
  margin-top: 0px;
  background: var(--content-pane-bg);
}

.tags-input:focus {
  background-color: var(--content-pane-bg);
  color: var(--content-text);
}

.tag-autocomplete-dropdown {
    display: none;
    position: fixed;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    max-width: 780px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    overflow: hidden;
}

.tag-autocomplete-item {
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-autocomplete-item:hover {
    background: var(--highlight-bg);
}

.tasklist-tasks {
  width: 100%;
  height: 200px;
  background: var(--content-pane-bg);
  color: var(--content-text);
  border: none;
  padding: 5px;
  border-radius: 0px;
  outline: none;
}

.tasklist-tasks:focus {
  background: var(--content-pane-bg);
  color: var(--content-text);
}



.main {
  display: flex;
  flex: 1;
  min-height: 0;
  margin-bottom: -17px;
  overflow-x: auto;
}

.columns-container {
  display: flex;
  flex-shrink: 0; /* columns take only as much space as needed */
}

.tasklists-container {
  flex: 1; /* takes all remaining horizontal space */
  display: flex;
  flex-direction: column;
}

.tasklist input {
    border: none;
    padding: 5px;
    outline: none;
    width: 100%;
}


.columns-container {
    display: flex;
    overflow-x: auto; /* horizontal scroll if too many columns */
}

.column {
    max-width: 12.5vw; /* 10% of viewport width */
    min-width: 12.5vw; /* ensure consistent width */
    overflow-y: auto; /* vertical scroll if content overflows */
    padding: 10px;
    padding-top: 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px; /* spacing between tag pills */
}

.tag-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}


/* Task row layout */
.task-row-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.task-row {
    transition: background-color 0.2s ease;
}

.task-row:nth-child(even) {
    background-color: rgba(255,255,255,0.04);
}

.task-row:hover {
    background-color: var(--highlight-bg);
}

.task-search-dim {
    opacity: 0.2;
    transition: opacity 0.15s ease;
}

.task-row-icon-td {
    width: 22px;
    vertical-align: middle;
    padding: 4px 0;
}

.task-row-text-cell {
    vertical-align: middle;
    padding: 4px 2px;
    width: 100%;
}

/* The editable text span inside the text cell */
.task-row-text {
    display: block;
    word-wrap: break-word;
    white-space: normal;
    color: var(--content-text);
}

.task-row-text[contenteditable="true"] {
    overflow: visible;
    white-space: pre-wrap;
    cursor: text;
    word-break: break-word;
}

.task-row-extras-td {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
    padding: 4px 0;
}

/* Task extras container */
.task-extra {
    display: grid;
    grid-template-columns: repeat(4, 28px);
    align-items: stretch;
}

/* Pin each button to a fixed column — absent buttons leave that column empty */
.task-extra .task-star-btn        { grid-column: 1; }
.task-extra .task-priority-up-btn { grid-column: 2; }
.task-extra .task-complete-btn    { grid-column: 3; }
.task-extra .task-row-delete      { grid-column: 4; }

/* Right-aligned trash button */

.task-type-icon {
    width: 12px;
    height: 12px;
    opacity: 0.35;
    margin-right: 5px;
}

.task-row-delete, .list-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 6px;
}

/* Task link dropdown for suggestions */
.task-link-dropdown {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.task-link-item {
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-primary);
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

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

.task-link-item:hover {
    background-color: var(--bg-tertiary);
}

/* Clickable task links within task text */
.task-link {
    cursor: pointer;
    text-decoration: underline;
    color: var(--accent-primary);
    transition: opacity 0.2s;
}

.task-link:hover {
    opacity: 0.8;
}

/* Make the tasklist pane a vertical flex container */
.tasklist {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* "Enter tasks here" should be very small */
.tasklist-tasks {
    flex: 0 0 auto;
    height: 2.2rem;        /* small height */
    resize: none;          /* prevent resizing */
}




.tag-pill.add-tag-pill {
    border: 1.5px solid transparent;
}

.tag-pill.add-tag-pill:hover {
    opacity: 0.85;
}




/* Editable task name */
.task-detail-name {
    background-color: #333;
    color: #eee;
    border: 1px solid #555;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 10px;
    outline: none;
}

/* Editable task description */
.task-detail-description {
    flex: 1;
    background-color: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 5px;
    resize: none;
    outline: none;
}


/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal box */
.modal-box {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 20px;
    border-radius: 10px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

/* Modal buttons container */
.modal-btn-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Modal buttons */
.modal-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.modal-btn.cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-btn.confirm {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.modal-btn:hover {
    opacity: 0.9;
}

/* List Settings Pane (side panel) */
.list-settings-pane {
    flex: 1;
    background: var(--bg-secondary);
    padding: 20px;
    min-width: 300px;
    position: relative;
    overflow-y: auto;
    min-height: 0;
    max-height: calc(100vh - 5px);
    box-sizing: border-box;
    border-top-right-radius: 11px;
    border-left: 2px solid var(--border-color);
}

.list-settings-pane h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: var(--text-primary);
}

.list-settings-pane h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

/* List Type Selector Section */
.list-type-selector-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Vertical list of type options */
.list-type-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Individual list type option (modern style) */
.list-type-option {
    background: var(--bg-primary);
    border: none;
    border-radius: 4px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: visible;
    margin-left: 30px;
    opacity: 0.65;
}



.list-type-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: all 0.2s ease;
    border-radius: 4px 0 0 4px;
}

.list-type-option.active {
    opacity: 1;
}

.list-type-option.active::before {
    background: linear-gradient(to bottom, rgb(0,166,251), rgb(144,14,253), rgb(251,32,86));
    width: 4px;
}

.list-type-option-icon {
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: rgba(0,0,0,0.3);
}

.list-type-option:hover {
    opacity: 1;
}

.list-type-option:hover .list-type-option-icon {
    color: var(--text-primary);
}

.list-type-option.active .list-type-option-icon {
    color: var(--text-primary);
}

.list-type-option.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.list-type-option.disabled:hover {
    opacity: 0.35;
}

.list-type-option.disabled:hover .list-type-option-icon {
    color: rgba(0,0,0,0.3);
}

/* Title of the option */
.list-type-option-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

/* Description text */
.list-type-option-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Secondary description text */
.list-type-option-description-secondary {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
    opacity: 0.8;
}

/* Example text */
.list-type-option-example {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.75;
    margin-top: 2px;
}

.list-stats-bar {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--content-pane-bg);
    padding: 2px 12px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-btns-table {
    border-collapse: collapse;
    margin-left: auto;
    margin-top: -17px;
}

.view-btns-table td {
    padding: 0 2px;
    vertical-align: middle;
}

.view-btns-td {
    white-space: nowrap;
}

.view-btns-td > button {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 3px;
}

.view-btn-label {
    padding-top: 2px !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 100ms ease;
    white-space: nowrap;
}

.view-btn-label--visible {
    opacity: 1;
}

.view-btn-label-inner {
    border-collapse: collapse;
}

.view-btn-label-inner td {
    padding: 0;
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1;
}

.view-btn-label-prefix {
    padding-right: 3px !important;
    opacity: 0.6;
}

.deadline-view-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: opacity 0.2s;
}

.deadline-view-btn--active {
    color: var(--text-primary);
    opacity: 1;
}

.deadline-view-btn--active:hover {
    opacity: 0.7;
}

.deadline-view-btn--disabled {
    color: var(--text-primary);
    opacity: 0.15;
    cursor: default;
}

.deadline-view-btn--on {
    color: var(--text-primary);
    opacity: 1;
}

.deadline-view-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--content-text);
}

.deadline-view-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    padding: 2px 4px 4px;
    box-shadow: inset 0 -1px 0 var(--border-color);
    text-align: right;
    position: sticky;
    top: 0;
    background: var(--content-pane-bg);
    z-index: 10;
}

.deadline-view-table thead th.dv-col-task {
    text-align: left;
}

.deadline-view-table tbody tr {
    cursor: pointer;
}

.deadline-view-table tbody tr:nth-child(even) {
    background-color: rgba(255,255,255,0.04);
}

.deadline-view-table tbody tr:hover {
    background-color: var(--highlight-bg);
}

.deadline-view-table tbody tr:hover .task-row-delete {
    opacity: 1;
    pointer-events: auto;
}

.deadline-view-table tbody td {
    padding: 4px 4px;
    text-align: right;
}

.dv-col-icon,
.row-icon-td {
    width: 22px;
    vertical-align: middle;
    padding: 0;
}

.dv-col-task {
    text-align: left !important;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dv-col-date {
    width: 1%;
    white-space: nowrap;
    padding-left: 12px !important;
}

.dv-col-actions {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
    text-align: right;
    padding: 0 2px;
}

@media (min-width: 1025px) {
    .dv-col-actions {
        min-width: 111px;
    }
}

.dv-col-actions .task-row-delete,
.dv-col-actions .task-complete-btn {
    opacity: 0;
    pointer-events: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: var(--text-primary);
}

/* Always visible, regardless of sort mode */
.dv-col-actions .task-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: var(--text-primary);
}

/* Star buttons in the "Starred" column (dv-col-date) */
.starred-view-star-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Pinned: colored via inline style */
.starred-view-star-btn--pinned {
}

/* Non-pinned rows' star toggle — always visible, regardless of sort mode
   (desktop only — never created on mobile) */
.starred-view-hover-star {
    color: var(--text-primary);
}

/* When star is directly adjacent to delete (no check button between them),
   reserve the missing check button's space so the star column stays fixed */
.dv-col-actions .task-star-btn + .task-row-delete {
    margin-left: 28px;
}

.deadline-view-table tbody tr:hover .dv-col-actions .task-row-delete,
.deadline-view-table tbody tr:hover .dv-col-actions .task-complete-btn,
.deadline-view-table tbody tr:hover .dv-col-actions .task-priority-up-btn {
    opacity: 0.9;
    pointer-events: auto;
}

.deadline-view-table tbody tr:hover .dv-col-actions .task-row-delete:hover,
.deadline-view-table tbody tr:hover .dv-col-actions .task-complete-btn:hover,
.deadline-view-table tbody tr:hover .dv-col-actions .task-priority-up-btn:hover {
    opacity: 1;
}

/* Hidden until row hover, matching complete/delete */
.dv-col-actions .task-priority-up-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
}

.deadline-view-active .frequency-label {
    display: none;
}

.list-delete-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transition: opacity 0.2s;
    margin-top: -28px;
    margin-right: 11px;
    margin-left: 26px;
}

.list-delete-btn:hover {
    opacity: 1;
}

.list-delete-btn .icon {
    color: var(--text-primary);
}

html {
  background: #000000;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

body {
    background: linear-gradient(-45deg, rgb(0,166,251), rgb(144,14,253), rgb(251,32,86), rgb(0,166,251));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.tasklist-title {
  border: none;
  color: var(--content-text);
}

/* Add "Tags" label to all columns except tasklist-titles and tag-column (tag-column uses JS header) */
.column:not(.tasklist-titles-column):not(.tag-column)::before {
    content: "Tags";
    display: block;
    font-size: 14px;
    padding: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

/* Tag column header (created via JS to support checkbox) */
.tag-column-header {
    position: sticky;
    top: -6px;
    margin-top: -6px;
    z-index: 2;
    background: var(--tags-column-bg);
    font-size: 14px;
    padding: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: center;
}

.tag-column-header .clear-all-tags-checkbox {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

/* "Lists" label at top of lists column */
.tasklist-titles-column::before {
    content: "Lists";
    display: block;
    font-size: 14px;
    padding: 8px;
    margin-top: -6px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    color: var(--content-text);
    flex-shrink: 0;
}

.titles-tiles-container {
    flex: 1;
    overflow-y: auto;
}

.list-sort-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 4px 0 2px;
    flex-shrink: 0;
}

.list-sort-label {
    font-size: 10px;
    color: #aaa;
    text-align: center;
    padding-bottom: 6px;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.list-sort-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 5px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.list-sort-btn--active {
    /* color set via inline style using pickGradientColor() */
}

.list-sort-btn .icon {
    width: 15px;
    height: 15px;
}

.tile-pin-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    opacity: 0.35;
    color: var(--titles-pane-text);
    transition: opacity 0.15s;
    border-radius: 5px;
}

.tile-pin-btn:hover {
    opacity: 0.7;
}

.tile-pin-btn--on {
    opacity: 1;
}

.tile-pin-btn .icon {
    width: 14px;
    height: 14px;
}

.tasklist-title{
  font-size: 44px;
}

.tasklist-title {
    background-color: transparent;
    color: var(--content-text);
}

.tasklist-title::placeholder {
    color: var(--content-text);
    opacity: 0.5;
}

.tasklist-title:focus {
    background-color: var(--content-pane-bg);
    color: var(--content-text);
}

.main, body {
  overflow-y: hidden;
}

.tasklist, .column, .tasklist-titles-column {
  margin-bottom: 0;
}

.tasklist {
    overflow-y: hidden;

}


/* Container for task-items and task-detail-pane */
.task-content-container {
    flex: 1 1 auto;
    display: flex;
    gap: 10px; /* This creates the margin between task-items and detail pane */
    overflow: hidden;
    min-height: 0; /* Important for flex overflow */
    background: var(--content-pane-bg);
    padding-left: 22px;
    padding-right: 22px;
}

/* Task items - will shrink when detail pane appears */
.task-items {
    flex: 1 1 auto;
    overflow-y: auto;
    transition: flex 0.3s ease;
    min-width: 0; /* Allow flex item to shrink below content size */
    padding-bottom: 100px;
}

/* Task detail pane */
.task-detail-pane {
    flex: 0 0 350px; /* Fixed width, adjust as needed */
    background-color: var(--bg-tertiary);
    border-left: 1px solid var(--border-color);
    padding: 10px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    color: var(--text-primary);
    overflow-y: auto;
}


/* Container for task-items and task-detail-pane */
.task-content-container {
    flex: 1 1 auto;
    display: flex;
    gap: 10px;
    overflow: hidden;
    min-height: 0;
}

/* Task items - will shrink when detail pane appears */
.task-items {
    flex: 1 1 auto;
    overflow-y: auto;
    transition: flex 0.3s ease;
    min-width: 0;
    padding-bottom: 100px;
}

/* Task detail pane */
.task-detail-pane {
    flex: 0 0 350px;
    background-color: var(--bg-tertiary);
    border-left: 1px solid var(--border-color);
    padding: 10px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    color: var(--text-primary);
    overflow-y: auto;
}

.tag-pill.disabled {
    opacity: 0.3;
}

textarea:focus {
  outline: none;
}


.tasklist-tasks {
    flex: 0 0 auto;
    height: 2.2rem;
    resize: none;
    margin-bottom: 0px;
    box-sizing: border-box;
    width: 100%;
    padding-left: 22px;
}

/* Frequency-based task table */
.frequency-task-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--content-pane-bg);
}

.frequency-table-header {
    position: sticky;
    top: 0;
    background: var(--content-pane-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.frequency-table-header th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: var(--content-text);
    border-bottom: 2px solid #ededed;
    font-size: 13px;
}

.frequency-table-header th:first-child {
    width: auto;
}

.frequency-table-header th:nth-child(2) {
    width: 120px;
    text-align: center;
}

.frequency-table-header th:nth-child(3) {
    width: 120px;
    text-align: center;
}

.frequency-table-header th:last-child {
    width: 80px;
    text-align: center;
}

.frequency-task-row {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.frequency-task-row:nth-child(even) {
    background-color: rgba(255,255,255,0.04);
}

.frequency-task-row:hover {
    background-color: var(--highlight-bg);
}

.frequency-col-name {
    padding: 10px;
    color: var(--content-text);
    word-wrap: break-word;
    white-space: normal;
    text-align: left;
    vertical-align: middle;
}

.frequency-col-name .task-row-text {
    display: block;
}

.frequency-col-freq,
.frequency-col-remaining {
    padding: 10px;
    text-align: right;
    color: var(--content-text);
    font-size: 13px;
    width: 120px;
}

.frequency-col-actions {
    padding: 10px;
    text-align: right;
    width: 80px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}

.frequency-col-actions .task-complete-btn,
.frequency-col-actions .task-row-delete,
.frequency-col-actions .task-priority-up-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    pointer-events: none;
}

.frequency-task-row:hover .frequency-col-actions .task-complete-btn,
.frequency-task-row:hover .frequency-col-actions .task-row-delete,
.frequency-task-row:hover .frequency-col-actions .task-priority-up-btn {
    opacity: 0.9;
    pointer-events: auto;
}

.frequency-task-row:hover .frequency-col-actions .task-complete-btn:hover,
.frequency-task-row:hover .frequency-col-actions .task-row-delete:hover,
.frequency-task-row:hover .frequency-col-actions .task-priority-up-btn:hover {
    opacity: 1;
}

.frequency-col-actions .icon {
    width: 18px;
    height: 18px;
}

/* Frequency display container with lock and chevrons */
.frequency-display-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.frequency-lock-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0.6;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    flex-shrink: 0;
}

.frequency-lock-btn:hover {
    opacity: 1;
}

.frequency-lock-btn .icon {
    width: 14px;
    height: 14px;
}

.frequency-display-text {
    flex: 1;
    text-align: center;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frequency-chevron-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.frequency-chevron-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0.6;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    height: 16px;
}

.frequency-chevron-btn:hover {
    opacity: 1;
}

.frequency-chevron-btn .icon {
    width: 14px;
    height: 14px;
}

/* Oldest-first task table */
.oldest-first-task-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--content-pane-bg);
}

.oldest-first-table-header {
    position: sticky;
    top: 0;
    background: var(--content-pane-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.oldest-first-table-header th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: var(--content-text);
    border-bottom: 2px solid var(--border-color);
    font-size: 13px;
}

.oldest-first-table-header th:first-child {
    width: auto;
}

.oldest-first-table-header th:nth-child(2) {
    width: 120px;
    text-align: right;
}

.oldest-first-table-header th:last-child {
    width: 80px;
    text-align: center;
}

.oldest-first-task-row {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.oldest-first-task-row:nth-child(even) {
    background-color: rgba(255,255,255,0.04);
}

.oldest-first-task-row:hover {
    background-color: var(--highlight-bg);
}

.oldest-first-col-name {
    padding: 10px;
    color: var(--content-text);
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    white-space: normal;
    text-align: left;
    display: flex;
    align-items: center;
}

.oldest-first-col-name .task-row-text {
    flex: 1;
    min-width: 0;
}

.oldest-first-col-completed {
    padding: 10px;
    text-align: right;
    color: var(--content-text);
    font-size: 13px;
    width: 120px;
}

.oldest-first-col-actions {
    padding: 10px;
    text-align: right;
    width: 80px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}

.oldest-first-col-actions .task-complete-btn,
.oldest-first-col-actions .task-row-delete,
.oldest-first-col-actions .task-priority-up-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    pointer-events: none;
}

.oldest-first-task-row:hover .oldest-first-col-actions .task-complete-btn,
.oldest-first-task-row:hover .oldest-first-col-actions .task-row-delete,
.oldest-first-task-row:hover .oldest-first-col-actions .task-priority-up-btn {
    opacity: 0.9;
    pointer-events: auto;
}

.oldest-first-task-row:hover .oldest-first-col-actions .task-complete-btn:hover,
.oldest-first-task-row:hover .oldest-first-col-actions .task-row-delete:hover,
.oldest-first-task-row:hover .oldest-first-col-actions .task-priority-up-btn:hover {
    opacity: 1;
}

.oldest-first-col-actions .icon {
    width: 18px;
    height: 18px;
}

/* Mobile override for oldest-first buttons */
@media (max-width: 1024px) {
    .oldest-first-col-actions .task-complete-btn,
    .oldest-first-col-actions .task-row-delete {
        opacity: 0.9 !important;
        pointer-events: auto !important;
    }
}

/* Task type buttons */
.task-type-buttons {
    display: flex;
    gap: 5px;
    margin-left: auto;
    margin-right: 10px;
    color: var(--text-primary);
}



.task-type-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.4;
    transition: opacity 0.2s;
    position: relative;
}

.task-type-btn.active {
    opacity: 1;
}

.task-type-btn:hover {
    opacity: 0.99;
}

.task-type-btn.active:hover {
    opacity: 1;
}

/* Popover */
.task-type-popover {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 8px 12px;
    margin-top: 5px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.task-type-btn:hover .task-type-popover {
    opacity: 1;
}


.task-type-popover-title {
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 12px;
    color: var(--text-primary);
}

.task-type-popover-desc {
    font-size: 11px;
    color: var(--text-secondary);
}


.task-type-buttons {
    display: flex;
    gap: 4px;
    overflow: hidden;
}

.task-type-wrapper {
    width: 0px;
    overflow: hidden;
    transition: width 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Active emoji gets full width ALWAYS */
.task-type-btn.active {
    /* Make the button visually active if you want */
    transform: scale(1.1);
}

/* The wrapper containing the active button gets width */
.task-type-wrapper:has(.task-type-btn.active) {
    width: 40px;   /* <— change to whatever width you want */
}

/* When hovering the parent container */
.task-type-buttons:hover .task-type-wrapper {
    width: 40px;   /* All expand */
}

/* Except: the active one already has width, but doubling won't break */
.task-type-buttons:hover .task-type-wrapper:has(.task-type-btn.active) {
    width: 40px;
}






/* Non-active emojis fade out when not hovered */
.task-type-buttons:not(:hover) .task-type-btn:not(.active) {
    opacity: 0;
}

/* On hover: all buttons fade in */
.task-type-buttons:hover .task-type-btn:has(.task-type-btn.active) {
    opacity: .4;
}


.task-type-tip{
  text-align: right;
  color: #ccc;
}

.task-type-tip {
  display: none;
}


.tasklist:has(.task-type-btn.one-and-done:hover) .task-type-tip.one-and-done {
  display: block;
}

.tasklist:has(.task-type-btn.frequency-based:hover) .task-type-tip.freq-based {
  display: block;
}

.tasklist:has(.task-type-btn.oldest-first:hover) .task-type-tip.oldest-first {
  display: block;
}

.tasklist:has(.task-type-btn.free-form:hover) .task-type-tip.free-form {
  display: block;
}



.task-type-tip-holder {
  min-height: 44px;
  background: var(--content-pane-bg);
  display: none
}

.task-complete-btn {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0 6px;
}

/* Star / pin button — same style as checkmark/trash */
.task-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 6px;
  color: var(--text-primary);
}

/* Ranking up-arrow — same style as star/checkmark/trash */
.task-priority-up-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 6px;
  color: var(--text-primary);
}

/* Buttons fill their grid cell height (stretch) and center their icon */
.task-extra button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.task-extra button svg {
  display: block;
}
.task-star-btn--pinned {
  /* color set via inline style using PIN_COLOR */
}

.frequency-label,
.oldest-label {
    flex-shrink: 0;
    white-space: nowrap;
    color: var(--text-secondary);
}



/* Star is always visible, regardless of sort mode. Ranking up-arrow,
   complete, and delete stay hidden until hover. */
.task-row .task-extra .task-priority-up-btn,
.task-row .task-extra .task-complete-btn,
.task-row .task-extra .task-row-delete {
    opacity: 0;
    pointer-events: none;
}

.task-row:hover {
  background-color: var(--highlight-bg);
}

.task-row:hover .task-extra .task-priority-up-btn,
.task-row:hover .task-extra .task-complete-btn,
.task-row:hover .task-extra .task-row-delete {
    opacity: 0.9;
    pointer-events: auto;
}
.task-row:hover .task-extra .task-priority-up-btn:hover,
.task-row:hover .task-extra .task-complete-btn:hover,
.task-row:hover .task-extra .task-row-delete:hover {
    opacity: 1;
}






/* Limit Popover Overlay */
.limit-popover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.limit-popover {
    background: var(--bg-secondary);
    padding: 44px 40px;
    border-radius: 10px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: popoverSlideIn 0.3s ease-out;
}

@keyframes popoverSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.limit-popover p:not([class]) {
    margin: 0;
    color: var(--text-primary);
}

.premium-link-btn:hover {
    background: var(--accent-hover) !important;
}

.tasklist-title-entry{
  padding: 4px;
  padding-bottom: 6px;
  margin-bottom: 0;
  position: relative;
  color: var(--content-text);
  font-weight: bold;
}

.tasklist-title-entry::before {
  display: none;
}

.tasklist-title-entry-container {
  position: relative;
  margin-bottom: 10px;
  padding: 8px;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 4px;
}

.tasklist-title-entry-container::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--border-color);
}

.tasklist-title-entry-container:first-of-type {
  margin-top: 0;
}

.tasklist-title-entry-container:first-of-type::after {
  display: none;
}

.tasklist-title-entry-container.active {
  background-color: var(--highlight-bg);
}

.tasklist-title-entry-container.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, rgb(0,166,251), rgb(144,14,253), rgb(251,32,86));
  border-radius: 4px 0 0 4px;
}

.tasklist-title-entry-container.active .tasklist-title-entry {
  color: var(--content-text);
  padding: 4px;
  padding-bottom: 6px;
  margin-bottom: 0;
}

.tasklist-title-entry-container.active .tasklist-title-entry::before {
  display: none;
}

.tasklist-title-entry-container.active .tasklist-task-preview {
  color: var(--content-text);
  opacity: 0.85;
}

.tasklist-task-preview {
  padding: 2px 4px 2px 12px;
  margin-bottom: 1px;
  font-size: 12px;
  font-weight: normal;
  color: var(--content-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}

.tasklist-deadline-time {
  padding: 1px 4px 2px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tasklist-deadline-time .icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* Mobile Lists Button */
.mobile-lists-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.mobile-lists-btn:hover { opacity: 1; }
.mobile-lists-btn:active { opacity: 0.5; }

.mobile-pane-lists-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 4px 8px 4px 0;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.mobile-pane-lists-btn:hover { opacity: 1; }
.mobile-pane-lists-btn:active { opacity: 0.5; }

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

.mobile-sidebar-overlay.active {
  display: block;
}

/* Mobile Sidebar */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 1000;
  transition: left 0.3s ease;
  display: flex;
  padding: 5px;
  box-sizing: border-box;
  gap: 5px;
}


.mobile-sidebar.active {
  left: 0;
}

.mobile-sidebar-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.mobile-sidebar-close-btn:hover {
  opacity: 1;
}

.mobile-sidebar-close-btn .icon {
  width: 24px;
  height: 24px;
}

/* iPad landscape breakpoint: 1024px */
@media (max-width: 1024px) {
  /* Tags row, stats bar, "add a task" row, and secondary filter buttons collapse
     while scrolling down through the tasks list to make more room, and re-expand
     when scrolling back up. The containers themselves only animate height/padding
     — never opacity or background, so they never look like a hole mid-collapse.
     Their contents fade to 0 opacity instead, so they don't look squashed. */
  .tags-input,
  .tasklist-tasks,
  .list-stats-bar,
  .view-btns-table--secondary {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.25s ease, padding-top 0.25s ease, padding-bottom 0.25s ease;
  }

  /* Override the base 24px min-height so the collapsed state below can reach 0. */
  .tags-input {
    min-height: 0;
  }

  /* .view-btns-table has a -17px margin-top (a desktop trick to tuck it under the
     header) that pushes it above view-btns-table--secondary's own box; combined
     with the overflow: hidden needed for the collapse above, that clipped its top
     edge. Neutralize the margin here so the whole button row is visible. */
  .view-btns-table--secondary .view-btns-table {
    margin-top: 0;
  }

  .tasklist--rows-collapsed .tags-input,
  .tasklist--rows-collapsed .tasklist-tasks,
  .tasklist--rows-collapsed .list-stats-bar,
  .tasklist--rows-collapsed .view-btns-table--secondary {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
  }

  /* Contents of the div-based rows fade independently of their container. */
  .tags-input > *,
  .list-stats-bar > *,
  .view-btns-table--secondary > * {
    transition: opacity 0.2s ease;
  }

  .tasklist--rows-collapsed .tags-input > *,
  .tasklist--rows-collapsed .list-stats-bar > *,
  .tasklist--rows-collapsed .view-btns-table--secondary > * {
    opacity: 0;
  }

  /* .tasklist-tasks is a plain textarea with no child elements to fade —
     fade its text color instead, leaving the textarea's own background alone. */
  .tasklist-tasks {
    transition: max-height 0.25s ease, padding-top 0.25s ease, padding-bottom 0.25s ease, color 0.2s ease;
  }

  .tasklist--rows-collapsed .tasklist-tasks,
  .tasklist--rows-collapsed .tasklist-tasks::placeholder {
    color: transparent;
  }

  /* Show top bar and auth container on mobile */
  .top-bar {
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    align-items: center;
    height: auto;
    min-height: 48px;
    padding: 0;
  }

  .mobile-top-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 4px;
  }

  .mobile-top-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .mobile-top-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
  }

  /* Prompt bar lives inside the center column — JS controls height, animation preserved */
  .mobile-top-center .deadline-prompt-bar {
    width: 100%;
  }

  .mobile-top-center .deadline-prompt-bar-inner {
    flex-wrap: wrap;
    gap: 18px 4px;
    padding: 8px 0 4px;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .mobile-top-center .deadline-prompt-text {
    width: 100%;
    text-align: center;
    margin-right: 0;
  }

  /* Bot wrapper inside mobile left column — no longer fixed */
  .mobile-top-left .prompt-bot-wrapper {
    position: static;
    min-height: unset;
  }

  .prompt-bot-icon {
    opacity: 1 !important;
  }

  .prompt-shield-icon {
    opacity: 0.7 !important;
  }

  /* Use dynamic viewport height so the body doesn't bleed under the mobile address bar */
  body {
    height: 100dvh;
  }

  /* Undo the desktop scrollbar-hiding trick; leave a strip of bg visible at bottom */
  .main {
    margin-bottom: -6px;
    padding-left: 0;
    padding-right: 0;
  }

  .tasklist, .column, .tasklist-titles-column {
    margin-bottom: 3px;
  }

  .task-row-icon-td,
  .task-row-text-cell,
  .task-row-extras-td {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .task-row-icon-td { padding-left: 12px; }
  .task-row-extras-td { padding-right: 12px; }

  .deadline-prompt-btn {
    padding: 5px 16px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Add border radius to tasklists container on mobile */
  .tasklists-container {
    border-top-left-radius: 11px;
    overflow: hidden;
  }

  .mobile-lists-btn {
    display: none;
  }

  .mobile-pane-lists-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ig-sections {
    flex-direction: column;
    gap: 12px;
  }

  /* Style new-list-btn in mobile sidebar — inherits static gradient from base rule */

  /* Hide columns in main on mobile (they'll be moved to sidebar) */
  .main > .columns-container,
  .main > .tasklist-titles-column {
    display: none !important;
  }

  /* Make tasklists container take full width */
  .tasklists-container {
    width: 100%;
    margin-right: 0;
  }

  /* When columns are in mobile sidebar, make them take specified widths */
  .mobile-sidebar .columns-container {
    flex: 0 0 40%;
    max-width: none;
    min-width: 0;
    display: flex;
  }

  .mobile-sidebar .tasklist-titles-column {
    flex: 0 0 60%;
    max-width: none;
    min-width: 0;
  }

  .mobile-sidebar .column {
    flex: 1;
    max-width: none;
    min-width: 0;
  }

  /* Hide task row extras on mobile — actions live in the tap modal instead */
  .task-row .task-extra {
    display: none !important;
  }

  /* Hide table-view action buttons on mobile — they're accessible via the tap modal */
  .dv-col-actions {
    display: none !important;
  }

  /* In importance sort mode, show only the up button in the actions column */
  .importance-sort-active .dv-col-actions {
    display: table-cell !important;
  }

  .importance-sort-active .dv-col-actions .task-complete-btn,
  .importance-sort-active .dv-col-actions .task-row-delete,
  .importance-sort-active .dv-col-actions .task-star-btn {
    display: none;
  }

  .importance-sort-active .dv-col-actions .task-priority-up-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Always show frequency task row action buttons on mobile (no hover needed) */
  .frequency-col-actions .task-complete-btn,
  .frequency-col-actions .task-row-delete {
    opacity: 0.6 !important;
    pointer-events: auto !important;
  }

  /* Desktop-only feature — mobile has no hover, so don't reserve layout
     space for a button that would otherwise sit invisible. */
  .frequency-col-actions .task-priority-up-btn {
    display: none !important;
  }

  /* Smaller font size for tasklist title on mobile */
  .tasklist-title {
    font-size: 24px;
  }

  /* Disable hover-based task type expansion on mobile - use tap instead */
  .task-type-buttons:hover .task-type-wrapper {
    width: 0px; /* Don't auto-expand on hover */
  }
  .task-type-buttons:hover .task-type-wrapper:has(.task-type-btn.active) {
    width: 44px; /* Keep active one visible */
  }

  /* When expanded via JS on mobile */
  .task-type-buttons.mobile-expanded .task-type-wrapper {
    width: 44px !important;
  }

  /* Disable hover-based tooltips on mobile */
  .tasklist:has(.task-type-btn.one-and-done:hover) .task-type-tip.one-and-done,
  .tasklist:has(.task-type-btn.frequency-based:hover) .task-type-tip.freq-based,
  .tasklist:has(.task-type-btn.oldest-first:hover) .task-type-tip.oldest-first,
  .tasklist:has(.task-type-btn.free-form:hover) .task-type-tip.free-form {
    display: none;
  }

  /* Show tooltip via JS class on mobile */
  .task-type-tip.mobile-visible {
    display: block !important;
  }

  /* Keep non-active buttons visible when expanded on mobile */
  .task-type-buttons.mobile-expanded .task-type-btn:not(.active) {
    opacity: 0.4 !important;
  }

  /* Task detail pane - full screen on mobile (below top bar) */
  .task-detail-pane {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100% - 60px);
    max-height: calc(100% - 60px);
    flex: none;
    border-left: none;
    border-radius: 0;
    z-index: 1000;
    padding: 20px;
  }

  /* Increase save button height on mobile */
  .task-detail-pane button {
    padding: 12px 16px;
    font-size: 16px;
    height: auto;
    min-height: 48px;
  }

  /* Task content container - allow detail pane to expand */
  .task-content-container {
    position: relative;
    padding-left: 0;
    padding-right: 0;
  }

  /* List settings pane on mobile - ensure scrolling works */
  .list-settings-pane {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Frequency table optimizations for mobile */
  .frequency-task-table {
    table-layout: auto;
    width: 100%;
  }

  .frequency-table-header th:nth-child(2) {
    width: 50px;
  }

  .frequency-table-header th:nth-child(3) {
    width: 50px;
  }

  .frequency-table-header th:last-child {
    width: 50px;
  }

  .frequency-col-name {
    word-break: break-word;
    white-space: normal;
    padding: 2px;
    max-width: none;
  }

  .frequency-col-freq,
  .frequency-col-remaining {
    padding: 2px;
    white-space: nowrap;
    font-size: 11px;
    width: 50px;
  }

  .frequency-col-actions {
    padding: 2px;
    width: 50px;
  }

  .frequency-col-actions .icon {
    width: 14px;
    height: 14px;
    color: var(--text-primary);
  }

  .task-row-icon-td { padding-left: 2px; }
  .task-row-extras-td { padding-right: 2px; }

  /* Ensure all lucide icons have proper color on mobile */
  .icon {
    color: var(--text-primary);
  }

  /* Let sort buttons pass their inline color through to their icon */
  .deadline-view-btn .icon {
    color: inherit;
  }

  .deadline-view-btn {
    margin-top: 0;
    align-self: flex-end;
    margin-bottom: 4px;
  }

  .tasklist {
    border-left: 0;
  }

  .deadline-view-table tbody td.dv-col-task {
    padding: 14px;
  }

  table.deadline-view-table {
    margin-top: -6px;
  }

  /* ── Task row cards (mobile) ── */

  /* Container bg on mobile — small horizontal padding lets bg-primary show past card edges */
  .task-content-container {
    background: var(--bg-primary);
    padding: 0 8px;
  }

  /* Remove table-level bg that would fill in card gaps */
  .frequency-task-table,
  .oldest-first-task-table {
    background: transparent;
  }

  /* Switch all task tables to separate-border model so border-radius works */
  .task-row-table,
  .deadline-view-table,
  .frequency-task-table,
  .oldest-first-task-table {
    border-collapse: separate;
    border-spacing: 0 6px;
  }

  /* Background on each cell so the row looks like a solid card.
     Always the hover-highlight color — rows aren't distinguishable via hover on touch. */
  .task-row td,
  .deadline-view-table tbody tr td,
  .frequency-task-row td,
  .oldest-first-task-row td {
    background: var(--highlight-bg);
  }

  /* Round the left edge of the first cell */
  .task-row td:first-child,
  .deadline-view-table tbody tr td:first-child,
  .frequency-task-row td:first-child,
  .oldest-first-task-row td:first-child {
    border-radius: 10px 0 0 10px;
    padding-left: 12px;
  }

  /* Last completion is only shown on mobile within the Last-update view itself —
     Deadline/Importance/Starred views hide their copy of it here. No override is
     needed outside this media query: desktop just shows it via the base
     .dv-col-date styling those cells already carry. */
  .dv-col-last-completion {
    display: none;
  }

  /* Round the right edge of the last visible cell.
     deadline-view uses nth-last-child(2) because dv-col-actions is always last
     in the DOM but display:none on mobile, making it invisible but still :last-child.
     Rows that also hide a .dv-col-last-completion cell have two trailing hidden
     columns, so the last *visible* cell there is nth-last-child(3) instead. */
  .task-row td:last-child,
  .deadline-view-table tbody tr:not(:has(.dv-col-last-completion)) td:nth-last-child(2),
  .deadline-view-table tbody tr:has(.dv-col-last-completion) td:nth-last-child(3),
  .frequency-task-row td:last-child,
  .oldest-first-task-row td:last-child {
    border-radius: 0 10px 10px 0;
    padding-right: 12px;
  }

  /* Match last visible header right-padding to last visible body cell */
  .deadline-view-table thead:not(:has(.dv-col-last-completion)) th:nth-last-child(2),
  .deadline-view-table thead:has(.dv-col-last-completion) th:nth-last-child(3) {
    padding-right: 12px;
  }

  /* In importance sort, dv-col-actions is visible and becomes the rightmost column */
  .importance-sort-active .deadline-view-table thead th.dv-col-actions,
  .importance-sort-active .deadline-view-table tbody td.dv-col-actions {
    padding-right: 12px;
  }

  /* Remove row-level stripe and border-bottom — cards have their own visual separation */
  .task-row:nth-child(even),
  .deadline-view-table tbody tr:nth-child(even),
  .frequency-task-row:nth-child(even),
  .oldest-first-task-row:nth-child(even) {
    background-color: transparent;
  }

  .frequency-task-row,
  .oldest-first-task-row {
    border-bottom: none;
  }

  /* Secondary filter-buttons wrapper — placed below .list-stats-bar, right-aligned */
  .view-btns-table--secondary {
    background: var(--content-pane-bg);
    display: flex;
    justify-content: flex-end;
    padding: 2px 0;
  }
}

.tag-column {
        min-width: 10vw; /* 10% of viewport width */
        max-width: 10vw; /* 10% of viewport width */
        border-top-left-radius: 11px;
}

.tasklist-titles-column {
        min-width: 14vw; /* 10% of viewport width */
        max-width: 14vw; /* 10% of viewport width */
}

.free-form-notes {
    flex: 1 1 auto;
    margin-top: 0px;
    padding: 22px;
    background: var(--content-pane-bg);
    border: none;
    outline: none;
    color: var(--content-text);
    font-size: 14px;
    line-height: 1.6;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.free-form-notes:focus {
    border: none;
    outline: none;
}

.free-form-notes:empty::before {
    content: attr(placeholder);
    color: var(--text-secondary);
    opacity: 0.6;
    pointer-events: none;
}

/* ===== REFACTORED INLINE STYLES ===== */

/* Settings and Header Buttons */
.settings-btn-unstyled {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.pro-badge {
    color: #ffffff;
    font-weight: bold;
    margin-right: 0px;
}

.separator-white {
    color: #ffffff;
    margin-right: 0px;
}

.auth-text-white {
    color: #ffffff;
    cursor: pointer;
    margin-right: 0px;
}

/* Modal Overlay and Base Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box-base {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    color: var(--text-primary);
}

/* Pricing Modal Elements */
.pricing-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.pricing-modal-message {
    margin-bottom: 36px;
    font-size: 15px;
    color: var(--text-secondary, #aaa);
}

.pricing-already-premium {
    margin: 28px 0 0;
    font-size: 13px;
    color: var(--text-secondary, #888);
    text-align: center;
}

.pricing-already-premium-link {
    color: #00aaff;
    cursor: pointer;
    text-decoration: underline;
}

.pricing-legal-links {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--text-secondary, #888);
    text-align: center;
}

.pricing-legal-links a {
    color: inherit;
    text-decoration: underline;
}

.pricing-modal-submessage {
    margin-bottom: 36px;
    font-size: 14px;
    opacity: 0.9;
}

.pricing-influencer-info {
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--accent-primary);
    font-weight: bold;
}

.pricing-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 0;
}

.pricing-btn-base {
    padding: 14px 24px;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}

.pricing-btn-monthly {
    background: #00aaff;
}

.pricing-btn-yearly {
    background: #00cc66;
}

.pricing-btn-close {
    padding: 10px 20px;
    background: #444;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

.pricing-selected-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary, #aaa);
    margin: 4px 0 0;
    text-align: center;
}

.pricing-signin-section {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.38s ease;
}

.pricing-inline-auth {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    padding-top: 24px;
}

/* General Modal Buttons */
.modal-btn {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.modal-btn-primary {
    background: var(--accent-primary);
    color: #fff;
}

.modal-btn-secondary {
    background: #444;
    color: #fff;
}

.modal-btn-danger {
    background: #d32f2f;
    color: #fff;
}

/* Settings Pane and Sections */
.settings-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.settings-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Feedback Section */
.feedback-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.feedback-link {
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

.feedback-link:hover {
    opacity: 0.8;
}

.task-url-link {
    color: var(--accent-primary);
    text-decoration: underline;
    font-size: inherit;
    word-break: break-all;
}

.task-url-link:hover {
    opacity: 0.8;
}

/* Subscription-Related Styles */
.subscription-status-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.subscription-date-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Delete/Danger Actions */
.delete-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.delete-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 12px;
}

.delete-section-warning {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.delete-btn {
    background: #d32f2f;
    color: #fff;
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.delete-btn:hover {
    opacity: 0.9;
    background: #b71c1c;
}

/* Success and Info Modals */
.success-modal-overlay {
    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: 10000;
}

.success-modal-box {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.success-modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.success-modal-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.success-modal-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.success-modal-btn {
    background: var(--accent-primary);
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.success-modal-btn:hover {
    opacity: 0.9;
}

/* List Conversion Dialog */
.list-conversion-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.list-conversion-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.list-conversion-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.list-conversion-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.list-conversion-btn-primary {
    background: var(--accent-primary);
    color: #fff;
}

.list-conversion-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Tag Pills and States */
.tag-pill {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.tag-pill-matching {
    background: var(--accent-primary);
    color: #fff;
}

.tag-pill-non-matching {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.tag-pill-disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Info and Alert Boxes */
.info-box {
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.info-box-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    color: var(--text-primary);
}

.info-box-success {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
    color: var(--text-primary);
}

.info-box-error {
    background: rgba(211, 47, 47, 0.1);
    border-left: 3px solid #d32f2f;
    color: var(--text-primary);
}

/* Text Styling */
.text-muted {
    color: var(--text-secondary);
    font-size: 12px;
}

.text-small {
    font-size: 12px;
}

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

.text-accent {
    color: var(--accent-primary);
}

.text-bold {
    font-weight: bold;
}

/* Spacing Utilities */
.margin-bottom-sm {
    margin-bottom: 8px;
}

.margin-bottom-md {
    margin-bottom: 15px;
}

.margin-bottom-lg {
    margin-bottom: 20px;
}

.margin-top-sm {
    margin-top: 8px;
}

.margin-top-md {
    margin-top: 15px;
}

.margin-top-lg {
    margin-top: 20px;
}

.padding-sm {
    padding: 8px;
}

.padding-md {
    padding: 12px;
}

.padding-lg {
    padding: 16px;
}

/* -------------------------------------------------------
   Mobile task action modal (bottom sheet)
   ------------------------------------------------------- */
.mobile-task-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9500;
    display: flex;
    align-items: flex-end;
    animation: fadeInOverlay 0.15s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.mobile-task-modal {
    background: var(--bg-secondary);
    width: 100%;
    padding: 12px 20px 32px;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: slideUpModal 0.2s ease;
}

@keyframes slideUpModal {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.mobile-task-modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 auto 4px;
}

.mobile-task-modal-name-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--content-text);
    font-family: inherit;
    outline: none;
}

.mobile-task-modal-name-input:focus {
    border-color: var(--accent-primary);
}

.mobile-task-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: space-around;
}

.mobile-task-modal-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    flex: 1;
    padding: 12px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 11px;
}

.mobile-task-modal-btn .icon {
    width: 22px;
    height: 22px;
}

.mobile-task-modal-btn--star-on {
    color: #f5a623;
    border-color: #f5a623;
}

.mobile-task-modal-btn--star-on .icon {
    fill: #f5a623;
}

.mobile-task-modal-btn--danger {
    color: #dc2626;
    border-color: #dc2626;
}

.mobile-task-modal-btn--danger .icon {
    color: #dc2626;
}

/* Native mac app — always desktop layout regardless of window width */
html.goatify-mac .top-bar           { display: none !important; }
html.goatify-mac .mobile-sidebar    { display: none !important; }
html.goatify-mac .mobile-sidebar-overlay { display: none !important; }
html.goatify-mac .main > .columns-container,
html.goatify-mac .main > .tasklist-titles-column { display: flex !important; }
html.goatify-mac .tasklists-container { border-top-left-radius: 0; }

/* ---- Email / password auth modal ---- */
.email-auth-modal {
    width: 340px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.email-auth-title {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
    text-align: center;
}

.email-auth-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-secondary, #888);
    text-align: center;
}

.email-auth-error {
    margin: 0;
    padding: 8px 12px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 6px;
    color: #f87171;
    font-size: 13px;
}

.email-auth-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #444);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
    box-sizing: border-box;
}

.email-auth-input:focus {
    outline: none;
    border-color: #00aaff;
}

.email-auth-password-wrapper {
    position: relative;
    width: 100%;
}

.email-auth-password-wrapper .email-auth-input {
    padding-right: 38px;
}

.email-auth-eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.4);
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 150ms ease;
}

.email-auth-eye-btn:hover {
    color: var(--text-primary);
}

.email-auth-submit {
    padding: 10px 16px;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    background: #00aaff;
    width: 100%;
    transition: opacity 150ms ease;
}

.email-auth-submit:hover {
    opacity: 0.85;
}

.email-auth-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.email-auth-toggle {
    color: #00aaff;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.email-auth-forgot {
    color: var(--text-secondary, #888);
}

.email-auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary, #888);
    font-size: 13px;
}

.email-auth-divider::before,
.email-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #444);
}

.email-auth-google {
    padding: 10px 16px;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    background: #444;
    width: 100%;
    transition: opacity 150ms ease;
}

.email-auth-google:hover {
    opacity: 0.85;
}

.settings-account-email {
    margin: 4px 0 2px;
    color: var(--text-primary);
    font-size: 14px;
}

.settings-account-providers {
    margin: 0 0 8px;
    color: var(--text-secondary, #888);
    font-size: 13px;
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.settings-toggle {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 999px;
    border: none;
    background: var(--highlight-bg, rgba(255,255,255,0.15));
    padding: 0;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.settings-toggle:disabled {
    opacity: 0.4;
    cursor: default;
}

.settings-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 150ms ease;
}

.settings-toggle--on {
    background: #00aaff;
}

.settings-toggle--on .settings-toggle-knob {
    transform: translateX(18px);
}

.settings-sync-signin-link {
    display: inline-block;
    font-weight: 600;
}

.settings-sync-signin-link--flash {
    animation: settings-sync-signin-flash 550ms ease;
}

@keyframes settings-sync-signin-flash {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.15); color: #00aaff; }
    60%  { transform: scale(0.97); }
    100% { transform: scale(1); }
}

.settings-link-action {
    display: block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
}

.settings-link-action:disabled {
    opacity: 0.5;
    cursor: default;
}

.settings-link-danger {
    color: #e57373;
}

.settings-confirm-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
}
