/* Promentix Custom Stylesheet - Modern Glassmorphism & High-End Light/Dark UI */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  /* Light mode defaults */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  --column-bg: #ebecf0;
  --column-border: rgba(0, 0, 0, 0.06);
}

html.dark {
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #182234;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  --column-bg: rgba(15, 23, 42, 0.7);
  --column-border: rgba(255, 255, 255, 0.08);
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.1);
}
html.dark ::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 9999px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Glassmorphism Utilities */
.glass-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}
html.dark .glass-panel {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

.glass-modal {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #0f172a;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
html.dark .glass-modal {
  background: rgba(11, 15, 25, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.gradient-brand {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}

.gradient-brand-subtle {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
}

.gradient-border {
  border-image: linear-gradient(135deg, #6366f1, #a855f7) 1;
}

/* Kanban Drag & Drop Styles */
.kanban-column {
  min-width: 290px;
  max-width: 320px;
  background: var(--column-bg);
  border: 1px solid var(--column-border);
  border-radius: 16px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.2s ease;
}
html.dark .kanban-card {
  background: #182234;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 2px 4px -2px rgba(0, 0, 0, 0.15);
}

.kanban-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
}
html.dark .kanban-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.kanban-card:active {
  cursor: grabbing;
}

/* SortableJS Ghost / Dragging state */
.sortable-ghost {
  opacity: 0.35;
  background: rgba(99, 102, 241, 0.2) !important;
  border: 2px dashed #6366f1 !important;
}

.sortable-chosen {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  transform: rotate(2deg) scale(1.02);
}

/* Priority Badges - Ergonomic contrast in both Light & Dark */
.badge-urgent {
  background: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fecdd3;
}
.badge-high {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-medium {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}
.badge-low {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

html.dark .badge-urgent {
  background: rgba(244, 63, 94, 0.18);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
html.dark .badge-high {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
html.dark .badge-medium {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}
html.dark .badge-low {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Calendar Grid */
.calendar-cell {
  min-height: 110px;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(203, 213, 225, 0.8) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}
.calendar-cell:hover {
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.calendar-cell.today {
  border: 2px solid #6366f1 !important;
  background: rgba(238, 242, 255, 0.98) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2) !important;
}
html.dark .calendar-cell {
  background: rgba(15, 23, 42, 0.94) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
html.dark .calendar-cell:hover {
  background: rgba(30, 41, 59, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}
html.dark .calendar-cell.today {
  border: 2px solid #818cf8 !important;
  background: rgba(30, 27, 75, 0.94) !important;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.35) !important;
}

/* Ergonomic Light Mode Form Controls & Typography */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
select,
textarea {
  font-family: inherit;
  transition: all 0.15s ease;
}

html:not(.dark) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="color"]),
html:not(.dark) select,
html:not(.dark) textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
  color: #94a3b8 !important;
}

html:not(.dark) input:focus,
html:not(.dark) select:focus,
html:not(.dark) textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* Restful light mode text & headings */
html:not(.dark) .glass-modal label {
  color: #334155 !important;
}
html:not(.dark) .glass-modal h1,
html:not(.dark) .glass-modal h2,
html:not(.dark) .glass-modal h3,
html:not(.dark) .glass-modal h4 {
  color: #0f172a !important;
}
html:not(.dark) .glass-modal p {
  color: #475569;
}
html:not(.dark) .glass-modal .text-slate-300 {
  color: #475569 !important;
}
html:not(.dark) .glass-modal .text-slate-400 {
  color: #64748b !important;
}
html:not(.dark) .glass-modal .text-slate-200,
html:not(.dark) .glass-modal .text-slate-100 {
  color: #0f172a !important;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modal Visibility Guarantees */
#auth-modal:not(.hidden),
#password-reset-modal:not(.hidden),
#admin-edit-user-modal:not(.hidden),
#admin-reset-result-modal:not(.hidden),
#admin-edit-plan-modal:not(.hidden) {
  display: flex !important;
}

#auth-modal.hidden,
#password-reset-modal.hidden,
#admin-edit-user-modal.hidden,
#admin-reset-result-modal.hidden,
#admin-edit-plan-modal.hidden {
  display: none !important;
}

/* ========================================================= */
/* SAFE AREA & MOBILE / TABLET RESPONSIVENESS (PWA) */
/* ========================================================= */
.safe-area-bottom {
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

/* Hide scrollbar utility for clean swipe carousels */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile Bottom Navigation Bar */
#mobile-bottom-nav {
  z-index: 50 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}
.mobile-nav-btn {
  min-width: 54px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-btn:active {
  transform: scale(0.94);
}

/* Ensure modals are on top of everything including mobile-bottom-nav */
.fixed.inset-0.z-50 {
  z-index: 60 !important;
}

/* Mobile Screens (< 640px) */
@media (max-width: 639px) {
  /* Toast Notification Placement on Mobile */
  #toast-container {
    bottom: 74px !important;
    right: 14px !important;
    left: 14px !important;
  }
  .toast {
    font-size: 12.5px;
    padding: 10px 14px;
    width: 100%;
  }

  /* Prevent auto-zoom on iOS inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Kanban Container & Columns Mobile Swipe */
  #kanban-board-container > div {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 8px;
    gap: 10px !important;
    padding-bottom: 20px;
    min-height: calc(100vh - 180px);
  }

  .kanban-column {
    min-width: 85vw !important;
    max-width: 330px !important;
    scroll-snap-align: start;
    max-height: calc(100vh - 190px) !important;
    border-radius: 18px;
  }

  /* Touch-friendly Kanban Cards */
  .kanban-card {
    padding: 12px !important;
    border-radius: 12px;
    touch-action: pan-y;
  }

  /* Card Color Covers */
  .card-cover-bar {
    height: 30px;
    border-radius: 8px 8px 0 0;
    margin: -12px -12px 10px -12px;
  }

  /* Card members avatars */
  .member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-weight: 700;
    border: 1.5px solid #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    transition: transform 0.1s ease;
  }
  html.dark .member-avatar {
    border-color: #182234;
  }
  .member-avatar:hover {
    transform: scale(1.15);
    z-index: 10;
  }

  /* Mobile Modals: Clean centered modals by default, with smooth scroll */
  .fixed.inset-0.z-50 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .fixed.inset-0.z-50.hidden {
    display: none !important;
  }

  .fixed .glass-modal {
    width: 100% !important;
    max-width: 480px !important;
    border-radius: 20px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px 24px !important;
    margin: auto !important;
  }

  /* Mobile Dropdowns: Fixed nicely below the top header spanning screen width */
  #notifications-dropdown {
    position: fixed !important;
    top: 62px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    border-radius: 18px !important;
    padding: 14px !important;
    max-height: 75vh !important;
    z-index: 120 !important;
  }

  #workspace-dropdown-menu {
    position: fixed !important;
    top: 62px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    border-radius: 18px !important;
    padding: 14px !important;
    z-index: 120 !important;
  }

  /* Specific bottom-sheet styling for Card Details Modal on mobile */
  #card-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  #card-modal .glass-modal {
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 88vh !important;
    padding: 20px 16px 32px !important;
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slideUpModal {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Compact header on mobile */
  header {
    padding-left: 10px !important;
    padding-right: 10px !important;
    height: 56px !important;
  }

  /* Responsive Board Sub-header */
  #boards-tab-list {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Tablet Screens (640px to 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
  #kanban-board-container > div {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    gap: 16px !important;
  }

  .kanban-column {
    min-width: 290px !important;
    max-width: 310px !important;
    scroll-snap-align: start;
    max-height: calc(100vh - 220px) !important;
  }

  #toast-container {
    bottom: 74px !important;
    right: 20px !important;
  }
}

/* ========================================================= */
/* WORKSPACE BACKGROUND & GLASSMORPHISM                      */
/* ========================================================= */
body.has-custom-bg {
  background-size: cover !important;
  background-position: center center !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

body.has-custom-bg.bg-type-color {
  background-image: none !important;
}

/* Translucent Frosted Glass Header when Custom BG is active */
body.has-custom-bg header {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
html.dark body.has-custom-bg header {
  background: rgba(9, 13, 22, 0.82) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Translucent Frosted Glass Sub-header */
body.has-custom-bg #view-boards .glass-panel {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}
html.dark body.has-custom-bg #view-boards .glass-panel {
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Glassmorphism for Kanban Columns when Custom BG is active */
body.has-custom-bg .kanban-column {
  background: rgba(241, 245, 249, 0.86) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}
html.dark body.has-custom-bg .kanban-column {
  background: rgba(15, 23, 42, 0.82) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
}

/* Kanban Cards retain high contrast inside frosted columns */
body.has-custom-bg .kanban-card:not(.has-full-cover) {
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}
html.dark body.has-custom-bg .kanban-card:not(.has-full-cover) {
  background: rgba(24, 34, 52, 0.95) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}
.kanban-card.has-full-cover {
  color: #ffffff !important;
}
.kanban-card.has-full-cover h4 {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Active Tile Styling for Workspace Background Picker */
.ws-bg-tile {
  cursor: pointer;
  outline: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ws-bg-tile:hover {
  transform: scale(1.03);
}
.ws-bg-tile.active-bg-tile {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.45) !important;
}
.ws-bg-tile.active-bg-tile .ws-bg-check {
  display: flex !important;
}

/* ========================================================= */
/* UNIVERSAL WORKSPACE BACKGROUND CONTRAST & LEGIBILITY     */
/* ========================================================= */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06);
  color: #0f172a;
}
html.dark .glass-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.35);
}

/* Ensure ALL views have crisp frosted containers when custom background is active */
body.has-custom-bg .glass-panel,
body.has-custom-bg .glass-card,
body.has-custom-bg #view-boards .glass-panel,
body.has-custom-bg #view-tasks .glass-panel,
body.has-custom-bg #view-calendar .glass-panel,
body.has-custom-bg #view-members .glass-panel,
body.has-custom-bg #view-admin .glass-panel {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.12) !important;
}
html.dark body.has-custom-bg .glass-panel,
html.dark body.has-custom-bg .glass-card,
html.dark body.has-custom-bg #view-boards .glass-panel,
html.dark body.has-custom-bg #view-tasks .glass-panel,
html.dark body.has-custom-bg #view-calendar .glass-panel,
html.dark body.has-custom-bg #view-members .glass-panel,
html.dark body.has-custom-bg #view-admin .glass-panel {
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 14px 40px -5px rgba(0, 0, 0, 0.45) !important;
}

/* Calendar Cells on custom background */
body.has-custom-bg .calendar-cell {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  color: #0f172a !important;
}
html.dark body.has-custom-bg .calendar-cell {
  background: rgba(20, 29, 47, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

/* Daily Tasks items on custom background */
body.has-custom-bg .task-item {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  color: #0f172a !important;
}
html.dark body.has-custom-bg .task-item {
  background: rgba(24, 34, 52, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

/* Section Title Pill Badges: Legible against ANY background */
.view-section-header {
  padding: 8px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
html.dark .view-section-header {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Language Switcher Button in Header */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
html.dark .lang-toggle-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.lang-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}



/* Daily Tasks High-Contrast Card & Empty State */
.task-item {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.task-item:hover {
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
html.dark .task-item {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
html.dark .task-item:hover {
  background: rgba(30, 41, 59, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

/* HTML5 Date Input Calendar Icon Contrast */
input[type="date"] {
  color-scheme: light;
}
html.dark input[type="date"] {
  color-scheme: dark;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}
html.dark input[type="date"]::-webkit-calendar-picker-indicator,
html.dark #new-task-date::-webkit-calendar-picker-indicator {
  filter: brightness(0) invert(1) !important;
  opacity: 0.95 !important;
  cursor: pointer !important;
}
html:not(.dark) input[type="date"]::-webkit-calendar-picker-indicator,
html:not(.dark) #new-task-date::-webkit-calendar-picker-indicator {
  filter: brightness(0) !important;
  opacity: 0.7 !important;
  cursor: pointer !important;
}

/* Card Modal: Modern Trello-Style Horizontal Layout */
.card-modal-container {
  max-width: 1100px !important;
  width: 95vw !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.card-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(241, 245, 249, 0.9);
  color: #334155;
  border: 1px solid rgba(226, 232, 240, 0.9);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.card-action-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}
html.dark .card-action-pill {
  background: rgba(30, 41, 59, 0.7);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
html.dark .card-action-pill:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
}

/* Card Floating Dock */
.card-floating-dock {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  z-index: 20;
}
html.dark .card-floating-dock {
  background: rgba(15, 23, 42, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Drag and Drop Glowing Overlay */
.card-dropzone-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  border-radius: 1rem;
  background: rgba(79, 70, 229, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px dashed #ffffff;
  color: #ffffff;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
  animation: pulse-dropzone 1.5s infinite;
}
@keyframes pulse-dropzone {
  0%, 100% { opacity: 0.96; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.005); }
}

/* Multi-Checklist Progress Bars & Groups */
.checklist-progress-bar {
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Kanban horizontal panoramic stretch & centering */
#kanban-board-container {
  width: 100% !important;
  max-width: 100% !important;
}

.kanban-columns-track {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  justify-content: safe center;
}

@supports not (justify-content: safe center) {
  .kanban-columns-track {
    justify-content: flex-start;
  }
}

.kanban-column {
  width: 18rem;
  border-radius: 1.25rem;
  transition: all 0.2s ease-in-out;
}

.kanban-cards-container {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 40px;
}

/* Ensure no vertical page scroll when inside board view */
#view-boards {
  width: 100%;
}

/* Full overlay date picker: allows clicking anywhere on the date badge to immediately trigger the native calendar */
.date-picker-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}
.date-picker-overlay::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

/* ========================================================= */
/* PRINT STYLES (PDF & PRINT OPTIMIZATIONS) */
/* ========================================================= */
@media print {
  header,
  #header,
  nav,
  aside,
  #sidebar,
  .sidebar,
  #toast-container,
  #floating-action-btn,
  .no-print,
  button:not(.allow-print),
  .view-tab-btn,
  .board-nav-controls {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 8mm !important;
    font-size: 11pt !important;
  }

  #main-content,
  #views-container,
  #dashboard-view-container,
  #workspace-activity-modal {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }

  table {
    width: 100% !important;
    page-break-inside: auto !important;
    border-collapse: collapse !important;
  }

  tr {
    page-break-inside: avoid !important;
    page-break-after: auto !important;
  }

  th, td {
    word-break: break-word !important;
    overflow: visible !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }
}
