/* ============================================================
   Modern SaaS Kanban Design System
   Inspired by Linear / Trello / Notion
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Light theme (default) */
  /* Surfaces */
  --bg-app: #f6f7f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #fafbfc;
  --bg-subtle: #f3f4f6;
  --bg-overlay: rgba(15, 23, 42, 0.45);

  --border-subtle: #eceef2;
  --border-default: #e5e7eb;
  --border-strong: #d1d5db;
  --border-focus: #8b5cf6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --text-link: #6366f1;

  --primary: #7c3aed;
  --primary-soft: #f5f3ff;
  --primary-border: #ddd6fe;

  --blue: #3b82f6;
  --blue-soft: #eff6ff;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --rose: #f43f5e;
  --rose-soft: #fff1f2;
  --pink: #ec4899;
  --pink-soft: #fdf2f8;
  --indigo: #6366f1;
  --indigo-soft: #eef2ff;
  --teal: #14b8a6;
  --teal-soft: #f0fdfa;

  --col-todo: #94a3b8;
  --col-todo-soft: #f1f5f9;
  --col-progress: #3b82f6;
  --col-progress-soft: #eff6ff;
  --col-review: #f59e0b;
  --col-review-soft: #fffbeb;
  --col-done: #10b981;
  --col-done-soft: #ecfdf5;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-focus: 0 0 0 3px rgba(139, 92, 246, 0.18);

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;

  /* Legacy aliases for inline-style compatibility */
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
}

/* Dark theme overrides (active when body does NOT have .light-theme) */
body:not(.light-theme) {
  --bg-app: #0b1120;
  --bg-surface: #111827;
  --bg-surface-hover: #1f2937;
  --bg-subtle: #1a2235;
  --bg-overlay: rgba(0, 0, 0, 0.7);

  --border-subtle: #1f2937;
  --border-default: #2d3a4f;
  --border-strong: #4b5563;
  --border-focus: #a78bfa;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --primary: #a78bfa;
  --primary-soft: rgba(167, 139, 250, 0.15);
  --primary-border: rgba(167, 139, 250, 0.3);

  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.15);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.15);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.15);
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.15);
  --pink: #f472b6;
  --pink-soft: rgba(244, 114, 182, 0.15);
  --indigo: #818cf8;
  --indigo-soft: rgba(129, 140, 248, 0.15);
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.15);

  --col-todo: #94a3b8;
  --col-progress: #60a5fa;
  --col-review: #fbbf24;
  --col-done: #34d399;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
  --shadow-focus: 0 0 0 3px rgba(167, 139, 250, 0.25);
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: auto;
}

button { font-family: inherit; cursor: pointer; border: none; background: transparent; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.10); border-radius: var(--r-pill); border: 2px solid var(--bg-app); }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.22); }

/* ============================================================
   App container
   ============================================================ */
#app {
  min-width: 1200px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--s-6);
}

/* ============================================================
   App Header
   ============================================================ */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-4) 0 var(--s-3);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-app);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.brand-project-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.15s;
}
.brand-project-name:hover { background: var(--bg-subtle); }
.brand-project-name .chev { color: var(--text-muted); font-size: 12px; }

.brand-section svg { filter: drop-shadow(0 1px 2px rgba(15,23,42,0.08)); }

/* Team avatar stack (top right) */
.header-actions { display: flex; align-items: center; gap: var(--s-2); }

.avatar-stack {
  display: inline-flex;
  align-items: center;
}
.avatar-stack .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg-app);
  margin-left: -8px;
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, z-index 0s;
}
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .avatar:hover { transform: translateY(-1px); z-index: 2; }
.avatar-stack .avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-stack .avatar.has-badge::after {
  content: attr(data-badge);
  position: absolute;
  right: -2px;
  bottom: -2px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--amber);
  border: 2px solid var(--bg-app);
  border-radius: var(--r-pill);
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.avatar-stack .avatar.add-btn {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1.5px dashed var(--border-strong);
  font-size: 14px;
  font-weight: 500;
}
.avatar-stack .avatar.add-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}

/* Right-side icon button (activity, etc.) */
.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  background: transparent;
  transition: background 0.15s, color 0.15s;
  font-size: 15px;
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* Header pill buttons (theme, logout) */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  transition: all 0.15s;
}
.pill-btn:hover { background: var(--bg-surface-hover); border-color: var(--border-strong); color: var(--text-primary); }

/* User profile badge in header */
.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 6px 0 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.user-profile-badge:hover { border-color: var(--border-strong); }
.user-profile-badge img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.user-profile-badge .name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.user-profile-badge .role-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.user-profile-badge .role-tag.admin { background: var(--primary-soft); color: var(--primary); }
.user-profile-badge .role-tag.member { background: var(--bg-subtle); color: var(--text-muted); }

.profile-wrap { position: relative; display: inline-flex; }
.user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 8px 10px;
}
.user-menu-header img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.user-menu-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.user-menu-email { font-size: 11px; color: var(--text-muted); }
.user-menu-divider { height: 1px; background: var(--border-subtle); margin: 4px 0; }
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.user-menu-item:hover { background: var(--bg-subtle); }
.user-menu-item.danger { color: var(--rose); }
.user-menu-item.danger:hover { background: var(--rose-soft); }

/* ============================================================
   Filter Bar (single horizontal row)
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding: var(--s-3) 0;
  flex-wrap: wrap;
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-group .filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-pill:hover { border-color: var(--border-strong); background: var(--bg-surface-hover); }
.filter-pill .ico { color: var(--text-muted); font-size: 14px; }
.filter-pill .chev { color: var(--text-muted); font-size: 10px; margin-left: 2px; }
.filter-pill.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.filter-pill .member-pill-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-pill .member-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-pill .member-dot.teal { background: var(--teal); }
.filter-pill .member-dot.amber { background: var(--amber); }
.filter-pill .member-dot.rose { background: var(--rose); }
.filter-pill .member-dot.blue { background: var(--blue); }
.filter-pill .member-dot.indigo { background: var(--indigo); }

.filter-select {
  height: 32px;
  padding: 0 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
  outline: none;
}
.filter-select:hover { border-color: var(--border-strong); }
.filter-select:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }

.search-wrapper { position: relative; }
.search-input {
  width: 280px;
  height: 32px;
  padding: 0 12px 0 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.search-wrapper .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.toolbar .toolbar-spacer { flex-grow: 1; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: #6d28d9; border-color: #6d28d9; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary.sketch-active { background: var(--text-primary); border-color: var(--text-primary); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--bg-surface-hover); }
.btn-ghost .x { color: var(--text-muted); margin-left: 2px; }

.input-inline {
  height: 32px;
  padding: 0 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-size: 13px;
  outline: none;
  transition: all 0.15s;
}
.input-inline:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }

/* ============================================================
   Board (Kanban with Swimlanes)
   ============================================================ */
.board-outer-container {
  margin-top: var(--s-4);
  position: relative;
}

.board-container {
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.board-headers {
  display: flex;
  gap: var(--s-3);
  padding-left: 0;
}

.column-header {
  flex: 1 1 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--col-todo-soft);
  border: 1px solid var(--border-default);
  border-top: 3px solid var(--col-todo);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  cursor: grab;
  user-select: none;
  transition: all 0.15s;
  min-height: 44px;
}
/* Tint the column header with its own status color so the buckets
   visually pop out of the board. */
.column-header[data-col="todo"]        { background: var(--col-todo-soft);      border-top-color: var(--col-todo); }
.column-header[data-col="in_progress"] { background: var(--col-progress-soft);  border-top-color: var(--col-progress); }
.column-header[data-col="in_review"]   { background: var(--col-review-soft);    border-top-color: var(--col-review); }
.column-header[data-col="review"]      { background: var(--col-review-soft);    border-top-color: var(--col-review); }
.column-header[data-col="done"]        { background: var(--col-done-soft);      border-top-color: var(--col-done); }
.column-header[data-col="completed"]   { background: var(--col-done-soft);      border-top-color: var(--col-done); }
.column-header:active { cursor: grabbing; }
.column-header.dragging { opacity: 0.5; }
.column-header.column-drag-over { border-color: var(--primary); background: var(--primary-soft); border-top-color: var(--primary); }

.column-header .col-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.column-header .col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--col-todo);
  flex-shrink: 0;
}
.column-header[data-col="todo"] .col-dot { background: var(--col-todo); }
.column-header[data-col="in_progress"] .col-dot { background: var(--col-progress); }
.column-header[data-col="in_review"] .col-dot { background: var(--col-review); }
.column-header[data-col="review"] .col-dot { background: var(--col-review); }
.column-header[data-col="done"] .col-dot { background: var(--col-done); }
.column-header[data-col="completed"] .col-dot { background: var(--col-done); }

.column-header .col-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  min-width: 22px;
  text-align: center;
}

.column-header .col-add {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s;
}
.column-header .col-add:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* Swimlane rows */
.board-swimlane {
  display: flex;
  gap: var(--s-3);
  position: relative;
}

.swimlane-employee-card {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: all 0.15s;
  user-select: none;
}
.swimlane-employee-card:active { cursor: grabbing; }
.swimlane-employee-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.swimlane-employee-card.employee-drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--shadow-md);
}

.emp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--bg-app);
}
.emp-avatar img { width: 100%; height: 100%; object-fit: cover; }

.emp-info {
  text-align: center;
  width: 100%;
}
.emp-info .emp-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.emp-info .emp-role {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.swimlane-employee-card .add-task-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.swimlane-employee-card .add-task-link:hover { background: var(--primary-soft); }

/* Grid dropzones */
.swimlane-grid-cells {
  display: grid;
  flex-grow: 1;
  gap: var(--s-3);
  grid-template-columns: repeat(var(--col-count, 3), minmax(0, 1fr));
}

.swimlane-cell {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-default);
  border-radius: var(--r-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 90px;
  transition: background 0.15s, border-color 0.15s;
}
.swimlane-cell.drag-over {
  background: var(--primary-soft);
  border-color: var(--primary);
  border-style: solid;
}

/* Task cards (modern, clean) */
.task-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: grab;
  transition: all 0.15s;
  position: relative;
  box-shadow: var(--shadow-xs);
}
.task-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: 0.5; }

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

.task-id-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}
.task-id-badge.priority-high { background: var(--rose-soft); color: var(--rose); }
.task-id-badge.priority-medium { background: var(--amber-soft); color: var(--amber); }
.task-id-badge.priority-low { background: var(--blue-soft); color: var(--blue); }
.task-id-badge.status-review { background: var(--amber-soft); color: var(--amber); }
.task-id-badge.status-done { background: var(--green-soft); color: var(--green); }

.task-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.task-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

/* Avatar group on cards */
.avatar-group {
  display: inline-flex;
  align-items: center;
}
.avatar-group .ag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--bg-surface);
  margin-left: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}
.avatar-group .ag:first-child { margin-left: 0; }
.avatar-group .ag img { width: 100%; height: 100%; object-fit: cover; }
.avatar-group .ag.lg { background: var(--indigo); }
.avatar-group .ag.tl { background: var(--teal); }
.avatar-group .ag.am { background: var(--amber); }
.avatar-group .ag.rs { background: var(--rose); }
.avatar-group .ag.bl { background: var(--blue); }
.avatar-group .ag.pn { background: var(--pink); }
.avatar-group .ag.pr { background: var(--primary); }
.avatar-group .ag.gn { background: var(--green); }

/* Card meta icons (date, comments) */
.task-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}
.task-meta .m {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.task-meta .m .ico { font-size: 12px; opacity: 0.85; }

/* Add task button inside cell */
.cell-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 28px;
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed transparent;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: auto;
}
.cell-add-btn:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

/* Add column link */
.add-column-link {
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}
.add-column-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* ============================================================
   Pen / Chalk Tray
   ============================================================ */
.pen-tray-container {
  display: flex;
  justify-content: center;
  margin-top: var(--s-4);
  margin-bottom: var(--s-6);
  position: relative;
  z-index: 5;
}
.pen-tray {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  padding: 6px 16px;
  box-shadow: var(--shadow-md);
}
.pen-tray-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}
.pen-option {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-surface);
  outline: 1px solid var(--border-default);
  outline-offset: -1px;
  transition: all 0.15s;
  position: relative;
}
.pen-option:hover { transform: scale(1.1); }
.pen-option.active { transform: scale(1.15); box-shadow: 0 0 0 2px var(--primary); }
.pen-eraser {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.pen-eraser.active { background: var(--rose-soft); color: var(--rose); border-color: var(--rose); }
.btn-clear-drawings {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
}
.btn-clear-drawings:hover { background: var(--bg-subtle); color: var(--text-primary); }

.board-sketch-canvas { touch-action: none; }

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  padding: 20px;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.96) translateY(4px);
  transition: transform 0.18s ease;
  overflow: hidden;
}
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }
.modal-content.split-mode { max-width: 1280px; }

.modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.modal-header h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.modal-close-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close-btn:hover { background: var(--bg-subtle); color: var(--text-primary); }

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-app);
  flex-shrink: 0;
}
.modal-tab-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.modal-tab-btn:hover { color: var(--text-primary); }
.modal-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--bg-surface); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}
.form-textarea { resize: vertical; min-height: 140px; }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Chat inside modal */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 360px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  overflow: hidden;
}
.chat-header {
  padding: 12px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}
.chat-history {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-bubble-wrapper {
  display: flex;
  gap: 10px;
  max-width: 85%;
  align-items: flex-start;
}
.chat-bubble-wrapper.self {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }

.chat-bubble {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 8px 12px;
  border-radius: var(--r-md);
  min-width: 0;
}
.chat-bubble-wrapper.self .chat-bubble {
  background: var(--primary-soft);
  border-color: var(--primary-border);
}
.chat-sender-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2px;
}
.chat-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.chat-input-field {
  flex-grow: 1;
  padding: 8px 12px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s;
}
.chat-input-field:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }

.mention {
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: var(--r-sm);
}

.mention-autocomplete {
  position: absolute;
  bottom: 100%;
  left: 10px;
  right: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: none;
  max-height: 200px;
  overflow-y: auto;
}
.mention-autocomplete.active { display: block; }
.autocomplete-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}
.autocomplete-item:hover { background: var(--bg-subtle); }

/* Attachments */
.pending-attachments-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 240px;
  overflow: hidden;
}
.chat-attachments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.preview-name,
.file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.chat-attachment-file-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 12px;
  max-width: 280px;
  overflow: hidden;
}
.chat-attachment-img-card {
  position: relative;
  max-width: 280px;
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-default);
  line-height: 0;
}
.chat-attachment-img-card img {
  width: 100%;
  max-height: 200px;
  display: block;
  object-fit: contain;
}
.attachment-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.chat-attachment-img-card:hover .attachment-overlay { opacity: 1; }

/* Split Workspace Modal */
.modal-body-split {
  display: flex;
  height: 680px;
  overflow: hidden;
}
.modal-split-left {
  flex: 0.85;
  padding: 28px 32px;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
}
.modal-split-right {
  flex: 1.15;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 20px 24px 0 24px;
}
.modal-split-right .chat-history { background: var(--bg-app); flex-grow: 1; }
.modal-split-right .chat-input-wrapper { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); margin: 0 -24px; padding: 14px 24px; }

/* Assets Timeline */
.assets-timeline {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.assets-timeline .timeline-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.assets-timeline .timeline-list {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 18px;
  border-left: 2px solid var(--border-default);
  gap: 12px;
  margin-left: 6px;
}
.assets-timeline .timeline-item { position: relative; }
.assets-timeline .timeline-dot {
  position: absolute;
  left: -24px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-surface);
}
.assets-timeline .timeline-content {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  padding: 10px 12px;
  border-radius: var(--r-md);
  transition: background 0.15s;
  min-width: 0;
  overflow: hidden;
}
.assets-timeline .timeline-content > * { min-width: 0; }
.assets-timeline .timeline-content:hover { background: var(--bg-subtle); }
.assets-timeline .timeline-thumb-wrapper {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border-default);
  cursor: pointer;
  flex-shrink: 0;
}
.assets-timeline .timeline-thumb-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.assets-timeline .timeline-file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.assets-timeline .timeline-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex-grow: 1;
}
.assets-timeline .timeline-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.assets-timeline .timeline-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.assets-timeline .timeline-file-size { font-size: 11px; color: var(--text-muted); }
.assets-timeline .timeline-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.assets-timeline .timeline-uploader-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox-stage { position: relative; display: inline-block; line-height: 0; }
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  display: block;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,0.1);
}
.lightbox-canvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: crosshair;
  touch-action: none;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lightbox-caption { color: #fff; font-size: 13px; }
.lightbox-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  z-index: 1;
  pointer-events: none;
}
.lightbox-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(255,255,255,0.95);
  padding: 6px 10px;
  border-radius: var(--r-md);
  flex-wrap: wrap;
  justify-content: center;
}
.lightbox-tool-btn {
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f2937;
  transition: all 0.15s;
}
.lightbox-tool-btn:hover { background: rgba(0,0,0,0.05); }
.lightbox-tool-btn.active { background: var(--primary-soft); border-color: var(--primary); }
.lightbox-save-btn {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-sm);
}
.lightbox-save-btn:hover { background: #6d28d9; }
.lightbox-colors { display: flex; gap: 4px; margin: 0 8px; padding: 0 8px; border-left: 1px solid #d1d5db; border-right: 1px solid #d1d5db; }
.lightbox-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  cursor: pointer;
  padding: 0;
}
.lightbox-color-swatch.active { border-color: #1f2937; transform: scale(1.15); }

/* Settings — Team Members */
.setting-members-section { margin-bottom: 4px; }

.setting-members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  transition: background 0.15s;
}
.setting-member-row:hover { background: var(--bg-subtle); }
.setting-member-row.editing { background: var(--primary-soft); border-color: var(--primary-border); }

.setting-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
}
.setting-member-avatar img { width: 100%; height: 100%; object-fit: cover; }

.setting-member-info {
  flex: 1;
  min-width: 0;
}
.setting-member-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.setting-member-admin-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  border: 1px solid var(--primary-border);
}
.setting-member-email {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.setting-member-role {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  width: 120px;
  flex-shrink: 0;
}
.setting-member-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.setting-member-fields {
  display: flex;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}
.setting-color-picker {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}
.setting-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.setting-color-swatch:hover { transform: scale(1.15); }
.setting-color-swatch.active { border-color: var(--text-primary); transform: scale(1.2); box-shadow: 0 0 0 1px var(--bg-surface), 0 0 0 3px var(--text-primary); }

/* Lightbox prev/next nav buttons */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-md);
  font-size: 32px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s, transform 0.15s;
  user-select: none;
}
.lightbox-nav:hover { background: rgba(15, 23, 42, 0.85); }
.lightbox-nav:active { transform: translateY(-50%) scale(0.96); }
.lightbox-nav-prev { left: 16px; }
.lightbox-nav-next { right: 16px; }

.lightbox-counter {
  display: inline-block;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-top: 4px;
}

/* Timeline iteration badge (annotated version) */
.timeline-version-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  margin-left: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  border: 1px solid var(--primary-border);
  white-space: nowrap;
  flex-shrink: 0;
}

.lightbox-text-input {
  position: absolute;
  z-index: 4;
  min-width: 140px;
  max-width: 360px;
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.lightbox-text-input::placeholder { color: rgba(255, 255, 255, 0.5); }

/* ============================================================
   Login
   ============================================================ */
.login-overlay {
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
}
.login-content-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  transform: scale(0.96) translateY(4px);
  transition: transform 0.18s ease;
  max-width: 440px !important;
  width: 100%;
}
.modal-overlay.active .login-content-card { transform: scale(1) translateY(0) !important; }

.login-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}
.login-tab {
  flex: 1;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.login-tab:hover { color: var(--text-primary); }
.login-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.login-form-wrap { min-height: 200px; }

.demo-credentials-tray {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.demo-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
  margin-bottom: 6px;
}
.demo-account-row:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.demo-account-row .acc-info { display: flex; align-items: center; gap: 10px; }
.demo-account-row .acc-info .name { font-weight: 600; color: var(--text-primary); }
.demo-account-row .acc-info .role { color: var(--text-muted); font-size: 12px; }
.demo-account-row .acc-cta {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================
   Toast
   ============================================================ */
.app-toast {
  position: relative;
}
