/* Antimeta Web Dashboard - Modern Dark Glass Theme */
:root {
  color-scheme: dark;
  --bg-primary: #0f1115;
  --bg-secondary: #161922;
  --bg-card: rgba(26, 30, 42, 0.7);
  --bg-card-hover: rgba(35, 40, 58, 0.85);
  --bg-card-solid: #1c202d;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #5865f2;
  --text-main: #f0f2f5;
  --text-muted: #949ba4;
  --accent-blurple: #5865f2;
  --accent-blurple-hover: #4752c4;
  --accent-green: #23a55a;
  --accent-red: #da373c;
  --accent-gold: #f0b232;
  --accent-orange: #f26522;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 250px;
  --tasks-header-height: 138px;
  --bottom-nav-height: 60px;
  --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

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

html, body {
  color-scheme: dark;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Glassmorphism helpers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.solid-panel {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

/* Typography & Badges */
h1, h2, h3, h4 {
  font-weight: 600;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-active { background: rgba(35, 165, 90, 0.2); color: #3ba55d; border: 1px solid rgba(35, 165, 90, 0.4); }
.badge-paused { background: rgba(240, 178, 50, 0.2); color: #faa61a; border: 1px solid rgba(240, 178, 50, 0.4); }
.badge-channel { background: rgba(88, 101, 242, 0.15); color: #7983f5; border: 1px solid rgba(88, 101, 242, 0.3); }
.badge-urgent { background: rgba(218, 55, 60, 0.2); color: #f04747; border: 1px solid rgba(218, 55, 60, 0.4); }
.badge-high { background: rgba(242, 101, 34, 0.2); color: #f26522; border: 1px solid rgba(242, 101, 34, 0.4); }
.badge-normal { background: rgba(255, 255, 255, 0.08); color: #b9bbbe; }
.badge-low { background: rgba(148, 155, 164, 0.12); color: #949ba4; border: 1px solid rgba(148, 155, 164, 0.25); }
.badge-very_low { background: rgba(148, 155, 164, 0.07); color: #72767d; }
.badge-crunch { background: rgba(218, 55, 60, 0.25); color: #ff5c5c; border: 1px solid #da373c; }
.badge-busy { background: rgba(240, 178, 50, 0.2); color: #faa61a; border: 1px solid rgba(240, 178, 50, 0.4); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-secondary { background: rgba(255, 255, 255, 0.07); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

.btn-success { background: var(--accent-green); color: #fff; }
.btn-success:hover { background: #1f9450; }

.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { background: #c03135; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); border: none; cursor: pointer; }
.btn-icon:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-main); }

/* Form Elements */
input, select, textarea, button {
  color-scheme: dark;
}

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: rgba(15, 17, 21, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, background-color 0.2s;
  color-scheme: dark;
}

textarea {
  resize: vertical;
  min-height: 64px;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23949ba4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  padding-right: 28px !important;
  cursor: pointer;
  color-scheme: dark;
}

select::-ms-expand {
  display: none;
}

select[data-task-assignee-select] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='none' stroke='%23949ba4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 6px center !important;
  padding-right: 18px !important;
}

select option {
  background-color: #161922 !important;
  color: #f0f2f5 !important;
  padding: 8px 12px;
  font-size: 0.88rem;
  color-scheme: dark;
}

select option:checked,
select option:hover {
  background-color: #2b3142 !important;
  color: #ffffff !important;
}

/* Checkbox & Radio - Consistent Dark Glass Theme (Image 2 & 3) */
input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  background-color: #181b24 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  position: relative !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  color-scheme: dark !important;
}

input[type="checkbox"]:hover {
  background-color: #222736 !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

input[type="checkbox"]:focus-visible {
  outline: none !important;
  border-color: var(--accent-blurple) !important;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.4) !important;
}

input[type="checkbox"]:checked {
  background-color: var(--accent-blurple) !important;
  border-color: var(--accent-blurple) !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 11px 11px !important;
  box-shadow: 0 2px 6px rgba(88, 101, 242, 0.35) !important;
}

input[type="checkbox"]:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

input[type="radio"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  background-color: #181b24 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  color-scheme: dark !important;
}

input[type="radio"]:hover {
  background-color: #222736 !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

input[type="radio"]:focus-visible {
  outline: none !important;
  border-color: var(--accent-blurple) !important;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.4) !important;
}

input[type="radio"]:checked {
  background-color: var(--accent-blurple) !important;
  border-color: var(--accent-blurple) !important;
  background-image: radial-gradient(circle, #fff 35%, transparent 40%) !important;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* App Header */
.top-nav {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(22, 25, 34, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Hide Top Navigation Bar User Preference */
body.hide-top-nav #top-nav {
  display: none !important;
}

body.hide-top-nav .sidebar {
  height: 100vh !important;
  top: 0 !important;
}

body.hide-top-nav .workspace-content {
  max-height: 100vh !important;
}

.sidebar-user-footer {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.hide-top-nav .sidebar-user-footer {
  display: flex !important;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.nav-brand-logo-full {
  height: 28px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-brand-logo-compact {
  height: 26px;
  width: auto;
  object-fit: contain;
  display: none;
}

.nav-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsive / Collapsed Logo Switching */
.sidebar.collapsed .sidebar-logo-full,
.sidebar-compact .sidebar-logo-full {
  display: none !important;
}
.sidebar.collapsed .sidebar-logo-compact,
.sidebar-compact .sidebar-logo-compact {
  display: block !important;
}

@media (max-width: 360px) {
  .sidebar-logo-full {
    display: none !important;
  }
  .sidebar-logo-compact {
    display: block !important;
  }
}

/* Immediate Visual Feedback for Task Deletion */
.is-deleting {
  opacity: 0.35 !important;
  pointer-events: none !important;
  filter: grayscale(0.5);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.spinner-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinner-rotate 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* Kanban Add Column Card & Column Delete Button */
.kanban-add-column-col {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.kanban-add-column-btn {
  width: 100%;
  min-height: 110px;
  background: rgba(22, 25, 34, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 24px 16px;
  box-sizing: border-box;
}

.kanban-add-column-btn:hover {
  background: rgba(88, 101, 242, 0.08);
  border-color: rgba(88, 101, 242, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.kanban-add-column-btn .add-col-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.kanban-add-column-btn:hover .add-col-icon {
  transform: scale(1.15);
  color: var(--accent-blurple);
}

.kanban-add-column-btn .add-col-text {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-col-delete {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  transition: all 0.15s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-col-delete:hover {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.14) !important;
}


.user-badge img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* Top Nav Workspace Header (Image 2 top bar.png) */
.top-nav-workspace-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.top-nav-workspace-left .guild-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.top-nav-workspace-left .guild-title-area img,
.top-nav-workspace-left .guild-title-area .server-icon-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.top-nav-workspace-left .guild-info-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.top-nav-workspace-left .guild-name-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-nav-workspace-left .guild-meta-sub {
  font-size: 0.74rem;
  color: #8a8f98;
  margin: 2px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-nav-view-role-btn {
  margin-left: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.top-nav-workspace-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.top-nav-admin-badge {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  font-weight: 800 !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.5px !important;
  padding: 3px 8px !important;
  border-radius: 12px !important;
  text-transform: uppercase;
}

/* Views Container */
#app-root {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Login View */
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.login-card .logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(88, 101, 242, 0.15);
  border: 2px solid var(--accent-blurple);
  font-size: 2.5rem;
}

.login-features {
  text-align: left;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-features li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-features li svg {
  color: var(--accent-blurple);
  flex-shrink: 0;
}

/* Server Selector View */
.servers-container {
  max-width: 1200px;
  width: 100%;
  margin: 40px auto;
  padding: 0 24px;
}

.servers-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  width: 100%;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.server-card {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.server-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.server-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-card-info img, .server-icon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #2b2d31;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
}

/* Guild Workspace Layout */
.workspace-layout {
  display: flex;
  flex: 1;
}

.sidebar {
  width: 250px;
  min-width: 250px;
  border-right: 1px solid var(--border-color);
  background: #111318;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
  box-sizing: border-box;
  height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
  overflow: hidden;
  z-index: 50;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.22s cubic-bezier(0.16, 1, 0.3, 1), padding 0.22s ease, opacity 0.18s ease;
}

body.hide-top-nav .sidebar {
  top: 0;
  height: 100vh;
}

body.sidebar-collapsed .sidebar {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 16px 0 !important;
  border-right: none !important;
  overflow: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  height: 48px;
  min-height: 48px;
  box-sizing: border-box;
}

.sidebar-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  max-width: 175px;
}

.sidebar-logo-full {
  height: 28px;
  max-width: 170px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-logo-compact {
  height: 26px;
  width: auto;
  object-fit: contain;
  display: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-brand-link:hover .sidebar-logo-full,
.sidebar-brand-link:hover .sidebar-logo-compact {
  opacity: 0.9;
  transform: scale(1.02);
}

.sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #949ba4;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-collapse-btn svg,
.sidebar-expand-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sidebar-close-btn {
  display: none;
}

.sidebar-brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-blurple);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
}

.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  margin-right: -2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-scrollable::-webkit-scrollbar {
  width: 4px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-heading {
  font-size: 0.74rem;
  font-weight: 700;
  color: #8a8f98;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 12px 0 6px 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-heading .btn-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: #8a8f98;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 4px;
}

.sidebar-heading .btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-collapsible-heading {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.sidebar-collapsible-heading:hover {
  color: #cbd5e1;
}

.sidebar-collapsible-heading:hover .sidebar-chevron {
  color: #fff;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav.collapsed {
  display: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #9ba1ad;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.sidebar-item.active {
  background: #5865f2;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.25);
}

/* Sidebar Sheet Sync Widget */
.sidebar-sync-widget {
  margin-top: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.78rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.sidebar-sync-widget:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-sync-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  flex-shrink: 0;
}

.sidebar-sync-dot.unsynced {
  background: #64748b;
  box-shadow: none;
}

.sidebar-sync-dot.error {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.sidebar-sync-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-sync-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.sidebar-sync-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

.sidebar-sync-btn svg,
.sidebar-sync-cog svg {
  width: 14px;
  height: 14px;
  display: block;
}

.sidebar-sync-btn.is-spinning svg {
  animation: spin 1s linear infinite;
}

.sidebar-sync-cog {
  background: transparent;
  border: none;
  color: #9ba1ad;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
  font-size: 0.85rem;
}

.sidebar-sync-cog:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Sidebar Wide Add Button */
.sidebar-add-task-btn {
  width: 100%;
  height: 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #9ba1ad;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 16px;
}

.sidebar-add-task-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Sidebar Board Group-By Pill (Image 1 wwww.png) */
.sidebar-board-groupby {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 16px;
}

.sidebar-groupby-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ba1ad;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  user-select: none;
}

.sidebar-groupby-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-groupby-btn.active {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

/* Sidebar Project Tree */
.sidebar-project-group {
  margin-bottom: 6px;
}

.sidebar-project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #9ba1ad;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.15s ease;
  user-select: none;
}

.sidebar-project-header:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.sidebar-project-header.active {
  color: #fff;
  font-weight: 700;
}

.sidebar-project-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  color: #64748b;
  transition: transform 0.2s ease, color 0.15s ease;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sidebar-project-header:hover .sidebar-chevron {
  color: #cbd5e1;
}

.sidebar-project-group.collapsed .sidebar-chevron,
.sidebar-chevron.collapsed {
  transform: rotate(-90deg);
}

.sidebar-project-sections {
  position: relative;
  margin-left: 14px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 3px;
  margin-bottom: 8px;
}

.sidebar-project-group.collapsed .sidebar-project-sections {
  display: none;
}

.sidebar-section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  color: #9ba1ad;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s ease;
  user-select: none;
}

.sidebar-section-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.sidebar-section-item.active {
  background: rgba(88, 101, 242, 0.2);
  color: #fff;
  font-weight: 600;
}

.sidebar-section-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sidebar-section-count {
  font-size: 0.74rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 20px;
  text-align: right;
  margin-left: 8px;
  flex-shrink: 0;
}

.sidebar-section-item.active .sidebar-section-count {
  color: #93c5fd;
}

/* Sidebar Bottom Action */
.sidebar-bottom {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: auto;
}

.sidebar-switch-server {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #8a8f98;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.sidebar-switch-server:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.workspace-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
  min-width: 0;
  min-height: 0;
}

body.hide-top-nav .workspace-content {
  height: 100vh !important;
  max-height: 100vh !important;
}

.workspace-content.is-tasks-tab {
  overflow: hidden !important;
}

.workspace-header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(22, 25, 34, 0.5);
}

.guild-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guild-title-area img, .guild-title-area .server-icon-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.workspace-body {
  padding: 24px 32px;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.workspace-body.is-tasks-tab {
  padding: 16px 24px 0 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

/* Module Action Bars */
.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-filters select, .toolbar-filters input {
  width: auto;
  min-width: 140px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsive / Collapsed Logo Switching */
.sidebar.collapsed .sidebar-logo-full,
.sidebar-compact .sidebar-logo-full {
  display: none !important;
}
.sidebar.collapsed .sidebar-logo-compact,
.sidebar-compact .sidebar-logo-compact {
  display: block !important;
}

@media (max-width: 360px) {
  .sidebar-logo-full {
    display: none !important;
  }
  .sidebar-logo-compact {
    display: block !important;
  }
}

/* Immediate Visual Feedback for Task Deletion */
.is-deleting {
  opacity: 0.35 !important;
  pointer-events: none !important;
  filter: grayscale(0.5);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.spinner-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinner-rotate 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* Kanban Add Column Card & Column Delete Button */
.kanban-add-column-col {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.kanban-add-column-btn {
  width: 100%;
  min-height: 110px;
  background: rgba(22, 25, 34, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 24px 16px;
  box-sizing: border-box;
}

.kanban-add-column-btn:hover {
  background: rgba(88, 101, 242, 0.08);
  border-color: rgba(88, 101, 242, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.kanban-add-column-btn .add-col-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.kanban-add-column-btn:hover .add-col-icon {
  transform: scale(1.15);
  color: var(--accent-blurple);
}

.kanban-add-column-btn .add-col-text {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-col-delete {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  transition: all 0.15s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-col-delete:hover {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.14) !important;
}


/* Reminders Cards Grid */
.reminders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.reminder-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.reminder-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reminder-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-dialog {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  background: #181b24;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Form Groups */
.form-group {
  margin-bottom: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-group textarea {
  resize: vertical;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tasks Compact Toolbar & View Switcher */
.tasks-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(22, 25, 34, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.tasks-toolbar input, .tasks-toolbar select {
  height: 36px;
  padding: 6px 10px;
  font-size: 0.85rem;
  width: auto;
}

.view-toggle-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-toggle-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.view-toggle-btn.active {
  background: var(--accent-blurple);
  color: #fff;
}

/* Spreadsheet Sync Banner */
.sheet-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 0.88rem;
  gap: 12px;
  flex-wrap: wrap;
}

/* High-Density Spreadsheet Table */
.sheet-table-container {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: rgba(18, 21, 29, 0.85);
  backdrop-filter: blur(12px);
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.sheet-table th {
  background: rgba(15, 17, 23, 0.95);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 20;
  white-space: nowrap;
}

.sheet-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.sheet-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

/* Source & Category Badges */
.tag-sheet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  letter-spacing: 0.4px;
}

.tag-local {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(35, 165, 90, 0.15);
  color: #4ade80;
  border: 1px solid rgba(35, 165, 90, 0.35);
  letter-spacing: 0.4px;
}

.type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.type-feature { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.type-ui { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.type-data { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.type-asset { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.type-balancing { background: rgba(168, 85, 247, 0.16); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
.type-rule { background: rgba(236, 72, 153, 0.16); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.35); }
.type-polish { background: rgba(56, 189, 248, 0.16); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.type-default { background: rgba(255, 255, 255, 0.08); color: #949ba4; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.status-pill-done { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.45); }
.status-pill-halfdone { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.45); }
.status-pill-inprogress { background: rgba(234, 179, 8, 0.2); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.45); }
.status-pill-needreview { background: rgba(139, 92, 246, 0.22); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.5); }
.status-pill-blocked { background: rgba(239, 68, 68, 0.22); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); }
.status-pill-research { background: rgba(192, 132, 252, 0.18); color: #e9d5ff; border: 1px solid rgba(192, 132, 252, 0.45); }
.status-pill-open { background: rgba(255, 255, 255, 0.07); color: #949ba4; border: 1px solid rgba(255, 255, 255, 0.15); }

/* Interactive Status Select Pill (Image 1) */
select.status-select-pill {
  appearance: none;
  -webkit-appearance: none;
  padding: 3px 22px 3px 10px !important;
  height: 26px !important;
  min-height: 26px !important;
  width: auto !important;
  border-radius: 9999px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  color-scheme: dark !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 7px center !important;
  transition: transform 0.12s ease, filter 0.12s ease;
}

select.status-select-pill:hover {
  filter: brightness(1.12);
}

select.status-select-pill option {
  background-color: #181b24 !important;
  color: #f0f2f5 !important;
  font-weight: 500;
  padding: 6px 12px !important;
  color-scheme: dark !important;
}

select.status-select-pill option:checked,
select.status-select-pill option:hover {
  background-color: #2b3142 !important;
  color: #ffffff !important;
}

/* Kanban & Tasks styling - Cleaned without clipping */
.kanban-board {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  gap: 16px;
  overflow: visible;
  padding: 4px 4px 20px 4px;
  width: max-content;
  min-width: 100%;
}

.kanban-col {
  flex: 0 0 310px;
  min-width: 310px;
  max-width: 310px;
  background: rgba(22, 25, 34, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Responsive / Collapsed Logo Switching */
.sidebar.collapsed .sidebar-logo-full,
.sidebar-compact .sidebar-logo-full {
  display: none !important;
}
.sidebar.collapsed .sidebar-logo-compact,
.sidebar-compact .sidebar-logo-compact {
  display: block !important;
}

@media (max-width: 360px) {
  .sidebar-logo-full {
    display: none !important;
  }
  .sidebar-logo-compact {
    display: block !important;
  }
}

/* Immediate Visual Feedback for Task Deletion */
.is-deleting {
  opacity: 0.35 !important;
  pointer-events: none !important;
  filter: grayscale(0.5);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.spinner-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinner-rotate 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* Kanban Add Column Card & Column Delete Button */
.kanban-add-column-col {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.kanban-add-column-btn {
  width: 100%;
  min-height: 110px;
  background: rgba(22, 25, 34, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 24px 16px;
  box-sizing: border-box;
}

.kanban-add-column-btn:hover {
  background: rgba(88, 101, 242, 0.08);
  border-color: rgba(88, 101, 242, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.kanban-add-column-btn .add-col-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.kanban-add-column-btn:hover .add-col-icon {
  transform: scale(1.15);
  color: var(--accent-blurple);
}

.kanban-add-column-btn .add-col-text {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-col-delete {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  transition: all 0.15s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-col-delete:hover {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.14) !important;
}


/* --- Kanban Column Header & Reordering --- */
.kanban-col-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #161922;
  margin: -14px -14px 0 -14px;
  padding: 12px 14px 10px 14px;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  gap: 8px;
  cursor: grab;
}

.kanban-col-header:active {
  cursor: grabbing;
}

.kanban-col-header-info {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.kanban-col-drag-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.45;
  cursor: grab;
  padding: 2px;
  border-radius: 3px;
  transition: opacity 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.kanban-col-header:hover .kanban-col-drag-grip,
.sidebar-project-header:hover .kanban-col-drag-grip {
  opacity: 0.9;
  color: var(--text-secondary);
}

.sidebar-project-header.active .kanban-col-drag-grip {
  opacity: 0.8;
  color: var(--text-secondary);
}

.kanban-col-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-col-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.kanban-col-header:hover .kanban-col-actions,
.kanban-col-header:focus-within .kanban-col-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.btn-col-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-col-move:hover:not(:disabled) {
  background: var(--accent-blurple);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
}

.btn-col-move:active:not(:disabled) {
  transform: translateY(0);
}

.btn-col-move:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* Column Dragging and Drop Placeholder */
.kanban-col.is-col-dragging {
  opacity: 0.3 !important;
  border-style: dashed !important;
  border-color: rgba(88, 101, 242, 0.5) !important;
  transform: scale(0.98);
}

.kanban-col-drag-clone {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  width: 310px;
  background: rgba(24, 27, 38, 0.95);
  border: 1px solid var(--accent-blurple);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(88, 101, 242, 0.4);
  transform: rotate(1.5deg);
  opacity: 0.95;
  transition: transform 0.05s ease;
}

.kanban-col-drop-indicator {
  flex: 0 0 6px;
  width: 6px;
  min-width: 6px;
  background: var(--accent-blurple);
  border-radius: 4px;
  box-shadow: 0 0 14px var(--accent-blurple);
  align-self: stretch;
  margin: 0 6px;
  animation: pulse-drop-indicator 1.2s infinite ease-in-out;
}

@keyframes pulse-drop-indicator {
  0%, 100% { opacity: 0.6; transform: scaleY(0.98); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Sidebar Project Drag and Drop */
.sidebar-project-header .kanban-col-drag-grip {
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.sidebar-project-header .kanban-col-drag-grip:active {
  cursor: grabbing;
}

.sidebar-project-drag-clone {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  background: #181b26;
  border: 1px solid var(--accent-blurple);
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 14px rgba(88, 101, 242, 0.4);
  transform: rotate(1deg);
  opacity: 0.95;
  box-sizing: border-box;
}

.sidebar-project-drag-clone .sidebar-project-header {
  padding: 0;
  background: transparent;
  color: #fff;
}

.sidebar-project-drop-indicator {
  height: 3px;
  width: 100%;
  background: var(--accent-blurple);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--accent-blurple);
  margin: 4px 0;
  animation: pulse-drop-indicator 1.2s infinite ease-in-out;
}

.sidebar-project-group.is-project-dragging {
  opacity: 0.35;
}

body.is-project-reordering {
  user-select: none !important;
  cursor: grabbing !important;
}

body.is-project-reordering * {
  cursor: grabbing !important;
}

/* --- Kanban Column Add Split Button --- */
.kanban-col-add-wrap {
  position: relative;
  width: 100%;
  height: 34px;
  margin-top: 4px;
  margin-bottom: 2px;
  border-radius: 8px;
  user-select: none;
}

.kanban-add-idle-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #949ba4;
  font-size: 1.15rem;
  font-weight: 400;
  cursor: pointer;
  transition: opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1), transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s, border-color 0.15s, color 0.15s;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.kanban-add-idle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f2f3f5;
}

.kanban-add-split-btns {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 0.24s cubic-bezier(0.4, 0, 0.2, 1), transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
}

.kanban-col-add-wrap:hover .kanban-add-idle-btn,
.kanban-col-add-wrap:focus-within .kanban-add-idle-btn,
.kanban-col-add-wrap.is-expanded .kanban-add-idle-btn {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.kanban-col-add-wrap:hover .kanban-add-split-btns,
.kanban-col-add-wrap:focus-within .kanban-add-split-btns,
.kanban-col-add-wrap.is-expanded .kanban-add-split-btns {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.kanban-add-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 100%;
  border-radius: 8px;
  font-size: 0.73rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  padding: 0 6px;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.kanban-add-action-btn .btn-prefix {
  opacity: 0.75;
  font-size: 0.72rem;
  font-weight: 600;
}

.kanban-add-action-btn.btn-sheet {
  background: rgba(35, 165, 90, 0.08);
  border: 1px solid rgba(35, 165, 90, 0.32);
  color: #4ade80;
}

.kanban-add-action-btn.btn-sheet:hover {
  background: rgba(35, 165, 90, 0.2);
  border-color: rgba(35, 165, 90, 0.65);
  color: #fff;
  transform: translateY(-1px);
}

.kanban-add-action-btn.btn-db {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.32);
  color: #a5b4fc;
}

.kanban-add-action-btn.btn-db:hover {
  background: rgba(88, 101, 242, 0.2);
  border-color: rgba(88, 101, 242, 0.65);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Task Destination Toggle In Modal --- */
.dest-toggle-group {
  display: flex;
  gap: 8px;
}

.dest-pill-btn {
  flex: 1;
  padding: 9px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dest-pill-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dest-pill-btn.active#dest-btn-spreadsheet {
  background: rgba(35, 165, 90, 0.16);
  border-color: rgba(35, 165, 90, 0.65);
  color: #4ade80;
  font-weight: 600;
}

.dest-pill-btn.active#dest-btn-database {
  background: rgba(88, 101, 242, 0.16);
  border-color: rgba(88, 101, 242, 0.65);
  color: #818cf8;
  font-weight: 600;
}

.dest-pill-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.task-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(35, 40, 58, 0.6);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.task-item:hover {
  transform: translateY(-1px);
  background: rgba(45, 52, 75, 0.8);
}

/* --- Kanban Drag & Drop SaaS Experience --- */
body.is-kanban-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

body.is-kanban-dragging * {
  cursor: grabbing !important;
}

.kanban-col {
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.kanban-col.kanban-col-drag-over {
  border-color: rgba(88, 101, 242, 0.65) !important;
  background: rgba(30, 34, 50, 0.9) !important;
  box-shadow: inset 0 0 0 1px rgba(88, 101, 242, 0.35), 0 0 20px rgba(88, 101, 242, 0.18) !important;
}

.kanban-col-cards {
  position: relative;
  transition: min-height 0.15s ease;
  flex: 1;
}

.kanban-col .task-item {
  cursor: grab;
  touch-action: none;
}

.kanban-col .task-item:active {
  cursor: grabbing;
}

.task-item.is-card-dragged {
  opacity: 0.22 !important;
  filter: grayscale(70%) !important;
  border: 1px dashed rgba(255, 255, 255, 0.25) !important;
  transform: scale(0.98);
  pointer-events: none;
}

.kanban-drag-avatar {
  position: fixed !important;
  pointer-events: none !important;
  z-index: 999999 !important;
  opacity: 0.96 !important;
  transform-origin: center center;
  transform: rotate(2.5deg) scale(1.025);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(88, 101, 242, 0.55), 0 0 24px rgba(88, 101, 242, 0.25) !important;
  border-radius: var(--radius-sm) !important;
  background: rgba(35, 40, 58, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(88, 101, 242, 0.7) !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transition: transform 0.08s ease;
}

.kanban-drop-placeholder {
  border-radius: var(--radius-sm);
  border: 2px dashed rgba(88, 101, 242, 0.55);
  background: rgba(88, 101, 242, 0.08);
  margin: 0;
  pointer-events: none;
  box-sizing: border-box;
  animation: kanbanPlaceholderPulse 1.4s infinite ease-in-out;
}

@keyframes kanbanPlaceholderPulse {
  0%, 100% {
    border-color: rgba(88, 101, 242, 0.4);
    background: rgba(88, 101, 242, 0.06);
  }
  50% {
    border-color: rgba(88, 101, 242, 0.8);
    background: rgba(88, 101, 242, 0.15);
  }
}

/* PM Analytics */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  padding: 20px;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-blurple);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Mobile & Component Navigation Helpers */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.sidebar-close-btn {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

/* Modal action row for responsive inputs & buttons */
.modal-input-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.modal-input-action-row input {
  flex: 1;
  min-width: 0;
}

.modal-input-action-row button {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Mobile table swipe hint */
.mobile-table-hint {
  display: none;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: rgba(88, 101, 242, 0.12);
  border: 1px dashed rgba(88, 101, 242, 0.35);
  color: #a5b4fc;
  font-size: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

/* Mobile Task Cards List */
.task-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.mobile-task-card {
  background: rgba(22, 25, 34, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mobile-task-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(28, 32, 45, 0.85);
}

.mobile-task-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-task-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  line-height: 1.4;
}

.mobile-task-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.mobile-task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

/* Toast container */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: #232836;
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.2s ease;
}

.toast-success { border-left: 4px solid var(--accent-green); }
.toast-error { border-left: 4px solid var(--accent-red); }

@keyframes slideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS (<= 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Navigation & Header */
  .mobile-menu-toggle {
    display: inline-flex;
  }

  .nav-user span#user-display-name {
    display: none; /* Keep avatar and logout compact on small screens */
  }

  .nav-brand-logo-full {
    display: none !important;
  }

  .nav-brand-logo-compact {
    display: block !important;
  }

  :root {
    --sidebar-width: 0px;
  }

  .top-nav {
    padding: 0 14px;
    height: 56px;
  }

  .tasks-sticky-header {
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px 0;
    padding: 0 0 6px 0;
    box-sizing: border-box;
  }

  .workspace-layout {
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }

  /* Off-canvas mobile sidebar drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 82vw;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.85);
  }

  body.sidebar-collapsed .sidebar {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 82vw !important;
    padding: 16px 12px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar-collapse-btn {
    display: none !important;
  }

  .sidebar-expand-btn {
    display: none !important;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
  }

  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
  }

  .sidebar-backdrop {
    display: block;
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(18, 21, 29, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    z-index: 90;
    justify-content: space-around;
    align-items: center;
    padding: 0 6px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
  }

  .bottom-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .bottom-nav-item.active {
    color: var(--accent-blurple);
  }

  /* Workspace viewport */
  .workspace-content {
    width: 100%;
    min-width: 0;
    max-height: none;
    overflow-y: visible;
  }

  .workspace-content.is-tasks-tab {
    height: calc(100vh - 56px - var(--bottom-nav-height, 60px)) !important;
    max-height: calc(100vh - 56px - var(--bottom-nav-height, 60px)) !important;
    overflow: hidden !important;
  }

  body.hide-top-nav .workspace-content.is-tasks-tab {
    height: calc(100vh - var(--bottom-nav-height, 60px)) !important;
    max-height: calc(100vh - var(--bottom-nav-height, 60px)) !important;
  }

  .workspace-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .workspace-body {
    padding: 14px 12px 84px 12px; /* Bottom padding keeps content clear of mobile bottom bar */
    width: 100%;
    min-width: 0;
  }

  .workspace-body.is-tasks-tab {
    padding: 12px 12px 0 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Toolbars */
  .module-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }

  .toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .toolbar-actions .btn {
    flex: 1;
    min-height: 42px;
  }

  /* Sheet Sync Bar */
  .sheet-sync-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .sheet-sync-bar > div {
    width: 100%;
  }

  .sheet-sync-bar .btn {
    width: 100%;
    min-height: 40px;
  }

  /* Tasks Filter & Command Bar */
  .tasks-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .tasks-toolbar input[type="text"],
  .tasks-search-input {
    width: 100% !important;
    min-height: 42px;
    font-size: 16px; /* Prevents iOS auto-zoom */
  }

  .tasks-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .tasks-filter-grid select,
  .tasks-toolbar select {
    width: 100% !important;
    min-width: 0;
    min-height: 40px;
    font-size: 15px;
  }

  .tasks-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  .view-toggle-group {
    display: flex;
    flex: 1;
  }

  .view-toggle-btn {
    flex: 1;
    min-height: 38px;
    padding: 6px 8px;
    font-size: 0.8rem;
    text-align: center;
  }

  /* Table View on Mobile */
  .mobile-table-hint {
    display: flex;
  }

  .sheet-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }

  .sheet-table {
    min-width: 760px;
  }

  /* Kanban Snap Scroll on Mobile */
  .kanban-board {
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 20px;
    width: 100%;
  }

  .kanban-col {
    flex: 0 0 85vw;
    min-width: 85vw;
    max-width: 85vw;
    scroll-snap-align: center;
  }

  /* Modals */
  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    padding: 20px 16px;
    border-radius: 16px 16px 0 0;
  }

  .modal-dialog input:not([type="checkbox"]):not([type="radio"]),
  .modal-dialog select,
  .modal-dialog textarea {
    font-size: 16px !important; /* Prevents iOS auto-zoom on input focus */
    min-height: 44px;
  }

  .modal-input-action-row {
    flex-direction: column;
    gap: 8px;
  }

  .modal-input-action-row button {
    width: 100%;
    min-height: 42px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 8px;
  }

  .modal-footer button {
    width: 100%;
    min-height: 44px;
  }

  /* Server grid & Login */
  .servers-container {
    padding: 0 16px;
    margin: 20px auto 80px auto;
  }

  .servers-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .search-bar {
    max-width: 100%;
  }

  .server-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .login-card {
    padding: 28px 18px;
  }

  /* Toast notification on mobile */
  #toast-container {
    bottom: 74px; /* Above mobile bottom bar */
    right: 16px;
    left: 16px;
  }

  /* Mobile Bulk Floating Bar */
  .tasks-bulk-bar {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 10px);
    left: 10px;
    right: 10px;
    top: auto;
    z-index: 150;
    padding: 10px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.65);
  }

  .tasks-bulk-info {
    justify-content: space-between;
  }

  .tasks-bulk-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .tasks-bulk-actions select,
  .tasks-bulk-actions .btn {
    width: 100%;
    font-size: 0.8rem;
    height: 36px;
    padding: 2px 6px;
  }
}

/* ----------------- Tasks Bulk Actions & Selection (Global) ----------------- */
.tasks-bulk-bar {
  position: relative;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  background: rgba(22, 27, 38, 0.96);
  border: 1px solid var(--accent-blurple);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 16px rgba(88, 101, 242, 0.25);
  backdrop-filter: blur(14px);
  margin-top: 8px;
  margin-bottom: 6px;
  animation: bulkBarSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

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

.tasks-bulk-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.tasks-bulk-count {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 500;
}

.tasks-bulk-count strong {
  color: #818cf8;
  font-size: 0.95rem;
}

.tasks-bulk-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex: 1;
  justify-content: flex-end;
  overflow-x: auto;
  scrollbar-width: none;
}

.tasks-bulk-actions::-webkit-scrollbar {
  display: none;
}

.tasks-bulk-actions select {
  width: auto !important;
  min-width: 95px;
  max-width: 130px;
  height: 30px;
  font-size: 0.78rem;
  padding: 2px 22px 2px 8px !important;
  background-color: rgba(15, 17, 23, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}

.tasks-bulk-actions select:focus {
  border-color: var(--accent-blurple);
}

.tasks-bulk-actions .btn {
  height: 30px;
  white-space: nowrap;
  font-size: 0.78rem;
  padding: 2px 10px;
  flex: 0 0 auto;
}

.sheet-table tr.selected-row td {
  background: rgba(88, 101, 242, 0.16) !important;
  border-bottom-color: rgba(88, 101, 242, 0.35) !important;
}

.mobile-task-card.selected-card {
  border-color: var(--accent-blurple) !important;
  background: rgba(88, 101, 242, 0.12) !important;
  box-shadow: 0 0 0 1px var(--accent-blurple), 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.task-item.selected-item {
  border-color: var(--accent-blurple) !important;
  background: rgba(88, 101, 242, 0.15) !important;
  box-shadow: 0 0 0 1px var(--accent-blurple) !important;
}

/* ----------------- Tasks Selection / Editing Mode Visibility ----------------- */
.task-select-col,
.task-select-cell,
.task-select-checkbox-wrap {
  display: none !important;
}

.selection-mode-active .task-select-checkbox-wrap {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  animation: taskSelectFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.selection-mode-active th.task-select-col,
.selection-mode-active td.task-select-cell {
  display: table-cell !important;
  animation: taskSelectFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes taskSelectFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.65);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Prevent native long-press text selection / callout menu */
.mobile-task-card,
.task-item,
.sheet-table tbody tr {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

/* Tactile visual press feedback when holding */
.mobile-task-card.task-pressing,
.task-item.task-pressing,
.sheet-table tbody tr.task-pressing {
  transform: scale(0.985);
  border-color: rgba(99, 102, 241, 0.7) !important;
  background: rgba(99, 102, 241, 0.1) !important;
}

.selection-mode-active .mobile-task-card,
.selection-mode-active .task-item,
.selection-mode-active .sheet-table tbody tr {
  cursor: pointer;
}

/* ============================================================================
   LOW-COGNITIVE-LOAD UNIFIED WORKSPACE & PROGRESSIVE DISCLOSURE UI
   ============================================================================ */

/* 1. Unified Workspace Header (Project Switcher + Compact Sync Pill + Primary CTA) */
.tasks-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tasks-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 240px;
}

.tasks-project-select {
  width: auto;
  min-width: 220px;
  max-width: 340px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 8px 34px 8px 12px;
}

.sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
}

.sync-status-pill.connected {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
  color: #d1fae5;
}

.sync-status-pill.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.sync-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
  flex-shrink: 0;
}

.sync-status-pill.connected .sync-pill-dot {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.sync-status-pill.error .sync-pill-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.sync-pill-action {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sync-pill-action:hover {
  background: rgba(255, 255, 255, 0.18);
}

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

/* Tasks Sticky Header Container (Image 2) */
.tasks-tab-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.tasks-sticky-header {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background-color: var(--bg-primary);
  padding: 0 0 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
  position: relative;
  z-index: 30;
}

#tasks-viewport-container {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  box-sizing: border-box;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

#tasks-viewport-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#tasks-viewport-container::-webkit-scrollbar-track {
  background: transparent;
}

#tasks-viewport-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

#tasks-viewport-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.tasks-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

/* 2. 1-Click Horizontal Status Segment Bar */
.status-segment-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
}

.status-segment-bar::-webkit-scrollbar {
  display: none;
}

.status-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(22, 25, 34, 0.75);
  border: 1px solid var(--border-color);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.status-segment-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.status-segment-btn.active {
  color: #fff;
  background: rgba(88, 101, 242, 0.2);
  border-color: var(--accent-blurple);
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.2);
}

.status-segment-count {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 700;
}

.status-segment-btn.active .status-segment-count {
  background: var(--accent-blurple);
  color: #fff;
}

/* 3. Streamlined Command Bar Row & Command Bar */
.tasks-command-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 0;
  box-sizing: border-box;
}

.sidebar-expand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #949ba4;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.sidebar-expand-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

body.sidebar-collapsed .sidebar-expand-btn {
  display: inline-flex;
}

.tasks-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 6px 12px;
  min-height: 48px;
  height: auto;
  box-sizing: border-box;
  flex: 1;
  max-width: 100%;
}

.command-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
}

.command-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

.command-search-wrap input,
.command-search-wrap input[type="text"] {
  width: 100%;
  height: 34px;
  padding: 0 30px 0 38px !important;
  font-size: 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.command-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
}

.command-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-toggle-btn svg {
  width: 17px;
  height: 17px;
  display: block;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.has-filters,
.filter-toggle-btn.active {
  color: #fff;
  border-color: var(--accent-blurple);
  background: rgba(88, 101, 242, 0.14);
}

.filter-badge-count {
  background: var(--accent-blurple);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

/* 4. Collapsible Filter Drawer & Active Filter Chips */
.tasks-filter-drawer {
  background: rgba(22, 25, 34, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  animation: fadeIn 0.15s ease;
}

.filter-drawer-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-drawer-group label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0;
}

.filter-drawer-group select {
  padding: 6px 26px 6px 10px;
  font-size: 0.8rem;
  background-color: var(--bg-input);
}

.active-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(88, 101, 242, 0.14);
  border: 1px solid rgba(88, 101, 242, 0.35);
  color: #c7d2fe;
}

.filter-chip button {
  background: none;
  border: none;
  color: #c7d2fe;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 2px;
  line-height: 1;
}

.filter-chip button:hover {
  color: #fff;
}

/* 5. Sheet Sync Modal Step 3 Clean Tab Selection Cards */
.sheet-tabs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.sheet-tab-option {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  margin: 0 !important;
  transition: all 0.14s ease;
  user-select: none;
}

.sheet-tab-option:hover {
  background: rgba(88, 101, 242, 0.1);
  border-color: rgba(88, 101, 242, 0.35);
}

.sheet-tab-option input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

.sheet-tab-option span {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 6. Kanban Group-By Switcher Bar */
.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(22, 25, 34, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.kanban-group-pills {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.kanban-group-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kanban-group-btn.active {
  background: var(--accent-blurple);
  color: #fff;
}

/* 7. PM Hub Visual Capacity Bars */
.pm-status-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  margin-top: 6px;
}

.pm-status-bar-seg {
  height: 100%;
  transition: width 0.25s ease;
}

/* 8. Mobile Overrides Placed LAST to Guarantee Cascade Priority */
@media (max-width: 768px) {
  .tasks-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tasks-header-left {
    width: 100%;
    justify-content: space-between;
  }

  .tasks-project-select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }

  .tasks-header-right {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .tasks-command-bar {
    flex-direction: column;
    align-items: stretch;
    height: auto !important;
    min-height: auto !important;
    gap: 10px;
    padding: 10px;
  }

  .command-search-wrap {
    min-width: 0;
    width: 100%;
  }

  .command-actions-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
  }

  .command-actions-right .view-toggle-group {
    flex: 0 0 auto;
    display: inline-flex;
  }

  .command-actions-right .view-toggle-btn {
    flex: 0 0 auto;
    min-height: 32px;
    height: 32px;
    width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .command-actions-right .filter-toggle-btn {
    height: 32px;
    padding: 0 8px;
    flex: 0 0 auto;
  }

  .tasks-subheader {
    margin-top: 14px;
    margin-bottom: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .tasks-filter-drawer {
    grid-template-columns: 1fr 1fr;
  }

  /* Ensure mobile bulk bar always docks above bottom nav bar */
  .tasks-bulk-bar {
    position: fixed !important;
    bottom: calc(var(--bottom-nav-height, 60px) + 10px) !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    z-index: 160 !important;
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.75), 0 0 16px rgba(88, 101, 242, 0.35) !important;
  }

  .tasks-bulk-actions {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .tasks-bulk-actions select,
  .tasks-bulk-actions .btn {
    width: 100% !important;
    height: 36px !important;
  }
}

/* ==========================================================================
   Discord-Style "View Server as Role" Top Banner
   ========================================================================== */
.view-as-role-banner {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: #4752c4;
  background: linear-gradient(90deg, #3c45a5 0%, #5865f2 100%);
  color: #ffffff;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  animation: varSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes varSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.var-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.var-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.var-btn-back {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.var-btn-back:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.var-label {
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.var-label strong {
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.22);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.var-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.var-select-wrap {
  display: flex;
  align-items: center;
}

.var-select {
  height: 28px;
  padding: 2px 24px 2px 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.var-select:hover, .var-select:focus {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
}

.var-select option {
  background: #2b2d31;
  color: #ffffff;
}

.var-btn-disable {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  border-radius: 4px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.var-btn-disable:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: transparent;
  transform: translateY(-1px);
}

.badge-view-role {
  background: rgba(88, 101, 242, 0.22) !important;
  color: #a5b4fc !important;
  border: 1px solid rgba(88, 101, 242, 0.45) !important;
  font-weight: 600 !important;
}

.var-preview-notice {
  background: rgba(88, 101, 242, 0.12);
  border: 1px dashed rgba(88, 101, 242, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Responsive / Collapsed Logo Switching */
.sidebar.collapsed .sidebar-logo-full,
.sidebar-compact .sidebar-logo-full {
  display: none !important;
}
.sidebar.collapsed .sidebar-logo-compact,
.sidebar-compact .sidebar-logo-compact {
  display: block !important;
}

@media (max-width: 360px) {
  .sidebar-logo-full {
    display: none !important;
  }
  .sidebar-logo-compact {
    display: block !important;
  }
}

/* Immediate Visual Feedback for Task Deletion */
.is-deleting {
  opacity: 0.35 !important;
  pointer-events: none !important;
  filter: grayscale(0.5);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.spinner-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinner-rotate 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* Kanban Add Column Card & Column Delete Button */
.kanban-add-column-col {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.kanban-add-column-btn {
  width: 100%;
  min-height: 110px;
  background: rgba(22, 25, 34, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 24px 16px;
  box-sizing: border-box;
}

.kanban-add-column-btn:hover {
  background: rgba(88, 101, 242, 0.08);
  border-color: rgba(88, 101, 242, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.kanban-add-column-btn .add-col-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.kanban-add-column-btn:hover .add-col-icon {
  transform: scale(1.15);
  color: var(--accent-blurple);
}

.kanban-add-column-btn .add-col-text {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-col-delete {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  transition: all 0.15s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-col-delete:hover {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.14) !important;
}



