:root {
  /* Velcy brand — Apple-tech palette (matches the landing/v3 design) */
  --bg: #f5f5f7;             /* Mist */
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ebebed;
  --border: #d2d2d7;
  --border-strong: #b8b8bd;
  --text: #1d1d1f;           /* Ink */
  --text-muted: #424245;
  --text-faint: #86868b;
  --accent: #0A84FF;         /* Velcy Blue */
  --accent-2: #5E5CE6;       /* Iris */
  --accent-hover: #0077ED;
  --accent-bg: rgba(10,132,255,0.08);
  --grad: linear-gradient(135deg, #0A84FF, #5E5CE6);
  --grad-soft: linear-gradient(135deg, rgba(10,132,255,0.10), rgba(94,92,230,0.10));
  --success: #34C759;
  --success-bg: rgba(52,199,89,0.10);
  --warning: #FF9F0A;
  --warning-bg: rgba(255,159,10,0.10);
  --danger: #FF453A;
  --danger-bg: rgba(255,69,58,0.10);
  --purple: #AF52DE;
  --purple-bg: rgba(175,82,222,0.10);
  --teal: #5AC8FA;
  --teal-bg: rgba(90,200,250,0.10);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 980px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 14px -4px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 40px -20px rgba(0,0,0,0.15);
  --shadow-accent: 0 6px 20px -8px rgba(10,132,255,0.35);
  --sidebar-width: 248px;
  --header-height: 60px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Monaco, Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --border: #2c2c2e;
  --border-strong: #3a3a3c;
  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --text-faint: #6e6e73;
  --accent: #0A84FF;
  --accent-2: #5E5CE6;
  --accent-hover: #409CFF;
  --accent-bg: rgba(10,132,255,0.18);
  --success: #9fd25e;
  --success-bg: rgba(159,210,94,0.15);
  --warning: #f0b350;
  --warning-bg: rgba(240,179,80,0.15);
  --danger: #f08585;
  --danger-bg: rgba(240,133,133,0.15);
  --purple: #a7a0eb;
  --purple-bg: rgba(167,160,235,0.15);
  --teal: #5dcaa5;
  --teal-bg: rgba(93,202,165,0.15);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --surface-3: #3a3a3c;
    --border: #2c2c2e;
    --border-strong: #3a3a3c;
    --text: #f5f5f7;
    --text-muted: #a1a1a6;
    --text-faint: #6e6e73;
    --accent: #0A84FF;
    --accent-hover: #409CFF;
    --accent-bg: rgba(10,132,255,0.18);
    --success: #9fd25e;
    --success-bg: rgba(159,210,94,0.15);
    --warning: #f0b350;
    --warning-bg: rgba(240,179,80,0.15);
    --danger: #f08585;
    --danger-bg: rgba(240,133,133,0.15);
    --purple: #a7a0eb;
    --purple-bg: rgba(167,160,235,0.15);
    --teal: #5dcaa5;
    --teal-bg: rgba(93,202,165,0.15);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
input, select, textarea, button { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--accent); text-decoration: none; cursor: pointer; }

.app { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar { width: var(--sidebar-width); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.logo-icon { width: 28px; height: 28px; flex-shrink: 0; display: block; }
.logo-text { font-size: 14px; font-weight: 600; }
.logo-text small { display: block; font-size: 11px; font-weight: 400; color: var(--text-muted); }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); padding: 12px 10px 4px; font-weight: 500; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); color: var(--text-muted); font-size: 13px; width: 100%; text-align: left; transition: all 0.1s; }
.nav-item i { font-size: 17px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }
.nav-badge { margin-left: auto; background: var(--danger-bg); color: var(--danger); font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.sidebar-footer { margin-top: auto; padding: 12px 0 0; border-top: 1px solid var(--border); }
.user-display { padding: 4px 8px 10px; }
.user-display .text-faint { display: block; margin-bottom: 4px; }
.user-name-input { width: 100%; padding: 5px 8px; font-size: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.theme-toggle { display: flex; background: var(--surface-2); border-radius: var(--radius); padding: 3px; gap: 2px; }
.theme-btn { flex: 1; padding: 5px; font-size: 11px; color: var(--text-muted); border-radius: 5px; }
.theme-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.theme-btn i { font-size: 14px; }
.sidebar-legal { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-faint); display: flex; flex-wrap: wrap; gap: 4px 6px; line-height: 1.5; }
.sidebar-legal a { color: var(--text-faint); text-decoration: none; }
.sidebar-legal a:hover { color: var(--text); text-decoration: underline; }

/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar { height: var(--header-height); border-bottom: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; gap: 12px; padding: 0 24px; flex-shrink: 0; }
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-sub { font-size: 12px; color: var(--text-muted); }
.connection-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); margin-left: auto; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.connection-status.online .conn-dot { background: var(--success); }
.connection-status.offline .conn-dot { background: var(--danger); }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: var(--radius); padding: 6px 10px; width: 240px; }
.search-box input { background: transparent; border: none; outline: none; flex: 1; font-size: 13px; }
.search-box i { font-size: 16px; color: var(--text-faint); }
.content { flex: 1; overflow-y: auto; padding: 20px 24px; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500; transition: all 0.1s; }
.btn:hover { background: var(--surface-2); border-color: var(--text-faint); }
.btn:active { transform: scale(0.98); }
.btn i { font-size: 16px; }
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: white; }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon { padding: 6px; }
.btn-ghost { border: none; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

/* FORMS */
.input, .select, textarea { width: 100%; padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13px; }
.input:focus, .select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
textarea { resize: vertical; min-height: 80px; font-family: var(--font); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.field-row { display: grid; gap: 12px; }
.field-row-2 { grid-template-columns: 1fr 1fr; }
.field-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* TOOLBAR + FILTERS */
.toolbar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; font-size: 12px; color: var(--text-muted); }
.filter-chip.active { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.filter-chip i { font-size: 14px; }
.filter-chip .clear { margin-left: 4px; cursor: pointer; }
.filter-chip .clear:hover { color: var(--danger); }

/* BOARD */
.board-container { display: flex; flex-direction: column; gap: 10px; }
.swimlane { background: var(--surface-2); border-radius: var(--radius-lg); padding: 8px; }
.swimlane-header { display: flex; align-items: center; gap: 8px; padding: 4px 8px 8px; }
.swimlane-title { font-size: 13px; font-weight: 600; }
.swimlane-count { font-size: 11px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; color: var(--text-faint); }
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 8px; overflow-x: auto; }
.column { background: var(--surface); border-radius: var(--radius); padding: 10px; min-height: 120px; transition: background 0.15s, outline 0.15s; }
.column.drag-over { background: var(--accent-bg); outline: 2px dashed var(--accent); outline-offset: -2px; }
.column.over-wip { border: 1px solid var(--danger); }
.column-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 2px; }
.column-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.column-count { font-size: 10px; background: var(--surface-2); border-radius: 8px; padding: 1px 6px; color: var(--text-faint); font-weight: 500; }
.column.over-wip .column-count { background: var(--danger-bg); color: var(--danger); }

/* TASK CARD */
.task-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 10px; margin-bottom: 6px; cursor: grab; transition: box-shadow 0.1s; position: relative; box-shadow: var(--shadow-sm); }
.task-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: 0.3; }
.task-card.priority-p1 { border-left: 3px solid var(--danger); }
.task-card.priority-p2 { border-left: 3px solid var(--warning); }
.task-card.priority-p3 { border-left: 3px solid var(--success); }
.task-title { font-size: 12.5px; font-weight: 500; margin-bottom: 6px; line-height: 1.35; color: var(--text); }
.task-meta { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin-bottom: 5px; }
.task-footer { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-faint); gap: 6px; }
.task-assignee { display: inline-flex; align-items: center; gap: 4px; }
.avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; flex-shrink: 0; }
.task-points { background: var(--surface-2); padding: 1px 6px; border-radius: 8px; font-weight: 500; font-size: 10.5px; }

/* BADGES */
.badge { font-size: 10px; padding: 2px 6px; border-radius: 8px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.badge i { font-size: 11px; }
.badge-bug { background: var(--danger-bg); color: var(--danger); }
.badge-feature { background: var(--accent-bg); color: var(--accent); }
.badge-hotfix { background: var(--warning-bg); color: var(--warning); }
.badge-task { background: var(--purple-bg); color: var(--purple); }
.badge-epic { background: var(--teal-bg); color: var(--teal); }
.badge-chore { background: var(--surface-2); color: var(--text-muted); }
.badge-p1 { background: var(--danger-bg); color: var(--danger); }
.badge-p2 { background: var(--warning-bg); color: var(--warning); }
.badge-p3 { background: var(--success-bg); color: var(--success); }
.badge-site { background: var(--purple-bg); color: var(--purple); }
.badge-comp { background: var(--surface-2); color: var(--text-muted); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--accent-bg); color: var(--accent); }

.add-task-btn { width: 100%; padding: 6px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: transparent; color: var(--text-faint); font-size: 12px; transition: all 0.1s; display: flex; align-items: center; justify-content: center; gap: 4px; }
.add-task-btn:hover { background: var(--surface-2); color: var(--text-muted); border-color: var(--text-faint); }

/* MODAL */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 100; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; backdrop-filter: blur(2px); }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); padding: 0; width: 100%; max-width: 720px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); max-height: calc(100vh - 80px); display: flex; flex-direction: column; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { display: flex; gap: 8px; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border); flex-shrink: 0; }
.modal-footer-right { display: flex; gap: 8px; margin-left: auto; }

/* TASK DETAIL */
.task-detail { display: grid; grid-template-columns: 1fr 220px; gap: 20px; }
.task-detail-main h2 { font-size: 18px; font-weight: 600; margin-bottom: 4px; outline: none; border-radius: 4px; padding: 4px; margin-left: -4px; }
.task-detail-main h2:focus { background: var(--surface-2); }
.task-detail-sidebar { background: var(--surface-2); border-radius: var(--radius); padding: 14px; font-size: 13px; }
.tds-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.tds-row:last-child { border-bottom: none; }
.tds-label { color: var(--text-muted); font-size: 12px; }
.tds-value { font-weight: 500; }
.tds-value select, .tds-value input { background: transparent; border: none; text-align: right; font-weight: 500; color: var(--text); font-size: 12px; }
.tds-value select { cursor: pointer; }

.section-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 16px 0 8px; }

.subtask-list { list-style: none; }
.subtask-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.subtask-item input[type="text"] { flex: 1; background: transparent; border: none; outline: none; }
.subtask-item input[type="text"]:focus { background: var(--surface-2); border-radius: 4px; padding: 2px 6px; margin: -2px -6px; }
.subtask-item.done input[type="text"] { text-decoration: line-through; color: var(--text-faint); }
.subtask-item button { color: var(--text-faint); padding: 2px; opacity: 0; transition: opacity 0.1s; }
.subtask-item:hover button { opacity: 1; }
.subtask-item button:hover { color: var(--danger); }

.comment-list { display: flex; flex-direction: column; gap: 10px; }
.comment { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.comment-author { font-weight: 500; font-size: 12px; }
.comment-time { font-size: 11px; color: var(--text-faint); }
.comment-body { color: var(--text); white-space: pre-wrap; }

.history-list { font-size: 12px; color: var(--text-muted); }
.history-item { padding: 4px 0; display: flex; gap: 8px; }
.history-item time { color: var(--text-faint); flex-shrink: 0; }

/* DASHBOARD */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; position: relative; }
.stat-card.danger { border-color: var(--danger); }
.stat-card.warning { border-color: var(--warning); }
.stat-card.success { border-color: var(--success); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 5px; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.stat-value.danger { color: var(--danger); }
.stat-value.success { color: var(--success); }
.stat-sub { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 980px) { .dashboard-grid { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 13px; font-weight: 600; }

.burndown-chart { height: 220px; position: relative; }
.burndown-chart svg { width: 100%; height: 100%; }

.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item { display: flex; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius); border-left: 3px solid var(--text-faint); font-size: 12.5px; }
.alert-item.danger { border-left-color: var(--danger); }
.alert-item.warning { border-left-color: var(--warning); }
.alert-item.info { border-left-color: var(--accent); }
.alert-item i { font-size: 18px; color: var(--text-muted); flex-shrink: 0; margin-top: 1px; }
.alert-item.danger i { color: var(--danger); }
.alert-item.warning i { color: var(--warning); }
.alert-item.info i { color: var(--accent); }
.alert-title { font-weight: 500; margin-bottom: 2px; }
.alert-meta { font-size: 11px; color: var(--text-faint); }

/* CAPACITY */
.capacity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.dev-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.dev-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dev-card .avatar { width: 32px; height: 32px; font-size: 12px; }
.dev-name { font-weight: 600; font-size: 14px; }
.dev-role { font-size: 12px; color: var(--text-muted); }
.progress-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 10px 0 6px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
.progress-fill.over { background: var(--danger); }
.progress-fill.warning { background: var(--warning); }
.dev-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

/* CALENDAR */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 12px; }
.cal-header { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; text-align: center; padding: 6px; letter-spacing: 0.04em; }
.cal-day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; min-height: 80px; font-size: 12px; }
.cal-day.today { border-color: var(--accent); border-width: 2px; }
.cal-day.weekend { background: var(--surface-2); }
.cal-day.in-sprint { background: var(--accent-bg); }
.cal-day.empty { background: transparent; border: none; }
.cal-day-num { font-weight: 600; margin-bottom: 4px; font-size: 12px; }
.cal-day.today .cal-day-num { color: var(--accent); }
.cal-event { font-size: 10px; padding: 2px 5px; background: var(--accent); color: white; border-radius: 3px; margin-bottom: 2px; font-weight: 500; }

/* RETRO */
.retro-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.retro-column { background: var(--surface-2); border-radius: var(--radius); padding: 12px; min-height: 240px; }
.retro-column h4 { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.retro-column h4 i { font-size: 16px; }
.sticky { background: var(--warning-bg); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 6px; font-size: 12px; cursor: pointer; }
.sticky.well { background: var(--success-bg); color: var(--success); }
.sticky.bad { background: var(--danger-bg); color: var(--danger); }
.sticky.block { background: var(--warning-bg); color: var(--warning); }
.sticky.action { background: var(--accent-bg); color: var(--accent); }
.sticky-votes { font-size: 10px; opacity: 0.7; margin-top: 4px; display: flex; justify-content: space-between; }
.sticky-delete:hover { color: var(--danger); }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 12px; background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.data-table td { padding: 10px 12px; border-top: 1px solid var(--border); }
.data-table tr:hover { background: var(--surface-2); cursor: pointer; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty-state i { font-size: 36px; margin-bottom: 10px; opacity: 0.5; }
.empty-state h3 { font-size: 14px; margin-bottom: 4px; color: var(--text-muted); font-weight: 500; }
.empty-state p { font-size: 12px; max-width: 320px; margin: 0 auto; }
.spinning { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* TOAST */
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius); font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 200; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); color: white; }

/* HELP */
.help-page h2 { font-size: 17px; margin: 24px 0 8px; font-weight: 600; }
.help-page h3 { font-size: 14px; margin: 14px 0 6px; font-weight: 600; }
.help-page p, .help-page li { color: var(--text-muted); margin-bottom: 6px; font-size: 13px; line-height: 1.6; }
.help-page ul, .help-page ol { margin: 8px 0 12px 22px; }
.help-page code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 12px; font-family: var(--font-mono); }
.help-page pre { background: var(--surface-2); padding: 12px; border-radius: var(--radius); overflow-x: auto; font-size: 12px; font-family: var(--font-mono); margin: 8px 0; }

/* MOBILE */
.menu-toggle { display: none; }
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -240px; top: 0; bottom: 0; z-index: 50; transition: left 0.2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .menu-toggle { display: flex; }
  .content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .search-box { width: 140px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, 220px); }
  .task-detail { grid-template-columns: 1fr; }
}

/* UTILITIES */
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fw-500 { font-weight: 500; }
.hidden { display: none !important; }
.text-info { color: var(--accent); }

/* ============================================================
   Quick add inline rows (backlog + board columns)
   ============================================================ */
.quick-add {
  display: flex; gap: 6px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px; margin-bottom: 12px;
}
.quick-add .input { flex: 2 1 220px; min-width: 0; padding: 6px 8px; border-radius: var(--radius-sm); }
.quick-add .select { flex: 0 1 auto; padding: 6px 8px; border-radius: var(--radius-sm); }
/* Linear-style mini quick-add for board columns */
.qa-mini {
  margin: 6px 0 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  transition: border-color 0.12s, background 0.12s, padding 0.12s;
  overflow: hidden;
}
.qa-mini:hover { border-color: var(--border-strong); }
.qa-mini.expanded { border: 1px solid var(--accent); background: var(--surface); padding: 6px; }
.qa-mini-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text);
}
.qa-mini-input::placeholder { color: var(--text-faint); }
.qa-mini-meta {
  display: none;
  gap: 4px;
  padding: 6px 2px 2px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.qa-mini.expanded .qa-mini-meta { display: flex; flex-wrap: wrap; }
.qa-mini-meta .select { font-size: 11px; padding: 3px 4px; border-radius: 4px; flex: 1 1 60px; min-width: 0; }
.qa-mini-meta .btn { padding: 3px 10px; font-size: 11px; }

/* ============================================================
   Capacity per-member inputs
   ============================================================ */
.cap-inputs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.cap-input { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text-muted); flex: 0 0 70px; }
.cap-input-wide { flex: 1 1 140px; }
.cap-input input {
  padding: 4px 6px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--surface); color: var(--text); font-size: 12px; width: 100%;
}
.cap-input input:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   Site cards (clickable for drill-down)
   ============================================================ */
.cal-legend { display:flex; flex-wrap:wrap; gap:8px 14px; padding: 0 4px 12px; font-size: 12px; }
.cal-legend-chip { display:inline-flex; align-items:center; gap:4px; }
.cal-legend-dot { display:inline-block; width:10px; height:10px; border-radius:2px; }
.cal-day.in-any-sprint { background-color: var(--surface); }

.site-card { cursor: pointer; transition: transform 0.08s ease, border-color 0.08s ease; }
.site-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.site-generic { background: var(--accent-bg); }
.avatar-sm { width: 22px; height: 22px; font-size: 10px; }

.role-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.role-admin   { background: var(--danger-bg); color: var(--danger); }
.role-manager { background: var(--accent-bg); color: var(--accent); }
.role-dev     { background: var(--teal-bg); color: var(--teal); }
.role-viewer  { background: var(--surface-2); color: var(--text-muted); }

.dev-role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dev-role-opt {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color 0.1s;
}
.dev-role-opt:hover { border-color: var(--accent); }
.dev-role-opt input[type=radio] { margin-top: 2px; }

/* PI planning */
.pi-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  height: calc(100vh - 200px);
  min-height: 500px;
}
.pi-backlog, .pi-sprint {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pi-sprints {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.pi-col-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.pi-list {
  flex: 1; overflow-y: auto;
  padding: 8px; display: flex; flex-direction: column; gap: 6px;
  min-height: 80px;
}
.pi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: grab;
  transition: border-color 0.08s;
}
.pi-card:hover { border-color: var(--accent); }
.pi-card.dragging { opacity: 0.4; }
.pi-card-title { font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.pi-card-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pi-sprint .progress-bar { margin: 0 12px 6px; }

/* Component editor */
.component-grid { display: flex; flex-direction: column; gap: 6px; }
.component-row {
  display: flex; gap: 6px; align-items: center;
  background: var(--surface-2); border-radius: var(--radius); padding: 6px 10px;
}
.component-row > .input { flex: 1; }
.component-row > input[type=color] { width: 36px; height: 28px; border: 1px solid var(--border); border-radius: 4px; padding: 0; background: transparent; cursor: pointer; }

/* AI panel */
.btn-ai {
  background: linear-gradient(135deg, var(--purple) 0%, var(--accent) 100%);
  color: white;
  border: none;
}
.btn-ai:hover { opacity: 0.9; }
.btn-ai i { margin-right: 4px; }

.ai-panel {
  position: fixed;
  top: 0; right: -420px; bottom: 0;
  width: 420px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transition: right 0.2s ease;
  z-index: 60;
}
.ai-panel.open { right: 0; }
.ai-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.ai-panel-title { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ai-panel-title i { color: var(--purple); }
.ai-panel-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.ai-action {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: 12px; text-align: left;
}
.ai-action:hover { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.ai-panel-messages {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.ai-empty {
  text-align: center; padding: 40px 20px; color: var(--text-faint);
}
.ai-empty i { font-size: 36px; color: var(--purple); }
.ai-empty p { margin-top: 8px; font-size: 13px; }
.ai-msg { font-size: 13px; line-height: 1.55; }
.ai-msg-role {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px; margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.ai-msg-user .ai-msg-role { color: var(--accent); }
.ai-msg-assistant .ai-msg-role { color: var(--purple); }
.ai-msg-body {
  background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius);
  white-space: pre-wrap; word-wrap: break-word;
}
.ai-msg-body code {
  background: var(--surface-3); padding: 1px 4px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 11px;
}
.ai-msg-body ul, .ai-msg-body ol { margin: 6px 0 6px 18px; }
.ai-msg-body li { margin: 2px 0; }
.ai-loading { color: var(--text-muted); font-style: italic; }
.ai-panel-input {
  border-top: 1px solid var(--border); padding: 10px 12px;
  display: flex; gap: 6px; align-items: flex-end;
}
.ai-panel-input textarea {
  flex: 1; min-height: 60px; max-height: 200px; resize: vertical;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); padding: 8px 10px;
  font-size: 13px; font-family: inherit;
}
@media (max-width: 768px) {
  .ai-panel { width: 100%; right: -100%; }
}

/* Sub-issues + deps */
.parent-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); padding: 4px 10px; border-radius: var(--radius);
  font-size: 12px; cursor: pointer; margin-bottom: 8px;
}
.parent-pill:hover { background: var(--accent-bg); color: var(--accent); }
.children-list, .dep-list { display: flex; flex-direction: column; gap: 4px; }
.child-item, .dep-item {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-2); padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: 12px; cursor: pointer;
}
.child-item:hover, .dep-item:hover { background: var(--accent-bg); }
.dep-resolved { opacity: 0.6; text-decoration: line-through; }
.badge-blocked {
  background: var(--danger-bg); color: var(--danger); font-weight: 600;
  display: inline-flex; align-items: center; gap: 3px;
}
.task-card.is-blocked { border-left: 3px solid var(--danger); }
.picker-list .picker-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-bottom: 1px solid var(--border);
  font-size: 12px; cursor: pointer;
}
.picker-list .picker-item:hover { background: var(--surface-2); }

/* Roadmap */
.roadmap-card { padding: 0; overflow: hidden; }
.roadmap-header {
  background: var(--surface-2);
  margin-left: 220px;
}
.roadmap-month {
  position: absolute; top: 8px; font-size: 11px; color: var(--text-muted);
  font-weight: 500; transform: translateX(-50%);
}
.roadmap-sprint-marker {
  position: absolute; top: 22px; bottom: 0; height: 6px;
  background: var(--accent-bg); border-top: 1px solid var(--accent);
}
.roadmap-rows {
  position: relative;
  max-height: 70vh; overflow-y: auto;
}
.roadmap-today {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--danger); z-index: 2; margin-left: 220px;
  pointer-events: none;
}
.roadmap-row {
  display: grid; grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.08s;
}
.roadmap-row:hover { background: var(--surface-2); }
.roadmap-row-label {
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--border);
  font-size: 13px;
}
.roadmap-bar-track {
  position: relative; height: 44px;
}
.roadmap-bar {
  position: absolute; top: 10px; height: 24px;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.roadmap-bar-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: var(--accent); opacity: 0.6;
}
.roadmap-bar-label {
  position: relative;
  padding: 4px 6px; font-size: 11px;
  color: white; font-weight: 500;
  white-space: nowrap;
  mix-blend-mode: difference;
}

/* SaaS sign-up / sign-in */
.saas-auth { display: flex; justify-content: center; align-items: flex-start; padding: 60px 20px; }
.saas-auth-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow);
}
.saas-logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white; font-weight: 700; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.saas-auth-card h2 { text-align: center; margin-bottom: 4px; }
.saas-auth-card > p { text-align: center; margin-bottom: 20px; }
.saas-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.saas-tab {
  flex: 1; padding: 10px; font-size: 13px; color: var(--text-muted);
  background: transparent; border: none; border-bottom: 2px solid transparent;
}
.saas-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

.ws-switcher {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-2); padding: 6px 10px; border-radius: var(--radius);
  cursor: pointer; transition: background 0.08s;
}
.ws-switcher:hover { background: var(--accent-bg); }
.ws-list { display: flex; flex-direction: column; gap: 4px; }
.ws-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2);
  cursor: pointer; transition: background 0.08s;
}
.ws-item:hover { background: var(--accent-bg); }
.ws-item.current { border: 1px solid var(--accent); }

/* JIRA import modal */
.jira-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.jira-tab {
  padding: 8px 14px; font-size: 13px; color: var(--text-muted);
  border-bottom: 2px solid transparent;
  background: transparent;
}
.jira-tab:hover { color: var(--text); }
.jira-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

/* ============================================================
   Pages (Notion-like docs) + Sticky notes — added 2026-05-27
   ============================================================ */

.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.page-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.page-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(99, 102, 241, .25);
}
.page-card-icon { font-size: 24px; line-height: 1; padding-top: 2px; }
.page-card-body { flex: 1; min-width: 0; }
.page-card-title { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.page-card-preview { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.page-card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.page-doc { max-width: 760px; margin: 0 auto; padding: 8px 4px 80px; }
.page-doc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.page-doc-actions { display: flex; gap: 6px; }
.page-doc-title-row { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.page-doc-icon { font-size: 48px; line-height: 1; }
.page-doc-title { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.page-doc-body { font-size: 15px; line-height: 1.7; color: var(--text); }
.page-doc-body h1 { font-size: 28px; font-weight: 700; margin: 32px 0 14px; letter-spacing: -0.01em; }
.page-doc-body h2 { font-size: 22px; font-weight: 600; margin: 26px 0 12px; letter-spacing: -0.01em; }
.page-doc-body h3 { font-size: 18px; font-weight: 600; margin: 22px 0 10px; }
.page-doc-body p { margin: 0 0 14px; }
.page-doc-body ul, .page-doc-body ol { margin: 0 0 14px; padding-left: 26px; }
.page-doc-body li { margin: 4px 0; }
.page-doc-body code { background: var(--surface-2, var(--bg)); padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, "SF Mono", monospace; font-size: 13px; border: 1px solid var(--border); }
.page-doc-body pre { background: var(--surface-2, var(--bg)); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; overflow-x: auto; }
.page-doc-body pre code { background: none; border: none; padding: 0; font-size: 13px; }
.page-doc-body blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; margin: 0 0 14px; color: var(--text-muted); font-style: italic; }
.page-doc-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.page-doc-body strong { font-weight: 600; }

/* Sticky color picker (used in sticky modal) */
.sticky-color-picker { display: flex; gap: 8px; }
.sticky-color {
  width: 34px; height: 34px; border-radius: 8px; border: 2px solid transparent;
  cursor: pointer; transition: transform .12s, border-color .12s;
}
.sticky-color:hover { transform: scale(1.08); }
.sticky-color.selected { border-color: var(--text); transform: scale(1.08); }
.sticky-color-yellow   { background: #fef3a7; }
.sticky-color-pink     { background: #fbcfe8; }
.sticky-color-blue     { background: #bfdbfe; }
.sticky-color-green    { background: #bbf7d0; }
.sticky-color-lavender { background: #ddd6fe; }

/* Sticky-card display (reused on dashboards, retros, page bodies) */
.sticky-card {
  padding: 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1f2937;
  box-shadow: 0 2px 6px -2px rgba(0,0,0,.15);
  cursor: grab;
  min-height: 80px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.sticky-card.sticky-color-yellow   { background: #fef3a7; }
.sticky-card.sticky-color-pink     { background: #fbcfe8; }
.sticky-card.sticky-color-blue     { background: #bfdbfe; }
.sticky-card.sticky-color-green    { background: #bbf7d0; }
.sticky-card.sticky-color-lavender { background: #ddd6fe; }

/* Subtle UI polish — small differentiator from Plane:
   - rounder primary CTAs
   - softer drop shadow on primary
   - more breathing room between nav items */
.btn-primary {
  border-radius: 10px !important;
  box-shadow: 0 2px 8px -2px rgba(99, 102, 241, .35);
}
.btn-primary:hover {
  box-shadow: 0 4px 14px -2px rgba(99, 102, 241, .45);
}
.nav-item { padding-top: 8px !important; padding-bottom: 8px !important; }

/* ============================================================
   Velcy v3 — Apple-tech UI polish (added 2026-05-30)
   ============================================================ */

/* Buttons — softer pill primary with gradient + glow */
.btn { border-radius: var(--radius); letter-spacing: -0.005em; transition: background .2s ease, box-shadow .2s ease, transform .12s ease; }
.btn-primary { background: var(--grad); border-color: transparent; box-shadow: var(--shadow-accent); border-radius: var(--radius-pill); padding: 7px 16px; }
.btn-primary:hover { background: var(--grad); filter: brightness(1.05); box-shadow: 0 8px 24px -8px rgba(10,132,255,.5); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ai { background: var(--grad-soft); color: var(--accent); border-color: rgba(10,132,255,.2); border-radius: var(--radius-pill); }
.btn-ai:hover { background: var(--accent-bg); border-color: var(--accent); }

/* Sidebar — cleaner, more breathing room */
.sidebar { padding: 18px 12px; }
.logo { padding: 4px 8px 16px; margin-bottom: 4px; }
.logo-text { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.logo-text small { font-size: 11px; font-weight: 500; color: var(--text-faint); }
.nav-section { font-size: 11px; letter-spacing: 0.06em; color: var(--text-faint); padding: 16px 10px 6px; font-weight: 600; }
.nav-item { padding: 8px 10px; border-radius: var(--radius); font-size: 13.5px; transition: background .15s ease, color .15s ease; }
.nav-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.nav-item.active i { color: var(--accent); }

/* Topbar — flatter, monospace breadcrumb feel */
.topbar { border-bottom: 1px solid var(--border); padding: 0 24px; gap: 16px; }
.topbar-title { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.topbar-sub { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }

/* Page header */
.page-title { font-size: 24px; letter-spacing: -0.02em; font-weight: 700; }
.page-subtitle { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

/* Sprint board cards — match the landing mockup */
.kanban .card .id, .card-id, .task-id, [class*="task-key"] { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); letter-spacing: -.01em; }
.kanban .col, .board-col { background: transparent; }
.kanban .col-header, .col-head { display:flex; align-items:center; justify-content:space-between; padding: 0 4px 12px; }
.kanban .col-header .name, .col-head .name { font-size: 13px; font-weight: 600; color: var(--text-muted); display:inline-flex; align-items:center; gap:8px; }
.kanban .col-header .count, .col-head .count { font-size: 11px; color: var(--text-faint); background: var(--surface-2); padding: 2px 8px; border-radius: 999px; font-weight: 500; }

/* ============================================================
   Sticky notes board (Dashboard widget + on Pages)
   ============================================================ */
.sticky-board { position: relative; min-height: 320px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-top: 20px; overflow: hidden; }
.sticky-board-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 12px; }
.sticky-board-title { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.sticky-board-empty { color: var(--text-faint); font-size: 13px; padding: 40px; text-align: center; font-style: italic; }
.sticky-note { position: absolute; min-width: 180px; max-width: 240px; min-height: 120px; padding: 14px 14px 28px; border-radius: 10px; font-size: 13px; line-height: 1.45; color: #1f2937; box-shadow: 0 4px 14px -4px rgba(0,0,0,.18); cursor: grab; user-select: none; white-space: pre-wrap; word-wrap: break-word; transition: box-shadow .2s ease, transform .12s ease; }
.sticky-note:hover { box-shadow: 0 8px 20px -6px rgba(0,0,0,.25); }
.sticky-note.dragging { cursor: grabbing; transition: none; z-index: 1000; box-shadow: 0 14px 30px -8px rgba(0,0,0,.35); transform: scale(1.02); }
.sticky-note .sn-actions { position: absolute; top: 6px; right: 6px; display: none; gap: 4px; }
.sticky-note:hover .sn-actions { display: flex; }
.sticky-note .sn-actions button { background: rgba(0,0,0,.08); border: 0; width: 22px; height: 22px; border-radius: 6px; cursor: pointer; color: #374151; display:inline-flex; align-items:center; justify-content:center; font-size: 13px; }
.sticky-note .sn-actions button:hover { background: rgba(0,0,0,.18); }
.sticky-note.sticky-color-yellow   { background: linear-gradient(180deg,#fef6ad,#fef3a7); }
.sticky-note.sticky-color-pink     { background: linear-gradient(180deg,#fbd5e5,#fbcfe8); }
.sticky-note.sticky-color-blue     { background: linear-gradient(180deg,#c2dbfd,#bfdbfe); }
.sticky-note.sticky-color-green    { background: linear-gradient(180deg,#c4f6cd,#bbf7d0); }
.sticky-note.sticky-color-lavender { background: linear-gradient(180deg,#e0daff,#ddd6fe); }

/* ============================================================
   Notion-style block editor (on Pages)
   ============================================================ */
.page-doc { max-width: 800px; margin: 0 auto; padding: 24px 4px 120px; }
.page-doc-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 16px; }
.page-doc-title-row { display:flex; align-items:center; gap: 18px; margin-bottom: 12px; }
.page-doc-icon { font-size: 56px; line-height: 1; cursor: pointer; user-select: none; }
.page-doc-title { font-size: 40px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; outline: none; cursor: text; }
.page-doc-title:empty::before { content: 'Untitled'; color: var(--text-faint); }
.page-doc-body { font-size: 15.5px; line-height: 1.6; color: var(--text); }

.block { position: relative; margin: 2px 0; padding: 3px 6px 3px 36px; border-radius: 5px; min-height: 1.6em; transition: background .12s ease; }
.block:hover { background: var(--surface-2); }
.block:hover .block-handle { opacity: 1; }
.block-handle { position: absolute; left: 4px; top: 4px; display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s ease; }
.block-handle button { background: transparent; border: 0; width: 22px; height: 22px; border-radius: 5px; color: var(--text-faint); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.block-handle button:hover { background: var(--surface-3); color: var(--text); }
.block-content { outline: none; min-height: 1.5em; }
.block-content:empty::before { content: attr(data-placeholder); color: var(--text-faint); pointer-events: none; }
.block-h1 .block-content { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 20px 0 4px; }
.block-h2 .block-content { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin: 18px 0 4px; }
.block-h3 .block-content { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin: 14px 0 4px; }
.block-quote .block-content { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; color: var(--text-muted); font-style: italic; }
.block-callout { background: var(--accent-bg); border-radius: var(--radius); padding: 12px 14px 12px 40px; }
.block-callout::before { content: '💡'; position: absolute; left: 14px; top: 12px; font-size: 16px; }
.block-code .block-content { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font-family: var(--font-mono); font-size: 13px; white-space: pre-wrap; }
.block-divider { padding: 8px 36px; }
.block-divider::after { content: ''; display: block; border-top: 1px solid var(--border); }
.block-bulleted .block-content::before, .block-numbered .block-content::before, .block-todo .block-content::before {
  display: inline-block; margin-right: 8px; color: var(--text-faint); flex-shrink: 0;
}
.block-bulleted { display: flex; align-items: flex-start; }
.block-bulleted::before { content: '•'; color: var(--text-muted); padding-left: 36px; padding-right: 8px; font-size: 18px; line-height: 1.3; }
.block-bulleted .block-content { padding-left: 0 !important; }
.block-numbered { display: flex; align-items: flex-start; }
.block-numbered::before { content: counter(numbered) '.'; counter-increment: numbered; color: var(--text-muted); padding-left: 36px; padding-right: 8px; font-family: var(--font-mono); font-size: 13px; padding-top: 2px; }
.page-doc-body { counter-reset: numbered; }
.block-todo { display: flex; align-items: flex-start; padding-left: 36px; }
.block-todo .todo-check { width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: 4px; margin-right: 10px; margin-top: 4px; cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease; }
.block-todo.checked .todo-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.block-todo.checked .todo-check::after { content: '✓'; font-size: 12px; font-weight: 700; }
.block-todo.checked .block-content { color: var(--text-faint); text-decoration: line-through; }

/* Slash menu */
.slash-menu { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; min-width: 260px; z-index: 1000; max-height: 320px; overflow-y: auto; }
.slash-menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.slash-menu-item.active, .slash-menu-item:hover { background: var(--accent-bg); }
.slash-menu-icon { width: 32px; height: 32px; border-radius: 6px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.slash-menu-label { font-size: 13px; font-weight: 500; }
.slash-menu-desc { font-size: 11px; color: var(--text-faint); }

/* Page save indicator */
.page-save-indicator { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); }
.page-save-indicator.saving { color: var(--accent); }
.page-save-indicator.saved { color: var(--success); }

/* ============================================================
   AI provider Settings + AI panel polish
   ============================================================ */
.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.settings-section-title { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 4px; }
.settings-section-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.ai-provider-list { display: flex; flex-direction: column; gap: 10px; }
.ai-provider-card { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.ai-provider-card.is-default { border-color: var(--accent); background: var(--accent-bg); }
.ai-provider-card .ap-kind { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); background: var(--surface); padding: 3px 8px; border-radius: 999px; }
.ai-provider-card .ap-name { font-weight: 600; font-size: 14px; }
.ai-provider-card .ap-model { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.ai-provider-card .ap-key { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-left: auto; }
.ai-provider-card .ap-actions { display: flex; gap: 6px; }
.ai-provider-add { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.ai-provider-add .form-row { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; margin-bottom: 10px; }
.ai-provider-add .form-row.single { grid-template-columns: 1fr; }
.ai-provider-add label { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 4px; font-weight: 500; }

.ai-panel-title { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.ai-panel-no-provider { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
.ai-panel-no-provider strong { color: var(--text); }

/* ============================================================
   View toggle, Pages list, Team quick-add, Inline sticky body
   added 2026-05-30
   ============================================================ */
.view-toggle { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.view-btn { background: transparent; border: 0; padding: 6px 12px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.view-btn:hover { color: var(--text); }
.view-btn.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.view-btn i { font-size: 15px; }

.pages-list { display: flex; flex-direction: column; gap: 1px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-top: 16px; }
.page-row { display: grid; grid-template-columns: 28px 1fr 2fr 90px 36px; gap: 12px; align-items: center; padding: 11px 16px; background: var(--bg); cursor: pointer; transition: background .12s; }
.page-row + .page-row { border-top: 1px solid var(--border); }
.page-row:hover { background: var(--surface); }
.page-row-icon { font-size: 18px; }
.page-row-title { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-row-preview { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-row-date { text-align: right; }
.page-row-actions { display: flex; justify-content: flex-end; }

.team-quick-add { display: grid; grid-template-columns: 1.4fr 1.4fr auto; gap: 10px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; }
.team-quick-add .input { font-size: 14px; }

/* Inline-editable sticky body */
.sticky-note .sn-body { white-space: pre-wrap; outline: none; min-height: 60px; cursor: text; }
.sticky-note .sn-body:empty::before { content: attr(data-placeholder); color: rgba(0,0,0,.35); font-style: italic; pointer-events: none; }
.sticky-note .sn-body:focus { outline: none; }
.sticky-note .sn-actions button.sn-color { font-size: 12px; }

/* ============================================================
   Multi-team Teams page + Notes board — added 2026-05-30 (B)
   ============================================================ */
.team-create-row { display: grid; grid-template-columns: 28px 1fr 50px auto; gap: 10px; align-items: center; padding: 12px 14px; background: linear-gradient(135deg, rgba(10,132,255,.06), rgba(94,92,230,.06)); border: 1px dashed var(--accent); border-radius: 12px; margin-bottom: 18px; }
.team-create-row > i { color: var(--accent); font-size: 18px; justify-self: center; }
.team-create-row .qa-color { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: transparent; padding: 2px; cursor: pointer; }

.team-group { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.team-group-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.team-group-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: var(--text); }
.team-group-title [contenteditable] { outline: none; border-radius: 4px; padding: 2px 4px; min-width: 80px; }
.team-group-title [contenteditable]:focus { background: var(--bg); box-shadow: 0 0 0 2px var(--accent); }
.team-group-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.team-group .team-quick-add { background: var(--bg); margin-bottom: 12px; }
.team-group-unassigned { border-style: dashed; }

/* Notes board full-page variant — generous height for the workspace stickies tab */
.sticky-board.sticky-board-full { min-height: calc(100vh - 220px); }

/* ============================================================
   Guide page + Onboarding — 2026-05-30 (C)
   ============================================================ */

/* Onboarding */
.onboarding-card { background: linear-gradient(135deg, rgba(10,132,255,.06), rgba(94,92,230,.06)); border: 1px solid rgba(10,132,255,.18); border-radius: 16px; padding: 18px 20px; margin: 18px 0; }
.onboarding-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.onboarding-title { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.onboarding-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.onboarding-bar { height: 4px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.onboarding-fill { height: 100%; background: var(--grad); transition: width .25s ease; }
.onboarding-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ob-step { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .12s, transform .12s; }
.ob-step:hover { border-color: var(--accent); transform: translateY(-1px); }
.ob-step.done { opacity: .58; cursor: default; }
.ob-step.done:hover { transform: none; border-color: var(--border); }
.ob-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.ob-step.done .ob-step-num { background: var(--grad); border-color: transparent; color: white; }
.ob-step-body { min-width: 0; }
.ob-step-label { font-size: 13px; font-weight: 600; color: var(--text); }
.ob-step-cta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* Guide page */
.guide-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; margin-top: 8px; }
.guide-toc { position: sticky; top: 80px; align-self: start; display: flex; flex-direction: column; gap: 4px; padding: 8px 0; }
.guide-toc a { padding: 8px 12px; font-size: 13px; color: var(--text-muted); text-decoration: none; border-radius: 8px; cursor: pointer; transition: background .12s, color .12s; border-left: 2px solid transparent; }
.guide-toc a:hover { background: var(--surface); color: var(--text); border-left-color: var(--accent); }
.guide-content { display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.guide-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px 28px; scroll-margin-top: 80px; }
.guide-card h2 { font-size: 20px; font-weight: 700; margin: 0 0 16px; letter-spacing: -0.01em; color: var(--text); }
.guide-card h3 { font-size: 15px; font-weight: 600; margin: 22px 0 10px; color: var(--text); }
.guide-card h4 { font-size: 14px; font-weight: 600; margin: 0 0 4px; color: var(--text); }
.guide-card p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0 0 10px; }
.guide-card a { color: var(--accent); cursor: pointer; text-decoration: none; border-bottom: 1px dotted currentColor; }
.guide-card a:hover { border-bottom-style: solid; }
.guide-card kbd { background: var(--bg); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; color: var(--text); }
.guide-card code { background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; font-family: var(--font-mono, ui-monospace, monospace); }

.guide-steps { padding-left: 20px; }
.guide-steps li { font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 4px; }

.concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.concept-grid > div { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.concept-grid p { font-size: 12.5px; line-height: 1.5; margin: 0; }

.kbd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; }
.kbd-grid > div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.kbd-grid > div span { color: var(--text); }

.g-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.g-table th { text-align: left; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); font-weight: 600; }
.g-table td { padding: 8px 12px; border: 1px solid var(--border); color: var(--text-muted); }
.g-table td b { color: var(--text); }

.g-glossary { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 13.5px; }
.g-glossary dt { font-weight: 600; color: var(--text); }
.g-glossary dd { margin: 0; color: var(--text-muted); line-height: 1.5; }

.guide-card details { margin: 8px 0; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.guide-card details[open] { background: var(--surface); }
.guide-card details summary { cursor: pointer; font-weight: 500; color: var(--text); font-size: 13.5px; outline: none; }
.guide-card details p { margin: 8px 0 0; }

@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc { position: static; flex-direction: row; flex-wrap: wrap; padding: 0; }
}

/* PI planning — inline "Add sprint" tile */
.pi-add-sprint { background: linear-gradient(135deg, rgba(10,132,255,.04), rgba(94,92,230,.04)); border: 1px dashed var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; min-height: 200px; transition: background .12s, transform .12s; }
.pi-add-sprint:hover { background: linear-gradient(135deg, rgba(10,132,255,.10), rgba(94,92,230,.10)); transform: translateY(-1px); }
.pi-add-inner { text-align: center; color: var(--text-muted); }
.pi-add-inner i { font-size: 24px; color: var(--accent); display: block; margin-bottom: 6px; }
.pi-add-title { font-size: 14px; font-weight: 600; color: var(--text); }
.pi-add-sub { font-size: 12px; margin-top: 2px; }

/* Roadmap legend chips */
.rm-key { display: inline-block; width: 14px; height: 10px; vertical-align: middle; margin-right: 5px; border-radius: 2px; }
.rm-key-epic { background: var(--accent); }
.rm-key-sprint { background: transparent; border: 1px solid var(--accent); height: 8px; }
.rm-key-today { width: 2px; height: 12px; background: var(--danger); border-radius: 0; }

/* ============================================================
   UI dialogs — picker list (sprint, etc.) — 2026-05-31
   ============================================================ */
.picker-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.picker-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--bg); cursor: pointer; transition: background .12s; }
.picker-item:hover { background: var(--surface); }
.picker-item i { font-size: 18px; color: var(--accent); flex-shrink: 0; }
.picker-item-body { min-width: 0; flex: 1; }
.picker-item-title { font-size: 14px; font-weight: 600; color: var(--text); }
.picker-item-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* ============================================================
   Floating Ask AI launcher — 2026-05-31
   ============================================================ */
.ai-launcher {
  position: fixed; bottom: 22px; right: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  background: var(--grad);
  color: white; font-weight: 600; font-size: 13.5px; letter-spacing: -0.005em;
  border: none; cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(10,132,255,.55), 0 2px 6px rgba(0,0,0,.08);
  z-index: 55;
  transition: transform .12s ease, box-shadow .12s ease, opacity .18s ease;
}
.ai-launcher:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(10,132,255,.6), 0 4px 10px rgba(0,0,0,.10); }
.ai-launcher i { font-size: 17px; }
.ai-launcher.hidden { opacity: 0; pointer-events: none; transform: translateY(8px) scale(0.96); }

@media (max-width: 768px) {
  .ai-launcher { bottom: 16px; right: 16px; padding: 11px 16px; }
  .ai-launcher span { display: none; }
}

/* ============================================================
   Projects switcher + My tasks badge + bulk bar + search dropdown
   + mobile responsive sweep — 2026-05-31
   ============================================================ */

/* Project switcher (top of sidebar) */
.project-switcher { padding: 8px 12px 12px; }
.proj-switch { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .12s; }
.proj-switch:hover { border-color: var(--accent); }
.proj-switch .ti { color: var(--text-muted); font-size: 14px; }
.proj-info { flex: 1; min-width: 0; text-align: left; }
.proj-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.proj-menu { position: relative; margin-top: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.18); padding: 4px; max-height: 360px; overflow-y: auto; z-index: 5; }
.proj-menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.proj-menu-item:hover { background: var(--bg); }
.proj-menu-item.active { background: linear-gradient(135deg, rgba(10,132,255,.08), rgba(94,92,230,.08)); }
.proj-menu-item.active .proj-name { color: var(--accent); }
.proj-menu-divider { height: 1px; background: var(--border); margin: 4px 6px; }
.proj-menu-item.proj-create { color: var(--accent); }
.proj-menu-item.proj-create i { color: var(--accent); font-size: 16px; width: 10px; }

/* My-tasks "new" badge — uses gradient like a pill */
.nav-badge.nav-badge-new { background: var(--grad); color: white; border: 0; }

/* Bulk action bar */
.bulk-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(135deg, rgba(10,132,255,.08), rgba(94,92,230,.08)); border: 1px solid var(--accent); border-radius: 10px; margin-bottom: 12px; }
.bulk-bar b { color: var(--accent); }

/* Global search dropdown */
.search-box { position: relative; }
.search-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 30px -10px rgba(0,0,0,.18); max-height: 420px; overflow-y: auto; z-index: 50; display: none; padding: 4px; }
.sd-group-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 10px 4px; }
.sd-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.sd-item:hover { background: var(--bg); }
.sd-item > i { color: var(--accent); font-size: 16px; flex-shrink: 0; }
.sd-title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.sd-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.sd-empty { padding: 18px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* My-tasks priority cards */
.card .card-title i { margin-right: 6px; }

/* ============================================================
   Mobile responsive sweep
   ============================================================ */
@media (max-width: 900px) {
  .sidebar { position: fixed; top: 0; bottom: 0; left: -260px; width: 260px; z-index: 100; transition: left .2s ease; box-shadow: 0 0 30px rgba(0,0,0,.18); }
  .sidebar.open { left: 0; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 10px 14px; }
  .search-box { display: none; }
  .topbar-title { font-size: 16px; }
  .topbar-sub { display: none; }
  .pi-layout { grid-template-columns: 1fr; }
  .board-container { overflow-x: auto; padding-bottom: 10px; }
  .board-container .column { min-width: 260px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .modal { width: 95vw; max-width: none; max-height: 90vh; }
  .ai-panel { width: 100%; right: -100%; }
  .roadmap-row-label { font-size: 12px; }
  .pages-list .page-row { grid-template-columns: 24px 1fr 36px; }
  .pages-list .page-row .page-row-preview,
  .pages-list .page-row .page-row-date { display: none; }
  .team-quick-add { grid-template-columns: 1fr auto; }
  .team-quick-add .qa-role { display: none; }
  .onboarding-steps { grid-template-columns: 1fr; }
  .bulk-bar { flex-wrap: wrap; }
  .data-table th, .data-table td { padding: 8px 6px; font-size: 12.5px; }
  .data-table th:nth-child(5), .data-table td:nth-child(5),
  .data-table th:nth-child(6), .data-table td:nth-child(6) { display: none; }
  .ai-launcher { bottom: 14px; right: 14px; padding: 10px 14px; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .field-row.field-row-3, .field-row.field-row-2 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================================================
   Workspace (tenant) switcher + Tenants admin page — 2026-05-31 (C)
   ============================================================ */
.workspace-switcher { padding: 12px 12px 4px; }
.ws-switch { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid transparent; background: linear-gradient(135deg, rgba(10,132,255,.06), rgba(94,92,230,.06)); cursor: pointer; transition: border-color .12s; }
.ws-switch:hover { border-color: var(--accent); }
.ws-switch > i { color: var(--accent); font-size: 14px; }
.ws-switch .ti-chevron-down { font-size: 14px; color: var(--text-muted); margin-left: auto; }
.ws-info { flex: 1; min-width: 0; text-align: left; }
.ws-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ws-menu { position: relative; margin-top: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.18); padding: 4px; max-height: 380px; overflow-y: auto; z-index: 6; }
.ws-menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; cursor: pointer; }
.ws-menu-item:hover { background: var(--bg); }
.ws-menu-item > i { color: var(--text-muted); font-size: 15px; flex-shrink: 0; }
.ws-menu-item.active { background: linear-gradient(135deg, rgba(10,132,255,.08), rgba(94,92,230,.08)); }
.ws-menu-item.active .ws-name { color: var(--accent); }

/* Tenants admin page */
.tenants-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 8px; }
.tenant-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: border-color .12s, transform .12s; }
.tenant-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.tenant-card.tenant-active { border-color: var(--accent); background: linear-gradient(135deg, rgba(10,132,255,.05), rgba(94,92,230,.05)); }
.tenant-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; gap: 8px; }
.tenant-name { font-size: 15px; font-weight: 700; color: var(--text); }
.tenant-slug { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.tenant-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; }
.tenant-stats > div { font-size: 12px; }
.tenant-stats strong { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.tenant-stats span { color: var(--text-muted); }
.tenant-stats .tenant-tasks { grid-column: span 3; padding-top: 6px; border-top: 1px dashed var(--border); margin-top: 4px; }
.tenant-stats .tenant-tasks strong { font-size: 18px; color: var(--accent); display: inline-block; margin-right: 6px; }
