@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ════════════════════════════════════════════════════
   DESIGN TOKENS – Dark Mode (Default)
════════════════════════════════════════════════════ */
:root,
[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-secondary: #0f1f33;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-light: #334155;

  --header-bg: #1e293b;
  --header-text: #ffffff;
  --header-accent: #38bdf8;

  --accent-primary: #2563eb;
  --board-accent: #2563eb;
  --board-accent-bg: rgba(37, 99, 235, .12);
  --board-accent-border: rgba(37, 99, 235, .3);

  --status-done: #10b981;
  --priority-low: #10b981;
  --priority-mid: #f59e0b;
  --priority-high: #f97316;
  --priority-urg: #ef4444;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, .25);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 30px -10px rgba(0, 0, 0, .45);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, .6);

  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  --modal-footer-bg: #1e293b;
  --modal-header-bg: #1e293b;
}

/* ════════════════════════════════════════════════════
   LIGHT MODE TOKENS
════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-main: #f4f6fb;
  --bg-card: #ffffff;
  --bg-secondary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-light: #e2e8f0;

  --header-bg: #ffffff;
  --header-text: #0f172a;
  --header-accent: #2563eb;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, .06), 0 8px 10px -6px rgba(0, 0, 0, .04);
  --shadow-lg: 0 20px 30px -10px rgba(15, 23, 42, .14);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, .25);

  --modal-footer-bg: #ffffff;
  --modal-header-bg: #ffffff;
}

/* ════════════════════════════════════════════════════
   OLED TRUE-BLACK TOKENS
════════════════════════════════════════════════════ */
[data-theme="oled"] {
  --bg-main: #000000;
  --bg-card: #0a0a0a;
  --bg-secondary: #000000;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-light: rgba(255, 255, 255, 0.18);

  --header-bg: #000000;
  --header-text: #ffffff;
  --header-accent: #38bdf8;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, .5);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, .65);
  --shadow-lg: 0 20px 30px -10px rgba(0, 0, 0, .8);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, .9);

  --modal-footer-bg: #000000;
  --modal-header-bg: #000000;
}

/* ════════════════════════════════════════════════════
   BASE RESET
════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-main, #0f172a);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main, #0f172a);
  color: var(--text-primary, #f1f5f9);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  transition: background-color .25s, color .25s;
}

#app-root {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ════════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════ */
.app-header {
  background: var(--header-bg);
  color: var(--header-text);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  position: relative;
  min-width: 200px;
}

.header-right {
  justify-content: flex-end;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255, 255, 255, .08);
  padding: .35rem .9rem .35rem .4rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.user-pill:hover {
  background: rgba(255, 255, 255, .14);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: white;
  flex-shrink: 0;
}

.user-greeting {
  font-weight: 600;
  font-size: .9rem;
  color: var(--header-text);
}

.header-brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
}

.staging-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding: .15rem .55rem;
  border-radius: var(--radius-pill, 9999px);
  margin-left: .5rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  text-transform: uppercase;
  vertical-align: middle;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-pill);
  padding: .38rem .9rem;
  width: 200px;
  transition: var(--transition);
  color: rgba(255, 255, 255, .6);
}

.search-bar:focus-within {
  width: 260px;
  background: rgba(255, 255, 255, .14);
  border-color: var(--header-accent);
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: .85rem;
  width: 100%;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, .4);
}

/* Profile dropdown */
.profile-dropdown-wrap {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  z-index: 300;
  min-width: 300px;
}

.profile-dropdown {
  background: var(--header-bg);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-md);
  padding: .5rem;
  box-shadow: var(--shadow-modal);
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .6rem 1rem;
  color: var(--header-text);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, .8);
  padding: .55rem .8rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.profile-menu-item:hover {
  background: rgba(255, 255, 255, .1);
  color: white;
}

/* ════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════ */
.btn-primary {
  background: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
  border: none !important;
  padding: .7rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
  transform: none;
}

[data-theme="dark"] .btn-primary {
  background: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-primary:hover {
  filter: brightness(1.15);
}

/* Floating Action Button (Bottom Right) */
.floating-add-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 300;
  background: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, .2);
  padding: .75rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .88rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
  user-select: none;
}

.floating-add-btn * {
  pointer-events: none;
}

.floating-add-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.floating-add-btn:active {
  transform: scale(.97);
}

[data-theme="dark"] .floating-add-btn {
  background: var(--accent-primary, #2563eb) !important;
  border-color: rgba(255, 255, 255, .2);
}

@media (min-width: 769px) {
  .floating-add-btn {
    bottom: 28px;
    right: 28px;
  }
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: .55rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--border-light);
}

.btn-back {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  padding: .45rem .9rem;
  border-radius: var(--radius-pill);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: var(--transition);
}

.btn-back:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════ */
.app-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 5.5rem;
  flex: 1;
}

.view-section {
  display: none;
  animation: fadeIn .28s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ════════════════════════════════════════════════════
   DASHBOARD / HOME
════════════════════════════════════════════════════ */
.dashboard-header {
  margin-bottom: 2rem;
}

.welcome-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-primary);
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-top: .3rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info h4 {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stat-info div {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: .2rem;
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.dashboard-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-pills {
  display: flex;
  background: var(--bg-card);
  padding: .3rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.filter-pill {
  padding: .42rem 1rem;
  border-radius: var(--radius-pill);
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill.active {
  background: var(--header-bg);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* ════════════════════════════════════════════════════
   BOARD CARDS
════════════════════════════════════════════════════ */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.board-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.board-card-cover {
  height: 110px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-fav-btn,
.card-share-btn {
  z-index: 5;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: .92rem;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  flex-shrink: 0 !important;
}

.card-fav-btn:hover,
.card-share-btn:hover {
  transform: scale(1.12);
  background: rgba(15, 23, 42, .85);
  border-color: rgba(255, 255, 255, .4);
}

.card-fav-btn.active {
  color: #f59e0b !important;
  background: rgba(15, 23, 42, .85);
  border-color: rgba(245, 158, 11, .5);
}

.board-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, .8);
  backdrop-filter: blur(6px);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  padding: .28rem .65rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.board-card-body {
  padding: 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.board-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.board-card-desc {
  font-size: .83rem;
  color: var(--text-secondary);
  margin: .4rem 0 .9rem;
}

.board-meta-info {
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--text-secondary);
}

.progress-bar-container {
  width: 100%;
  background: var(--bg-secondary);
  height: 6px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: .6rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width .4s ease;
}

/* ════════════════════════════════════════════════════
   BOARD DETAIL HEADER
════════════════════════════════════════════════════ */
.board-nav-header {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.board-nav-banner {
  height: 80px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(0, 0, 0, .06);
}

.board-nav-top {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  width: 100%;
}

.board-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: .75rem;
}

.board-title-left {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  flex: 1;
}

.board-title-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

.active-board-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.board-view-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.board-view-switch {
  width: 100%;
  display: flex;
  background: var(--bg-secondary);
  padding: .28rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.board-view-switch::-webkit-scrollbar {
  display: none;
}

.view-switch-btn {
  flex: 1;
  text-align: center;
  padding: .48rem .85rem;
  border-radius: var(--radius-pill);
  font-size: .83rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.view-switch-btn.active {
  background: var(--bg-card);
  color: var(--board-accent);
  box-shadow: var(--shadow-sm);
}

.kanban-container {
  display: flex;
  gap: 1.15rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  min-height: calc(100vh - 300px);
  align-items: flex-start;
}

.kanban-column {
  background: rgba(241, 245, 249, .75);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 315px;
  min-width: 290px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 280px);
  min-height: 520px;
  max-height: calc(100vh - 250px);
  transition: var(--transition);
  overflow: hidden;
}

[data-theme="dark"] .kanban-column {
  background: rgba(15, 31, 51, .85);
}

.kanban-column.drag-over {
  background: var(--board-accent-bg);
  border-color: var(--board-accent);
  border-style: dashed;
}

.kanban-column-header {
  padding: .9rem 1.1rem .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2.5px solid transparent;
  gap: .5rem;
  flex-shrink: 0;
}

.kanban-column-title {
  font-weight: 700;
  font-size: .92rem;
  color: var(--text-primary);
  flex: 1;
}

.column-count {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: .73rem;
  font-weight: 700;
  padding: .13rem .5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.col-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px dashed var(--text-muted);
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.col-add-btn:hover {
  border-color: var(--board-accent);
  color: var(--board-accent);
  background: var(--board-accent-bg);
}

.kanban-cards-list {
  padding: .75rem;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.kanban-cards-list::-webkit-scrollbar {
  width: 6px;
}

.kanban-cards-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 6px;
}

.kanban-cards-list::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
}

/* Task Cards (v1.6.5.2 Jira-Style Refinement) */
.task-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: .9rem 1rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: grab;
  position: relative;
  overflow: visible;
  flex-shrink: 0 !important;
  min-height: fit-content !important;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  border-color: var(--board-accent-border, rgba(59, 130, 246, 0.4));
}

.task-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0;
  word-break: break-word;
}

.task-parent-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  line-height: 1.2;
}

.task-story-points-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.28);
  white-space: nowrap;
}

/* Priority Badges (Crisp Light & Dark Mode) */
.task-priority-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  line-height: 1.1;
  text-transform: capitalize;
  white-space: nowrap;
}

.task-priority-tag.priority-dringend {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.task-priority-tag.priority-hoch {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.28);
}
[data-theme="dark"] .task-priority-tag.priority-hoch {
  color: #f59e0b;
}

.task-priority-tag.priority-mittel {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.28);
}
[data-theme="dark"] .task-priority-tag.priority-mittel {
  color: #3b82f6;
}

.task-priority-tag.priority-niedrig {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.28);
}
[data-theme="dark"] .task-priority-tag.priority-niedrig {
  color: #94a3b8;
}

/* Card Inline Subtasks Checklist */
.card-subtasks-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-subtasks-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary, #3b82f6);
}

.card-subtasks-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.2rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
}

.card-subtask-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.25;
}

.card-subtask-item.is-done {
  text-decoration: line-through;
  opacity: 0.6;
}

.card-subtask-chk {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #10b981;
  flex-shrink: 0;
}

/* Density Variants (Clearly differentiated) */
.task-card.density-compact {
  padding: 0.55rem 0.75rem !important;
  gap: 0.22rem !important;
  border-radius: 10px !important;
}

.task-card.density-compact .task-card-title {
  font-size: 0.82rem !important;
}

.task-card.density-compact .task-parent-tag {
  font-size: 0.68rem !important;
  padding: 0.08rem 0.35rem !important;
}

.task-card.density-normal {
  padding: 0.9rem 1rem !important;
  gap: 0.45rem !important;
  border-radius: 14px !important;
}

.task-card.density-normal .task-card-title {
  font-size: 0.92rem !important;
}

.task-card.density-large,
.task-card.density-detailed {
  padding: 1.25rem 1.35rem !important;
  gap: 0.75rem !important;
  border-radius: 16px !important;
}

.task-card.density-large .task-card-title,
.task-card.density-detailed .task-card-title {
  font-size: 0.98rem !important;
}

/* ════════════════════════════════════════════════════
   SWIMLANES (Jira-Style Kanban Grouping)
════════════════════════════════════════════════════ */
.kanban-swimlanes-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2rem;
}

.kanban-swimlane-columns-header {
  display: flex;
  gap: 1.15rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-main);
  padding: 0.5rem 0;
  min-width: max-content;
  border-bottom: 1px solid var(--border-light);
}

.kanban-swimlane-col-header {
  width: 315px;
  min-width: 290px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: var(--bg-secondary);
  border-radius: 10px;
  border-bottom: 3px solid transparent;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.kanban-swimlane-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: max-content;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 0.75rem;
  transition: all 0.2s ease;
}

.kanban-swimlane-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  user-select: none;
  position: sticky;
  left: 0;
  width: fit-content;
  max-width: 100%;
  z-index: 8;
}

.kanban-swimlane-banner:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary, #3b82f6);
}

.swimlane-toggle-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.kanban-swimlane-row.is-collapsed .swimlane-toggle-btn svg {
  transform: rotate(-90deg);
}

.swimlane-badge {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.swimlane-stats-chip {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.swimlane-points-chip {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.kanban-swimlane-cells-grid {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
}

.kanban-swimlane-cell {
  width: 315px;
  min-width: 290px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 80px;
}

[data-theme="dark"] .kanban-swimlane-cell,
html[data-theme="dark"] .kanban-swimlane-cell {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="oled"] .kanban-swimlane-cell,
html[data-theme="oled"] .kanban-swimlane-cell {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="light"] .kanban-swimlane-cell,
html[data-theme="light"] .kanban-swimlane-cell {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.kanban-swimlane-cell.drag-over {
  background: var(--board-accent-bg);
  border-color: var(--board-accent);
  border-style: solid;
}

.swimlane-cell-header-mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Global Top App Header */
  .app-header {
    padding: 0.45rem 0.85rem !important;
    min-height: 46px !important;
  }
  .app-container {
    padding: 0.65rem 0.65rem 5.5rem !important;
  }
  #btn-pwa-install-header {
    display: none !important;
  }
  .user-greeting {
    display: none !important;
  }
  .user-pill {
    padding: 0.2rem 0.35rem 0.2rem 0.2rem !important;
    gap: 0.25rem !important;
  }
  .staging-badge {
    font-size: 0.56rem !important;
    padding: 0.1rem 0.35rem !important;
    margin-left: 0.3rem !important;
  }

  /* Board Detail Navigation Header */
  .board-nav-banner {
    display: none !important;
  }
  .desktop-only-btn {
    display: none !important;
  }
  .board-nav-header {
    margin-bottom: 0.75rem !important;
  }
  .board-nav-top {
    gap: 0.55rem !important;
    background: var(--bg-card);
    padding: 0.75rem 0.85rem !important;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  }
  .board-title-row {
    margin-bottom: 0.15rem !important;
  }
  .btn-back {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8rem !important;
  }
  .active-board-title {
    font-size: 1.12rem !important;
  }
  .board-view-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.45rem !important;
    width: 100% !important;
  }
  .board-view-switch {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.22rem !important;
  }
  .view-switch-btn {
    padding: 0.38rem 0.3rem !important;
    font-size: 0.78rem !important;
    flex: 1 !important;
  }
  .board-grouping-selector {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    background: var(--bg-secondary) !important;
    padding: 0.28rem 0.65rem !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-light) !important;
  }
  .board-grouping-selector label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
  }
  .board-grouping-selector select {
    flex: 1 !important;
    height: 28px !important;
    font-size: 0.78rem !important;
    border: none !important;
    background: transparent !important;
    padding: 0 0.3rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
  }

  /* Swimlanes & Column Headers */
  .kanban-swimlane-columns-header {
    display: none;
  }
  .kanban-swimlane-banner {
    width: 100%;
    position: static;
  }
  .kanban-swimlane-row {
    min-width: 100%;
    padding: 0.35rem 0;
  }
  .kanban-swimlane-cells-grid {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    gap: 0.75rem;
  }
  .kanban-swimlane-cell {
    width: 82vw;
    min-width: 260px;
    scroll-snap-align: start;
    padding: 0.6rem;
  }
  .swimlane-cell-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.2rem 0.2rem 0.5rem;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .swimlane-cell-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
  }
  .swimlane-cell-status-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .swimlane-cell-status-count {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    font-weight: 700;
  }
}

.card-quick-complete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50% !important;
  background: transparent;
  border: 1.5px solid var(--border-light, #94a3b8);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

[data-theme="dark"] .card-quick-complete-btn {
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.5);
}

.card-quick-complete-btn:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981 !important;
  color: #10b981 !important;
  transform: scale(1.1);
}

.card-quick-complete-btn.is-done {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981 !important;
  color: #10b981 !important;
}

.task-card:active {
  cursor: grabbing;
}

/* ════════════════════════════════════════════════════
   SCRUM / MULTI-SPRINT & BACKLOG COLUMNS WORKSPACE
════════════════════════════════════════════════════ */
.sprint-columns-container {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 2rem;
  align-items: flex-start;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  min-height: calc(100vh - 260px);
}

.sprint-column-card {
  flex: 0 0 330px;
  width: 330px;
  max-width: 88vw;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sprint-column-card.is-active-sprint {
  border: 2px solid var(--accent-primary, #2563eb) !important;
  box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.2) !important;
}

.sprint-column-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 1rem 1.15rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sprint-column-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sprint-column-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: var(--accent-primary, #2563eb);
  color: #ffffff;
}

.sprint-menu-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.sprint-menu-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-primary, #3b82f6);
}

.sprint-actions-popover {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 0.4rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 200px;
}

.sprint-action-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.12s ease;
}

.sprint-action-item:hover {
  background: var(--bg-secondary);
  color: var(--accent-primary, #3b82f6);
}

.sprint-action-item.is-danger {
  color: #ef4444;
}

.sprint-action-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.sprint-column-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 120px;
}

.sprint-task-card {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
  flex-shrink: 0 !important;
  min-height: fit-content !important;
}

.sprint-task-card:hover {
  transform: translateY(-2px);
  border-color: var(--board-accent-border, rgba(37, 99, 235, 0.3));
  box-shadow: var(--shadow-md);
}

.sprint-task-card:active {
  cursor: grabbing;
}

.sprint-task-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.sprint-task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sprint-add-card {
  flex: 0 0 280px;
  width: 280px;
  max-width: 80vw;
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  scroll-snap-align: center;
  transition: all 0.2s ease;
  min-height: 220px;
}

.sprint-add-card:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent-primary, #2563eb);
  transform: translateY(-2px);
}

/* Priority side-stripe */
.task-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
}

.task-card:has(.priority-dringend)::before {
  background: #ef4444;
}

.task-card:has(.priority-hoch)::before {
  background: #f97316;
}

.task-card:has(.priority-mittel)::before {
  background: #f59e0b;
}

.task-card:has(.priority-niedrig)::before {
  background: #10b981;
}

.task-priority-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: .16rem .5rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .45rem;
}

.priority-niedrig {
  background: rgba(16, 185, 129, .12);
  color: #047857;
}

.priority-mittel {
  background: rgba(245, 158, 11, .12);
  color: #b45309;
}

.priority-hoch {
  background: rgba(249, 115, 22, .12);
  color: #c2410c;
}

.priority-dringend {
  background: rgba(239, 68, 68, .12);
  color: #b91c1c;
}

.task-card-title {
  font-weight: 700;
  font-size: .93rem;
  color: var(--text-primary);
  margin-bottom: .35rem;
  line-height: 1.35;
}

.task-card-desc {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-bottom: .65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-subtasks-summary {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: .3rem .6rem;
  border-radius: var(--radius-sm);
  margin-bottom: .65rem;
}

.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .45rem;
  border-top: 1px solid var(--border-light);
  font-size: .76rem;
  color: var(--text-muted);
}

.task-date {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* ════════════════════════════════════════════════════
   SCRUM
════════════════════════════════════════════════════ */
.scrum-sprint-bar {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.5rem;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.sprint-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .15rem;
}

.sprint-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--header-accent);
}

.stat-label {
  font-size: .72rem;
  color: #94a3b8;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════
   TO-DO LIST
════════════════════════════════════════════════════ */
.todo-list-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0.5rem 0 2.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.todo-add-box {
  display: flex;
  gap: .65rem;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 0.4rem 0.5rem;
  box-shadow: var(--shadow-sm);
}

.todo-add-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: .65rem 1rem;
  font-size: .93rem;
  outline: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.todo-add-input:focus {
  outline: none;
}

.todo-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: .7rem;
  transition: var(--transition);
}

.todo-item:hover {
  border-color: var(--board-accent-border);
  box-shadow: var(--shadow-sm);
}

.todo-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.todo-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  color: white;
  margin-top: 2px;
}

.todo-item.completed .custom-checkbox {
  background: var(--status-done);
  border-color: var(--status-done);
}

.todo-item.completed .todo-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-title {
  font-weight: 600;
  font-size: .97rem;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}

.todo-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem .6rem;
  margin-top: .5rem;
  padding-left: 2.1rem;
}

.todo-meta-badge {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: .2rem .55rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.todo-meta-badge.time-badge {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.subtasks-container {
  margin-top: .75rem;
  padding: .75rem 0 0 2rem;
  border-top: 1px dashed var(--border-light);
}

.subtask-row {
  font-size: .86rem;
  padding: .3rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subtask-row.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════════════
   TIMELINE / GANTT
════════════════════════════════════════════════════ */
.timeline-wrapper {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 350px);
}

.timeline-sidebar {
  width: 220px;
  min-width: 180px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  background: var(--bg-secondary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.timeline-sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.timeline-row-label {
  height: 52px;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 .85rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-row-label:hover {
  background: var(--board-accent-bg);
}

.timeline-label-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

.tl-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.priority-dot-dringend {
  background: #ef4444;
}

.priority-dot-hoch {
  background: #f97316;
}

.priority-dot-mittel {
  background: #f59e0b;
}

.priority-dot-niedrig {
  background: #10b981;
}

.timeline-scroll-area {
  flex: 1;
  overflow: auto;
  position: relative;
}

.timeline-header-row {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  height: 28px;
}

.timeline-month-header {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.timeline-day-headers {
  display: flex;
  position: sticky;
  top: 28px;
  z-index: 10;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-light);
}

.timeline-day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-light);
  padding: .2rem 0;
  font-size: .7rem;
  color: var(--text-secondary);
  cursor: default;
}

.timeline-day-cell.today {
  background: rgba(37, 99, 235, .08);
}

.timeline-day-cell.today .day-num {
  color: var(--board-accent);
  font-weight: 800;
}

.day-num {
  font-weight: 700;
  font-size: .8rem;
  color: var(--text-primary);
}

.day-name {
  font-size: .65rem;
  opacity: .7;
}

.timeline-grid {
  position: relative;
}

.timeline-grid-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  border-bottom: 1px solid var(--border-light);
}

.timeline-grid-cell {
  border-right: 1px solid var(--border-light);
  height: 100%;
  flex-shrink: 0;
}

.timeline-grid-cell.today-col {
  background: rgba(37, 99, 235, .04);
}

.timeline-task-bar {
  position: absolute;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 .5rem;
  cursor: pointer;
  transition: opacity .2s;
  overflow: hidden;
  z-index: 5;
}

.timeline-task-bar:hover {
  filter: brightness(1.1);
}

.tl-bar-label {
  font-size: .72rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.tl-bar-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, .4);
  border-radius: 0 0 6px 6px;
}

.timeline-task-bar.no-date {
  background: var(--border-light) !important;
  color: var(--text-muted);
  border: 1px dashed var(--text-muted);
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ════════════════════════════════════════════════════
   MODALS & OVERLAYS Z-INDEX HIERARCHY
   - Level 1: Standard Modals & Bottom Sheets (100000)
   - Level 2: Sub-Modals, Presets & Config Dialogs (100200)
   - Level 3: Popups & Date/Time Dialogs (100300)
   - Level 4: Confirmations & Destructive Dialogs (100500)
   - Level 5: Toast Notifications (101000)
   - Level 6: Guided Walkthrough & Tooltips (102000)
════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .22s ease;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 100000 !important;
}

/* Level 2: Sub-modals & Config Modals (Always on top of base modals) */
#columns-modal,
.modal-overlay.modal-sublevel,
.modal-sublevel {
  z-index: 100200 !important;
}

#columns-modal.active,
.modal-overlay.modal-sublevel.active {
  z-index: 100200 !important;
}

/* Level 4: Confirmations & Reset dialogs */
#modal-confirm-reset-prototype,
.modal-confirm-overlay,
.modal-overlay.modal-confirm {
  z-index: 100500 !important;
}

#modal-confirm-reset-prototype.active,
.modal-confirm-overlay.active,
.modal-overlay.modal-confirm.active {
  z-index: 100500 !important;
}

.modal-card {
  background: var(--bg-card);
  border-radius: 22px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
  transform: translateY(18px) scale(.96);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

/* Bottom Sheet (Mobile) & Overlay (Desktop) */
.sheet-handle-bar {
  width: 36px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  margin: 8px auto 0;
  display: none;
}

@media (max-width: 768px) {
  .modal-bottom-sheet-container {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-bottom-sheet-container .modal-bottom-sheet {
    max-width: 100% !important;
    max-height: 88vh !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    transform: translateY(100%) !important;
    transition: transform .3s cubic-bezier(.16, 1, .3, 1) !important;
  }

  .modal-bottom-sheet-container.active .modal-bottom-sheet {
    transform: translateY(0) !important;
  }

  .modal-bottom-sheet-container .sheet-handle-bar {
    display: block;
  }
}

/* Task Card Assignee Avatar */
.task-assignee-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  flex-shrink: 0;
}

/* Sticky header + footer inside modal (Themed Header) */
.modal-sticky-header {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.4rem;
  background: var(--header-bg, #1e293b);
  border-bottom: 1px solid var(--border-light, rgba(255, 255, 255, .1));
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  color: var(--header-text, #ffffff) !important;
}

.modal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.modal-sticky-header h3,
.modal-sticky-header h2,
.modal-sticky-header .modal-header-top h3,
.modal-header-title {
  color: var(--header-text, #ffffff) !important;
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0;
}

.modal-scrollable-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.35rem 1.5rem;
}

.modal-sticky-footer {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.1rem 1.5rem;
  background: var(--modal-footer-bg);
  border-top: 1px solid var(--border-light);
  position: sticky;
  bottom: 0;
  z-index: 10;
  flex-shrink: 0;
}

.modal-close-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  color: #ffffff;
  transition: var(--transition);
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, .25);
  color: #ffffff;
}

/* ════════════════════════════════════════════════════
   FORMS (Figma Rounded Inputs & Block Toggles)
════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .4rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: .75rem 1rem;
  border-radius: 14px;
  font-size: .88rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #3b82f6;
  background: var(--bg-card);
  box-shadow: 0 0 0 3.5px rgba(59, 130, 246, .15);
}

/* Segmented picker (Figma Light Blue Active Pill) */
.segmented-picker {
  display: flex;
  background: var(--bg-secondary);
  padding: .3rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.35rem;
  border: 1px solid var(--border-light);
}

.segmented-option {
  flex: 1;
  text-align: center;
  padding: .6rem .75rem;
  font-size: .88rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.segmented-option.active {
  background: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}

[data-theme="dark"] .segmented-option.active,
[data-theme="oled"] .segmented-option.active {
  background: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .35);
}

.type-desc-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: .85rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: .83rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Color swatches */
.color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .6rem;
  margin-top: .4rem;
}

.color-swatch {
  height: 36px;
  border-radius: var(--radius-pill);
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.color-swatch.selected {
  border-color: var(--text-primary);
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.color-swatch.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: 800;
  font-size: .82rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

/* Feature toggles (Figma Block Container Rows) */
.feature-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  margin-bottom: .6rem;
  transition: var(--transition);
}

.feature-toggle-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  transition: .22s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: .22s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

input:checked+.slider {
  background: #10b981;
}

input:checked+.slider:before {
  transform: translateX(20px);
}

/* Board type tabs */
.board-type-switcher {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .35rem;
}

.board-type-tab {
  padding: .5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: .85rem;
  font-weight: 700;
  border: 1.5px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.board-type-tab.active {
  background: var(--bg-card);
  color: var(--board-accent);
  border-color: var(--board-accent);
}

/* Sprint duration buttons */
.sprint-dur-btn {
  padding: .4rem .8rem;
  border-radius: var(--radius-pill);
  font-size: .83rem;
  font-weight: 600;
  border: 1.5px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.sprint-dur-btn.active {
  background: var(--board-accent);
  color: white;
  border-color: var(--board-accent);
}

/* File upload */
.file-upload-input {
  display: block;
  width: 100%;
  margin-top: .35rem;
  font-size: .83rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: .6rem .85rem;
  cursor: pointer;
}

.file-upload-input::file-selector-button {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: .3rem .7rem;
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: .75rem;
}

/* Column configurator modal specifics */
.col-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .65rem;
  margin-bottom: 1.25rem;
}

.col-preset-card {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: .8rem .9rem;
  cursor: pointer;
  transition: var(--transition);
}

.col-preset-card.selected {
  border-color: var(--board-accent);
  background: var(--board-accent-bg);
}

.col-preset-card:hover:not(.selected) {
  border-color: var(--text-muted);
}

.col-preset-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.col-preset-name {
  font-size: .83rem;
  font-weight: 700;
  color: var(--text-primary);
}

.col-preset-desc {
  font-size: .75rem;
  color: var(--text-secondary);
  margin-top: .15rem;
}

.col-preview-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .65rem;
  border: 1.5px solid;
  border-radius: var(--radius-pill);
  font-size: .77rem;
  font-weight: 700;
}

.custom-col-editor {
  margin-bottom: 1rem;
}

.custom-col-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.custom-col-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg-secondary);
  padding: .5rem .65rem;
  border-radius: var(--radius-md);
}

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  font-size: .9rem;
}

.col-color-swatch-wrap {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════
   SMART CALENDAR VIEW STYLES
   ═══════════════════════════════════════════════════ */
.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  margin-bottom: 2px;
}
.cal-grid-day-name {
  padding: .65rem;
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  background: var(--bg-card);
}
.cal-grid-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-light);
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}
.cal-day-cell {
  background: var(--bg-card);
  min-height: 100px;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cal-day-cell:hover {
  background: var(--bg-hover);
}
.cal-day-cell.other-month {
  opacity: 0.35;
}
.cal-day-cell.is-today {
  background: var(--accent-light, rgba(99, 102, 241, 0.08));
  outline: 1.5px solid var(--accent-primary);
  outline-offset: -1px;
}
.cal-day-num {
  font-size: .85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.cal-day-cell.is-today .cal-day-num {
  background: var(--accent-primary);
  color: #ffffff;
}
.cal-task-badge {
  font-size: .75rem;
  padding: .25rem .45rem;
  border-radius: 6px;
  background: var(--bg-hover);
  border-left: 3px solid var(--accent-primary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.cal-task-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.cal-task-badge.done {
  text-decoration: line-through;
  opacity: 0.65;
}
.cal-task-badge.overdue {
  border-left-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}
.cal-task-badge.is-event-badge {
  border-left-color: #a855f7 !important;
  background: rgba(168, 85, 247, 0.12) !important;
}

/* Innovative Calendar Header Toolbar */
.calendar-toolbar-innovative {
  background: var(--bg-card);
  padding: 0.85rem 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.cal-toolbar-top-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.cal-toolbar-left-group {
  display: flex;
  align-items: center;
}

.cal-title-block {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.cal-toolbar-right-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.cal-toolbar-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.cal-toolbar-actions-bottom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cal-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: opacity 0.2s ease;
}
.cal-btn-nav {
  padding: 0.35rem 0.65rem !important;
  font-size: 0.8rem !important;
  border-radius: 8px !important;
  line-height: 1 !important;
}
.cal-scope-select {
  padding: 0.35rem 0.65rem !important;
  font-size: 0.78rem !important;
  border-radius: 10px !important;
  background: var(--bg-input, var(--bg-card)) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
}
.cal-btn-action {
  padding: 0.35rem 0.65rem !important;
  font-size: 0.78rem !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}
.cal-view-picker {
  padding: 0.2rem !important;
  border-radius: 12px !important;
}

/* Badge Tags & Time Pills */
.cal-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  line-height: 1.2;
}
.cal-time-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

/* Week View Grid */
.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .75rem;
}
.cal-week-col {
  background: var(--bg-card);
  border-radius: 14px;
  padding: .75rem;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

@media (max-width: 768px) {
  .calendar-toolbar-innovative {
    padding: 0.75rem;
    gap: 0.6rem;
  }
  .cal-toolbar-top-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .cal-title-block {
    order: -1;
  }
  .cal-toolbar-bottom-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .cal-nav-buttons {
    justify-content: space-between;
  }
  .cal-toolbar-actions-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .cal-scope-select, .cal-btn-action {
    width: 100%;
    justify-content: center;
  }
  .cal-view-picker {
    width: 100%;
    display: flex;
  }
  .cal-view-picker .segmented-option {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.2rem;
    font-size: 0.74rem;
  }
  .cal-grid-body {
    grid-template-columns: repeat(7, minmax(40px, 1fr));
  }
  .cal-day-cell {
    min-height: 70px;
    padding: .25rem;
  }
  .cal-task-badge {
    font-size: .68rem;
    padding: .25rem .35rem;
  }
  .cal-week-grid {
    grid-template-columns: 1fr;
  }
}

.mini-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.mini-swatch.selected {
  border-color: var(--text-primary);
}

/* Time tracking popup */
#time-popup {
  position: fixed;
  inset: 0;
  z-index: 100300 !important;
  background: rgba(15, 23, 42, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none !important;
  align-items: center;
  justify-content: center;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .2s;
}

#time-popup.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.time-popup-card {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 2rem;
  max-width: 380px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-modal);
  text-align: center;
}

.time-popup-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
}

.time-popup-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .35rem;
}

.time-popup-subtitle {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.time-popup-inputs {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.time-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}

.time-unit-input {
  width: 58px;
  text-align: center;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: .5rem .25rem;
  font-size: 1.1rem;
  font-weight: 700;
  outline: none;
  transition: var(--transition);
}

.time-unit-input:focus {
  border-color: var(--board-accent);
  box-shadow: 0 0 0 3px var(--board-accent-bg);
}

.time-input-group label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.time-popup-actions {
  display: flex;
  gap: .65rem;
}

/* Time summary */
.time-summary {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.time-summary-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
}

.time-user-block {
  margin-bottom: .75rem;
}

.time-user-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem 0;
}

.time-entry-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: .5rem;
  align-items: center;
  padding: .2rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .8rem;
}

/* Settings view */
.settings-group {
  margin-bottom: 2rem;
}

.settings-group-title {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border-light);
}

/* Project board rows */
.project-board-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--bg-secondary);
  padding: .65rem .9rem;
  border-radius: var(--radius-md);
  margin-bottom: .4rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.project-board-row:hover {
  border-color: var(--board-accent-border);
  background: var(--board-accent-bg);
}

.member-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .5rem;
}

/* Login screen */
#login-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-overlay {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 24px;
  padding: 2.25rem;
  backdrop-filter: blur(10px);
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-section-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .45);
}

.login-user-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .75rem 0;
}

.login-user-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-pill);
  padding: .45rem 1rem .45rem .5rem;
  color: rgba(255, 255, 255, .85);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.login-user-btn:hover {
  background: rgba(255, 255, 255, .14);
}

.login-avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: rgba(255, 255, 255, .3);
  font-size: .8rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .12);
}

.login-input {
  width: 100%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  color: white;
  font-size: .92rem;
  outline: none;
  transition: var(--transition);
}

.login-input:focus {
  border-color: #60a5fa;
  background: rgba(255, 255, 255, .1);
}

.login-input::placeholder {
  color: rgba(255, 255, 255, .3);
}

.login-color-picker {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.login-color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
}

.login-color-dot.selected {
  border-color: white;
  transform: scale(1.15);
}

.login-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: white;
  border: none;
  padding: .85rem;
  border-radius: var(--radius-pill);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(37, 99, 235, .4);
}

.login-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, .5);
}

/* ════════════════════════════════════════════════════
   MAIN BOTTOM NAV
════════════════════════════════════════════════════ */
.mobile-nav-bar {
  display: flex !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: var(--mobile-dock-bg, #1e293b) !important;
  border-top: 1px solid var(--mobile-dock-border, rgba(255, 255, 255, .15)) !important;
  padding: .4rem .75rem calc(.4rem + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 200 !important;
  justify-content: space-around !important;
  align-items: center !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, .25);
  transition: background 0.25s, border-color 0.25s;
}

@media (min-width: 769px) {
  .mobile-nav-bar {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 2rem);
    max-width: 560px !important;
    bottom: 16px !important;
    border-radius: 24px !important;
    border: 1px solid var(--mobile-dock-border, rgba(255, 255, 255, .2)) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .35) !important;
    padding: .45rem 1.5rem !important;
  }

  .mobile-fab,
  .floating-add-btn {
    display: none !important;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  color: var(--mobile-dock-text, rgba(255, 255, 255, .65)) !important;
  font-size: .68rem;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: .35rem .5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-nav-item span {
  color: inherit !important;
}

.mobile-nav-item svg {
  stroke: currentColor !important;
}

.mobile-nav-item.active {
  color: var(--mobile-dock-active, #38bdf8) !important;
  font-weight: 800 !important;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.mobile-nav-item.active span {
  color: var(--mobile-dock-active, #38bdf8) !important;
  font-weight: 800 !important;
}

.mobile-nav-item.active svg {
  stroke: var(--mobile-dock-active, #38bdf8) !important;
}

.mobile-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, .3) !important;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  transform: translateY(-10px);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.2s ease;
}

.mobile-fab:hover {
  filter: brightness(1.12);
  transform: translateY(-12px) scale(1.05);
}

/* ════════════════════════════════════════════════════
   RESPONSIVE (Tablet & Mobile, Pixel 10, iOS)
════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .app-header {
    padding: 0 .85rem;
  }

  .header-left,
  .header-right {
    min-width: 0;
    gap: .5rem;
  }

  .search-bar {
    display: none;
  }

  .user-greeting {
    display: none;
  }

  .header-brand {
    font-size: 1.15rem;
  }

  /* Hide header create button on mobile (mobile FAB used instead) */
  #btn-open-create-modal {
    display: none;
  }

  .app-container {
    padding: 1rem .85rem 5.5rem;
  }

  .welcome-title {
    font-size: 1.4rem;
  }

  .welcome-subtitle {
    font-size: .88rem;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
  }

  .stat-card {
    padding: .8rem .9rem;
    border-radius: var(--radius-md);
  }

  .stat-info h4 {
    font-size: .7rem;
  }

  .stat-info div {
    font-size: 1.3rem;
    margin-top: .1rem;
  }

  .stat-icon-wrapper {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .filter-pills {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    white-space: nowrap;
    padding: .38rem .85rem;
    font-size: .8rem;
  }

  .boards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Board Detail Responsive */
  .board-nav-header {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .board-nav-banner {
    height: 60px;
    margin-bottom: .85rem;
  }

  .board-nav-top {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }

  .board-title-group {
    width: 100%;
    justify-content: space-between;
  }

  .active-board-title {
    font-size: 1.2rem;
    word-break: break-word;
  }

  .board-controls-bar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: space-between;
  }

  .board-view-switch {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .board-view-switch::-webkit-scrollbar {
    display: none;
  }

  .view-switch-btn {
    padding: .38rem .75rem;
    font-size: .78rem;
    flex-shrink: 0;
  }

  /* Kanban Snap Scroll for Mobile */
  .kanban-container {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5.5rem;
    gap: .85rem;
  }

  .kanban-column {
    scroll-snap-align: center;
    width: 84vw;
    max-width: 320px;
    min-width: 270px;
    max-height: calc(100vh - 280px);
  }

  /* Modals as Mobile Bottom Sheet */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    border-radius: 24px 24px 0 0 !important;
    position: relative;
    max-height: 88vh;
    width: 100%;
    margin: 0;
    overflow: hidden !important;
    transform: translateY(100%);
  }

  .modal-overlay.active .modal-card {
    transform: translateY(0);
  }

  .modal-sticky-header {
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    overflow: hidden;
    padding: 0.85rem 1.25rem 0.95rem;
    margin-bottom: 0 !important;
  }

  .modal-scrollable-body {
    padding: 1.15rem 1.25rem;
  }

  .modal-sticky-footer {
    padding: .85rem 1.25rem;
  }

  /* Stack date pickers on mobile */
  #group-dates-picker>div {
    flex-direction: column;
    gap: .5rem;
  }

  /* Timeline mobile sidebar */
  .timeline-sidebar {
    width: 130px;
    min-width: 110px;
  }

  .timeline-sidebar-header {
    font-size: .72rem;
    padding: 0 .5rem;
  }

  .timeline-row-label {
    font-size: .76rem;
    padding: 0 .5rem;
  }
}

@media (max-width: 480px) {
  .color-swatches-grid {
    gap: .4rem;
  }

  .color-swatch {
    height: 32px;
  }

  .time-unit-input {
    width: 48px;
    font-size: .95rem;
    padding: .4rem .2rem;
  }
}

/* App Mode Simple (Nur To-Do Listen) */
body.app-mode-simple #mobile-nav-boards,
body.app-mode-simple #mobile-nav-projects,
body.app-mode-simple [data-filter="project"],
body.app-mode-simple #stat-card-boards {
  display: none !important;
}

/* Hide project assignment in create modal, sprint/kanban board type selector */
body.app-mode-simple #group-board-project,
body.app-mode-simple #create-type-segmented {
  display: none !important;
}

/* Onboarding modal cards */
.onboarding-option-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.onboarding-option-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.onboarding-option-card.active {
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.15);
}

/* ═══════════════════════════════════════════════════
   HOME TASKS LIST ("Meine Aufgaben" / "To-Dos anzeigen")
═══════════════════════════════════════════════════ */

.home-tasks-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.home-task-group {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.home-task-group-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}

.home-task-group-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.home-task-group-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-primary);
  flex: 1;
}

.home-task-group-count {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-tertiary, rgba(0, 0, 0, 0.06));
  padding: .15rem .55rem;
  border-radius: 10px;
}

.home-task-items {
  display: flex;
  flex-direction: column;
}

.home-task-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background .15s ease;
  cursor: default;
}

.home-task-row:last-child {
  border-bottom: none;
}

.home-task-row:hover {
  background: var(--bg-secondary);
}

.home-task-row.done {
  opacity: .8;
}

.home-task-row.done .home-task-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.home-task-check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-light);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  color: white;
  cursor: pointer;
  transition: all .2s ease;
  margin-top: 2px;
  padding: 0;
}

.home-task-check:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.home-task-check.checked {
  background: var(--accent-primary, #2563eb);
  border-color: var(--accent-primary, #2563eb);
}

.home-task-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.home-task-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  line-height: 1.35;
}

.home-task-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-top: .25rem;
  flex-wrap: wrap;
}

.home-task-prio,
.home-task-due,
.home-task-sub {
  font-size: .72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
}

.home-task-due {
  color: var(--text-muted);
}

.home-task-due.overdue {
  color: #ef4444;
  font-weight: 700;
}

.home-task-sub {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   QUICK-CREATE POPOVER
═══════════════════════════════════════════════════ */

.quick-create-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 999;
  overflow: hidden;
  animation: qcPopIn .2s cubic-bezier(.16, 1, .3, 1);
}

@media (max-width: 768px) {
  .quick-create-popover {
    position: fixed !important;
    top: auto !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    min-width: unset !important;
    max-width: 420px !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    z-index: 1000 !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  }
}

[data-theme="dark"] .quick-create-popover {
  background: rgba(30, 41, 59, 0.97);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes qcPopIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quick-create-header {
  padding: .65rem 1rem .4rem;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.quick-create-divider {
  height: 1px;
  background: var(--border-light);
  margin: .25rem .75rem;
}

.quick-create-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .6rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background .15s ease;
  text-align: left;
  font-family: inherit;
}

.quick-create-item:hover {
  background: var(--bg-secondary);
}

.quick-create-item:active {
  background: var(--border-light);
}

.quick-create-item:last-child {
  border-radius: 0 0 16px 16px;
}

.quick-create-icon {
  font-size: 1.15rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 10px;
  flex-shrink: 0;
}

.quick-create-label {
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.quick-create-desc {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  margin-top: .05rem;
}

/* In simple mode, hide filter bar since only To-Do lists exist */
body.app-mode-simple .dashboard-filter-bar {
  display: none !important;
}

/* ── Mobile Quick-Create Overlay ── */
.quick-create-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100100 !important;
  animation: fadeIn .15s ease;
  backdrop-filter: blur(4px);
}

.quick-create-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-radius: 24px 24px 0 0;
  z-index: 100101 !important;
  padding: .5rem 0 calc(env(safe-area-inset-bottom, 0px) + 2rem);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
  animation: slideUpSheet .25s cubic-bezier(.16, 1, .3, 1);
  max-height: 75vh;
  overflow-y: auto;
}

[data-theme="dark"] .quick-create-sheet {
  background: var(--bg-card);
}

@keyframes slideUpSheet {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.quick-create-sheet .quick-create-header {
  padding: .8rem 1.2rem .5rem;
  font-size: .75rem;
}

.quick-create-sheet .quick-create-item {
  padding: .85rem 1.2rem;
}

.quick-create-sheet .quick-create-icon {
  width: 38px;
  height: 38px;
  font-size: 1.25rem;
  border-radius: 12px;
}

.quick-create-sheet .quick-create-label {
  font-size: .92rem;
}

.quick-create-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-light);
  border-radius: 4px;
  margin: .5rem auto .3rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════
   TOAST NOTIFICATIONS SYSTEM
═══════════════════════════════════════════════════ */

#toast-container {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 101000 !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 380px;
}

@media (max-width: 768px) {
  #toast-container {
    bottom: 88px;
    top: auto;
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
  pointer-events: auto;
  animation: toastPopIn .25s cubic-bezier(.16, 1, .3, 1);
  transition: opacity .25s ease, transform .25s ease;
}

[data-theme="dark"] .toast {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.toast.toast-success {
  border-left: 4px solid #10b981;
}

.toast.toast-danger {
  border-left: 4px solid #ef4444;
}

.toast.toast-info {
  border-left: 4px solid #38bdf8;
}

@keyframes toastPopIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Touch Target Optimization */
button,
.mobile-nav-item,
.home-task-check,
.quick-create-item {
  min-height: 38px;
}

@media (max-width: 768px) {
  .mobile-nav-item {
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════
   LEGAL LINKS & MODAL
═══════════════════════════════════════════════════ */

.legal-links-grid {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.legal-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}

.legal-link-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════
   SHARE MODAL & ROLES STYLING
═══════════════════════════════════════════════════ */

.share-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  gap: .75rem;
}

.share-member-user {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex: 1;
  min-width: 0;
}

.share-member-name {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-role-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
}

.share-role-badge.badge-inherited {
  background: rgba(37, 99, 235, 0.12);
  color: #3b82f6;
  border-color: rgba(37, 99, 235, 0.25);
}

/* Read-Only Mode Banner */
.read-only-banner {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
}

body.user-role-read .col-add-btn,
body.user-role-read #btn-add-task-header,
body.user-role-read #btn-floating-add-task,
body.user-role-read #todo-fast-add-wrap,
body.user-role-read #btn-open-board-settings,
body.user-role-read .hide-on-read-only {
  display: none !important;
}

/* ═══════════════════════════════════════════════════
   AUTHENTICATION & LOGIN / REGISTRATION STYLES
 ═══════════════════════════════════════════════════ */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 20%, rgba(30, 58, 138, 0.45) 0%, rgba(15, 23, 42, 0.96) 70%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 40px rgba(96, 165, 250, 0.15);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  color: #f8fafc;
  position: relative;
  transition: all 0.3s ease;
}

.auth-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  line-height: 1;
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.05);
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-brand-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-brand-logo {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
  display: inline-block;
  animation: floatSparkle 3s ease-in-out infinite;
}

@keyframes floatSparkle {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-4px) scale(1.08);
  }
}

.auth-brand-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #60a5fa 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.auth-brand-sub {
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.65);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.6);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.auth-tab.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Form controls */
.auth-field-group {
  margin-bottom: 1.1rem;
}

.auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.85);
  margin-bottom: 0.4rem;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.75rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
  background: rgba(15, 23, 42, 0.85);
}

.auth-input::placeholder {
  color: rgba(226, 232, 240, 0.35);
}

.auth-toggle-pass {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.auth-toggle-pass:hover {
  color: #ffffff;
}

.auth-toggle-pass svg {
  display: block;
  pointer-events: none;
}

.auth-link-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.78rem;
  font-weight: 500;
  color: #60a5fa;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.auth-link-btn:hover {
  color: #93c5fd;
  opacity: 0.85;
}

.auth-link-text {
  color: #60a5fa;
  cursor: pointer;
}

.auth-guest-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-guest-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.25rem 0.5rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}

.auth-guest-btn:hover {
  color: #f1f5f9;
  text-decoration: underline;
}

/* Error Banner */
.auth-error-banner {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.84rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* Avatar Selection */
.auth-color-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.auth-color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}

.auth-color-dot:hover {
  transform: scale(1.15);
}

.auth-color-dot.selected {
  border-color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.auth-quick-users {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-quick-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.auth-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-quick-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: white;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.auth-quick-user-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════
   PREMIUM DARK GLASSMORPHISM ONBOARDING WIZARD STYLES
 ═══════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════
   PREMIUM DARK GLASSMORPHISM ONBOARDING WIZARD STYLES
 ═══════════════════════════════════════════════════ */

#modal-onboarding {
  padding: env(safe-area-inset-top, 16px) env(safe-area-inset-right, 16px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 16px);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.onboarding-modal-card {
  max-width: 580px !important;
  width: 94vw !important;
  max-height: calc(100dvh - 36px) !important;
  max-height: calc(100vh - 36px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 20px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-modal) !important;
  color: var(--text-primary) !important;
}

.onboarding-header {
  flex-shrink: 0;
  padding: 1.2rem 1.5rem 0.85rem 1.5rem;
  background: var(--bg-card) !important;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom: 1px solid var(--border-light) !important;
}

.onboarding-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.onboarding-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.onboarding-step-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-primary, #2563eb);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  display: inline-block;
}

.onboarding-step-percent {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
}

.onboarding-quick-login-btn {
  background: var(--bg-secondary, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.14));
  color: var(--text-primary, #e2e8f0);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.onboarding-quick-login-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--accent-primary, #2563eb);
  color: var(--accent-primary, #2563eb);
}

.onboarding-progress-track {
  height: 4px;
  background: var(--border-light, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.85rem;
}

.onboarding-progress-fill {
  height: 100%;
  width: 20%;
  background: var(--accent-primary, #2563eb);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.onboarding-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.4rem 1.5rem;
  background: var(--bg-card) !important;
}

.onboarding-body::-webkit-scrollbar {
  width: 5px;
}
.onboarding-body::-webkit-scrollbar-thumb {
  background: var(--border-light, rgba(255, 255, 255, 0.2));
  border-radius: 4px;
}

.onboarding-modal-card h2 {
  color: var(--text-primary) !important;
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.35 !important;
}

.onboarding-modal-card p {
  color: var(--text-secondary) !important;
  font-size: 0.86rem !important;
  line-height: 1.45 !important;
}

.onboarding-card-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--bg-secondary) !important;
  border: 1.5px solid var(--border-light) !important;
  border-radius: 14px !important;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.onboarding-card-option:hover {
  background: var(--bg-card) !important;
  border-color: var(--accent-primary) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm) !important;
}

.onboarding-card-option.active {
  background: rgba(37, 99, 235, 0.08) !important;
  border: 1.5px solid var(--accent-primary, #2563eb) !important;
}

.onboarding-card-option div>div:first-child {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  margin-bottom: 0.15rem !important;
}

.onboarding-card-option div>div:last-child {
  color: var(--text-secondary) !important;
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
}

.onboarding-card-option input[type="radio"] {
  accent-color: var(--accent-primary, #2563eb) !important;
  width: 17px;
  height: 17px;
  margin-top: 0.15rem;
  cursor: pointer;
}

.onboarding-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.5rem;
  background: var(--bg-card) !important;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  border-top: 1px solid var(--border-light) !important;
  z-index: 10;
}

#btn-onboarding-next {
  background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  border: none !important;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45) !important;
  border-radius: 14px !important;
  padding: 0.75rem 1.75rem !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

#btn-onboarding-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.55) !important;
}

#btn-onboarding-prev {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 14px !important;
  padding: 0.75rem 1.4rem !important;
  font-size: 0.9rem !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

#btn-onboarding-prev:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

@media (max-width: 640px) {
  #modal-onboarding {
    padding: env(safe-area-inset-top, 8px) 8px max(env(safe-area-inset-bottom, 12px), 12px) 8px !important;
  }

  .onboarding-modal-card {
    width: 96vw !important;
    max-height: calc(100dvh - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    border-radius: 20px !important;
  }

  .onboarding-header {
    padding: 1rem 1.15rem 0.6rem 1.15rem !important;
  }

  .onboarding-body {
    padding: 0.9rem 1.15rem !important;
  }

  .onboarding-body .onboarding-step > div:first-child {
    margin-bottom: 0.85rem !important;
  }

  .onboarding-body .onboarding-step > div:first-child > div:first-child {
    font-size: 1.85rem !important;
    margin-bottom: 0.25rem !important;
  }

  .onboarding-body h2 {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }

  .onboarding-body p {
    font-size: 0.8rem !important;
    margin-top: 0.2rem !important;
  }

  .onboarding-card-option {
    padding: 0.75rem 0.85rem !important;
    gap: 0.65rem !important;
    border-radius: 14px !important;
  }

  .onboarding-card-option div>div:first-child {
    font-size: 0.88rem !important;
  }

  .onboarding-card-option div>div:last-child {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }

  .onboarding-footer {
    padding: 0.75rem 1.15rem !important;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0.75rem)) !important;
  }

  #btn-onboarding-next {
    padding: 0.65rem 1.25rem !important;
    font-size: 0.92rem !important;
  }

  #btn-onboarding-prev {
    padding: 0.65rem 1rem !important;
    font-size: 0.88rem !important;
  }
}

/* ═══════════════════════════════════════════════════
   PROFILE DROPDOWN & MENU STYLES
 ═══════════════════════════════════════════════════ */

#profile-dropdown-wrap {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10000;
  min-width: 270px;
  max-width: 320px;
}

.profile-dropdown {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.65), 0 0 25px rgba(96, 165, 250, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f8fafc;
  max-height: 85vh;
  overflow-y: auto;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.65rem;
}

.profile-user-name {
  font-weight: 700;
  font-size: 0.96rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-user-email {
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.profile-badge-guest {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 999px;
  color: #93c5fd;
  display: inline-block;
}

.profile-guest-card {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(79, 70, 229, 0.2));
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 14px;
  margin-bottom: 0.75rem;
}

.profile-guest-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-guest-card-sub {
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 0.65rem;
}

.profile-guest-card-btn {
  width: 100%;
  font-size: 0.82rem !important;
  padding: 0.45rem 0.75rem !important;
  justify-content: center !important;
  border-radius: 10px !important;
}

.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  margin-bottom: 0.2rem;
}

.profile-menu-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.profile-menu-item:active {
  transform: scale(0.98);
}

.profile-menu-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

.profile-logout-btn {
  color: #fca5a5 !important;
}

.profile-logout-btn:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #ef4444 !important;
}

/* ═══════════════════════════════════════════════════
   TIME TRACKING POPUP & CARD QUICK ACTIONS
 ═══════════════════════════════════════════════════ */

.time-popup-card {
  width: 100%;
  max-width: 420px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  border-radius: 20px;
  padding: 1.5rem;
  color: #f8fafc;
  text-align: center;
}

.time-popup-icon {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.time-popup-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #ffffff;
}

.time-popup-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.time-popup-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.time-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-unit-input {
  width: 54px;
  padding: 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.time-unit-input:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.14);
}

.time-input-group label {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.time-popup-actions {
  display: flex;
  gap: 0.75rem;
}

/* Quick Member Assign Popover */
.quick-assign-popover {
  position: absolute;
  z-index: 100060;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  padding: 0.65rem;
  width: 220px;
  max-height: 260px;
  overflow-y: auto;
}

.quick-assign-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  color: #f8fafc;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.quick-assign-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.task-quick-time-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  line-height: 22px;
  padding: 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.task-quick-time-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.modal-overlay.active {
  display: flex !important;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 30px rgba(59, 130, 246, 0.15);
  border-radius: 24px;
  padding: 0 !important;
  overflow: hidden !important;
  color: #f8fafc !important;
  position: relative;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Explicit High Contrast for elements inside modal cards */
.modal-card h1,
.modal-card h2,
.modal-card h3,
.modal-card h4,
.modal-card .modal-header-title,
.modal-card #modal-task-heading {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.modal-card .form-label,
.modal-card label {
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  margin-bottom: 0.35rem;
}

.modal-card #save-and-create-label {
  color: #cbd5e1 !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
}

.modal-card .form-input,
.modal-card .form-select,
.modal-card .form-textarea {
  background: rgba(15, 23, 42, 0.75) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  font-weight: 500 !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.9rem !important;
}

[data-theme="light"] .modal-card .form-input,
[data-theme="light"] .modal-card .form-select,
[data-theme="light"] .modal-card .form-textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

.modal-card .form-input:focus,
.modal-card .form-select:focus,
.modal-card .form-textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
  outline: none !important;
}

.modal-card .form-select option {
  background: #1e293b;
  color: #f8fafc;
}

/* Modal Header & Close Button */
.modal-sticky-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.modal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.modal-close-btn {
  background: rgba(125, 125, 125, 0.15) !important;
  color: var(--header-text, #ffffff) !important;
  border: none !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 1.2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(125, 125, 125, 0.3) !important;
}

.modal-scrollable-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding-right: 6px;
  flex: 1;
}

/* Custom Sleek Scrollbar */
.modal-scrollable-body::-webkit-scrollbar {
  width: 5px;
}

.modal-scrollable-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.modal-scrollable-body::-webkit-scrollbar-track {
  background: transparent;
}

/* Modal Sticky Footer */
.modal-sticky-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: transparent !important;
  flex-shrink: 0;
  gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════
   SLIDE-UP BOTTOM SHEETS & MOBILE BOTTOM DOCK
 ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  #btn-floating-add-task {
    display: none !important;
  }

  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
    z-index: 100000 !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 88vh !important;
    animation: slideUpBottomSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border-bottom: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1.25rem 1.5rem !important;
    box-sizing: border-box !important;
  }

  .modal-scrollable-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 4px;
    max-height: calc(88vh - 120px) !important;
  }

  .bottom-sheet-handle {
    width: 44px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin: 0 auto 0.65rem auto;
    flex-shrink: 0;
  }

  .kanban-board,
  .kanban-grid,
  .board-columns-container {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .kanban-column,
  .board-column {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
}

@keyframes slideUpBottomSheet {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.app-mode-simple .qc-full-only {
  display: none !important;
}

.app-mode-simple #mobile-nav-bar {
  justify-content: space-around !important;
}

/* ════════════════════════════════════════════════════
   SHEEN TIMELINE (GANTT) VIEW STYLES
════════════════════════════════════════════════════ */
.timeline-wrapper {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
}

.timeline-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  background: var(--bg-secondary);
  z-index: 2;
}

.timeline-sidebar-header {
  padding: 1rem 1.15rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  height: 80px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.timeline-row-label {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  height: 52px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.15s ease;
}

.timeline-row-label:hover {
  background: rgba(255, 255, 255, 0.06);
}

.timeline-scroll-area {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
}

.timeline-header-row {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.timeline-month-header {
  padding: 0.4rem 0.75rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border-light);
  box-sizing: border-box;
}

.timeline-day-headers {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.timeline-day-cell {
  padding: 0.35rem 0.2rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border-light);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-day-cell.today {
  background: var(--board-accent-bg, rgba(37, 99, 235, 0.15));
  color: var(--accent-primary, #2563eb);
  font-weight: 700;
}

.timeline-grid {
  position: relative;
  width: max-content;
}

.timeline-grid-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  border-bottom: 1px solid var(--border-light);
  box-sizing: border-box;
}

.timeline-grid-cell {
  border-right: 1px solid var(--border-light);
  box-sizing: border-box;
  height: 100%;
}

.timeline-grid-cell.today-col {
  background: var(--board-accent-bg, rgba(37, 99, 235, 0.06));
}

.timeline-task-bar {
  position: absolute;
  height: 28px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 0.65rem;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 3;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.timeline-task-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.timeline-task-bar.no-date {
  background: #64748b !important;
  justify-content: center;
}

.tl-bar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.tl-bar-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.25);
  z-index: 1;
}

/* ════════════════════════════════════════════════════
   2-COLUMN DESKTOP TASK MODAL & RICH TEXT / ATTACHMENTS / COMMENTS
════════════════════════════════════════════════════ */
@media (min-width: 840px) {
  .modal-card-large {
    max-width: 1180px !important;
    width: 92vw !important;
  }

  .task-modal-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 400px !important;
    gap: 1.75rem !important;
    align-items: start !important;
  }

  .task-modal-sidebar {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  }
}

[data-theme="light"] .task-modal-sidebar {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(203, 213, 225, 0.8);
}

@media (max-width: 839px) {
  .task-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .task-modal-sidebar {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1rem;
  }
}

/* Unified Task Description Editor Container */
.task-desc-editor-wrap {
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #1e293b;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-desc-editor-wrap:focus-within {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35) !important;
}

/* Rich Text Toolbar */
.rich-text-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  background: rgba(15, 23, 42, 0.7) !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
}

.task-desc-editor-wrap .form-textarea,
#modal-task-detail .task-desc-editor-wrap .form-textarea {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0.75rem 0.9rem !important;
  width: 100% !important;
  outline: none !important;
  display: block;
}

.rich-text-toolbar + .form-textarea {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.rt-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.rt-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
}

/* Attachments */
.task-attachments-box {
  background: rgba(15, 23, 42, 0.45);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  color: #f8fafc;
}

.attachment-chip .att-del {
  color: #ef4444;
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

/* Comments Feed */
.comments-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 280px;
  overflow-y: auto;
}

.comment-item {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.comment-author {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.comment-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Refined Task Type Badges */
.task-type-badge {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  padding: 0.12rem 0.45rem !important;
  border-radius: 6px !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ════════════════════════════════════════════════════
   HIGH-CONTRAST TASK DETAIL MODAL Theme Engine
════════════════════════════════════════════════════ */
#modal-task-detail .modal-card {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(37, 99, 235, 0.15) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

@media (min-width: 840px) {
  #modal-task-detail .modal-card-large {
    max-width: 1180px !important;
    width: 92vw !important;
  }

  #modal-task-detail .task-modal-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 400px !important;
    gap: 1.75rem !important;
    align-items: start !important;
  }

  #modal-task-detail .task-modal-sidebar {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 16px !important;
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
  }
}

@media (max-width: 839px) {
  #modal-task-detail .task-modal-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  #modal-task-detail .task-modal-sidebar {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 14px !important;
    padding: 1rem !important;
  }
}

/* High Contrast Labels */
#modal-task-detail .form-label,
#modal-task-detail label {
  color: #94a3b8 !important;
  font-weight: 700 !important;
  font-size: 0.83rem !important;
  letter-spacing: 0.01em !important;
  margin-bottom: 0.35rem !important;
}

#modal-task-detail #modal-task-heading {
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* High Contrast Inputs & Selects */
#modal-task-detail .form-input,
#modal-task-detail .form-select,
#modal-task-detail .form-textarea {
  background: #1e293b !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 12px !important;
  font-weight: 500 !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 0.9rem !important;
}

#modal-task-detail .form-input::placeholder,
#modal-task-detail .form-textarea::placeholder {
  color: #64748b !important;
}

#modal-task-detail .form-input:focus,
#modal-task-detail .form-select:focus,
#modal-task-detail .form-textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35) !important;
  outline: none !important;
}

#modal-task-detail select option {
  background: #1e293b !important;
  color: #ffffff !important;
}

/* Rich Text Toolbar High Contrast */
#modal-task-detail .rich-text-toolbar {
  background: #1e293b !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-bottom: none !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 0.45rem 0.65rem !important;
}

#modal-task-detail .rt-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  padding: 0.25rem 0.6rem !important;
  border-radius: 8px !important;
}

#modal-task-detail .rt-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

/* Attachments High Contrast */
#modal-task-detail .task-attachments-box {
  background: #1e293b !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
}

#modal-task-detail .attachment-chip {
  background: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  font-weight: 600 !important;
}

/* Comments High Contrast */
#modal-task-detail .comment-item {
  background: #1e293b !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  color: #f8fafc !important;
}

#modal-task-detail .comment-author {
  color: #ffffff !important;
  font-weight: 700 !important;
}

#modal-task-detail .comment-time {
  color: #94a3b8 !important;
}

#modal-task-detail .comment-body {
  color: #e2e8f0 !important;
}

/* Sticky Footer High Contrast */
#modal-task-detail .modal-sticky-footer {
  background: #0f172a !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

#modal-task-detail #btn-save-task {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

#modal-task-detail #btn-delete-task {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

/* ════════════════════════════════════════════════════
   LIGHT MODE TASK DETAIL MODAL Theme Overrides
════════════════════════════════════════════════════ */
[data-theme="light"] #modal-task-detail .modal-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12), 0 0 30px rgba(37, 99, 235, 0.08) !important;
}

[data-theme="light"] #modal-task-detail .task-modal-sidebar {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] #modal-task-detail .form-label,
[data-theme="light"] #modal-task-detail label {
  color: #334155 !important;
}

[data-theme="light"] #modal-task-detail #modal-task-heading {
  color: #0f172a !important;
}

[data-theme="light"] #modal-task-detail .form-input,
[data-theme="light"] #modal-task-detail .form-select,
[data-theme="light"] #modal-task-detail .form-textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
}

[data-theme="light"] #modal-task-detail .form-input::placeholder,
[data-theme="light"] #modal-task-detail .form-textarea::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] #modal-task-detail .form-input:focus,
[data-theme="light"] #modal-task-detail .form-select:focus,
[data-theme="light"] #modal-task-detail .form-textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

[data-theme="light"] #modal-task-detail select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] #modal-task-detail .rich-text-toolbar {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-bottom: none !important;
}

[data-theme="light"] #modal-task-detail .rt-btn {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] #modal-task-detail .rt-btn:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

[data-theme="light"] #modal-task-detail .task-attachments-box {
  background: #f8fafc !important;
  border: 1.5px dashed #cbd5e1 !important;
}

[data-theme="light"] #modal-task-detail .attachment-chip {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] #modal-task-detail .comment-item {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] #modal-task-detail .comment-author {
  color: #0f172a !important;
}

[data-theme="light"] #modal-task-detail .comment-time {
  color: #64748b !important;
}

[data-theme="light"] #modal-task-detail .comment-body {
  color: #334155 !important;
}

[data-theme="light"] #modal-task-detail .modal-sticky-footer {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] #modal-task-detail #btn-delete-task {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
}

/* ════════════════════════════════════════════════════
   OLED TRUE BLACK TASK & APPOINTMENT MODAL Overrides (#000000)
════════════════════════════════════════════════════ */
[data-theme="oled"] #modal-task-detail .modal-card,
[data-theme="oled"] .modal-card {
  background: #000000 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 255, 255, 0.05) !important;
}

[data-theme="oled"] #modal-task-detail .task-modal-sidebar {
  background: #0a0a0a !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="oled"] #modal-task-detail .form-label,
[data-theme="oled"] #modal-task-detail label,
[data-theme="oled"] .modal-card .form-label,
[data-theme="oled"] .modal-card label {
  color: #a1a1aa !important;
}

[data-theme="oled"] #modal-task-detail #modal-task-heading,
[data-theme="oled"] .modal-card .modal-header-title,
[data-theme="oled"] .modal-card h1,
[data-theme="oled"] .modal-card h2,
[data-theme="oled"] .modal-card h3,
[data-theme="oled"] .modal-card h4 {
  color: #ffffff !important;
}

[data-theme="oled"] #modal-task-detail .form-input,
[data-theme="oled"] #modal-task-detail .form-select,
[data-theme="oled"] #modal-task-detail .form-textarea,
[data-theme="oled"] .modal-card .form-input,
[data-theme="oled"] .modal-card .form-select,
[data-theme="oled"] .modal-card .form-textarea {
  background: #000000 !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
}

[data-theme="oled"] #modal-task-detail .form-input::placeholder,
[data-theme="oled"] #modal-task-detail .form-textarea::placeholder,
[data-theme="oled"] .modal-card .form-input::placeholder,
[data-theme="oled"] .modal-card .form-textarea::placeholder {
  color: #71717a !important;
}

[data-theme="oled"] #modal-task-detail .form-input:focus,
[data-theme="oled"] #modal-task-detail .form-select:focus,
[data-theme="oled"] #modal-task-detail .form-textarea:focus,
[data-theme="oled"] .modal-card .form-input:focus,
[data-theme="oled"] .modal-card .form-select:focus,
[data-theme="oled"] .modal-card .form-textarea:focus {
  border-color: var(--accent-primary, #2563eb) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35) !important;
}

[data-theme="oled"] #modal-task-detail select option,
[data-theme="oled"] .modal-card select option {
  background: #000000 !important;
  color: #ffffff !important;
}

[data-theme="oled"] #modal-task-detail .rich-text-toolbar {
  background: #0a0a0a !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-bottom: none !important;
}

[data-theme="oled"] #modal-task-detail .rt-btn {
  background: #18181b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

[data-theme="oled"] #modal-task-detail .rt-btn:hover {
  background: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
  border-color: var(--accent-primary, #2563eb) !important;
}

[data-theme="oled"] #modal-task-detail .task-attachments-box {
  background: #0a0a0a !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.22) !important;
}

[data-theme="oled"] #modal-task-detail .attachment-chip {
  background: #18181b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

[data-theme="oled"] #modal-task-detail .comment-item {
  background: #0a0a0a !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

[data-theme="oled"] #modal-task-detail .comment-author {
  color: #ffffff !important;
}

[data-theme="oled"] #modal-task-detail .comment-time {
  color: #a1a1aa !important;
}

[data-theme="oled"] #modal-task-detail .comment-body {
  color: #e4e4e7 !important;
}

[data-theme="oled"] #modal-task-detail .modal-sticky-header,
[data-theme="oled"] #modal-task-detail .modal-scrollable-body,
[data-theme="oled"] #modal-task-detail .modal-sticky-footer,
[data-theme="oled"] .modal-sticky-header,
[data-theme="oled"] .modal-scrollable-body,
[data-theme="oled"] .modal-sticky-footer {
  background: #000000 !important;
}

[data-theme="oled"] #modal-task-detail .modal-sticky-footer,
[data-theme="oled"] .modal-sticky-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] #modal-task-detail #btn-delete-task {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
}

[data-theme="oled"] .modal-close-btn {
  background: #18181b !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #f4f4f5 !important;
}

[data-theme="oled"] .modal-close-btn:hover {
  background: #27272a !important;
  color: #ffffff !important;
}

/* ════════════════════════════════════════════════════
   OLED ULTRA TRUE-BLACK THEME ENGINE (#000000)
════════════════════════════════════════════════════ */
html[data-theme="oled"],
html[data-theme="oled"] body,
html[data-theme="oled"] .app-container {
  background-color: #000000 !important;
  color: #f8fafc !important;
}

html[data-theme="oled"] .modal-card,
html[data-theme="oled"] .app-header,
html[data-theme="oled"] .board-card,
html[data-theme="oled"] .task-card,
html[data-theme="oled"] .todo-item,
html[data-theme="oled"] .task-modal-sidebar,
html[data-theme="oled"] .settings-group,
html[data-theme="oled"] .kanban-column,
html[data-theme="oled"] .mobile-nav-bar,
html[data-theme="oled"] .stat-card,
html[data-theme="oled"] .rich-text-toolbar,
html[data-theme="oled"] .task-attachments-box,
html[data-theme="oled"] .comment-item,
html[data-theme="oled"] .segmented-picker {
  background-color: #000000 !important;
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="oled"] .form-input,
html[data-theme="oled"] .form-select,
html[data-theme="oled"] .form-textarea {
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

/* ════════════════════════════════════════════════════
   HIGH-IMPACT COMPACT DENSITY MODE (.density-compact)
════════════════════════════════════════════════════ */
html[data-density="compact"] .task-card {
  padding: 0.4rem 0.6rem !important;
  margin-bottom: 0.3rem !important;
  border-radius: 8px !important;
}

html[data-density="compact"] .todo-item {
  padding: 0.35rem 0.65rem !important;
  margin-bottom: 0.25rem !important;
  border-radius: 8px !important;
}

html[data-density="compact"] .task-card-title,
html[data-density="compact"] .todo-title {
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
  margin-bottom: 0.15rem !important;
}

html[data-density="compact"] .task-badge,
html[data-density="compact"] .task-type-badge {
  font-size: 0.62rem !important;
  padding: 0.08rem 0.3rem !important;
}

html[data-density="compact"] .kanban-column {
  padding: 0.5rem !important;
  min-width: 240px !important;
}

html[data-density="compact"] .kanban-container {
  gap: 0.6rem !important;
}

html[data-density="compact"] .boards-grid {
  gap: 0.75rem !important;
}

html[data-density="compact"] .stat-card {
  padding: 0.6rem 0.85rem !important;
}

/* ════════════════════════════════════════════════════
   CUSTOM APP BACKGROUND WALLPAPER ENGINE
════════════════════════════════════════════════════ */
html[data-bg-image]:not([data-bg-image="none"]) body,
html[data-bg-image]:not([data-bg-image="none"]) #app-root,
html[data-bg-image]:not([data-bg-image="none"]) .app-container,
html[data-bg-image]:not([data-bg-image="none"]) .view-section {
  background-color: transparent !important;
  background: transparent !important;
}

html[data-bg-image]:not([data-bg-image="none"]) .app-header {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

html[data-bg-image]:not([data-bg-image="none"]) .stat-card,
html[data-bg-image]:not([data-bg-image="none"]) .board-card,
html[data-bg-image]:not([data-bg-image="none"]) .task-card,
html[data-bg-image]:not([data-bg-image="none"]) .todo-item,
html[data-bg-image]:not([data-bg-image="none"]) .settings-group,
html[data-bg-image]:not([data-bg-image="none"]) .kanban-column {
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ════════════════════════════════════════════════════
   SETTINGS TAB NAVIGATION & MODULAR TABS
════════════════════════════════════════════════════ */
.settings-tab-bar {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.settings-tab-bar::-webkit-scrollbar {
  display: none;
}

.settings-tab-bar .segmented-option {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .settings-tab-bar {
    padding: 0.25rem !important;
    gap: 0.3rem !important;
    border-radius: 14px !important;
  }
  .settings-tab-bar .segmented-option {
    flex: 1 1 auto !important;
    min-width: auto !important;
    font-size: 0.76rem !important;
    padding: 0.5rem 0.55rem !important;
    text-align: center !important;
  }
}

/* ════════════════════════════════════════════════════
   RELEASE NOTES & CHANGELOG MODAL STYLES
════════════════════════════════════════════════════ */
.release-card {
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.release-card.highlight {
  border: 1.5px solid var(--accent-primary, #3b82f6);
  background: var(--bg-card, #1e293b);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.release-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light, rgba(255, 255, 255, 0.08));
}

.release-card-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.release-card-date {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin-left: 0.5rem;
}

.release-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.release-badge.current {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
}

.release-badge.legacy {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
}

.release-section-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-primary, #60a5fa);
  margin: 0.9rem 0 0.4rem 0;
}

.release-list {
  margin: 0.4rem 0 0.8rem 1.25rem;
  padding: 0;
  list-style-type: disc;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.6;
}

.release-sublist {
  margin: 0.25rem 0 0.35rem 1.1rem;
  list-style-type: circle;
}

.release-list li {
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.release-list li strong {
  color: var(--text-primary);
}

.release-paragraph {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.release-code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82em;
  font-family: monospace;
  color: var(--accent-primary, #60a5fa);
}

[data-theme="light"] .release-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .release-card.highlight {
  background: #f0f7ff !important;
  border: 1.5px solid #93c5fd !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08) !important;
}

[data-theme="light"] .release-card-header {
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .release-card-title {
  color: #0f172a !important;
}

[data-theme="light"] .release-card-date {
  color: #64748b !important;
}

[data-theme="light"] .release-badge.legacy {
  background: #e2e8f0 !important;
  color: #64748b !important;
}

[data-theme="light"] .release-section-heading {
  color: #1d4ed8 !important;
}

[data-theme="light"] .release-list {
  color: #334155 !important;
}

[data-theme="light"] .release-list li {
  color: #334155 !important;
}

[data-theme="light"] .release-list li strong {
  color: #0f172a !important;
}

[data-theme="light"] .release-paragraph {
  color: #334155 !important;
}

[data-theme="light"] .release-code {
  background: #f1f5f9 !important;
  color: #1d4ed8 !important;
}

.settings-tab-panel {
  animation: fadeInPanel 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modern Toggle Row Switches */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.toggle-row:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
}

.toggle-row-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-right: 0.75rem;
}

.toggle-row-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.toggle-row-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: #cbd5e1;
  border: 1px solid #94a3b8;
  border-radius: 24px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .toggle-slider,
[data-theme="oled"] .toggle-slider {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.toggle-input:checked + .toggle-slider {
  background-color: var(--accent-primary, #2563eb) !important;
  border-color: var(--accent-primary, #2563eb) !important;
}

.toggle-input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ════════════════════════════════════════════════════
   INTERACTIVE WALKTHROUGH TOOLTIP TOUR (v1.4.0)
════════════════════════════════════════════════════ */
.walkthrough-overlay {
  position: fixed;
  inset: 0;
  z-index: 102000 !important;
  background: transparent;
  pointer-events: auto;
  opacity: 1;
}

.walkthrough-spotlight-box {
  position: fixed;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.78), 0 0 24px rgba(59, 130, 246, 0.6);
  border: 2px solid var(--accent-primary, #3b82f6);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 102001 !important;
}

.walkthrough-tooltip-card {
  position: fixed;
  z-index: 102002 !important;
  width: 320px;
  max-width: 90vw;
  background: var(--bg-card, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.walkthrough-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.walkthrough-step-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.walkthrough-tooltip-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.walkthrough-tooltip-desc {
  font-size: 0.84rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.walkthrough-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ═══════════════════════════════════════════════════
   RELEASE NOTES & CHANGELOG ENGINE STYLES
═══════════════════════════════════════════════════ */
.release-pulse-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  margin-left: auto;
  letter-spacing: 0.05em;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
  animation: pulseReleaseDot 2s infinite ease-in-out;
}

@keyframes pulseReleaseDot {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.85);
  }
}

.toast.toast-version-update {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(139, 92, 246, 0.25);
  padding: 0.75rem 1rem;
  min-width: 320px;
  max-width: 440px;
}

.release-card {
  background: var(--bg-card, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.15rem;
  margin-bottom: 1.15rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.release-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.release-card.highlight {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(15, 23, 42, 0.8));
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

/* ═══════════════════════════════════════════════════
   SETTINGS VIEW & GROUP STYLES
═══════════════════════════════════════════════════ */
.settings-group {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-group:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.settings-group-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

/* ═══════════════════════════════════════════════════
   NOTIFICATIONS & PRO-TIER SYSTEM STYLES
═══════════════════════════════════════════════════ */
.header-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, transform 0.15s ease;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9999px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-main, #0f172a);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.notification-badge.pulse {
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notification-dropdown-wrap {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  z-index: 100060;
}

.notification-dropdown-wrap[style*="display: none"],
.notification-dropdown-wrap[style*="display:none"] {
  display: none !important;
  pointer-events: none !important;
}

body.notif-open .app-header {
  z-index: 100050 !important;
}

body.notif-open .mobile-nav-bar {
  display: none !important;
}

/* ── Mobile Notification Bottom Sheet & Backdrop ── */
@media (max-width: 768px) {
  .notification-dropdown-wrap {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    height: 100vh !important;
    z-index: 100060 !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    margin: 0 !important;
    overscroll-behavior: contain !important;
    animation: fadeInNotifBackdrop 0.2s ease forwards;
  }

  .notification-dropdown-wrap[style*="display: block"] {
    display: flex !important;
    pointer-events: auto !important;
  }

  .notification-dropdown-wrap[style*="display: none"],
  .notification-dropdown-wrap[style*="display:none"] {
    display: none !important;
    pointer-events: none !important;
  }

  .notification-panel {
    border-radius: 26px 26px 0 0 !important;
    max-height: 82vh !important;
    max-height: 82dvh !important;
    width: 100% !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.8) !important;
    margin: 0 !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) 0 !important;
    display: flex !important;
    flex-direction: column !important;
    animation: slideUpNotifMobile 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overscroll-behavior: contain !important;
    touch-action: auto !important;
    z-index: 100070 !important;
  }

  .notification-list-body {
    max-height: 65vh !important;
    max-height: 65dvh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    flex: 1 1 auto !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 24px) + 3.5rem) !important;
  }

  /* Hide footer buttons on mobile bottom-sheet for a cleaner, native feel */
  .notification-panel-footer {
    display: none !important;
  }

  .notif-mobile-handle {
    display: block !important;
    width: 44px;
    height: 5px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.35);
    margin: 0.6rem auto 0.25rem;
    cursor: pointer;
  }
}

@media all and (display-mode: standalone), (display-mode: window-controls-overlay), (display-mode: fullscreen) {
  #btn-pwa-install-header,
  #btn-pwa-install-settings,
  .pwa-install-btn {
    display: none !important;
  }
}

@keyframes fadeInNotifBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpNotifMobile {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.notification-panel {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notification-panel-header {
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.notif-pill-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
}

.notif-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-action-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.notif-tier-status-bar {
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-tier-status-bar.is-pro {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(234, 88, 12, 0.15));
}

.notif-tier-status-bar.is-free {
  background: rgba(255, 255, 255, 0.03);
}

.notif-tier-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.notif-tier-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.notif-filter-bar {
  display: flex;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  background: rgba(15, 23, 42, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.notif-filter-bar::-webkit-scrollbar {
  height: 4px;
}

.notif-filter-bar::-webkit-scrollbar-track {
  background: transparent;
}

.notif-filter-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.notif-filter-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.notif-filter-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
}

.notif-filter-chip.active,
.notif-filter-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #ffffff;
}

.notification-list-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.notif-item.is-unread {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

.notif-item.is-pro-card {
  border-left: 3px solid #f59e0b;
}

.notif-item-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.notif-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.notif-pro-badge {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.notif-item-time {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
}

.notif-item-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.notif-item-action-link {
  font-size: 0.74rem;
  font-weight: 700;
  color: #60a5fa;
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  position: absolute;
  top: 10px;
  right: 10px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

.notif-empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.notification-panel-footer {
  padding: 0.65rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Plan Matrix Comparison */
.notif-plan-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@media (max-width: 600px) {
  .notif-plan-matrix {
    grid-template-columns: 1fr;
  }
}

.notif-matrix-col {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem;
  transition: border-color 0.2s ease;
}

.notif-matrix-col.active-col {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(30, 41, 59, 0.7);
}

.notif-matrix-header {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-matrix-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: #cbd5e1;
}

.notif-matrix-list li.disabled {
  color: #64748b;
  opacity: 0.7;
}

.notif-sound-btn.active {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: #6366f1 !important;
  color: #ffffff !important;
}

/* ── To-Do List Done Accordion ── */
.todo-done-accordion {
  margin-top: 1.5rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  transition: var(--transition);
}

.todo-done-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  user-select: none;
  border-radius: var(--radius-md, 14px);
}

.todo-done-summary:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.todo-done-accordion[open] .todo-done-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.todo-done-accordion[open] .todo-accordion-icon {
  transform: rotate(180deg);
}

.todo-accordion-icon {
  transition: transform 0.2s ease;
  font-size: 0.85rem;
}

.todo-done-items-wrap {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.todo-all-done-banner {
  margin-bottom: 1rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md, 14px);
}

/* Light Theme Overrides for To-Do Done Accordion */
[data-theme="light"] .todo-done-accordion {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .todo-done-summary {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
}

[data-theme="light"] .todo-done-summary:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .todo-done-accordion[open] .todo-done-summary {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .todo-accordion-icon {
  color: #64748b !important;
}

[data-theme="light"] .todo-all-done-banner {
  background: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

[data-theme="light"] .todo-all-done-banner div {
  color: #047857 !important;
  font-weight: 600 !important;
}

/* OLED Theme Overrides for To-Do Done Accordion */
[data-theme="oled"] .todo-done-accordion {
  background: #0d0d0d !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] .todo-done-summary {
  background: #000000 !important;
  color: #e4e4e7 !important;
}

[data-theme="oled"] .todo-done-summary:hover {
  background: #141414 !important;
  color: #ffffff !important;
}

[data-theme="oled"] .todo-done-accordion[open] .todo-done-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.my-task-quick-toggle-btn:hover {
  transform: scale(1.1);
  border-color: #10b981 !important;
}

.my-task-quick-toggle-btn:active {
  transform: scale(0.92);
}

/* ════════════════════════════════════════════════════
   APPLE/GOOGLE LEVEL THEME ENGINE & LIGHT MODE OVERRIDES
════════════════════════════════════════════════════ */
.theme-accent-btn {
  transition: all 0.18s ease;
}

.theme-accent-btn:hover {
  border-color: var(--accent-primary, #2563eb) !important;
  transform: translateY(-1px);
}

.theme-accent-btn.selected {
  border-color: var(--accent-primary, #2563eb) !important;
  background: rgba(37, 99, 235, 0.1) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* Dashboard Stat Cards */
.stat-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card:active {
  transform: translateY(-1px);
}

/* Priority Tags */
.task-priority-tag {
  font-size: .75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: .2rem .6rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  line-height: 1.2;
}

.priority-niedrig {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.priority-mittel {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.priority-hoch {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.priority-dringend {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.35);
  font-weight: 800;
}

/* LIGHT MODE COMPREHENSIVE FIXES */
[data-theme="light"] {
  background-color: #f8fafc;
  color: #0f172a;
}

[data-theme="light"] body {
  background-color: #f8fafc;
  color: #0f172a;
}

[data-theme="light"] .app-header {
  background: #ffffff;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .search-bar {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .search-bar input {
  color: #0f172a;
}

[data-theme="light"] .search-bar input::placeholder {
  color: #94a3b8;
}

[data-theme="light"] .user-pill {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .user-pill:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .user-pill .user-greeting,
[data-theme="light"] .user-pill span {
  color: #0f172a !important;
}

[data-theme="light"] .user-pill svg {
  stroke: #0f172a !important;
  color: #0f172a !important;
}

[data-theme="light"] .profile-dropdown {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .profile-dropdown-header {
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .profile-user-name {
  color: #0f172a;
}

[data-theme="light"] .profile-user-email {
  color: #64748b;
}

[data-theme="light"] .profile-badge-guest {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
}

[data-theme="light"] .profile-guest-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .profile-guest-card-title {
  color: #1e293b;
}

[data-theme="light"] .profile-guest-card-sub {
  color: #64748b;
}

[data-theme="light"] .profile-menu-item {
  color: #334155;
}

[data-theme="light"] .profile-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .settings-view-header {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .settings-view-header .modal-user-name {
  color: #0f172a !important;
}

[data-theme="light"] .settings-view-header .btn-back {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .stat-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .stat-info h4 {
  color: #64748b;
}

[data-theme="light"] .stat-info div {
  color: #0f172a;
}

[data-theme="light"] .board-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .board-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .task-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .task-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .task-card-title {
  color: #0f172a;
}

[data-theme="light"] .task-card-desc {
  color: #64748b;
}

[data-theme="light"] .task-date {
  color: #64748b;
  background: #f1f5f9;
}

[data-theme="light"] .todo-list-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .todo-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .todo-item:hover {
  border-color: #cbd5e1;
}

[data-theme="light"] .todo-item-title {
  color: #0f172a;
}

[data-theme="light"] .todo-meta-badge {
  background: #f1f5f9;
  color: #64748b;
}

[data-theme="light"] .kanban-column {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .column-header h3 {
  color: #0f172a;
}

[data-theme="light"] .modal-card,
[data-theme="light"] .modal-bottom-sheet,
[data-theme="light"] .modal-bottom-sheet-container .modal-bottom-sheet,
[data-theme="light"] #modal-task-detail .modal-card,
[data-theme="light"] #modal-share-board .modal-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.14) !important;
}

[data-theme="light"] .modal-sticky-header,
[data-theme="light"] .modal-scrollable-body,
[data-theme="light"] .modal-sticky-footer {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] .modal-sticky-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-sticky-footer {
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-card h1,
[data-theme="light"] .modal-card h2,
[data-theme="light"] .modal-card h3,
[data-theme="light"] .modal-card h4,
[data-theme="light"] .modal-card .modal-header-title,
[data-theme="light"] .modal-card #modal-task-heading,
[data-theme="light"] .modal-card #share-modal-title {
  color: #0f172a !important;
}

[data-theme="light"] .modal-card .form-label,
[data-theme="light"] .modal-card label,
[data-theme="light"] .modal-card #save-and-create-label {
  color: #334155 !important;
}

[data-theme="light"] .bottom-sheet-handle,
[data-theme="light"] .sheet-handle-bar,
[data-theme="light"] .notif-mobile-handle {
  background: #cbd5e1 !important;
}

[data-theme="light"] .modal-header-title {
  color: #0f172a !important;
}

[data-theme="light"] .header-icon-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .header-icon-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

[data-theme="light"] .header-icon-btn svg {
  stroke: #0f172a;
}

[data-theme="light"] .modal-close-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .modal-close-btn:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="light"] .modal-sticky-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .form-label {
  color: #334155;
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
  background: #ffffff;
  border-color: var(--accent-primary, #2563eb);
}

[data-theme="light"] .notification-dropdown-wrap {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

[data-theme="light"] .notification-panel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .notification-panel-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .notif-filter-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .notif-filter-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

[data-theme="light"] .notif-filter-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

[data-theme="light"] .notif-filter-chip.active {
  background: var(--accent-primary, #2563eb) !important;
  border-color: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
}

[data-theme="light"] .notif-action-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .notif-action-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .notif-tier-status-bar.is-free {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

[data-theme="light"] .notif-tier-toggle-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .notif-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

[data-theme="light"] .notif-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .notif-item-title {
  color: #0f172a;
}

[data-theme="light"] .notif-item-body {
  color: #64748b;
}

[data-theme="light"] .mobile-nav-bar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mobile-nav-item {
  color: #64748b !important;
}

[data-theme="light"] .mobile-nav-item.active {
  background: #f1f5f9 !important;
  color: var(--accent-primary, #2563eb) !important;
}

/* ── Light Theme Authentication Screen & Login / Register ── */
[data-theme="light"] .auth-overlay {
  background: radial-gradient(circle at 50% 20%, rgba(219, 234, 254, 0.75) 0%, rgba(241, 245, 249, 0.95) 70%) !important;
}

[data-theme="light"] .auth-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.12), 0 0 35px rgba(37, 99, 235, 0.08) !important;
  color: #0f172a !important;
}

[data-theme="light"] .auth-brand-title {
  background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

[data-theme="light"] .auth-brand-sub {
  color: #64748b !important;
}

[data-theme="light"] .auth-close-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .auth-close-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .auth-tabs {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .auth-tab {
  color: #64748b !important;
}

[data-theme="light"] .auth-tab.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

[data-theme="light"] .auth-label {
  color: #334155 !important;
}

[data-theme="light"] .auth-input {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .auth-input:focus {
  background: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

[data-theme="light"] .auth-input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] .auth-toggle-pass {
  color: #64748b !important;
}

[data-theme="light"] .auth-toggle-pass:hover {
  color: #0f172a !important;
}

[data-theme="light"] .auth-checkbox-label {
  color: #334155 !important;
}

[data-theme="light"] .auth-link-btn,
[data-theme="light"] .auth-link-text {
  color: #2563eb !important;
}

[data-theme="light"] .auth-avatar-custom-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .auth-avatar-custom-btn:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="light"] .auth-guest-divider {
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .auth-guest-btn {
  color: #64748b !important;
}

[data-theme="light"] .auth-guest-btn:hover {
  color: #0f172a !important;
}

[data-theme="light"] .auth-quick-users {
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .auth-quick-label {
  color: #64748b !important;
}

[data-theme="light"] .auth-quick-user-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .auth-quick-user-btn:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .login-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .login-section-label {
  color: #64748b !important;
}

[data-theme="light"] .login-user-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .login-user-btn:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .login-divider {
  color: #94a3b8 !important;
}

[data-theme="light"] .login-divider::before,
[data-theme="light"] .login-divider::after {
  background: #e2e8f0 !important;
}

/* ════════════════════════════════════════════════════
   OLED TRUE BLACK THEME COMPREHENSIVE OVERRIDES
════════════════════════════════════════════════════ */
[data-theme="oled"] {
  background-color: #000000 !important;
  color: #ffffff !important;
}

[data-theme="oled"] body,
[data-theme="oled"] #app-root {
  background-color: #000000 !important;
  color: #ffffff !important;
}

[data-theme="oled"] .app-header {
  background: #000000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

[data-theme="oled"] .modal-overlay {
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(10px);
}

[data-theme="oled"] .modal-card,
[data-theme="oled"] .modal-bottom-sheet,
[data-theme="oled"] .modal-bottom-sheet-container .modal-bottom-sheet,
[data-theme="oled"] #modal-task-detail .modal-card,
[data-theme="oled"] #modal-share-board .modal-card,
[data-theme="oled"] .modal-sticky-header,
[data-theme="oled"] .modal-sticky-footer,
[data-theme="oled"] .modal-scrollable-body,
[data-theme="oled"] .profile-dropdown,
[data-theme="oled"] .notification-panel,
[data-theme="oled"] .quick-create-popover,
[data-theme="oled"] .board-card,
[data-theme="oled"] .task-card,
[data-theme="oled"] .stat-card,
[data-theme="oled"] .todo-list-card,
[data-theme="oled"] .todo-item,
[data-theme="oled"] .kanban-column,
[data-theme="oled"] .settings-view,
[data-theme="oled"] .settings-panel,
[data-theme="oled"] .login-card {
  background: #000000 !important;
  background-color: #000000 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .bottom-sheet-handle,
[data-theme="oled"] .sheet-handle-bar,
[data-theme="oled"] .notif-mobile-handle {
  background: #3f3f46 !important;
}

[data-theme="oled"] .modal-sticky-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] .modal-sticky-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] .notification-panel-header {
  background: #000000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] .notif-filter-bar {
  background: #050505 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="oled"] .notif-filter-chip {
  background: #111111 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #a1a1aa !important;
}

[data-theme="oled"] .notif-filter-chip.active {
  background: var(--accent-primary, #2563eb) !important;
  border-color: var(--accent-primary, #2563eb) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .notif-item {
  background: #0a0a0a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="oled"] .notif-item:hover {
  background: #141414 !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

[data-theme="oled"] .user-pill,
[data-theme="oled"] .search-bar,
[data-theme="oled"] .header-icon-btn,
[data-theme="oled"] .modal-close-btn,
[data-theme="oled"] .notif-action-btn {
  background: #111111 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .user-pill:hover,
[data-theme="oled"] .header-icon-btn:hover,
[data-theme="oled"] .modal-close-btn:hover,
[data-theme="oled"] .notif-action-btn:hover {
  background: #1a1a1a !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="oled"] .form-input,
[data-theme="oled"] .form-select,
[data-theme="oled"] .form-textarea,
[data-theme="oled"] .login-input {
  background: #080808 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .form-input:focus,
[data-theme="oled"] .form-select:focus,
[data-theme="oled"] .form-textarea:focus,
[data-theme="oled"] .login-input:focus {
  background: #0f0f0f !important;
  border-color: var(--accent-primary, #2563eb) !important;
}

[data-theme="oled"] .profile-guest-card {
  background: #0d0d0d !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] .profile-menu-item:hover {
  background: #141414 !important;
}

[data-theme="oled"] .mobile-nav-bar {
  background: rgba(0, 0, 0, 0.95) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* OLED Theme Authentication Screen & Login / Register */
[data-theme="oled"] .auth-overlay {
  background: rgba(0, 0, 0, 0.95) !important;
}

[data-theme="oled"] .auth-card {
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .auth-brand-sub {
  color: #a1a1aa !important;
}

[data-theme="oled"] .auth-close-btn {
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .auth-tabs {
  background: #0a0a0a !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] .auth-tab {
  color: #a1a1aa !important;
}

[data-theme="oled"] .auth-tab.active {
  background: #2563eb !important;
  color: #ffffff !important;
}

[data-theme="oled"] .auth-label {
  color: #e4e4e7 !important;
}

[data-theme="oled"] .auth-input {
  background: #080808 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .auth-input:focus {
  background: #0f0f0f !important;
  border-color: #3b82f6 !important;
}

[data-theme="oled"] .auth-input::placeholder {
  color: #52525b !important;
}

[data-theme="oled"] .auth-toggle-pass {
  color: #a1a1aa !important;
}

[data-theme="oled"] .auth-toggle-pass:hover {
  color: #ffffff !important;
}

[data-theme="oled"] .auth-checkbox-label {
  color: #d4d4d8 !important;
}

[data-theme="oled"] .auth-avatar-custom-btn {
  background: #111111 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .auth-avatar-custom-btn:hover {
  background: #1a1a1a !important;
}

[data-theme="oled"] .auth-guest-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] .auth-guest-btn {
  color: #a1a1aa !important;
}

[data-theme="oled"] .auth-guest-btn:hover {
  color: #ffffff !important;
}

[data-theme="oled"] .auth-quick-users {
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="oled"] .auth-quick-label {
  color: #a1a1aa !important;
}

[data-theme="oled"] .auth-quick-user-btn {
  background: #111111 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

[data-theme="oled"] .auth-quick-user-btn:hover {
  background: #1a1a1a !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* ════════════════════════════════════════════════════
   SETTINGS INFO & LEGAL PANEL STYLES
   - Cross-Theme Precision (Light, Dark, OLED)
   - Zero Hardcoded Invisible Colors
════════════════════════════════════════════════════ */
.info-release-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.info-release-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.info-release-title {
  font-weight: 700;
  font-size: .92rem;
  color: var(--text-primary);
}

.info-release-build {
  font-size: .78rem;
  color: var(--text-muted);
  margin-left: .4rem;
}

.info-release-btn {
  padding: .45rem .9rem;
  font-size: .8rem;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.info-release-btn:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
}

.info-bug-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 14px;
  padding: 1.1rem;
  margin-bottom: 1.2rem;
}

.info-bug-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .4rem;
}

.info-bug-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.info-bug-desc {
  font-size: .84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: .85rem;
}

.info-bug-btn {
  width: 100%;
  justify-content: center;
  font-weight: 700;
  padding: .65rem 1rem;
  font-size: .88rem;
}

.info-legal-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-top: .5rem;
}

.info-legal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: .85rem 1rem;
  transition: var(--transition);
}

.info-legal-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.info-legal-summary {
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
}

.info-legal-summary::-webkit-details-marker {
  display: none;
}

.info-legal-chevron {
  font-size: .78rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.info-legal-body {
  margin-top: .85rem;
  font-size: .84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  border-top: 1px solid var(--border-light);
  padding-top: .75rem;
}

.info-legal-link {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
}

.info-legal-link:hover {
  text-decoration: underline;
}

.info-footer-credits {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Light Mode Overrides for Info & Legal Panel */
[data-theme="light"] .info-release-bar {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .info-release-btn {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
}

[data-theme="light"] .info-release-btn:hover {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .info-bug-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(99, 102, 241, 0.07));
  border-color: rgba(37, 99, 235, 0.22);
}

[data-theme="light"] .info-bug-title {
  color: #0f172a;
}

[data-theme="light"] .info-bug-desc {
  color: #475569;
}

[data-theme="light"] .info-legal-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .info-legal-summary {
  color: #0f172a;
}

[data-theme="light"] .info-legal-body {
  color: #475569;
  border-top-color: #f1f5f9;
}

[data-theme="light"] .info-footer-credits {
  color: #64748b;
  border-top-color: #e2e8f0;
}

/* OLED Mode Overrides for Info & Legal Panel */
[data-theme="oled"] .info-release-bar,
[data-theme="oled"] .info-legal-card {
  background: #080808;
  border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="oled"] .info-bug-card {
  background: #0a0a0a;
  border-color: rgba(37, 99, 235, 0.45);
}

/* ═══════════════════════════════════════════════════
   LIGHT MODE CONTRAST OVERRIDES: COMPLETED / DONE TASKS
═══════════════════════════════════════════════════ */
[data-theme="light"] .home-task-row.done {
  opacity: 0.92;
  background: rgba(241, 245, 249, 0.55);
}

[data-theme="light"] .home-task-row.done:hover {
  background: rgba(226, 232, 240, 0.8);
}

[data-theme="light"] .home-task-row.done .home-task-title {
  color: #334155 !important;
  text-decoration: line-through;
  text-decoration-color: #94a3b8;
  font-weight: 500;
}

[data-theme="light"] .home-task-row.done .home-task-meta span {
  color: #64748b !important;
}

[data-theme="light"] .todo-item.completed {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.92;
}

[data-theme="light"] .todo-item.completed .todo-title {
  color: #334155 !important;
  text-decoration: line-through;
  text-decoration-color: #94a3b8;
}

[data-theme="light"] .todo-item.completed .subtask-row.completed,
/* ═══════════════════════════════════════════════════
   HIERARCHICAL JSON IMPORTER STYLES
═══════════════════════════════════════════════════ */
.import-dropzone {
  border: 2px dashed rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.04);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.import-dropzone:hover,
.import-dropzone.drag-over {
  border-color: var(--accent-primary, #3b82f6);
  background: rgba(59, 130, 246, 0.09);
  transform: translateY(-1px);
}

.import-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.import-badge-epic {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.import-badge-story {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.import-badge-task {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.import-badge-subtask {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.3);
}

[data-theme="light"] .import-dropzone {
  border-color: rgba(37, 99, 235, 0.28);
  background: #f8fafc;
}

[data-theme="light"] .import-dropzone:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

/* ═══════════════════════════════════════════════════
   BOARD SETTINGS CENTER & CARD DISPLAY OPTIONS
═══════════════════════════════════════════════════ */
.board-settings-card {
  max-width: 780px !important;
  width: 100%;
}

.board-settings-tabs-wrapper {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  padding: 0.35rem 0.75rem 0;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.board-settings-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.board-settings-tab-btn {
  padding: 0.65rem 0.95rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  border-radius: 8px 8px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.board-settings-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.board-settings-tab-btn.active {
  color: var(--accent-primary, #3b82f6);
  border-bottom-color: var(--accent-primary, #3b82f6);
  background: var(--bg-card);
}

.board-settings-tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

.board-settings-tab-pane.active {
  display: block;
}

/* Card Display Options Grid */
.card-display-options-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.card-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.card-option-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.card-option-toggle-item:hover {
  border-color: var(--accent-primary, #3b82f6);
}

/* Live Card Preview Box */
.card-live-preview-wrap {
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed var(--border-light);
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.card-live-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Workflow & Automation Cards (Pro Tier) */
.workflow-rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.workflow-rule-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  gap: 1rem;
  transition: all 0.2s ease;
}

.workflow-rule-card.is-pro {
  border-left: 3.5px solid #f59e0b;
}

.workflow-rule-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.workflow-rule-info p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.pro-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* Quick Density Segmented Switcher */
.density-picker-segmented {
  display: flex;
  background: var(--bg-card);
  padding: 0.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  gap: 0.25rem;
}

.density-picker-btn {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.density-picker-btn.active {
  background: var(--accent-primary, #3b82f6);
  color: #ffffff;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   SPRINT & KANBAN STICKY COLUMNS ALIGNMENT & POPOVERS
═══════════════════════════════════════════════════ */
.sprint-menu-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sprint-menu-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.sprint-actions-popover {
  position: absolute;
  z-index: 100050;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  animation: fadeIn 0.15s ease;
}

.sprint-action-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.sprint-action-item:hover {
  background: var(--bg-secondary);
  color: var(--accent-primary, #3b82f6);
}

.sprint-action-item.is-danger {
  color: #ef4444;
}

.sprint-action-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ═══════════════════════════════════════════════════
   CARD TYPOGRAPHY, BADGES & BREATHING ROOM
═══════════════════════════════════════════════════ */
.task-type-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.task-parent-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
  line-height: 1.35;
}

.sprint-task-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
  line-height: 1.35;
}

/* Priority & Story Points Pills */
.task-priority-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 0.55rem;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  line-height: 22px;
  box-sizing: border-box;
  border-radius: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.task-priority-tag.priority-dringend {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.task-priority-tag.priority-hoch {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.task-priority-tag.priority-mittel {
  background: rgba(59, 130, 246, 0.14);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.task-priority-tag.priority-niedrig {
  background: rgba(100, 116, 139, 0.14);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.task-story-points-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 0.55rem;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  line-height: 22px;
  box-sizing: border-box;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.task-date {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  height: 24px;
  min-height: 24px;
  line-height: 24px;
}

.task-quick-time-btn {
  height: 24px;
  min-height: 24px;
  line-height: 22px;
  font-size: 0.72rem;
  padding: 0 0.5rem;
  border-radius: 12px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
}

.sprint-task-move-select {
  height: 24px !important;
  min-height: 24px !important;
  line-height: 1.2 !important;
  padding: 0 0.4rem !important;
  font-size: 0.72rem !important;
  border-radius: 12px !important;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════
   TIMELINE VIEW (Gantt-Style) ROW & HEADER SYNC
═══════════════════════════════════════════════════ */
.timeline-wrapper {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.timeline-sidebar {
  width: 240px;
  min-width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  background: var(--bg-card);
  z-index: 10;
}

.timeline-sidebar-header {
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  box-sizing: border-box;
}

.timeline-row-label {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease;
}

.timeline-row-label:hover {
  background: var(--bg-secondary);
}

.timeline-row-label.is-epic-row {
  font-weight: 800;
  color: var(--accent-primary, #6366f1);
}

.timeline-row-label.is-nested-child {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline-row-label.is-nested-child .timeline-label-text {
  display: inline-flex;
  align-items: center;
}

/* ═══════════════════════════════════════════════════
   TODO LIST VIEW (Modern Card Layout)
═══════════════════════════════════════════════════ */
.todo-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-primary, #6366f1);
  border-radius: 12px;
  margin-bottom: 0.65rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.15s ease;
}

.todo-item-row.density-compact {
  padding: 0.45rem 0.8rem;
  margin-bottom: 0.45rem;
  gap: 0.65rem;
}

.todo-item-row.density-large {
  padding: 1.05rem 1.25rem;
  margin-bottom: 0.85rem;
  gap: 1.2rem;
}

.todo-item-row.prio-border-dringend { border-left-color: #ef4444 !important; }
.todo-item-row.prio-border-hoch { border-left-color: #f59e0b !important; }
.todo-item-row.prio-border-mittel { border-left-color: #3b82f6 !important; }
.todo-item-row.prio-border-niedrig { border-left-color: #64748b !important; }

.todo-item-row:hover {
  transform: translateY(-1px);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.todo-item-row.done {
  opacity: 0.65;
  border-left-color: #10b981 !important;
}

.timeline-scroll-area {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
}

.timeline-header-row {
  height: 28px;
  min-height: 28px;
  display: flex;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.timeline-day-headers {
  height: 36px;
  min-height: 36px;
  display: flex;
  border-bottom: 1px solid var(--border-light);
}

.timeline-grid-row {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  display: flex;
  border-bottom: 1px solid var(--border-light);
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════
   CALENDAR (Month, Week, Agenda & Timeline)
═══════════════════════════════════════════════════ */
.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.cal-grid-day-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.4rem 0;
}

.cal-grid-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.cal-day-cell {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  min-height: 105px;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-day-cell:hover {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
}

.cal-day-cell.is-today {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.cal-day-cell.other-month {
  opacity: 0.35;
  background: transparent;
}

.cal-day-num {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
}

.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.65rem;
}

.cal-week-col {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  min-height: 480px;
  padding: 0.75rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.cal-task-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 3.5px solid var(--accent-primary);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-size: 0.76rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cal-task-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.cal-task-badge.done {
  opacity: 0.6;
  text-decoration: line-through;
}

.cal-task-badge.overdue {
  border-left-color: #ef4444 !important;
}

.cal-type-tag {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.cal-time-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  padding: 0.12rem 0.45rem;
  border-radius: 8px;
}









/* ═══════════════════════════════════════════════════
   NALVA MOBILE CALENDAR UX ENGINE (v0.5.1.8)
   ═══════════════════════════════════════════════════ */

.cal-day-dots {
  display: none;
}

.cal-day-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-desktop-badges-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cal-month-selected-day-agenda {
  display: none;
}

.cal-agenda-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  margin-bottom: 0.75rem;
}

.cal-today-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.cal-agenda-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cal-agenda-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-primary);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.cal-agenda-item-card:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.cal-agenda-item-card.done {
  opacity: 0.65;
}

.cal-agenda-item-card.overdue {
  border-left-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.06);
}

.cal-agenda-empty {
  text-align: center;
  padding: 2.2rem 1rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px dashed var(--border-light);
}

/* Mobile Calendar Overrides */
@media (max-width: 768px) {
  .cal-grid-header {
    margin-bottom: 4px;
  }
  .cal-grid-day-name {
    padding: 0.45rem 0.1rem;
    font-size: 0.72rem;
  }
  .cal-grid-body {
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 3px;
    background: transparent;
    border-radius: 12px;
  }
  .cal-day-cell {
    min-height: 48px !important;
    height: auto;
    padding: 0.35rem 0.15rem !important;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3px !important;
  }
  .cal-day-num {
    font-size: 0.8rem;
    width: 22px;
    height: 22px;
    margin-bottom: 0;
  }
  .cal-day-cell.is-selected-day {
    border-color: var(--accent-primary) !important;
    background: rgba(56, 189, 248, 0.12) !important;
    box-shadow: 0 0 10px var(--accent-glow);
  }
  .cal-day-cell.is-selected-day .cal-day-num {
    background: var(--accent-primary);
    color: #ffffff;
  }
  .cal-desktop-badges-wrap {
    display: none !important;
  }
  .cal-day-dots {
    display: flex !important;
    gap: 3px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    margin-top: 2px;
  }
  .cal-month-selected-day-agenda {
    display: flex !important;
    flex-direction: column;
    margin-top: 1.15rem;
    animation: fadeIn 0.2s ease-out;
  }
  
  /* Swipeable 3-Day Columns */
  .cal-week-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 0.65rem !important;
    padding-bottom: 0.75rem !important;
    scroll-padding: 0.5rem;
  }
  .cal-week-col {
    flex: 0 0 calc(33.333% - 0.45rem) !important;
    min-width: 118px !important;
    scroll-snap-align: start !important;
    border-radius: 14px;
    padding: 0.75rem 0.65rem !important;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
  }
}
