/* Reset & Base Variables */
:root {
  --bg-app: #1d2125;
  --bg-sidebar: #181b1f;
  --bg-topbar: #1d2125;
  --bg-list: #101204;
  --bg-list-surface: #16181d;
  --bg-card: #22272b;
  --bg-card-hover: #282e33;
  --bg-modal: #22272b;
  --bg-popover: #282e33;
  --bg-input: #181b1f;
  --bg-button: #282e33;
  --bg-button-hover: #333a41;
  --bg-button-active: #3b444c;
  
  --text-main: #b6c2cf;
  --text-heading: #ffffff;
  --text-muted: #8c9bab;
  --text-subtle: #626f86;
  
  --accent-blue: #0c66e4;
  --accent-blue-hover: #0055cc;
  --accent-blue-subtle: #1c2b42;
  --accent-purple: #8b5cf6;
  --accent-green: #1f845a;
  --accent-red: #e34935;
  --accent-amber: #e2b203;

  --border-subtle: #2c333a;
  --border-focus: #388bff;
  --border-card: #282e33;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-card: 0 1px 1px rgba(9, 30, 66, 0.35), 0 0 1px rgba(9, 30, 66, 0.45);
  --shadow-modal: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.1);
  --shadow-dock: 0 8px 30px rgba(0, 0, 0, 0.7);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, "Helvetica Neue", sans-serif;
  --topbar-height: 48px;
  --sidebar-width: 250px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

button:active {
  transform: scale(0.98);
}

a {
  color: #579dff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* App Shell Layout */
#app-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   Top Navigation Bar (Screenshot 2 & 3)
   ========================================================================== */
.top-nav {
  height: var(--topbar-height);
  background-color: var(--bg-topbar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 100;
  gap: 12px;
  flex-shrink: 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-heading);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.brand-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.brand-logo-icon {
  width: 22px;
  height: 22px;
  background: #0055cc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 3px;
}

.brand-logo-bar-1 {
  width: 4px;
  height: 14px;
  background: #ffffff;
  border-radius: 1px;
}

.brand-logo-bar-2 {
  width: 4px;
  height: 9px;
  background: #ffffff;
  border-radius: 1px;
}

.global-search-container {
  position: relative;
  width: 320px;
}

.global-search-input {
  width: 100%;
  height: 32px;
  background: #22272b;
  border: 1px solid #333940;
  border-radius: var(--radius-sm);
  padding: 0 32px 0 34px;
  color: var(--text-heading);
  font-size: 13px;
  transition: all 0.2s ease;
}

.global-search-input:focus {
  background: #181b1f;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-focus);
}

.search-icon-left {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.nav-create-btn {
  height: 32px;
  padding: 0 14px;
  background: var(--accent-blue);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.nav-create-btn:hover {
  background: var(--accent-blue-hover);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-plan-badge {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  position: relative;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-heading);
}

.badge-counter {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e34935;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #d97706;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Main Shell Layout (Sidebar + Content View)
   ========================================================================== */
.main-shell {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Left Collapsible Sidebar (Screenshot 3) */
.left-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  flex-shrink: 0;
  transition: width 0.25s ease, transform 0.25s ease;
  overflow-y: auto;
  z-index: 50;
}

.left-sidebar.collapsed {
  width: 0;
  padding: 0;
  border-right: none;
  overflow: hidden;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 24px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-heading);
}

.sidebar-nav-item.active {
  background: rgba(12, 102, 228, 0.18);
  color: #579dff;
  font-weight: 600;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-subtle);
  margin: 12px 12px 6px 12px;
}

.workspace-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-bottom: 4px;
}

.workspace-accordion-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.workspace-badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #16a34a;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workspace-name-text {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-heading);
  flex: 1;
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-sub-items {
  margin-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ==========================================================================
   Content Viewport
   ========================================================================== */
.content-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-app);
}

/* Dashboard / Home View (Screenshot 3) */
.dashboard-view {
  flex: 1;
  overflow-y: auto;
  padding: 32px 48px 80px 48px;
}

.dashboard-container {
  max-width: 1180px;
  margin: 0 auto;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 18px;
}

/* Templates Carousel / Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.template-card {
  height: 120px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.template-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.template-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Boards Grid */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.board-card-tile {
  height: 110px;
  border-radius: var(--radius-md);
  position: relative;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.board-card-tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.board-tile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.board-tile-title {
  position: relative;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.board-tile-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}

.board-star-btn {
  color: rgba(255, 255, 255, 0.6);
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.board-star-btn:hover, .board-star-btn.starred {
  color: #e2b203;
  transform: scale(1.15);
}

.board-delete-btn {
  color: rgba(255, 255, 255, 0.45);
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.board-delete-btn:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.15);
}

.create-board-tile {
  height: 110px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.create-board-tile:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--text-heading);
}

/* ==========================================================================
   Kanban Board View (Screenshot 2)
   ========================================================================== */
.board-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.board-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Board Header */
.board-header {
  height: 52px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  color: #ffffff;
}

.board-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.board-title-editable {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
}

.board-title-editable:hover {
  background: rgba(255, 255, 255, 0.15);
}

.board-view-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13px;
  color: #ffffff;
}

.board-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-members-stack {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.board-member-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid #1d2125;
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
}

.board-member-avatar:first-child {
  margin-left: 0;
}

.share-board-btn {
  height: 32px;
  padding: 0 12px;
  background: #ffffff;
  color: #172b4d;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.share-board-btn:hover {
  background: #ebecf0;
}

/* Kanban Main Container (Horizontally Scrollable) */
.kanban-canvas-wrapper {
  flex: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px;
  gap: 16px;
  position: relative;
  z-index: 5;
}

/* Kanban List Column */
.kanban-list {
  width: 280px;
  min-width: 280px;
  max-height: calc(100vh - 180px);
  background-color: var(--bg-list-surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.kanban-list-header {
  padding: 10px 12px 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
}

.list-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.list-title-text {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-heading);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.list-title-text:hover {
  background: rgba(255, 255, 255, 0.08);
}

.list-cards-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.list-menu-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Cards Stack */
.kanban-cards-container {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 20px;
}

/* Task Card (Screenshot 1 & 2) */
.task-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.task-card:hover {
  background-color: var(--bg-card-hover);
  border-color: #388bff;
}

.task-card.dragging {
  opacity: 0.4;
  transform: rotate(2deg) scale(0.98);
}

.card-quick-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(30, 35, 42, 0.85);
  color: var(--text-muted);
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  z-index: 5;
  transition: all 0.15s ease;
  padding: 0;
}

.card-quick-delete-btn:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  transform: scale(1.08);
}

.task-card:hover .card-quick-delete-btn {
  display: inline-flex;
}

.task-card-cover {
  height: 32px;
  border-radius: 4px 4px 0 0;
  margin: -10px -12px 6px -12px;
}

.task-card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.label-pill {
  height: 18px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.2px;
}

.task-card-title {
  color: var(--text-heading);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}

.task-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.card-badge-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-badge-item.completed {
  color: #1f845a;
}

.card-badge-item.overdue {
  color: #e34935;
  font-weight: 600;
}

.card-assignees-stack {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.card-assignee-avatar {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg-card);
  margin-left: -4px;
}

/* Card Add Button in List */
.kanban-list-footer {
  padding: 6px 8px 10px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.add-card-btn {
  flex: 1;
  height: 32px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 500;
  font-size: 13.5px;
  justify-content: flex-start;
  padding-left: 8px;
}

.add-card-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-heading);
}

.add-card-input-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
}

.add-card-textarea {
  width: 100%;
  min-height: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 8px;
  color: var(--text-heading);
  font-size: 13.5px;
  resize: vertical;
}

.add-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
}

.btn-ghost {
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-heading);
}

/* Add Another List Tile */
.add-list-tile {
  width: 280px;
  min-width: 280px;
  height: 48px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-list-tile:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* Drop Indicator Line */
.drop-indicator {
  height: 4px;
  background: #388bff;
  border-radius: 2px;
  margin: 2px 0;
  box-shadow: 0 0 8px rgba(56, 139, 255, 0.8);
  pointer-events: none;
}

/* ==========================================================================
   Bottom Floating Dock (Screenshot 2)
   ========================================================================== */
.bottom-dock-container {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  background: rgba(22, 24, 29, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-dock);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  gap: 4px;
}

.dock-item-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-weight: 500;
  font-size: 13.5px;
  position: relative;
  transition: all 0.15s ease;
}

.dock-item-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-heading);
}

.dock-item-btn.active {
  color: #ffffff;
  font-weight: 600;
}

.dock-item-btn.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: #388bff;
  border-radius: 2px;
}

/* ==========================================================================
   Left Inbox Drawer (Screenshot 2)
   ========================================================================== */
.inbox-drawer {
  width: 290px;
  background: #141824;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 70;
  position: relative;
  flex-shrink: 0;
  transition: margin-left 0.25s ease;
}

.inbox-drawer.hidden {
  margin-left: -290px;
}

.inbox-drawer-header {
  height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.inbox-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.inbox-cards-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbox-add-box {
  padding: 0 12px 12px 12px;
}

.inbox-add-input {
  width: 100%;
  height: 36px;
  background: #1d2232;
  border: 1px solid #2e354b;
  border-radius: var(--radius-md);
  padding: 0 12px;
  color: #ffffff;
  font-size: 13.5px;
}

.inbox-bottom-promo {
  height: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Task Detail Modal (Screenshot 1)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}

.task-modal-container {
  width: 860px;
  max-width: 96vw;
  background-color: var(--bg-modal);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  margin-bottom: 40px;
}

.task-modal-header-banner {
  padding: 14px 20px 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

.modal-location-badge:hover {
  background: rgba(255, 255, 255, 0.15);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-modal-title-row {
  padding: 4px 20px 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-modal-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.task-modal-checkbox.checked {
  background: #1f845a;
  border-color: #1f845a;
  color: #ffffff;
}

.task-modal-title-input {
  flex: 1;
  background: transparent;
  color: var(--text-heading);
  font-size: 22px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.task-modal-title-input:focus {
  background: var(--bg-input);
  border-color: var(--border-focus);
}

/* Quick Action Buttons Row (Screenshot 1) */
.task-modal-action-row {
  padding: 0 20px 16px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

.action-pill-btn {
  height: 32px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-heading);
  font-weight: 500;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.action-pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Add to card Popover (Screenshot 1) */
.popover-menu {
  position: absolute;
  top: 42px;
  left: 20px;
  width: 280px;
  background: #282e33;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 250;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-heading);
}

.popover-option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}

.popover-option-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.popover-option-title {
  color: var(--text-heading);
  font-weight: 600;
  font-size: 13.5px;
}

.popover-option-desc {
  color: var(--text-muted);
  font-size: 11.5px;
}

/* Modal Body (2-Column Grid: Left Content, Right Comments) */
.task-modal-body-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 400px;
}

.task-modal-left-column {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.task-section-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-heading);
  font-weight: 600;
  font-size: 14px;
}

.task-section-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Description Editor */
.description-text-view {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  min-height: 64px;
  cursor: pointer;
  white-space: pre-wrap;
  word-break: break-word;
}

.description-text-view:hover {
  background: rgba(0, 0, 0, 0.35);
}

.description-textarea {
  width: 100%;
  min-height: 100px;
  background: var(--bg-input);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-heading);
  font-size: 13.5px;
  resize: vertical;
}

/* Checklist Items */
.checklist-progress-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.checklist-progress-fill {
  height: 100%;
  background: #1f845a;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.checklist-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.checklist-item-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.checklist-item-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1.5px solid var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checklist-item-checkbox.checked {
  background: #1f845a;
  border-color: #1f845a;
  color: #ffffff;
}

.checklist-item-text {
  flex: 1;
  color: var(--text-heading);
  font-size: 13.5px;
}

.checklist-item-text.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Right Panel: Comments and Activity (Screenshot 1) */
.task-modal-right-column {
  background: #1e2227;
  display: flex;
  flex-direction: column;
}

.comments-panel-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comments-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-heading);
}

.comment-input-area {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comment-textarea {
  width: 100%;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-heading);
  font-size: 13.5px;
  resize: vertical;
}

.comment-textarea:focus {
  height: 80px;
  border-color: var(--border-focus);
}

.activity-feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 10px;
  font-size: 13px;
}

.activity-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-author-line {
  color: var(--text-heading);
  font-weight: 600;
}

.activity-timestamp {
  color: var(--text-subtle);
  font-size: 11.5px;
}

.comment-bubble {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-top: 4px;
  color: var(--text-heading);
  word-break: break-word;
}

/* Modal Bottom Tabs (Screenshot 1: Power-ups, Automations, Comments) */
.task-modal-bottom-bar {
  height: 46px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #181b1f;
}

.bottom-tab-pill {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
}

.bottom-tab-pill.active {
  background: rgba(12, 102, 228, 0.2);
  color: #579dff;
  font-weight: 600;
}

#bottom-bar-delete-card-btn:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
}

/* ==========================================================================
   Planner / Calendar View
   ========================================================================== */
.calendar-view-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.calendar-month-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  flex: 1;
}

.calendar-day-header {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-bottom: 6px;
}

.calendar-day-cell {
  background: #22272b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  min-height: 110px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-day-cell.today {
  border-color: #388bff;
}

.calendar-day-number {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
}

.calendar-task-pill {
  background: #2c333a;
  border-left: 3px solid #0c66e4;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.calendar-task-pill:hover {
  background: #38414a;
}

/* ==========================================================================
   Dropdowns & Modals Shared
   ========================================================================== */
.dropdown-menu {
  position: absolute;
  top: 48px;
  right: 14px;
  width: 260px;
  background: #22272b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  z-index: 150;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  cursor: pointer;
  font-size: 13.5px;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-heading);
}

.dropdown-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* Notification Panel */
.notifications-panel {
  width: 340px;
  max-height: 480px;
  overflow-y: auto;
}

.notif-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.notif-item.unread {
  background: rgba(12, 102, 228, 0.12);
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .left-sidebar {
    position: absolute;
    height: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  }
  .task-modal-body-grid {
    grid-template-columns: 1fr;
  }
  .task-modal-right-column {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

