/* CAFA Command Center v5.0 - Layout (Shell, Topbar, Sidebar, Main). Hybrid UI, rounded corners. */
/* ══════ SHELL ══════ */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: 48px 1fr; height: calc(100vh - 30px); overflow: hidden; position: relative; z-index: 1; min-width: 600px; }
.shell.detail-open { grid-template-columns: 220px minmax(0, 1fr) 400px; }
.shell.detail-open .detail-panel { display: flex; }

/* ══════ TOPBAR ══════ */
.topbar {
  grid-column: 1 / -1; background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 100;
  min-width: 0; height: 48px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden; flex: 1; }

/* v5.0: Logo with diamond mark and stacked text */
.logo {
  display: flex; align-items: center; gap: 8px;
  padding-right: 16px; border-right: 1px solid var(--border); margin-right: 8px;
}
.logo svg { width: 18px; height: 18px; flex-shrink: 0; }
.logo-stack { display: flex; flex-direction: column; line-height: 1.15; text-align: center; align-items: center; }
.logo-phase {
  font-family: var(--serif); font-size: 10px; font-weight: 500;
  color: var(--gold); letter-spacing: 0.5px;
}
.logo-app {
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  color: var(--sidebar-text, var(--text-2)); letter-spacing: 0.2px;
}

/* Legacy logo pill (backward compat) */
.logo-pill {
  font-size: 13px; font-weight: 800; letter-spacing: -.3px;
  background: linear-gradient(135deg, #C9A84C, #E2C97E); color: #081E28;
  padding: 5px 14px; border-radius: var(--radius);
}
.version-pill { font-size: 9px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius); background: transparent; color: var(--text-4); display: none; }

/* v5.0: Cmd+K Search bar in topbar */
.cmd-search {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: rgba(26,107,138,0.08);
  border: 1px solid rgba(26,107,138,0.15); border-radius: var(--radius);
  cursor: pointer; transition: all 0.2s var(--ease-out);
}
.cmd-search:hover { background: rgba(26,107,138,0.12); border-color: rgba(26,107,138,0.25); }
.cmd-search-icon { font-size: 12px; color: var(--text-3); }
.cmd-search-text { font-size: 12px; color: var(--text-3); }
.cmd-search-kbd {
  font-size: 10px; color: var(--text-2); background: rgba(0,0,0,0.2);
  padding: 2px 6px; border-radius: 3px; font-family: var(--sans);
}

/* v5.0: Focus Timer in topbar */
.topbar-focus-timer {
  display: none; align-items: center; gap: 10px; margin-left: 16px;
  padding: 6px 14px; background: var(--focus-glow);
  border: 1px solid rgba(245,158,11,0.4); border-radius: var(--radius);
  animation: focusPulse 2s ease-in-out infinite;
}
.topbar-focus-timer.active { display: flex; }
@keyframes focusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.25); }
  50% { box-shadow: 0 0 0 4px rgba(245,158,11,0.12); }
}
.focus-dot {
  width: 8px; height: 8px; background: var(--focus);
  border-radius: 50%; animation: blink 1s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.focus-label {
  font-size: 10px; font-weight: 500; color: var(--focus);
  text-transform: uppercase; letter-spacing: 1px;
}
.focus-time {
  font-family: var(--serif); font-size: 16px; font-weight: 400;
  color: var(--text); letter-spacing: 0.5px; min-width: 52px;
}
.focus-task-name-topbar {
  font-size: 12px; color: var(--text-2); max-width: 180px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.focus-stop-btn {
  padding: 4px 10px; font-size: 10px; font-weight: 600;
  color: var(--dark); background: var(--focus);
  border: 1px solid var(--focus); border-radius: var(--radius-sm);
  cursor: pointer; font-family: var(--sans);
  text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.15s;
}
.focus-stop-btn:hover { background: var(--focus-dark); border-color: var(--focus-dark); }

/* Role Switcher */
.role-switcher {
  display: flex; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 0; overflow: hidden; margin-left: 8px;
}
.role-btn {
  padding: 6px 14px; font-size: 11px; font-weight: 600; color: var(--text-3);
  cursor: pointer; transition: all .2s; border: none; background: none; font-family: var(--sans);
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.role-btn:not(:last-child) { border-right: 1px solid var(--border); }
.role-btn:hover { color: var(--text-2); background: rgba(250,248,243,.04); }
.role-btn.active-ceo { background: var(--teal-dim); color: var(--teal); }
.role-btn.active-mgr { background: var(--purple-dim); color: var(--purple); }
.role-btn.active-staff { background: var(--green-dim); color: var(--green); }
.role-btn .r-dot { width: 7px; height: 7px; border-radius: 50%; }

/* Top tabs */
.top-tabs { display: flex; gap: 0; height: 100%; align-items: stretch; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.top-tabs::-webkit-scrollbar { display: none; }
.top-tab {
  display: flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 12px; font-weight: 600;
  color: var(--text-3); cursor: pointer; border-bottom: none; transition: all .2s; user-select: none; white-space: nowrap; flex-shrink: 0;
}
.top-tab:hover { color: var(--text-2); }
.top-tab.active { color: var(--teal); }
.top-tab .pin-badge { font-size: 8px; font-weight: 700; padding: 2px 5px; border-radius: 0; background: var(--purple-dim); color: var(--purple); }

/* Manager top tabs — purple accent */
.top-tab.mgr-tab.active { color: var(--purple); }

.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.notif-btn {
  position: relative; width: 32px; height: 32px; border-radius: var(--radius); 
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-3); transition: all .15s;
}
.notif-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.notif-btn svg { width: 18px; height: 18px; }
.notif-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; border: 2px solid var(--panel); }

/* v5.0: Topbar icon buttons */
.topbar-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); cursor: pointer; border-radius: var(--radius);
  transition: all 0.15s; position: relative;
}
.topbar-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* Pomodoro widget */
.pomo-widget {
  background: var(--surface); border: 1px solid var(--border); border-radius: 0;
  margin-top: 8px; overflow: hidden;
}
.pomo-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; font-size: 11px; font-weight: 600; color: var(--text-3);
  cursor: pointer; transition: all .15s;
}
.pomo-header:hover { color: var(--text-2); background: rgba(250,248,243,.03); }
.pomo-toggle-icon { font-size: 10px; transition: transform .2s; }
.pomo-toggle-icon.open { transform: rotate(90deg); }
.pomo-body { padding: 10px; text-align: center; border-top: 1px solid var(--border); }
.pomo-timer { font-size: 28px; font-weight: 900; font-family: var(--mono); color: var(--teal); margin-bottom: 4px; }
.pomo-session { font-size: 9px; color: var(--text-4); margin-bottom: 8px; }
.pomo-btns { display: flex; gap: 4px; }
.pomo-btn {
  flex: 1; padding: 5px 0; border-radius: 0; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-3); font-size: 10px; font-weight: 600;
  font-family: var(--sans); text-align: center; cursor: pointer; transition: all .15s;
}
.pomo-btn:hover { border-color: var(--border-hover); color: var(--text-2); }
.pomo-btn.pomo-start { background: var(--teal-dim); color: var(--teal); border-color: rgba(26,107,138,.2); }

.avatar {
  width: 32px; height: 32px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #FAF8F3; cursor: pointer; transition: transform 0.15s;
}
.avatar:hover { transform: scale(1.05); }

/* v5.0: Avatar Dropdown */
.avatar-wrap { position: relative; }
.avatar-dropdown {
  position: absolute; top: 40px; right: 0; width: 200px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all 0.2s var(--ease-out); z-index: 200;
}
.avatar-wrap:hover .avatar-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.dropdown-name { font-size: 13px; font-weight: 500; color: var(--text); }
.dropdown-role { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  font-size: 12px; color: var(--text-2); cursor: pointer; transition: all 0.12s;
}
.dropdown-item:hover { background: rgba(26,107,138,0.1); color: var(--text); }
.dropdown-item svg { width: 14px; height: 14px; }
.dropdown-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 4px 0; }
.dropdown-item.danger:hover { background: rgba(214,69,69,0.1); color: var(--red); }

/* v5.0: Updated notification badge */
.notif-badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px;
  padding: 0 5px; font-size: 10px; font-weight: 800; font-family: var(--sans);
  line-height: 16px; text-align: center; color: #fff;
  background: var(--red); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.sync-pill { font-size: 9px; color: var(--text-4); font-family: var(--mono); display: flex; align-items: center; gap: 4px; }
.sync-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.role-indicator {
  font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius); letter-spacing: .3px;
}

/* ══════ SIDEBAR ══════ */
/* v5.0: Sidebar with proper flex layout for footer */
.sidebar {
  grid-column: 1; grid-row: 2;
  background: var(--panel); 
  overflow: hidden;
  display: flex; flex-direction: column;
  width: 220px; min-width: 220px;
  border-right: 1px solid rgba(201,168,76,0.12);
}
.sidebar::-webkit-scrollbar { width: 0; }

/* Focus Task Bar (sidebar) */

/* ══════ FOCUS LOG ══════ */
.focus-log {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}
.focus-log-header { margin-bottom: 14px; }
.focus-log-title {
  font-size: 10px; font-weight: 800; letter-spacing: .8px; color: var(--text-3);
  margin-bottom: 6px;
}
.focus-log-meta {
  display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-3);
}
.focus-rate-pill {
  font-size: 10px; font-weight: 800; color: var(--text); padding: 3px 10px;
  border-radius: 0; margin-left: auto;
}
.focus-log-timeline { display: flex; flex-direction: column; gap: 6px; }
.focus-log-row {
  display: grid; grid-template-columns: 1fr 120px 50px 28px; gap: 10px;
  align-items: center; font-size: 11px;
}
.focus-log-name {
  color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.focus-log-bar-wrap {
  height: 6px; background: var(--surface); border-radius: 0; overflow: hidden;
}
.focus-log-bar {
  height: 100%; border-radius: 0; transition: width .3s ease;
}
.focus-log-time {
  text-align: right; font-weight: 700; font-family: var(--mono); color: var(--teal);
}
.focus-log-sessions {
  text-align: center; font-size: 9px; color: var(--text-4); font-weight: 600;
}
.focus-log-footer {
  font-size: 9px; color: var(--text-4); margin-top: 12px; padding-top: 8px;
  border-top: 1px solid var(--border); text-align: center;
}

/* ══════ CEO TIME VIEW (Modal) ══════ */
.time-log-section { margin-top: 12px; }
.time-log-title {
  font-size: 10px; font-weight: 800; letter-spacing: .6px; color: var(--text-3);
  margin-bottom: 8px;
}
.time-log-row {
  display: grid; grid-template-columns: 1fr 80px 40px 28px; gap: 8px;
  align-items: center; font-size: 11px; padding: 5px 0;
  border-bottom: 1px solid rgba(250,248,243,.04);
}
.time-log-task { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time-log-bar-wrap { height: 5px; background: var(--surface); border-radius: 0; overflow: hidden; }
.time-log-bar { height: 100%; border-radius: 0; background: var(--teal); }
.time-log-time { text-align: right; font-weight: 700; font-family: var(--mono); color: var(--teal); font-size: 10px; }
.time-log-sess { text-align: center; font-size: 9px; color: var(--text-4); }
.time-log-summary {
  display: flex; justify-content: space-between; font-size: 10px; color: var(--text-3);
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border);
}
.time-log-rate {
  font-weight: 800; padding: 2px 8px; border-radius: 0; font-size: 9px; color: var(--text);
}

/* Focus Task Bar (sidebar) */
.focus-task-bar {
  background: rgba(26,107,138,.06); border: 1px solid rgba(26,107,138,.15);
  border-radius: 0; padding: 10px 12px; margin-bottom: 8px;
}
.focus-task-indicator { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.focus-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: focusPulse 2s ease-in-out infinite;
}
@keyframes focusPulse { 0%,100%{opacity:1;box-shadow:0 0 4px var(--teal)} 50%{opacity:.6;box-shadow:0 0 12px var(--teal)} }
.focus-task-label { font-size: 9px; font-weight: 800; color: var(--teal); letter-spacing: .6px; }
.focus-idle-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-4); opacity: .4;
}
.focus-task-timer { margin-left: auto; font-size: 11px; font-weight: 700; font-family: var(--mono); color: var(--teal); }
.focus-total-time { font-size: 9px; font-weight: 500; font-family: var(--mono); color: var(--text-3); margin-left: 8px; }
.focus-task-total { font-size: 9px; font-weight: 600; font-family: var(--mono); color: var(--text-3); margin-left: 6px; }
.focus-task-name {
  font-size: 11px; color: var(--text-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.focus-sessions-hint { font-size: 9px; color: var(--text-4); margin-top: 2px; }

/* Mini Focus Log (sidebar expandable) */
.focus-task-bar { cursor: pointer; transition: all .15s; }
.focus-task-bar:hover { border-color: rgba(26,107,138,.25); }
.focus-mini-log {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(26,107,138,.1);
}
.fml-row {
  display: grid; grid-template-columns: 8px 1fr 42px 20px; gap: 6px;
  align-items: center; padding: 4px 0; font-size: 10px;
}
.fml-row.fml-active { font-weight: 600; }
.fml-dot { width: 6px; height: 6px; border-radius: 50%; }
.fml-name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fml-active .fml-name { color: var(--teal); }
.fml-time { text-align: right; font-weight: 700; font-family: var(--mono); color: var(--text-2); font-size: 9px; }
.fml-active .fml-time { color: var(--teal); }
.fml-sess { text-align: center; font-size: 8px; color: var(--text-4); }
.fml-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(26,107,138,.08);
  font-size: 9px; color: var(--text-3);
}

/* Time Log on team cards */
.tc-timelog {
  padding: 8px 0 2px; margin-top: 6px; border-top: 1px solid var(--border);
}
.tc-timelog-label { font-size: 9px; font-weight: 700; color: var(--text-4); letter-spacing: .3px; margin-bottom: 6px; }
.tc-timelog-bar {
  display: flex; height: 10px; border-radius: 0; overflow: hidden; gap: 1px;
  background: var(--surface); margin-bottom: 6px;
}
.tc-timelog-seg { height: 100%; min-width: 3px; border-radius: 0; transition: opacity .15s; cursor: default; }
.tc-timelog-seg:hover { opacity: .7; }
.tc-timelog-list { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tc-timelog-item {
  display: flex; align-items: center; gap: 4px; font-size: 9px; color: var(--text-3);
}
.tc-timelog-dot { width: 6px; height: 6px; border-radius: 0; flex-shrink: 0; }
.tc-timelog-time { font-family: var(--mono); font-weight: 600; color: var(--text-2); }

/* Time Log in God Mode modal */
.modal-timelog { margin-top: 16px; }
.modal-timelog-title { font-size: 11px; font-weight: 700; color: var(--text-3); margin-bottom: 10px; }
.modal-tl-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border); font-size: 12px;
}
.modal-tl-row:last-child { border-bottom: none; }
.modal-tl-color { width: 10px; height: 10px; border-radius: 0; flex-shrink: 0; }
.modal-tl-name { flex: 1; color: var(--text-2); }
.modal-tl-sessions { font-size: 10px; color: var(--text-4); }
.modal-tl-total { font-size: 12px; font-weight: 700; font-family: var(--mono); color: var(--text); min-width: 50px; text-align: right; }
.modal-tl-bar {
  display: flex; height: 6px; border-radius: 0; overflow: hidden; gap: 2px; margin-top: 2px;
  background: var(--surface);
}
.modal-tl-seg { height: 100%; border-radius: 0; }
.modal-tl-timeline {
  background: var(--surface); border: 1px solid var(--border); border-radius: 0;
  padding: 12px; margin-top: 10px;
}
.modal-tl-timeline-bar {
  display: flex; height: 20px; border-radius: 0; overflow: hidden; gap: 1px;
  background: var(--bg); margin-bottom: 8px; position: relative;
}
.modal-tl-timeline-seg {
  height: 100%; min-width: 4px; border-radius: 0; position: relative; cursor: default;
}
.modal-tl-timeline-seg:hover::after {
  content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border); padding: 4px 8px; border-radius: 0;
  font-size: 9px; white-space: nowrap; z-index: 10; color: var(--text); font-weight: 600;
}
.modal-tl-times { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-4); font-family: var(--mono); }
.modal-tl-summary {
  display: flex; gap: 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 10px; color: var(--text-3);
}
.modal-tl-summary strong { color: var(--text); font-family: var(--mono); }

/* Focus button on tasks */
.focus-btn {
  font-size: 9px; font-weight: 700; color: var(--text-4); padding: 3px 8px;
  border-radius: 0; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border); background: transparent;
  font-family: var(--sans); transition: all .15s; flex-shrink: 0;
}
.focus-btn:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }
.focus-btn.is-focused {
  background: var(--teal); color: #FAF8F3; border-color: var(--teal); font-weight: 800;
}
.task-item.task-focused {
  border-color: rgba(26,107,138,.2); background: rgba(26,107,138,.03);
  border-left: 3px solid var(--teal);
}

/* Focus on team card */
.tc-focus-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 0; margin-top: 4px; border-top: 1px solid var(--border);
}
.tc-focus-pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 6px var(--teal); animation: focusPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
.tc-focus-name { font-size: 10px; color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-focus-time { font-size: 9px; font-weight: 700; font-family: var(--mono); color: var(--teal); flex-shrink: 0; }

/* Clock Card */
.clock-card { background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 12px; margin-bottom: 8px; }
.clock-tz-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.clock-tz-primary { }
.clock-tz-time { font-size: 24px; font-weight: 900; font-family: var(--mono); color: var(--teal); line-height: 1; }
.clock-tz-label { font-size: 9px; color: var(--text-3); margin-top: 2px; }
.clock-tz-secondary { text-align: right; }
.clock-tz-time-sm { font-size: 16px; font-weight: 700; font-family: var(--mono); color: var(--text-2); line-height: 1; }
.clock-status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.clock-status { font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 0; background: var(--green-dim); color: var(--green); }
.clock-elapsed { font-size: 11px; font-weight: 600; font-family: var(--mono); color: var(--text-3); }
.clock-btns { display: flex; gap: 4px; }
.clock-btn {
  flex: 1; padding: 6px 0; border-radius: 0; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-3); font-size: 9px; font-weight: 600; font-family: var(--sans); text-align: center; cursor: pointer; transition: all .15s;
}
.clock-btn:hover { border-color: var(--border-hover); color: var(--text-2); }
.clock-btn.biz-out { border-color: rgba(26,107,138,.2); color: var(--teal); background: var(--teal-dim); }

.focus-bar { display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; margin-bottom: 4px; }
.focus-track { flex: 1; height: 4px; background: var(--surface-2); border-radius: 0; overflow: hidden; }
.focus-fill { height: 100%; background: var(--teal); border-radius: 0; }
.focus-label { font-size: 9px; color: var(--text-3); font-family: var(--mono); }

.stats-row { display: flex; gap: 6px; margin-bottom: 10px; }
.stat-chip { flex: 1; text-align: center; padding: 6px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 0; }
.stat-val { font-size: 14px; font-weight: 800; font-family: var(--mono); }
.stat-lbl { font-size: 8px; color: var(--text-4); text-transform: uppercase; letter-spacing: .3px; margin-top: 1px; }

.sb-divider { height: 1px; background: rgba(201,168,76,0.12); margin: 12px 16px; }
.sb-section {
  font-size: 9px; font-weight: 600; color: var(--sidebar-muted); letter-spacing: 1px; text-transform: uppercase;
  padding: 16px 16px 8px; display: flex; align-items: center; gap: 6px;
}
.sb-section .new-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.sb-section.mgr-section { color: var(--purple); }

/* v5.0: List items in sidebar */
.sb-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 0;
  font-size: 12px; font-weight: 400; color: var(--sidebar-text); cursor: pointer; 
  transition: all .12s; position: relative;
}
.sb-item:hover { background: rgba(26,107,138,.06); color: var(--cream); }
.sb-item.active { background: rgba(26,107,138,.1); color: var(--cream); }
.sb-item .sb-icon { width: 16px; text-align: center; font-size: 7px; flex-shrink: 0; color: var(--sidebar-muted); }
.sb-item.active .sb-icon { color: var(--cream); }
.sb-svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--sidebar-muted); transition: color .15s; }
.sb-item.active .sb-svg { color: var(--cream); }
.sb-item:hover .sb-svg { color: var(--sidebar-text); }
.sb-item .sb-count { margin-left: auto; font-size: 13px; font-family: var(--serif); font-weight: 400; color: var(--sidebar-muted); }
.sb-item .sb-warn { margin-left: auto; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-sm); background: var(--red-dim); color: var(--red); }
.sb-item .sb-new { margin-left: auto; font-size: 8px; font-weight: 700; padding: 2px 5px; border-radius: var(--radius-sm); background: var(--blue-dim); color: var(--blue); }

/* ══════ NAV ITEMS (v5.0 - teal active state with left bar) ══════ */
.sb-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; 
  border-radius: 0; position: relative;
  font-size: 13px; font-weight: 400; color: var(--sidebar-text, #9FB3BC); 
  cursor: pointer; transition: all .12s;
}
.sb-nav-item::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 0; background: var(--teal); border-radius: 0 2px 2px 0;
  transition: height 0.2s var(--ease-out);
}
.sb-nav-item:hover { background: rgba(26,107,138,.06); color: var(--cream); }
.sb-nav-item.active { 
  background: rgba(26,107,138,.1); color: var(--cream); 
}
.sb-nav-item.active::before { height: 20px; }
.sb-nav-svg {
  width: 18px; height: 18px; flex-shrink: 0; color: var(--sidebar-muted, #6B8896);
  stroke-width: 1.5; transition: all .15s;
}
.sb-nav-item:hover .sb-nav-svg { color: var(--sidebar-text); }
.sb-nav-item.active .sb-nav-svg { color: var(--cream); }
.sb-nav-label { flex: 1; }
.sb-nav-item .sb-count { 
  margin-left: auto; font-size: 13px; font-family: var(--serif); 
  font-weight: 400; color: var(--sidebar-muted); 
}
.sb-nav-item.active .sb-count { color: var(--cream); }
.sb-item.mgr-item { color: var(--purple); }
.sb-item.mgr-item:hover { background: var(--purple-dim); }
.sb-item.mgr-item.active { background: var(--purple-dim); color: var(--purple); font-weight: 600; }
.sb-item.dim { opacity: .4; }
.sb-item.tag-item .tag-dot { width: 8px; height: 8px; border-radius: 0; flex-shrink: 0; }

/* v5.0: List color dots - rounded */
.space-item { gap: 10px !important; }
.space-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.space-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-item:hover .space-name { color: var(--cream); }

/* Archived spaces */
.sb-archived-wrap { margin-top: 4px; }
.sb-archived-toggle {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer;
  border-radius: 0; user-select: none;
}
.sb-archived-toggle:hover { background: var(--surface); }
.sb-archived-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px;
  font-size: 11px; border-radius: 0;
}
.sb-archived-item:hover { background: var(--surface); }
.sb-arch-btn {
  font-size: 12px; color: var(--text-4); cursor: pointer; padding: 2px 4px;
  border-radius: 0; opacity: 0; transition: opacity .15s;
}
.sb-archived-item:hover .sb-arch-btn { opacity: 1; }
.sb-arch-btn:hover { color: var(--teal); background: var(--surface-2); }
.sb-arch-del:hover { color: var(--red); }

/* Space Panel */
.space-panel { padding: 24px; overflow-y: auto; }
.space-header { margin-bottom: 20px; }
.space-header-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 8px; }
.space-header-icon { font-size: 28px; }
.space-header-title { font-size: 20px; font-weight: 800; }
.space-header-meta { display: flex; gap: 16px; font-size: 11px; color: var(--content-muted); }
.space-header-meta span { display: flex; align-items: center; gap: 4px; }
.space-members { display: flex; gap: 4px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.space-member {
  width: 30px; height: 30px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #FAF8F3; cursor: default;
  border: none;
}
.space-member-label { font-size: 10px; color: var(--content-muted); margin-left: 8px; align-self: center; }

/* Space manage controls */
.space-manage-btns { display: flex; gap: 4px; flex-shrink: 0; }
.space-manage-btn {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--content-surface); border: 1px solid var(--content-border);
  font-size: 13px; cursor: pointer; transition: all .15s; color: var(--content-muted);
}
.space-manage-btn:hover { border-color: var(--teal); color: var(--teal); background: rgba(26,107,138,0.04); }
.space-view-badge {
  font-size: 10px; font-weight: 600; color: var(--content-muted);
  padding: 4px 10px; border-radius: 6px; background: var(--content-surface);
  border: 1px solid var(--content-border); white-space: nowrap; flex-shrink: 0;
}
.space-filter-bar {
  display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
}
.space-filter {
  padding: 5px 12px; border-radius: 6px; font-size: 10px; font-weight: 600;
  background: var(--content-surface); border: 1px solid var(--content-border); color: var(--content-muted);
  cursor: pointer; transition: all .15s; font-family: var(--sans);
}
.space-filter:hover { border-color: rgba(26,107,138,0.2); color: var(--content-text); }
.space-filter.active { background: rgba(26,107,138,0.08); border-color: var(--teal); color: var(--teal); }

.space-person-group { margin-bottom: 18px; }
.space-person-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--content-border);
}
.space-person-avatar {
  width: 24px; height: 24px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; color: #FAF8F3; flex-shrink: 0;
}
.space-person-name { font-size: 12px; font-weight: 700; color: var(--content-text); }
.space-person-role { font-size: 10px; color: var(--content-muted); }
.space-person-count { margin-left: auto; font-size: 10px; font-family: var(--mono); color: var(--content-muted); }

.space-task {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--content-surface); border: 1px solid var(--content-border); border-radius: 8px;
  margin-bottom: 4px; font-size: 12px; transition: all .15s; cursor: pointer;
}
.space-task:hover { border-color: rgba(26,107,138,0.2); background: var(--content-surface); box-shadow: 0 2px 8px rgba(8,30,40,0.06); }
.space-task-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.space-task-name { flex: 1; color: var(--content-text); }
.space-task-assignee { font-size: 9px; font-weight: 600; color: var(--content-muted); padding: 2px 7px; background: var(--content-bg); border-radius: 4px; white-space: nowrap; }

.space-completed-section { margin-top: 12px; border-top: 1px solid var(--content-border); padding-top: 8px; }
.space-completed-header {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; cursor: pointer;
  font-size: 11px; font-weight: 700; color: var(--content-muted); border-radius: 6px;
  user-select: none;
}
.space-completed-header:hover { background: rgba(26,107,138,0.04); }
.space-completed-arrow { font-size: 10px; color: var(--content-muted); width: 12px; }
.space-completed-count {
  margin-left: auto; font-size: 10px; font-family: var(--mono); color: var(--content-muted);
  background: var(--content-bg); padding: 1px 7px; border-radius: 4px;
}

/* Space filter layout */
.space-filters-wrap { margin-bottom: 16px; }
.space-filter-label {
  font-size: 9px; font-weight: 700; color: var(--content-muted); letter-spacing: .4px;
  margin-bottom: 6px; text-transform: uppercase;
}

/* Person filter chips */
.space-person-chips {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px;
}
.person-chip {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; padding: 5px 12px; border-radius: 6px;
  background: var(--content-surface); border: 1px solid var(--content-border); color: var(--content-muted);
  cursor: pointer; font-family: var(--sans); transition: all .15s;
}
.person-chip:hover { border-color: rgba(26,107,138,0.2); color: var(--content-text); }
.person-chip.active {
  background: rgba(26,107,138,0.08); border-color: var(--teal); color: var(--teal);
}
.chip-avatar {
  width: 16px; height: 16px; border-radius: 3px; font-size: 7px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; color: #FAF8F3;
}
.chip-count { font-family: var(--mono); font-size: 9px; opacity: .7; }

/* Date filter chips */
.space-date-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.date-chip {
  font-size: 10px; font-weight: 600; padding: 5px 12px; border-radius: 6px;
  background: var(--content-surface); border: 1px solid var(--content-border); color: var(--content-muted);
  cursor: pointer; font-family: var(--sans); transition: all .15s;
}
.date-chip:hover { border-color: rgba(26,107,138,0.2); color: var(--content-text); }
.date-chip.active {
  background: rgba(26,107,138,0.08); border-color: var(--teal); color: var(--teal);
}

/* Space task body with due date */
.space-task-body { flex: 1; min-width: 0; }
.space-task-due {
  font-size: 9px; font-family: var(--mono); color: var(--content-muted); margin-top: 1px;
}
.space-task-due.overdue { color: var(--red); font-weight: 700; }

/* Task Flag Icons (☀ My Day + ⭐ Important) */
.task-flags {
  display: flex; align-items: center; gap: 2px; flex-shrink: 0; margin-left: 4px;
}
.task-flags.compact { gap: 1px; }
.flag-icon {
  width: 24px; height: 24px; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; opacity: 0;
  color: var(--text-4);
}
.flag-icon svg { transition: all .15s; }
/* Show on task hover */
.task-item:hover .flag-icon,
.space-task:hover .flag-icon { opacity: .4; }
.task-item:hover .flag-icon:hover,
.space-task:hover .flag-icon:hover { opacity: 1; background: var(--surface-2); }
/* Always show when flagged */
.flag-icon.flagged { opacity: 1 !important; }
.flag-icon.flag-myday.flagged { color: var(--teal); }
.flag-icon.flag-myday.flagged svg { fill: var(--teal); stroke: var(--teal); }
.flag-icon.flag-important.flagged { color: var(--amber); }
.flag-icon.flag-important.flagged svg { fill: var(--amber); stroke: var(--amber); }
/* Hover colors when not flagged */
.flag-icon.flag-myday:hover { color: var(--teal); }
.flag-icon.flag-important:hover { color: var(--amber); }

/* Hidden elements by role */
.ceo-only, .mgr-only, .staff-only { display: none; }
body.role-ceo .ceo-only { display: flex; }
body.role-mgr .mgr-only { display: flex; }
body.role-staff .staff-only { display: flex; }

/* Block-level hidden */
.ceo-only-block, .mgr-only-block { display: none; }
body.role-ceo .ceo-only-block { display: block; }
body.role-mgr .mgr-only-block { display: block; }

/* ══════ MAIN ══════ */
/* v5.0: Hybrid Theme - Cream content area */
.main { grid-column: 2; grid-row: 2; overflow-y: auto; padding: 0; background: var(--content-bg); min-width: 0; }
.main-inner { display: none; height: 100%; background: var(--content-bg); }
.main-inner.active { display: flex; flex-direction: column; }
/* Pause animations on hidden panels to reduce GPU overhead */
.main-inner:not(.active) * { animation-play-state: paused !important; }

/* ══════ DETAIL PANEL (v14.6 inline side panel) ══════ */
/* v5.0: Cream background to match content area */
.detail-panel {
  display: none; flex-direction: column; grid-row: 2; grid-column: 3;
  background: var(--content-bg);
  border-left: 1px solid var(--content-border);
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: rgba(26,107,138,0.2) transparent;
}
.dp-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--content-border);
  position: sticky; top: 0; background: var(--content-surface); z-index: 2;
}
.dp-check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-4);
  cursor: pointer; flex-shrink: 0; transition: all .15s;
}
.dp-check:hover { border-color: var(--teal); }
.dp-check.done { background: var(--teal); border-color: var(--teal); }
.dp-title {
  flex: 1; font-size: 15px; font-weight: 700; color: var(--text-1);
  background: transparent; border: none; outline: none; font-family: var(--sans);
  padding: 4px 0;
}
.dp-title:focus { border-bottom: 1px solid var(--teal); }
.dp-star {
  font-size: 20px; cursor: pointer; flex-shrink: 0; color: var(--text-4);
  transition: all .15s; user-select: none;
}
.dp-star:hover { color: var(--gold); }
.dp-star.starred { color: var(--gold); }
.dp-close {
  width: 28px; height: 28px; border-radius: 0; background: var(--surface);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px; color: var(--text-3); flex-shrink: 0;
}
.dp-close:hover { background: var(--surface-2); color: var(--text); }
.dp-body { flex: 1; padding: 0; }
.dp-footer {
  padding: 12px 18px; border-top: 1px solid var(--border);
  font-size: 9px; color: var(--text-4); text-align: center;
}

/* Detail panel action rows — progressive disclosure */
.dp-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: all .12s;
  font-size: 13px; color: var(--text-2); position: relative;
}
.dp-row:hover { background: rgba(250,248,243,.04); }
.dp-row-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-4); display: flex; align-items: center; justify-content: center; }
.dp-row-icon svg { width: 18px; height: 18px; }
.dp-row-label { flex: 1; }
.dp-row-value { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.dp-row-select {
  font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
  border-radius: 0; padding: 4px 8px; font-family: var(--sans); cursor: pointer; outline: none;
  max-width: 140px;
}
.dp-row-select:focus { border-color: var(--teal); }
.dp-row.active { color: var(--teal); }
.dp-row.active .dp-row-icon { color: var(--teal); }
.dp-row.overdue { color: var(--red); }
.dp-row.overdue .dp-row-icon { color: var(--red); }

/* Hidden date input that overlays the due date row */
.dp-date-input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; left: 0; top: 0; }

/* Subtasks / Add step */
.dp-steps { padding: 0 18px 8px; }
.dp-step {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid rgba(250,248,243,.04); font-size: 12px; color: var(--text-2);
}
.dp-step-check {
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--text-4);
  cursor: pointer; flex-shrink: 0; transition: all .15s;
}
.dp-step-check:hover { border-color: var(--teal); }
.dp-step-check.done { background: var(--teal); border-color: var(--teal); }
.dp-step.done .dp-step-text { text-decoration: line-through; color: var(--text-4); }
.dp-step-text { flex: 1; }
.dp-step-del { font-size: 10px; color: var(--text-4); cursor: pointer; opacity: 0; transition: opacity .15s; }
.dp-step:hover .dp-step-del { opacity: 1; }
.dp-step-add {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  font-size: 12px; color: var(--teal); cursor: pointer;
}
.dp-step-add:hover { color: var(--text-1); }
.dp-step-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 12px; color: var(--text-1); font-family: var(--sans);
}

/* Notes area - v5.0 cream theme */
.dp-notes {
  margin: 0 18px 16px; padding: 12px; min-height: 80px;
  background: var(--content-surface); border-radius: 6px; border: 1px solid var(--content-border);
  font-size: 13px; color: var(--content-text); resize: vertical; width: calc(100% - 36px);
  font-family: var(--sans); outline: none; line-height: 1.5;
}
.dp-notes:focus { border-color: var(--teal); }
.dp-notes::placeholder { color: var(--content-muted); }

/* ══════ VIEW TOGGLE (Grid / List) ══════ */
.view-toggle { display: flex; gap: 2px; background: var(--surface); border-radius: 0; padding: 2px; }
.view-toggle-btn {
  font-size: 10px; font-weight: 600; padding: 4px 10px; border-radius: 0;
  border: none; background: transparent; color: var(--text-4); cursor: pointer;
  font-family: var(--sans); display: flex; align-items: center; gap: 4px; transition: all .15s;
}
.view-toggle-btn:hover { color: var(--text-2); }
.view-toggle-btn.active { background: var(--teal-dim); color: var(--teal); }
.view-toggle-btn svg { width: 14px; height: 14px; }

/* ══════ FOCUS LOG ══════ */
.focus-log-date { border-bottom: 1px solid var(--content-border); cursor: pointer; transition: background .15s; }
.focus-log-date:hover { background: rgba(26,107,138,0.03); }
.focus-log-date.today { background: rgba(26,107,138,.06); }
.fl-arrow { font-size: 10px; color: var(--content-muted); transition: transform .15s; min-width: 12px; }
.fl-detail { background: var(--content-bg); }

/* Responsive: detail panel on narrow screens */
@media (max-width: 1100px) {
  .shell.detail-open { grid-template-columns: 220px minmax(0, 1fr) 360px; }
}
@media (max-width: 900px) {
  .shell.detail-open { grid-template-columns: 220px minmax(0, 1fr); }
  .shell.detail-open .detail-panel { position: fixed; right: 0; top: 48px; bottom: 0; width: 400px; box-shadow: -4px 0 24px rgba(0,0,0,.2); z-index: 500; }
}
@media (max-width: 600px) {
  .shell.detail-open .detail-panel { width: 100%; }
}

/* ═══════ LISTS & GROUPS ═══════ */
/* ══════ SECTION DIVIDER (LISTS label) - v5.0 ══════ */
.sb-section-divider {
  display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; margin-top: 8px;
}
.sb-section-divider span {
  font-size: 9px; font-weight: 600; color: var(--teal); letter-spacing: 1px;
}
.sb-section-divider::before, .sb-section-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(26,107,138,0.15);
}

/* ══════ LIST ITEMS - v5.0 ══════ */
.sb-list-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 0;
  font-size: 13px; font-weight: 400; color: var(--sidebar-text); cursor: pointer; transition: all .12s;
}
.sb-list-item:hover { background: rgba(26,107,138,.06); color: var(--cream); }
.sb-list-item.active { background: rgba(26,107,138,.1); color: var(--cream); }
.sb-list-item.nested { padding-left: 38px; }
.sb-list-item.editing { background: none; cursor: default; }
.sb-list-icon {
  width: 16px; height: 16px; flex-shrink: 0; color: var(--sidebar-muted); stroke-width: 1.5;
}
.sb-list-item:hover .sb-list-icon { color: var(--sidebar-text); }
.sb-list-item.active .sb-list-icon { color: var(--cream); }
.sb-list-name { flex: 1; }

/* ══════ GROUP SECTIONS ══════ */
.sb-group-section { margin-top: 2px; }
.sb-group-header {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 0;
  cursor: pointer; transition: all .15s; user-select: none;
}
.sb-group-header:hover { background: rgba(250,248,243,.04); }
.sb-group-header.editing { cursor: default; }
.sb-group-arrow { font-size: 9px; color: var(--text-4); width: 10px; transition: transform .2s; }
.sb-group-arrow.open { transform: rotate(90deg); }
.sb-group-name { font-size: 13.5px; font-weight: 600; color: var(--text-2); flex: 1; }
.sb-group-lists { padding-left: 0; overflow: hidden; transition: max-height .3s ease; }
.sb-group-lists.collapsed { max-height: 0 !important; }
.sb-group-empty {
  padding: 6px 14px 6px 38px; font-size: 10px; color: var(--text-4); font-style: italic;
}

/* ══════ INLINE INPUT ══════ */
.sb-inline-input {
  flex: 1; border: none; background: transparent; font-size: 13.5px; font-weight: 400;
  color: var(--text); font-family: var(--sans); outline: none; padding: 0;
  border-bottom: 1px solid var(--teal);
}
.sb-inline-input::placeholder { color: var(--text-4); }

/* ══════ DRAG & DROP FEEDBACK ══════ */
.sb-list-item.dragging { opacity: .35; }
.sb-list-item[draggable="true"] { cursor: grab; }
.sb-list-item[draggable="true"]:active { cursor: grabbing; }
.sb-group-header.drop-target {
  outline: 1.5px dashed var(--teal); outline-offset: -1.5px; border-radius: 0;
}
.sb-group-header.drag-over {
  background: var(--teal-dim); outline-color: var(--teal);
}
#liveSpacesList.drag-over-ungroup {
  background: rgba(250,248,243,.04); border-radius: 0;
}

/* ══════ SORT INDICATORS ══════ */
.sort-indicator-before { box-shadow: 0 -1.5px 0 0 var(--teal); }
.sort-indicator-after { box-shadow: 0 1.5px 0 0 var(--teal); }
.sb-group-section.dragging { opacity: .35; }
.sb-group-section[draggable="true"] > .sb-group-header { cursor: grab; }
.sb-group-section[draggable="true"]:active > .sb-group-header { cursor: grabbing; }

/* ══════ GROUP CONTEXT MENU ══════ */
.sb-group-menu {
  position: fixed; z-index: 9999; min-width: 160px;
  background: var(--card); border: 1px solid var(--border); border-radius: 0;
  padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.sb-group-menu-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 0;
  font-size: 12px; color: var(--text-2); cursor: pointer; transition: background .1s;
}
.sb-group-menu-item:hover { background: var(--surface); }
.sb-group-menu-item.danger { color: var(--red); }
.sb-group-menu-item.danger:hover { background: var(--red-dim); }

/* ══════ GROUP MEMBER PANEL ══════ */
.sb-group-member-panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 0;
  margin: 4px 8px 6px; padding: 8px; overflow: hidden;
  animation: gmpSlideIn .15s ease;
}
@keyframes gmpSlideIn { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 400px; } }
.gmp-header {
  display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.gmp-title { font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: .3px; }
.gmp-close { font-size: 12px; color: var(--text-4); cursor: pointer; padding: 2px 4px; border-radius: 0; }
.gmp-close:hover { color: var(--text-2); background: var(--surface); }
.gmp-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 0;
}
.gmp-row:hover { background: var(--surface); }
.gmp-avatar {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #FAF8F3; flex-shrink: 0;
}
.gmp-info { flex: 1; min-width: 0; }
.gmp-name { font-size: 11px; font-weight: 600; color: var(--text-2); }
.gmp-role { font-size: 9px; color: var(--text-4); }
.gmp-btn {
  font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 0; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text-3); transition: all .15s;
}
.gmp-btn:hover { border-color: var(--teal); color: var(--teal); }
.gmp-btn.active { background: var(--teal-dim); border-color: var(--teal); color: var(--teal); }
.gmp-hint { font-size: 9px; color: var(--text-4); padding: 6px 4px 2px; font-style: italic; }

/* ══════ NEW LIST / GROUP ACTIONS ══════ */
.sb-list-actions {
  display: flex; align-items: center; gap: 4px; padding: 2px 8px; margin-top: 2px;
}
.sb-new-list {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; flex: 1;
  font-size: 11px; font-weight: 500; color: var(--text-4); cursor: pointer; transition: all .15s;
  border-radius: 0;
}
.sb-new-list:hover { color: var(--teal); background: var(--surface); }
.sb-new-group {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  color: var(--text-4); cursor: pointer; transition: all .15s; border-radius: 0;
}
.sb-new-group:hover { color: var(--teal); background: var(--surface); }

/* ═══════ SPACE HEADER ═══════ */
.space-header { position: relative; overflow: hidden; }

/* Level ring on space member avatars */
.space-member { position: relative; }
.space-member .level-ring {
  position: absolute; bottom: -2px; right: -2px; width: 10px; height: 10px;
  border-radius: 50%; border: 2px solid var(--bg);
}
.space-member .level-ring.l1 { background: var(--l1); }
.space-member .level-ring.l2 { background: var(--l2); }
.space-member .level-ring.l3 { background: var(--l3); }

/* Maker-checker status in slideout */
.mc-status {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 0;
}
.mc-status.mc-awaiting { background: var(--amber-dim); color: var(--amber); }
.mc-status.mc-reviewed { background: var(--purple-dim); color: var(--purple); }
.mc-status.mc-approved { background: var(--green-dim); color: var(--green); }