/**
 * trello.css
 * Pixel-Perfect Atlassian Trello Stylesheet
 */

:root {
  /* Atlassian / Trello Color Palette */
  --ds-background-neutral: #ebecf0;
  --ds-background-neutral-hovered: #091e4214;
  --ds-background-neutral-pressed: #091e4224;
  --ds-surface: #ffffff;
  --ds-surface-hovered: #f4f5f7;
  --ds-surface-overlay: #ffffff;
  --ds-surface-sunken: #f4f5f7;
  
  --ds-text: #172b4d;
  --ds-text-subtle: #5e6c84;
  --ds-text-subtlest: #6b778c;
  --ds-text-inverse: #ffffff;
  
  --ds-border: #dfe1e6;
  --ds-border-focused: #0052cc;
  
  --trello-blue: #0079bf;
  --trello-blue-dark: #026aa7;
  --trello-btn-primary: #0052cc;
  --trello-btn-primary-hover: #0065ff;
  --trello-btn-danger: #b04632;
  --trello-btn-danger-hover: #eb5a46;
  --trello-btn-success: #61bd4f;
  
  --board-header-height: 48px;
  --app-header-height: 48px;
  --list-width: 272px;
  
  --radius-sm: 3px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --shadow-card: 0 1px 1px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);
  --shadow-card-hover: 0 2px 4px rgba(9, 30, 66, 0.25), 0 0 2px rgba(9, 30, 66, 0.31);
  --shadow-list: 0 1px 1px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --shadow-popover: 0 8px 16px -4px rgba(9, 30, 66, 0.25), 0 0 0 1px rgba(9, 30, 66, 0.08);
  --shadow-modal: 0 12px 32px -4px rgba(9, 30, 66, 0.35), 0 0 0 1px rgba(9, 30, 66, 0.1);
  
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Noto Sans', 'Ubuntu', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* Dark Theme Support */
[data-theme="dark"] {
  --ds-background-neutral: #101204;
  --ds-background-neutral-hovered: rgba(255, 255, 255, 0.1);
  --ds-background-neutral-pressed: rgba(255, 255, 255, 0.2);
  --ds-surface: #22272b;
  --ds-surface-hovered: #282e33;
  --ds-surface-overlay: #282e33;
  --ds-surface-sunken: #1d2125;
  
  --ds-text: #b6c2cf;
  --ds-text-subtle: #9fadbc;
  --ds-text-subtlest: #8c9bab;
  --ds-text-inverse: #172b4d;
  
  --ds-border: #333c43;
  --ds-border-focused: #579dff;
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.5), 0 0 1px rgba(0, 0, 0, 0.6);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 20px;
  color: var(--ds-text);
  background-color: #0079bf;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  font-size: 14px;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background-color 0.12s ease;
}

input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  outline: none;
  border: 1px solid var(--ds-border);
  border-radius: var(--radius-sm);
  background: var(--ds-surface);
  color: var(--ds-text);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--ds-border-focused);
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

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

/* =========================================================
   1. GLOBAL HEADER
   ========================================================= */
.global-header {
  height: var(--app-header-height);
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: #ffffff;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  user-select: none;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trello-logo-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
  border-radius: var(--radius-sm);
  background: transparent;
}

.trello-logo-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.trello-icon-box {
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px;
}

.trello-icon-col-1 {
  width: 6px;
  height: 14px;
  background: #0079bf;
  border-radius: 2px;
}
.trello-icon-col-2 {
  width: 6px;
  height: 9px;
  background: #0079bf;
  border-radius: 2px;
  margin-top: -5px;
}

.header-nav-btn {
  color: #ffffff;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  gap: 4px;
  background: transparent;
}

.header-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-create-header {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  gap: 6px;
}

.btn-create-header:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Header Search */
.header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-wrap svg {
  position: absolute;
  left: 8px;
  color: #ffffff;
  pointer-events: none;
}

.header-search-input {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 6px 10px 6px 30px;
  border-radius: var(--radius-sm);
  width: 180px;
  transition: width 0.2s ease, background 0.2s ease;
}

.header-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.header-search-input:focus {
  width: 250px;
  background: #ffffff;
  color: #172b4d;
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.3);
}

.header-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0052cc;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

/* =========================================================
   2. MAIN WRAPPER (SIDEBAR + BOARD)
   ========================================================= */
.main-wrapper {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--app-header-height));
  position: relative;
  overflow: hidden;
}

/* Left Sidebar */
.left-sidebar {
  width: 260px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
  z-index: 40;
  user-select: none;
  flex-shrink: 0;
}

.left-sidebar.collapsed {
  width: 16px;
  overflow: hidden;
}

.left-sidebar.collapsed .sidebar-content {
  opacity: 0;
  pointer-events: none;
}

.sidebar-collapse-btn {
  position: absolute;
  top: 10px;
  right: -12px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  color: #172b4d;
  border-radius: 50%;
  box-shadow: var(--shadow-card);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-collapse-btn:hover {
  background: #f4f5f7;
}

.sidebar-content {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  transition: opacity 0.15s ease;
}

.sidebar-workspace-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.workspace-badge {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ff5630, #ffab00);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  font-size: 16px;
}

.workspace-info {
  display: flex;
  flex-direction: column;
}

.workspace-title {
  font-weight: 600;
  font-size: 14px;
}

.workspace-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

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

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  width: 100%;
  justify-content: flex-start;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-nav-item.active {
  background: rgba(255, 255, 255, 0.28);
  font-weight: 600;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-top: 8px;
}

.board-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #ffffff;
}

.board-nav-item:hover {
  background: rgba(255, 255, 255, 0.18);
}

.board-nav-item.active {
  background: rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.board-nav-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.board-thumb-mini {
  width: 20px;
  height: 16px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* =========================================================
   3. BOARD CANVAS & BOARD HEADER
   ========================================================= */
.board-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background 0.3s ease;
}

/* Board Header */
.board-header {
  height: var(--board-header-height);
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: #ffffff;
  user-select: none;
  z-index: 20;
}

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

.board-title-input {
  background: transparent;
  border: 1px solid transparent;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-width: 160px;
  max-width: 500px;
}

.board-title-input:hover {
  background: rgba(255, 255, 255, 0.2);
}

.board-title-input:focus {
  background: #ffffff;
  color: #172b4d;
  border-color: var(--ds-border-focused);
  cursor: text;
}

.board-header-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  gap: 6px;
}

.board-header-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.board-header-btn.is-starred {
  color: #f2d600;
}

.board-members-group {
  display: flex;
  align-items: center;
  margin-left: 6px;
}

.member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  border: 2px solid #ffffff;
  margin-left: -6px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
}

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

/* Board Canvas (Horizontal scrollable lists) */
.board-canvas {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  user-select: none;
}

/* Custom Scrollbars */
.board-canvas::-webkit-scrollbar {
  height: 12px;
}
.board-canvas::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}
.board-canvas::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 6px;
}
.board-canvas::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   4. LIST COMPONENT
   ========================================================= */
.list-wrapper {
  width: var(--list-width);
  flex-shrink: 0;
  max-height: calc(100vh - var(--app-header-height) - var(--board-header-height) - 24px);
  display: flex;
  flex-direction: column;
  background-color: var(--ds-background-neutral);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-list);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.list-wrapper.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.list-wrapper.drag-placeholder {
  background: rgba(0, 0, 0, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

/* List Header */
.list-header {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  position: relative;
}

.list-title-input {
  font-weight: 600;
  font-size: 14px;
  color: var(--ds-text);
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  width: calc(100% - 32px);
  cursor: pointer;
}

.list-title-input:focus {
  background: var(--ds-surface);
  border-color: var(--ds-border-focused);
  cursor: text;
}

.list-actions-btn {
  width: 28px;
  height: 28px;
  color: var(--ds-text-subtle);
  border-radius: var(--radius-sm);
}

.list-actions-btn:hover {
  background: var(--ds-background-neutral-hovered);
  color: var(--ds-text);
}

/* List Cards Scroll Area */
.list-cards {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 10px;
}

.list-cards::-webkit-scrollbar {
  width: 6px;
}
.list-cards::-webkit-scrollbar-thumb {
  background: rgba(9, 30, 66, 0.2);
  border-radius: 3px;
}

/* =========================================================
   5. CARD COMPONENT
   ========================================================= */
.card-item {
  background-color: var(--ds-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color 0.1s ease, box-shadow 0.1s ease, transform 0.1s ease;
  user-select: none;
}

.card-item:hover {
  background-color: var(--ds-surface-hovered);
  box-shadow: var(--shadow-card-hover);
}

.card-item.dragging {
  opacity: 0.6;
  transform: rotate(3deg);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card-item.drag-placeholder {
  background-color: rgba(9, 30, 66, 0.08);
  border: 2px dashed rgba(9, 30, 66, 0.25);
  box-shadow: none;
  border-radius: var(--radius-md);
}

/* Card Cover */
.card-cover-photo {
  height: 140px;
  background-size: cover;
  background-position: center;
  width: 100%;
}

.card-cover-color {
  height: 34px;
  width: 100%;
}

.card-cover-full {
  padding: 30px 12px 12px 12px;
  color: #ffffff !important;
  font-weight: 600;
}

.card-cover-full .card-title {
  color: #ffffff !important;
  font-size: 15px;
}

/* Card Body */
.card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Card Labels Bar */
.card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.card-label-badge {
  height: 16px;
  border-radius: 4px;
  min-width: 40px;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  padding: 0 6px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  transition: filter 0.1s ease;
}

.show-label-text .card-label-badge {
  height: 20px;
  line-height: 20px;
}

.card-label-badge:hover {
  filter: brightness(0.9);
}

.card-title {
  font-size: 14px;
  line-height: 20px;
  color: var(--ds-text);
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Card Badges Row */
.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  color: var(--ds-text-subtle);
  font-size: 12px;
}

.card-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* Due Date Badge */
.due-badge {
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.due-badge.due-complete {
  background-color: #61bd4f;
  color: #ffffff;
}

.due-badge.due-overdue {
  background-color: #ec9488;
  color: #b04632;
}

.due-badge.due-soon {
  background-color: #f2d600;
  color: #172b4d;
}

.due-badge-checkbox {
  cursor: pointer;
  margin-right: 2px;
}

/* Checklist Badge */
.checklist-badge.is-complete {
  background-color: #61bd4f;
  color: #ffffff;
}

/* Card Members */
.card-members-row {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.card-members-row .member-avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
  border: 1px solid var(--ds-surface);
}

/* Card Stickers */
.card-stickers-row {
  display: flex;
  gap: 4px;
  font-size: 20px;
  margin-top: 2px;
}

/* Card Quick Edit Button */
.card-quick-edit-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: rgba(244, 245, 247, 0.9);
  color: var(--ds-text-subtle);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.card-item:hover .card-quick-edit-btn {
  display: flex;
}

/* Add Card Composer (List Footer) */
.list-footer {
  padding: 6px 8px 8px 8px;
}

.btn-open-add-card {
  width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  color: var(--ds-text-subtle);
  justify-content: flex-start;
  gap: 6px;
  font-weight: 500;
}

.btn-open-add-card:hover {
  background: var(--ds-background-neutral-hovered);
  color: var(--ds-text);
}

.card-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-composer-textarea {
  width: 100%;
  min-height: 64px;
  padding: 8px;
  resize: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: none;
}

.card-composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-add-card-confirm {
  background: var(--trello-btn-primary);
  color: #ffffff;
  padding: 6px 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-add-card-confirm:hover {
  background: var(--trello-btn-primary-hover);
}

.btn-composer-cancel {
  width: 32px;
  height: 32px;
  color: var(--ds-text-subtle);
  border-radius: var(--radius-sm);
}

.btn-composer-cancel:hover {
  background: var(--ds-background-neutral-hovered);
  color: var(--ds-text);
}

/* Add Another List Box */
.add-list-wrapper {
  width: var(--list-width);
  flex-shrink: 0;
}

.btn-open-add-list {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  border-radius: var(--radius-lg);
  font-weight: 600;
  justify-content: flex-start;
  gap: 8px;
}

.btn-open-add-list:hover {
  background: rgba(255, 255, 255, 0.35);
}

.add-list-composer {
  background: var(--ds-background-neutral);
  padding: 8px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-list);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-list-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

/* =========================================================
   6. CARD DETAIL MODAL (FULL TRELLO EXPERIENCE)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  z-index: 100;
  overflow-y: auto;
  backdrop-filter: blur(2px);
}

.modal-backdrop.open {
  display: flex;
}

.card-modal {
  background: var(--ds-surface-sunken);
  width: 768px;
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.15s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: var(--ds-text);
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.16);
}

/* Modal Cover Header */
.modal-cover-banner {
  height: 160px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
}

.btn-cover-change {
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  padding: 6px 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  gap: 6px;
}

.btn-cover-change:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Modal Header */
.modal-header {
  padding: 20px 24px 8px 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-header-icon {
  margin-top: 4px;
  color: var(--ds-text);
}

.modal-title-area {
  flex: 1;
}

.modal-card-title-input {
  font-size: 20px;
  font-weight: 700;
  color: var(--ds-text);
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  width: 100%;
  resize: none;
  line-height: 24px;
}

.modal-card-title-input:focus {
  background: var(--ds-surface);
  border-color: var(--ds-border-focused);
}

.modal-subtitle {
  font-size: 14px;
  color: var(--ds-text-subtle);
  padding-left: 8px;
  margin-top: 2px;
}

.modal-subtitle a {
  color: var(--ds-text);
  text-decoration: underline;
  cursor: pointer;
}

/* Modal Content Grid */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
  padding: 16px 24px 32px 24px;
}

@media (max-width: 680px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}

/* Modal Main Left Column */
.modal-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Quick Properties (Members, Labels, Due Date pills) */
.modal-properties {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.property-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.property-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ds-text-subtle);
}

.property-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.property-btn-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ds-background-neutral);
  color: var(--ds-text);
}

.property-btn-add:hover {
  background: var(--ds-background-neutral-hovered);
}

/* Section Header Generic */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ds-text);
}

/* Description Editor */
.description-box {
  background: var(--ds-surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 60px;
  cursor: pointer;
  border: 1px solid transparent;
}

.description-box:hover {
  background: var(--ds-surface-hovered);
}

.description-box.empty {
  background: var(--ds-background-neutral-hovered);
  color: var(--ds-text-subtle);
  font-weight: 500;
}

.description-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.description-textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px;
  border-radius: var(--radius-sm);
  line-height: 20px;
}

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

/* Checklists */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-progress-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-pct {
  font-size: 12px;
  color: var(--ds-text-subtle);
  width: 32px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: var(--ds-background-neutral-hovered);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #0079bf;
  border-radius: 4px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.progress-fill.complete {
  background: #61bd4f;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.1s ease;
}

.checklist-item:hover {
  background: var(--ds-background-neutral-hovered);
}

.checklist-checkbox {
  margin-top: 3px;
  cursor: pointer;
}

.checklist-item-text {
  flex: 1;
  font-size: 14px;
  color: var(--ds-text);
  word-break: break-word;
}

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

.btn-delete-item {
  opacity: 0;
  color: var(--ds-text-subtle);
}

.checklist-item:hover .btn-delete-item {
  opacity: 1;
}

/* Attachments */
.attachment-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.attachment-card:hover {
  background: var(--ds-background-neutral-hovered);
}

.attachment-thumb {
  width: 80px;
  height: 60px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  background-color: var(--ds-background-neutral);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ds-text-subtle);
  flex-shrink: 0;
}

.attachment-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attachment-name {
  font-weight: 600;
  color: var(--ds-text);
  text-decoration: none;
}

.attachment-meta {
  font-size: 12px;
  color: var(--ds-text-subtle);
  display: flex;
  gap: 8px;
}

.attachment-action-link {
  text-decoration: underline;
  cursor: pointer;
  color: var(--ds-text-subtle);
}

.attachment-action-link:hover {
  color: var(--ds-text);
}

/* Comments & Activity */
.comment-input-box {
  background: var(--ds-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-textarea {
  width: 100%;
  min-height: 48px;
  border: none;
  resize: none;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.activity-bubble {
  flex: 1;
  background: var(--ds-surface);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: var(--shadow-card);
  font-size: 14px;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ds-text-subtle);
  margin-bottom: 4px;
}

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

/* Modal Right Sidebar (Tools & Actions) */
.modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-action-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-action-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ds-text-subtle);
}

.modal-action-btn {
  background: var(--ds-background-neutral);
  color: var(--ds-text);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
}

.modal-action-btn:hover {
  background: var(--ds-background-neutral-hovered);
}

.modal-action-btn.danger {
  color: var(--trello-btn-danger);
}

.modal-action-btn.danger:hover {
  background: #ffebe6;
}

/* =========================================================
   7. POPUP POPOVERS (MEMBERS, LABELS, DATES, COVERS, ETC.)
   ========================================================= */
.popover {
  position: absolute;
  width: 304px;
  background: var(--ds-surface-overlay);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popover);
  z-index: 150;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  animation: popoverFade 0.1s ease-out;
}

.popover.open {
  display: flex;
}

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

.popover-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ds-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.popover-title {
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  flex: 1;
  color: var(--ds-text);
}

.popover-close-btn {
  width: 24px;
  height: 24px;
  color: var(--ds-text-subtle);
}

.popover-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

/* Label Picker Popover */
.labels-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-color-bar {
  flex: 1;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.1s ease;
}

.label-color-bar:hover {
  filter: brightness(0.92);
}

/* Date Picker Popover */
.date-picker-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ds-text-subtle);
}

/* =========================================================
   8. BOARD RIGHT DRAWER MENU ("SHOW MENU")
   ========================================================= */
.board-menu-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  background: var(--ds-surface-overlay);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
  z-index: 60;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.board-menu-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  height: var(--board-header-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--ds-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--ds-text);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ds-text);
  font-weight: 500;
  width: 100%;
}

.drawer-nav-btn:hover {
  background: var(--ds-background-neutral-hovered);
}

/* Background Picker Grid */
.bg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.bg-thumb-card {
  height: 80px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 2px solid transparent;
  display: flex;
  align-items: flex-end;
  padding: 6px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  transition: transform 0.1s ease;
}

.bg-thumb-card:hover {
  transform: scale(1.03);
}

.bg-thumb-card.active {
  border-color: var(--ds-border-focused);
}

/* Stickers Grid */
.stickers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sticker-item {
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: grab;
  transition: transform 0.15s ease;
}

.sticker-item:hover {
  transform: scale(1.2) rotate(6deg);
  background: var(--ds-background-neutral-hovered);
}

/* Notification & Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}

.toast {
  background: #172b4d;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-popover);
  font-size: 14px;
  animation: toastSlide 0.2s ease-out;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   12. WORKSPACE MANAGEMENT VIEWS (BOARDS, MEMBERS, SETTINGS)
   ========================================================= */
.workspace-view-container {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  background-color: var(--ds-surface);
  color: var(--ds-text);
  display: flex;
  flex-direction: column;
}

.ws-view-inner {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 36px 24px 60px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Workspace Header Card */
.ws-header-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 4px;
}

.ws-header-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ws-avatar-big {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #0052cc, #2684ff);
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 82, 204, 0.2);
}

.ws-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ws-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-title-text {
  font-size: 22px;
  font-weight: 600;
  color: var(--ds-text);
  margin: 0;
  letter-spacing: -0.2px;
}

.ws-edit-btn {
  padding: 6px;
  border-radius: 4px;
  color: var(--ds-text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-edit-btn:hover {
  background: var(--ds-background-neutral-hovered);
  color: var(--ds-text);
}

.ws-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ds-text-subtle);
  flex-wrap: wrap;
}

.ws-visibility-pill, .ws-tier-pill, .ws-members-count {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--ds-background-neutral);
  font-size: 12px;
  font-weight: 500;
  color: var(--ds-text);
}

.ws-desc-text {
  font-size: 14px;
  color: var(--ds-text-subtle);
  margin-top: 4px;
  line-height: 1.5;
}

/* Tabs Navigation Bar */
.ws-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.ws-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ds-text-subtle);
  border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
}

.ws-tab-btn:hover {
  color: var(--ds-text);
  background: var(--ds-background-neutral-hovered);
}

.ws-tab-btn.active {
  color: var(--trello-blue);
  border-bottom-color: var(--trello-blue);
  font-weight: 600;
}

.ws-tab-content {
  padding-top: 8px;
}

/* Tab 1: Boards Hub */
.ws-boards-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ws-section-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ws-section-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--ds-text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

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

.ws-board-tile {
  height: 106px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
  box-shadow: var(--shadow-card);
}

.ws-board-tile:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.ws-board-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ws-board-tile-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  word-break: break-word;
}

.ws-star-board-btn {
  align-self: flex-end;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s ease, transform 0.15s ease;
  background: transparent;
}

.ws-star-board-btn:hover {
  color: #f2d600;
  transform: scale(1.15);
}

.ws-star-board-btn.starred {
  color: #f2d600;
}

.ws-board-tile.create-tile {
  background: var(--ds-background-neutral);
  border: 2px dashed var(--ds-border);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ds-text-subtle);
}

.ws-board-tile.create-tile:hover {
  background: var(--ds-background-neutral-hovered);
  border-color: var(--trello-blue);
  color: var(--trello-blue);
  filter: none;
}

.create-tile-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  padding: 8px;
}

/* Tab 2: Members Management */
.ws-members-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ws-section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.ws-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ds-text);
  margin-bottom: 4px;
}

.ws-section-subtitle {
  font-size: 13px;
  color: var(--ds-text-subtle);
  max-width: 600px;
  line-height: 1.4;
}

.members-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.members-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.members-search-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--ds-text-subtle);
  pointer-events: none;
}

.members-search-input {
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--ds-border);
  border-radius: 4px;
  font-size: 14px;
  width: 260px;
  background: var(--ds-surface);
  color: var(--ds-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.members-search-input:focus {
  border-color: var(--ds-border-focused);
  box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.2);
}

.members-role-tabs {
  display: flex;
  gap: 6px;
}

.role-filter-btn {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-text-subtle);
  background: var(--ds-background-neutral);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.role-filter-btn:hover {
  background: var(--ds-background-neutral-hovered);
  color: var(--ds-text);
}

.role-filter-btn.active {
  background: #0052cc;
  color: #ffffff;
  font-weight: 600;
}

.members-table {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.members-table-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--ds-surface-sunken);
  border-bottom: 1px solid var(--ds-border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ds-text-subtle);
}

.members-table-body {
  display: flex;
  flex-direction: column;
}

.member-table-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ds-border);
  gap: 12px;
  transition: background 0.12s ease;
}

.member-table-row:hover {
  background: var(--ds-surface-hovered);
}

.member-table-row:last-child {
  border-bottom: none;
}

.member-col-user {
  flex: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.member-col-role {
  flex: 1;
}

.member-col-boards {
  flex: 1;
}

.member-col-action {
  width: 100px;
  text-align: right;
  display: flex;
  justify-content: flex-end;
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.member-info-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-full-name {
  font-weight: 600;
  color: var(--ds-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-badge {
  background: #e3fcef;
  color: #006644;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-block;
}

.member-email {
  font-size: 12px;
  color: var(--ds-text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-role-select {
  padding: 6px 10px;
  border: 1px solid var(--ds-border);
  border-radius: 4px;
  background: var(--ds-surface);
  color: var(--ds-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.member-role-select:focus {
  border-color: var(--ds-border-focused);
}

.boards-badge {
  font-size: 12px;
  color: var(--ds-text-subtle);
  background: var(--ds-background-neutral);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.btn-remove-member {
  color: #b04632;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.btn-remove-member:hover {
  background: #ffebe6;
}

/* Tab 3: Workspace Settings */
.ws-settings-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-card {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
}

.settings-card.danger-card {
  border-color: #ffbdad;
  background: #fffafa;
}

[data-theme="dark"] .settings-card.danger-card {
  background: #2b1d1d;
  border-color: #5c2b29;
}

.settings-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ds-text);
  margin: 0;
}

.settings-card-sub {
  font-size: 13px;
  color: var(--ds-text-subtle);
  margin-top: -8px;
  line-height: 1.4;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
}

.visibility-picker-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.visibility-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ds-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--ds-surface);
}

.visibility-option input[type="radio"] {
  margin-top: 3px;
}

.visibility-option:hover {
  background: var(--ds-surface-hovered);
}

.visibility-option.selected {
  border-color: var(--trello-blue);
  background: rgba(0, 121, 191, 0.05);
}

.vis-opt-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ds-text);
  margin-bottom: 2px;
}

.vis-opt-desc {
  font-size: 12px;
  color: var(--ds-text-subtle);
  line-height: 1.4;
}

.permissions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.permission-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ds-border);
}

.permission-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.perm-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ds-text);
}

.perm-sub {
  font-size: 12px;
  color: var(--ds-text-subtle);
}

.perm-select {
  padding: 6px 10px;
  border: 1px solid var(--ds-border);
  border-radius: 4px;
  background: var(--ds-surface);
  color: var(--ds-text);
  font-size: 13px;
  outline: none;
}

.perm-select:focus {
  border-color: var(--ds-border-focused);
}

/* =========================================================
   13. INVITATIONS & SHAREABLE JOIN LINKS
   ========================================================= */
.ws-invite-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ds-surface-sunken);
  border: 1px solid var(--ds-border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 8px;
}

.ws-invite-link-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ws-invite-link-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 82, 204, 0.1);
  color: var(--trello-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ws-invite-link-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ds-text);
  margin-bottom: 2px;
}

.ws-invite-link-desc {
  font-size: 12px;
  color: var(--ds-text-subtle);
}

.btn-copy-global-invite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-copy-global-invite:hover {
  background: var(--ds-surface-hovered);
  border-color: var(--trello-blue);
}

.invite-modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px 0;
}

.invite-modal-divider::before,
.invite-modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--ds-border);
}

.invite-modal-divider span {
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ds-text-subtlest);
}

.invite-modal-link-box {
  background: var(--ds-surface-sunken);
  border: 1px solid var(--ds-border);
  border-radius: 6px;
  padding: 10px 12px;
}

.btn-copy-link-small {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-copy-link-small:hover {
  background: var(--ds-background-neutral-hovered);
  border-color: var(--trello-blue);
}

.btn-resend-invite, .btn-copy-invite-item {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-resend-invite:hover, .btn-copy-invite-item:hover {
  background: var(--ds-surface-hovered);
  color: var(--trello-blue);
  border-color: var(--trello-blue);
}

.btn-revoke-invite {
  color: #b04632 !important;
}

.btn-revoke-invite:hover {
  background: #ffebe6 !important;
}
