/* ── Theme Variables ───────────────────────────────────────────────────────── */
/* Default: light mode (Asana-inspired). Dark mode via html.theme-dark. */
:root {
  /* Neutral scale */
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db;
  --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151;
  --gray-800: #1f2937; --gray-900: #111827;

  /* Semantic tokens */
  --bg-app: #F2F4F8; --bg-sidebar: #ffffff; --bg-card: #ffffff; --bg-input: #ffffff;
  --bg-hover: #ECEEF2; --bg-active: #EEECFD; --bg-elevated: #ffffff;
  --border: #ECEEF2; --border-subtle: #F2F4F8; --border-focus: #5546E6;
  --text-primary: #0E1320; --text-secondary: #525A68; --text-muted: #8A93A1; --text-disabled: #C8CDD6;
  --accent: #5546E6; --accent-hover: #4435CC; --accent-subtle: rgba(85,70,230,0.06); --accent-border: rgba(85,70,230,0.2);
  --green: #1F9D63; --green-subtle: rgba(31,157,99,0.08); --yellow: #d97706; --yellow-subtle: rgba(217,119,6,0.06); --red: #dc2626; --red-subtle: rgba(220,38,38,0.06); --orange: #ea580c; --orange-subtle: rgba(234,88,12,0.06);
  --btn-primary-bg: #5546E6; --btn-primary-text: #fff; --btn-secondary-bg: transparent; --btn-secondary-border: #ECEEF2; --btn-secondary-text: #525A68;
  --modal-bg: #ffffff; --overlay: rgba(0,0,0,0.25);
  --sidebar-bg: #ffffff; --sidebar-text: #8A93A1; --sidebar-text-active: #0E1320; --sidebar-active-bg: #EEECFD; --sidebar-hover-bg: #F2F4F8; --sidebar-label: #8A93A1;

  /* Type scale */
  --text-xs: 0.75rem; --text-sm: 0.8125rem; --text-base: 0.875rem; --text-lg: 1rem; --text-xl: 1.125rem; --text-2xl: 1.375rem;
  --weight-body: 400; --weight-medium: 500; --weight-semibold: 600; --weight-heading: 700;
  --leading-tight: 1.2; --leading-snug: 1.35; --leading-normal: 1.5;

  /* Status */
  --status-red: #C2402B; --status-yellow: #B07A0C; --status-green: #1F9D63;
}

/* Dark mode — preserved from original, applied via toggle */
html.theme-dark {
  --bg-app: #0E1019; --bg-sidebar: #13161E; --bg-card: #13161E; --bg-input: #0E1019; --bg-hover: #1E2230; --bg-active: rgba(111,96,242,0.18); --bg-elevated: #171B23;
  --border: rgba(255,255,255,0.08); --border-subtle: rgba(255,255,255,0.04); --border-focus: #6F60F2;
  --text-primary: #F2F4F8; --text-secondary: #AAB2BE; --text-muted: #79818E; --text-disabled: #3A4050;
  --accent: #6F60F2; --accent-hover: #8A7CF8; --accent-subtle: rgba(111,96,242,0.18); --accent-border: rgba(111,96,242,0.38);
  --green: #34B877; --green-subtle: rgba(52,184,119,0.14); --yellow: #F59E0B; --yellow-subtle: rgba(245,158,11,0.08); --red: #E54D2E; --red-subtle: rgba(229,77,46,0.08); --orange: #F76B15; --orange-subtle: rgba(247,107,21,0.06);
  --btn-primary-bg: #6F60F2; --btn-primary-text: #fff; --btn-secondary-bg: transparent; --btn-secondary-border: rgba(255,255,255,0.08); --btn-secondary-text: #AAB2BE;
  --modal-bg: #13161E; --overlay: rgba(0,0,0,0.7);
  --sidebar-bg: #13161E; --sidebar-text: #79818E; --sidebar-text-active: #F2F4F8; --sidebar-active-bg: rgba(111,96,242,0.18); --sidebar-hover-bg: #171B23; --sidebar-label: #3A4050;
  --status-red: #E54D2E; --status-yellow: #F59E0B; --status-green: #34B877;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
input, select, textarea { background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--hv-r-sm); padding: 0.5rem 0.75rem; font-size: var(--text-sm); font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-subtle); }
select option { background: var(--bg-card); }

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: var(--text-base);
  font-weight: var(--weight-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
}

/* ── App shell ─────────────────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
/* ── Top bar ───────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px; display: flex; align-items: center;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 0 16px; gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-hamburger {
  background: none; border: none; font-size: 18px; color: var(--text-muted);
  cursor: pointer; padding: 4px 6px; border-radius: var(--hv-r-sm); transition: all 0.1s;
}
.topbar-hamburger:hover { background: var(--bg-hover); color: var(--text-primary); }
.topbar-logo { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.topbar-logo-mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.topbar-logo-text { font-size: var(--text-lg); font-weight: var(--weight-heading); color: var(--text-primary); letter-spacing: -0.02em; }

.topbar-center { flex: 1; display: flex; justify-content: center; max-width: 480px; margin: 0 auto; }
.topbar-search {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--bg-app); border: 1px solid var(--border); border-radius: var(--hv-r-md);
  padding: 0 12px; height: 34px; cursor: text;
}
.topbar-search-icon { color: var(--text-disabled); font-size: 14px; flex-shrink: 0; }
.topbar-search-input {
  flex: 1; border: none; background: none; font-size: var(--text-sm); color: var(--text-primary);
  padding: 0; outline: none; cursor: text;
}
.topbar-search-input::placeholder { color: var(--text-disabled); }
.topbar-search-kbd {
  font-size: 10px; color: var(--text-disabled); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px;
  font-family: inherit; flex-shrink: 0;
}

.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; }
/* Clerk OrganizationSwitcher — keep it compact inside the topbar */
#topbar-org-switcher { display: flex; align-items: center; }
.clerk-org-switcher-root { font-family: inherit; }
.clerk-org-switcher-trigger {
  height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border);
  background: none; font-size: 13px; font-weight: 500; color: var(--text-primary);
  cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background 0.1s;
}
.clerk-org-switcher-trigger:hover { background: var(--bg-hover); }
.topbar-help-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: none; color: var(--text-muted); font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.1s;
}
.topbar-help-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.topbar-profile-btn {
  display: flex; align-items: center; gap: 6px; background: none; border: none;
  cursor: pointer; padding: 4px 8px; border-radius: var(--hv-r-sm); transition: background 0.1s;
}
.topbar-profile-btn:hover { background: var(--bg-hover); }
.topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.topbar-username { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-primary); }
.topbar-caret { font-size: 10px; color: var(--text-muted); }

.topbar-profile-dropdown {
  position: absolute; top: 44px; right: 0; width: 200px; z-index: 200;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 8px 0;
}
.topbar-profile-name { padding: 8px 14px 2px; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); }
.topbar-profile-role { padding: 0 14px 8px; font-size: var(--text-xs); color: var(--text-muted); }
.topbar-profile-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.topbar-profile-item {
  display: block; width: 100%; padding: 6px 14px; font-size: var(--text-sm); color: var(--text-secondary);
  text-decoration: none; background: none; border: none; text-align: left; cursor: pointer;
  font-family: inherit; transition: background 0.1s;
}
.topbar-profile-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.topbar-signout { color: var(--red); }
.topbar-signout:hover { background: var(--red-subtle); }

/* ── Sidebar (below top bar) ──────────────────────────────────────────────── */
.sidebar {
  width: 220px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 52px; left: 0; bottom: 0;
  z-index: 50;
  overflow-y: auto;
  transition: transform 0.2s ease;
}
body.sidebar-collapsed .sidebar { transform: translateX(-220px); }
body.sidebar-collapsed .main-area { margin-left: 0; }

.sidebar-workspace-wrap { position: relative; padding: 8px 8px 0; border-bottom: 1px solid var(--border); }
.sidebar-workspace {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px;
  transition: background 0.1s, border-color 0.1s;
  margin-bottom: 8px;
}
.sidebar-workspace:hover { background: var(--bg-hover); border-color: var(--border); }
.sidebar-workspace:focus-visible { outline: 2px solid var(--hv-accent, #5546E6); outline-offset: 1px; border-color: transparent; }
.sidebar-workspace-name { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); }
.sidebar-workspace-chevron { font-size: 10px; color: var(--text-muted); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  gap: 0.1rem;
}

/* ── Workspace switcher ───────────────────────────────────────────────────── */
.workspace-switcher { display: flex; align-items: center; gap: 8px; padding: 0; cursor: pointer; width: 100%; background: none; border: none; text-align: left; }
.workspace-avatar { width: 28px; height: 28px; border-radius: var(--hv-r-sm); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0; }
.workspace-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-chevron { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.workspace-dropdown { position: absolute; top: 100%; left: 0; right: 0; margin-top: 2px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-md); box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 300; overflow: hidden; }
.workspace-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: background 0.1s; }
.workspace-item:hover { background: var(--bg-hover); }
.workspace-item.active { background: rgba(91,91,214,0.08); }
.workspace-item-name { flex: 1; font-size: 13px; color: var(--text-primary); }
.workspace-active-badge { font-size: 11px; color: var(--green); }
.workspace-divider { height: 1px; background: var(--border); margin: 4px 0; }
.workspace-add-btn { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; color: var(--text-muted); cursor: pointer; width: 100%; background: none; border: none; text-align: left; font-family: inherit; }
.workspace-add-btn:hover { color: var(--text-primary); }
.workspace-add-form { padding: 12px 14px; border-top: 1px solid var(--border); }
.workspace-add-input { width: 100%; background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 4px; color: var(--text-primary); font-size: 13px; font-family: inherit; padding: 6px 10px; outline: none; box-sizing: border-box; margin-bottom: 8px; }
.workspace-add-input:focus { border-color: var(--accent); }
.workspace-color-options { display: flex; gap: 6px; margin-bottom: 10px; }
.workspace-color-swatch { width: 20px; height: 20px; border-radius: 4px; cursor: pointer; border: 2px solid transparent; transition: border-color 0.1s; }
.workspace-color-swatch.selected { border-color: var(--text-primary); }
.workspace-add-actions { display: flex; gap: 8px; justify-content: flex-end; }

.sidebar-divider { border-top: 1px solid var(--border); margin: 0.5rem 0.75rem 0.25rem; }
.sidebar-admin-label {
  font-size: var(--text-xs); font-weight: var(--weight-medium); text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--sidebar-label); padding: 0.75rem 0.85rem 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: var(--hv-r-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--sidebar-text);
  text-decoration: none;
  transition: color 0.1s, background 0.1s;
}
.sidebar-link:hover { color: var(--sidebar-text-active); background: var(--sidebar-hover-bg); }
.sidebar-link.nav-active {
  color: var(--sidebar-text-active);
  font-weight: var(--weight-semibold);
  background: var(--sidebar-active-bg);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* ── Main area ─────────────────────────────────────────────────────────────── */
.main-area {
  flex: 1;
  margin-left: 220px;
  margin-top: 52px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 52px);
  min-width: 0;
  transition: margin-left 0.2s ease;
}


/* ── Buttons ───────────────────────────────────────────────────────────────── */
#add-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 0.42rem 1rem; border-radius: var(--hv-r-sm);
  font-size: 0.84rem; font-weight: 500; cursor: pointer; font-family: inherit;
}
#add-btn:hover { background: #4f4fbd; }

/* admin toggle removed — isAdmin hardcoded */

.btn-save {
  background: var(--accent); color: #fff; border: none;
  padding: 0.5rem 1.2rem; border-radius: var(--hv-r-md);
  font-size: 0.84rem; font-weight: 550; cursor: pointer; font-family: inherit;
  transition: background 0.12s, box-shadow 0.12s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.btn-save:hover { background: var(--accent-hover); box-shadow: 0 2px 6px rgba(91,91,214,0.25); }
.btn-save:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-cancel {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border); padding: 0.5rem 1.2rem;
  border-radius: var(--hv-r-md); font-size: 0.84rem; font-weight: 450;
  cursor: pointer; font-family: inherit; transition: all 0.12s;
}
.btn-cancel:hover { color: var(--text-primary); border-color: var(--accent-border); background: var(--bg-hover); }

.btn-edit {
  padding: 0.38rem 0.7rem; border: 1px solid var(--border); border-radius: var(--hv-r-sm);
  font-size: 0.8rem; font-weight: 400; cursor: pointer;
  background: transparent; color: var(--text-secondary); font-family: inherit;
}
.btn-edit:hover { color: var(--text-primary); border-color: var(--text-disabled); }

.btn-delete {
  padding: 0.38rem 0.7rem; border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.8rem; font-weight: 400; cursor: pointer;
  background: transparent; color: var(--text-secondary); font-family: inherit;
}
.btn-delete:hover { color: var(--red); border-color: var(--red); }

.btn-export {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.32rem 0.7rem; font-size: 0.79rem; font-weight: 400;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.btn-export:hover { color: var(--text-primary); border-color: var(--text-disabled); }
.btn-export:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Toolbar ───────────────────────────────────────────────────────────────── */
.toolbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1.5rem;
  display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
}
.toolbar input[type="search"],
.toolbar select {
  background: var(--bg-app); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.32rem 0.55rem;
  font-size: 0.82rem; font-family: inherit;
}
.toolbar input[type="search"] { flex: 1; min-width: 100px; max-width: 160px; }
.toolbar select { min-width: 80px; }
.toolbar input[type="search"]:focus,
.toolbar select:focus { outline: none; border-color: var(--accent); }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.dashboard-wrapper { padding: 0 0 4rem; overflow-x: auto; }

#empty {
  text-align: center; color: var(--text-secondary);
  padding: 5rem 2rem 2rem;
  font-size: 0.93rem; line-height: 1.7;
}
#goals-grid { min-width: 0; }

/* ── Coaching banners ──────────────────────────────────────────────────────── */
#coaching-cards { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.75rem 1.5rem 0; }
.coaching-banner {
  background: transparent; border: none; border-left: 2px solid var(--orange);
  padding: 8px 12px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px;
}

/* ── Kotas dashboard table ─────────────────────────────────────────────────── */
.kotas-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }

.kotas-table thead tr { background: var(--bg-card); }
.kotas-table th {
  padding: 8px 12px;
  font-size: 0.69rem; font-weight: 500;
  text-align: left; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-secondary); white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

/* Section header rows */
.section-header-row td {
  background: var(--bg-hover); color: var(--text-primary);
  font-size: 0.78rem; font-weight: 500;
  padding: 0.42rem 0.75rem 0.42rem 0.9rem;
  border-left: 3px solid var(--accent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Zebra striping */
.goal-row:nth-child(even) td { background: var(--bg-card); }
.goal-row:nth-child(odd)  td { background: var(--bg-app); }
.goal-row td {
  padding: 8px 12px; vertical-align: top;
  border-bottom: 1px solid #1c1c1e; color: var(--text-primary);
}
.goal-row:hover td { background: var(--bg-hover) !important; cursor: pointer; }

/* Status left accent */
/* status left borders removed — status dot in column is sufficient */

/* Col widths */
.col-order    { width: 3rem; text-align: center; color: var(--text-secondary); font-size: 0.8rem; }
.col-id       { width: 6rem; white-space: nowrap; color: var(--text-secondary); font-size: 0.79rem; }
.col-owner    { width: 9rem; }
.col-status   { width: 3rem; text-align: center; }
.col-due      { width: 7rem; white-space: nowrap; color: var(--text-secondary); font-size: 0.8rem; }
.col-desc     { width: 50%; line-height: 1.5; }
.col-finance  { width: 8rem; color: var(--text-secondary); font-size: 0.8rem; }

/* ── Status dots in table (override badge → dot) ───────────────────────────── */
.col-status .badge {
  width: 9px; height: 9px; border-radius: 50%;
  padding: 0; font-size: 0; overflow: hidden;
  display: inline-block; vertical-align: middle; border: none;
}
.col-status .badge-green         { background: var(--green); }
.col-status .badge-yellow        { background: var(--yellow); }
.col-status .badge-red           { background: var(--red); }
.col-status .badge-complete      { background: #3b82f6; }
.col-status .badge-complete-late { background: #8b5cf6; }
.col-status .badge-dnm           { background: #6b7280; }

/* ── Prev dot ──────────────────────────────────────────────────────────────── */
.prev-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; vertical-align: middle; }
.prev-dot-Green         { background: var(--green); }
.prev-dot-Yellow        { background: var(--yellow); }
.prev-dot-Red           { background: var(--red); }
.prev-dot-Complete      { background: #3b82f6; }
.prev-dot-Complete-Late { background: #8b5cf6; }
.prev-dot-DNM           { background: #6b7280; }

/* ── Badges (full pills — detail page, update cards) ──────────────────────── */
.badge {
  font-size: 0.67rem; font-weight: 500;
  padding: 0.15rem 0.48rem; border-radius: var(--hv-r-full);
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em;
  display: inline-flex; align-items: center;
}
.badge-green         { background: #0c2918; color: var(--green);  border: 1px solid #14532d; }
.badge-yellow        { background: #221900; color: var(--yellow);  border: 1px solid #713f12; }
.badge-red           { background: #200d0d; color: var(--red);  border: 1px solid #7f1d1d; }
.badge-complete      { background: #081830; color: #60a5fa;  border: 1px solid #1e3a6e; }
.badge-complete-late { background: #160d28; color: #a78bfa;  border: 1px solid #4c1d95; }
.badge-dnm           { background: var(--bg-card); color: var(--text-secondary);  border: 1px solid var(--border); }

.badge-type-Input  { background: #0a1f14; color: #34d399; border: 1px solid #065f46; }
.badge-type-Output { background: #0c1e38; color: #60a5fa; border: 1px solid #1e3a6e; }
.badge-set-Board   { background: #1a1a2e; color: #a5a3ff; border: 1px solid #3730a3; }
.badge-set-L-Team  { background: #1e1e26; color: #c5c3bd; border: 1px solid var(--text-disabled); }
.badge-set-Team    { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-threshold   { background: #200d0d; color: var(--red); border: 1px solid #7f1d1d; }
.obj-type-badge    { background: var(--border); color: var(--text-secondary); font-size: 0.67rem; border: none; }

/* ── Status arrow ──────────────────────────────────────────────────────────── */
.status-arrow         { font-size: 0.85rem; font-weight: 400; line-height: 1; }
.status-arrow.up      { color: var(--green); }
.status-arrow.down    { color: var(--red); }
.status-arrow.neutral { color: var(--text-muted); }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.7); z-index: 100;
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-lg);
  padding: 1.6rem; width: 100%; max-width: 580px; max-height: 92vh;
  overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.modal h2 { font-size: 0.98rem; font-weight: 500; margin-bottom: 1.1rem; color: var(--text-primary); }

.commitment-note {
  font-size: 0.75rem; color: var(--text-secondary);
  border-left: 2px solid var(--accent); padding-left: 0.6rem;
  margin-bottom: 1.1rem; line-height: 1.45;
}

.modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.1rem; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.82rem; font-weight: 550; color: var(--text-secondary); }

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  background: var(--bg-app); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--hv-r-sm);
  padding: 0.48rem 0.65rem;
  font-size: 0.87rem; font-family: inherit; font-weight: 400;
  resize: vertical;
}
.form-group textarea:focus, .form-group select:focus,
.form-group input:focus { outline: none; border-color: var(--accent); }

.desc-hint { font-size: 0.74rem; color: var(--text-secondary); margin-bottom: 0.28rem; line-height: 1.4; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row .form-group { margin-bottom: 0.85rem; }

.radio-group { display: flex; flex-direction: column; gap: 0.3rem; }
.radio-opt {
  display: flex; align-items: center; gap: 0.55rem;
  border: 1px solid var(--border); border-radius: var(--hv-r-sm);
  padding: 0.48rem 0.65rem; cursor: pointer;
}
.radio-opt:hover { border-color: var(--text-disabled); background: var(--bg-hover); }
.radio-opt input[type="radio"] { accent-color: var(--accent); flex-shrink: 0; }
.radio-opt:has(input:checked) { border-color: var(--accent); background: #1a1a2e; }
.radio-label { display: flex; flex-direction: column; gap: 0.04rem; }
.radio-label strong { font-size: 0.82rem; font-weight: 500; color: var(--text-primary); }
.radio-label small  { font-size: 0.69rem; color: var(--text-secondary); }

.soft-warning-panel {
  background: #1a1700; border: 1px solid #3d3200;
  border-radius: var(--hv-r-sm); padding: 0.85rem; margin-bottom: 0.85rem;
}
.soft-warning-header { font-size: 0.82rem; font-weight: 500; color: #c9a020; margin-bottom: 0.45rem; }
.soft-warning-panel ul { list-style: disc; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.soft-warning-panel li { font-size: 0.79rem; color: #9a7800; line-height: 1.45; }
.soft-warning-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.8rem; }

.lock-hint {
  font-size: 0.74rem; color: var(--text-secondary);
  background: var(--bg-app); border: 1px solid var(--border);
  border-radius: var(--hv-r-xs); padding: 0.32rem 0.5rem; margin-top: 0.28rem; line-height: 1.4;
}
.field-locked { background: var(--bg-app) !important; color: var(--text-muted) !important; cursor: not-allowed; }

.word-count { font-size: 0.72rem; color: var(--text-secondary); margin-top: 0.18rem; }
.word-count.word-count-ok { color: var(--green); }

/* ── Update modal sections ─────────────────────────────────────────────────── */
.update-section { margin-bottom: 1rem; }
.update-section-title {
  font-size: 0.73rem; font-weight: 500; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.45rem;
}
.update-section-summary { cursor: pointer; user-select: none; }
.conditional-section {
  background: var(--bg-app); border: 1px solid var(--border); border-radius: var(--hv-r-sm); padding: 0.85rem;
}
.conditional-section .update-section-title { color: var(--red); }
.checkbox-label {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.84rem; font-weight: 400; cursor: pointer; color: var(--text-primary);
}
.checkbox-label input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; }

/* ── Error banner ──────────────────────────────────────────────────────────── */
#error-banner {
  background: #1e0d0d; color: var(--red); border-top: 1px solid #7f1d1d;
  padding: 0.55rem 1.5rem; font-size: 0.84rem; font-weight: 500;
  position: fixed; bottom: 0; left: 200px; right: 0; z-index: 150;
}

/* ── Detail view ───────────────────────────────────────────────────────────── */
.detail-toolbar {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem; flex-shrink: 0;
}
#back-btn {
  background: none; border: none; color: var(--accent);
  font-size: 0.84rem; font-weight: 500; cursor: pointer; padding: 0; font-family: inherit;
}
#back-btn:hover { color: #a5a3ff; }

.detail-content { max-width: 980px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }

.detail-actions-bar { display: flex; gap: 0.6rem; margin-bottom: 1rem; align-items: center; }
.detail-add-update-btn { font-size: 0.84rem; padding: 0.42rem 0.95rem; }

/* ── Kotas header table ────────────────────────────────────────────────────── */
.kotas-header-table {
  width: 100%; border-collapse: collapse; font-size: 0.81rem;
  margin-bottom: 1.1rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--hv-r-md); overflow: hidden;
}
.kotas-header-table th {
  background: var(--bg-hover); color: var(--text-secondary);
  font-size: 0.67rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.48rem 0.75rem; border: 1px solid var(--border);
  white-space: nowrap; width: 9rem;
}
.kotas-header-table td {
  padding: 0.48rem 0.75rem; border: 1px solid var(--border);
  color: var(--text-primary); vertical-align: top; line-height: 1.4;
}
.kotas-header-table .desc-row th { background: var(--bg-hover); color: var(--text-secondary); font-size: 0.67rem; }
.kotas-header-table .desc-row td { font-size: 0.91rem; font-weight: 500; line-height: 1.55; color: var(--text-primary); }

/* ── Kotas content sections ────────────────────────────────────────────────── */
.kotas-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--hv-r-md); padding: 1rem; margin-bottom: 1rem;
}
.kotas-section-label {
  font-size: 0.67rem; font-weight: 500; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem;
}
.kotas-wdws-text {
  font-size: 0.87rem; line-height: 1.65; color: var(--text-primary);
  white-space: pre-wrap; word-break: break-word;
}
.kotas-asi-text { font-size: 0.85rem; line-height: 1.6; color: #c5c3bd; }
.kotas-asi-placeholder { font-size: 0.85rem; color: var(--text-secondary); font-style: italic; margin: 0; }

/* ── Update history ────────────────────────────────────────────────────────── */
.updates-section { margin-bottom: 1rem; }
.updates-heading {
  font-size: 0.7rem; font-weight: 500; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem;
}
.toggle-prev-btn {
  background: var(--border); border: none; color: var(--text-secondary);
  font-size: 0.7rem; font-weight: 500;
  padding: 0.14rem 0.45rem; border-radius: 4px; cursor: pointer; font-family: inherit;
}
.toggle-prev-btn:hover { color: var(--text-primary); }

.no-updates  { font-size: 0.84rem; color: var(--text-secondary); }
.loading-msg { font-size: 0.84rem; color: var(--text-muted); padding: 2rem 0; text-align: center; }
.loading-msg::before { content: ""; display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg   { font-size: 0.84rem; color: var(--red); }

.update-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--hv-r-sm); padding: 1rem; margin-bottom: 0.65rem;
}
.update-card-latest { border-color: var(--text-disabled); }
.update-card-header {
  display: flex; justify-content: space-between;
  align-items: center; gap: 0.5rem; margin-bottom: 0.75rem;
}
.update-card-left { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.update-from   { font-size: 0.7rem; color: var(--text-secondary); }
.update-period { font-size: 0.74rem; font-weight: 500; color: #c5c3bd; }
.update-date   { font-size: 0.71rem; color: var(--text-secondary); white-space: nowrap; }
.wdws-text {
  font-size: 0.85rem; line-height: 1.6; color: var(--text-primary);
  white-space: pre-wrap; word-break: break-word;
}

/* ── PTG + late/breach cards ───────────────────────────────────────────────── */
.ptg-input-section {
  background: var(--bg-app); border: 1px solid var(--border);
  border-radius: var(--hv-r-sm); padding: 0.85rem; margin-top: 0.7rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.ptg-card {
  background: #1c1800; border: 1px solid #3d3200;
  border-radius: var(--hv-r-sm); padding: 0.85rem; margin-top: 0.7rem;
}
.ptg-card.no-path { background: #1a0d0d; border-color: #7f1d1d; }
.ptg-card-title {
  font-size: 0.67rem; font-weight: 500; color: #c9a020;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.45rem;
}
.ptg-card.no-path .ptg-card-title { color: var(--red); }
.ptg-item { margin-bottom: 0.45rem; }
.ptg-item:last-child { margin-bottom: 0; }
.ptg-label { font-size: 0.67rem; font-weight: 500; color: #8a6b00; margin-bottom: 0.1rem; }
.ptg-item p, .ptg-text { font-size: 0.83rem; line-height: 1.5; color: var(--text-primary); margin: 0; }

.late-card, .breach-card {
  background: #1a0d0d; border: 1px solid #7f1d1d;
  border-radius: var(--hv-r-sm); padding: 0.85rem; margin-top: 0.7rem;
}
.late-card-title, .breach-card-title {
  font-size: 0.67rem; font-weight: 500; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.38rem;
}
.late-card p, .breach-card p { font-size: 0.83rem; line-height: 1.5; color: var(--text-primary); margin: 0; }

.update-asi-label {
  margin-top: 0.7rem; font-size: 0.67rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary);
}
.update-asi-text {
  margin-top: 0.18rem; font-size: 0.84rem; line-height: 1.6;
  color: #c5c3bd; white-space: pre-wrap; word-break: break-word;
}
.update-asi-text .asi-table {
  border-collapse: collapse; width: 100%; margin: 0.4rem 0; white-space: normal;
}
.update-asi-text .asi-table th,
.update-asi-text .asi-table td {
  border: 1px solid var(--border); padding: 0.3rem 0.6rem; text-align: left; vertical-align: top;
}
.update-asi-text .asi-table th {
  background: var(--bg-elevated); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary);
}
.update-asi-text .asi-table td { font-size: 0.83rem; color: var(--text-primary); }

/* ── AI conversation thread ────────────────────────────────────────────────── */
.ai-thread { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.55rem; }
.ai-msg { border-radius: var(--hv-r-sm); padding: 0.6rem 0.8rem; }
.ai-msg-assistant { background: #15152a; border: 1px solid #2d2a45; }
.ai-msg-user { background: var(--bg-app); border: 1px solid var(--border); margin-left: 1.5rem; }
.ai-msg-label {
  font-size: 0.63rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.07em; margin-bottom: 0.28rem;
}
.ai-msg-assistant .ai-msg-label { color: #818cf8; }
.ai-msg-user      .ai-msg-label { color: var(--text-secondary); }
.ai-msg-content { font-size: 0.84rem; line-height: 1.6; color: var(--text-primary); }
.ai-answer-form { display: flex; flex-direction: column; gap: 0.42rem; margin-top: 0.18rem; }
.ai-answer-input {
  width: 100%; padding: 0.48rem 0.65rem;
  background: var(--bg-app); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--hv-r-sm);
  font-size: 0.84rem; font-family: inherit; resize: vertical; line-height: 1.5;
}
.ai-answer-input:focus { outline: none; border-color: var(--accent); }
.ai-answer-actions { display: flex; gap: 0.5rem; align-items: center; }
.ai-skip-btn {
  font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap;
}
.ai-skip-btn:hover { color: var(--text-primary); }

/* ── Objectives page ───────────────────────────────────────────────────────── */
.obj-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem 0.5rem;
}
.obj-coherence { font-size: 0.82rem; color: var(--text-secondary); }
.obj-coherence strong { color: var(--text-primary); }

#obj-list { padding: 0.6rem 1.5rem 2rem; display: flex; flex-direction: column; gap: 0.6rem; }

.obj-card {
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  border-radius: 0; padding: 0.85rem 0 28px 0;
  transition: none;
}
.obj-card:hover { border-color: var(--text-disabled); box-shadow: 0 4px 20px rgba(0,0,0,.4); }
.obj-card-header { display: flex; align-items: center; gap: 0.42rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.obj-horizon { font-size: 0.74rem; color: var(--text-secondary); font-weight: 400; }
.obj-owner   { font-size: 0.74rem; color: var(--text-secondary); }
.obj-description { font-size: 0.88rem; line-height: 1.55; color: var(--text-primary); margin: 0 0 0.6rem; }
.obj-card-actions { display: flex; gap: 0.42rem; }

.obj-directional-prompt {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem;
  background: #1c1800; border: 1px solid #3d3200; border-radius: var(--hv-r-sm);
  padding: 0.55rem 0.8rem; font-size: 0.8rem; color: #c9a020; margin-bottom: 0.6rem;
}
.obj-prompt-dismiss {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  font-size: 0.8rem; color: #8a6b00; padding: 0;
}

/* ── Analytics page ────────────────────────────────────────────────────────── */
.analytics-wrapper { max-width: 900px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
#analytics-content { display: flex; flex-direction: column; gap: 1.5rem; }

.an-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-md); padding: 1.2rem 1.4rem; }
.an-heading { font-size: 0.91rem; font-weight: 500; color: var(--text-primary); margin-bottom: 0.28rem; }
.an-period  { font-weight: 400; font-size: 0.84rem; color: var(--text-secondary); }
.an-subhead { font-size: 0.79rem; color: var(--text-secondary); margin-bottom: 0.85rem; }
.an-subhead strong { color: var(--text-primary); }

.an-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-top: 0.6rem; }
.an-table th {
  text-align: left; padding: 0.38rem 0.65rem;
  font-size: 0.67rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-secondary); border-bottom: 1px solid var(--border);
}
.an-table td { padding: 0.42rem 0.65rem; border-bottom: 1px solid #1c1c1e; color: var(--text-primary); }
.an-table tr:last-child td { border-bottom: none; }
.an-table tr:hover td { background: var(--bg-hover); }
.an-num     { text-align: right; font-variant-numeric: tabular-nums; }
.an-bold    { font-weight: 500; }
.an-at-risk { color: var(--red); font-weight: 500; }
.an-perfect { color: var(--green); font-weight: 500; }
.an-empty   { text-align: center; color: var(--text-secondary); font-style: italic; padding: 1.5rem; }

/* ── Focus ─────────────────────────────────────────────────────────────────── */
.btn-save:focus-visible, .btn-cancel:focus-visible,
#add-btn:focus-visible, .btn-export:focus-visible,
#back-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Type badge in table ───────────────────────────────────────────────────── */
.col-type .badge {
  font-size: 0.6rem; padding: 0.1rem 0.35rem;
}
.badge-type-input  { background: #0a1f14; color: #34d399; border: 1px solid #065f46; }
.badge-type-output { background: #0c1e38; color: #60a5fa; border: 1px solid #1e3a6e; }

/* ── View description ─────────────────────────────────────────────────────── */
.view-description {
  color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5;
  padding: 0.75rem 0 0; max-width: 600px;
}

/* ── Objective initiatives ────────────────────────────────────────────────── */
.obj-initiatives {
  list-style: none; padding: 0; margin: 0.5rem 0 0 1rem;
}
.obj-initiatives li {
  position: relative; padding-left: 0.9rem; color: var(--text-secondary); font-size: 0.82rem; line-height: 1.6;
}
.obj-initiatives li::before {
  content: "–"; position: absolute; left: 0; color: var(--accent);
}

/* ── Objective linked goals ────────────────────────────────────────────────── */
.obj-detail-desc { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; margin-top: 0.35rem; }
.obj-linked-goals { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.2rem; }
.obj-linked-goal { font-size: 0.8rem; color: #d0cfc9; display: flex; align-items: center; gap: 0.4rem; }
.obj-linked-goal .badge { flex-shrink: 0; }
.obj-no-goals { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

/* ── Goal form objective checklist ────────────────────────────────────────── */
.goal-objectives-list {
  display: flex; flex-direction: column; gap: 0.3rem;
  max-height: 160px; overflow-y: auto;
  padding: 0.4rem; background: var(--bg-app); border: 1px solid var(--border); border-radius: var(--hv-r-sm);
}
.obj-check-item {
  display: flex; align-items: flex-start; gap: 0.4rem;
  font-size: 0.82rem; cursor: pointer; padding: 0.2rem 0;
}
.obj-check-item input[type="checkbox"] { margin-top: 0.15rem; flex-shrink: 0; }

/* ── Document Import ──────────────────────────────────────────────────────── */
.import-subtext { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; line-height: 1.4; }
.import-config-row { display: flex; gap: 12px; margin-bottom: 1rem; }
.import-config-row .form-group { flex: 1; min-width: 0; }
.import-upload-area {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.4rem; border: 1px dashed var(--border); border-radius: var(--hv-r-md); padding: 40px;
  text-align: center; cursor: pointer; color: var(--text-secondary); font-size: 0.84rem;
  background: var(--bg-card); transition: border-color 0.15s;
}
.import-upload-area:hover, .import-upload-area.drag-over { border-color: var(--accent); background: var(--hv-accent-soft); }
.import-upload-area small { font-size: 0.75rem; color: var(--text-muted); }
.import-upload-icon { font-size: 1.5rem; }
.import-paste-toggle { background: none; border: none; color: var(--accent); font-size: 0.78rem; cursor: pointer; padding: 0; margin-top: 0.5rem; }
.import-paste-toggle:hover { text-decoration: underline; }
.import-paste-area { min-height: 200px; margin-top: 0.5rem; }
.import-extract-btn { margin-top: 1rem; }

.import-review-header { margin: 1.5rem 0 1rem; }
.import-review-header h3 { font-size: 0.95rem; font-weight: 500; }
.import-review-meta { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }

.import-candidate-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm);
  border-left: 3px solid var(--border); padding: 16px; margin-bottom: 12px;
}
.import-accepted { border-left-color: var(--green); }
.import-uncertain { border-left-color: var(--orange); }
.import-discarded { opacity: 0.4; }
.import-candidate-badge { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: var(--hv-r-lg); display: inline-block; margin-bottom: 8px; }
.import-badge-high { background: #0c2918; color: var(--green); }
.import-badge-accepted { background: #0c2918; color: var(--green); }
.import-badge-uncertain { background: #1e1200; color: var(--orange); }
.import-badge-draft { background: #1e1200; color: var(--orange); }
.import-badge-discarded { background: var(--bg-card); color: var(--text-muted); }

.import-candidate-section { margin-bottom: 8px; }
.import-section-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.import-candidate-original { font-size: 12px; color: var(--text-secondary); font-style: italic; line-height: 1.5; }
.import-candidate-context { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.import-candidate-suggestion {
  width: 100%; background: var(--bg-app); color: var(--text-primary); border: 1px solid var(--border);
  border-radius: 4px; padding: 8px; font-size: 0.84rem; font-family: inherit; resize: vertical;
}
.import-candidate-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.import-issues { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.import-issue-pill { font-size: 10px; background: #1e1200; color: var(--orange); padding: 2px 6px; border-radius: 4px; }
.import-uncertain-note { font-size: 11px; color: var(--orange); margin-bottom: 8px; }
.import-candidate-actions { display: flex; gap: 8px; margin-top: 12px; }
.import-candidate-actions button { font-size: 0.78rem; padding: 0.25rem 0.6rem; }

.import-bulk-actions {
  position: sticky; bottom: 0; background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 12px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-top: 1rem;
}
.import-success { padding: 1.5rem 0; font-size: 0.92rem; color: var(--green); }

/* ── Team department tag ──────────────────────────────────────────────────── */
.team-tag { font-size: 10px; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px; margin-left: 6px; }

/* ── Audit table ──────────────────────────────────────────────────────────── */
.audit-table { table-layout: fixed; }
.audit-col-ts { width: 160px; white-space: nowrap; color: var(--text-secondary); font-size: 12px; }
.audit-col-action { width: 180px; white-space: nowrap; }
.audit-col-detail { word-break: break-word; color: var(--text-secondary); font-size: 12px; }
.audit-col-user { width: 120px; white-space: nowrap; color: var(--text-secondary); }
.audit-action-badge { font-size: 11px; padding: 2px 8px; border-radius: 3px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap; }

/* ── Theme pills ──────────────────────────────────────────────────────────── */
.theme-pill-group { display: inline-flex; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--hv-r-md); padding: 3px; gap: 2px; }
.theme-pill { background: transparent; border: none; color: var(--text-muted); font-size: 13px; font-family: inherit; padding: 6px 14px; border-radius: var(--hv-r-sm); cursor: pointer; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.theme-pill:hover { color: var(--text-secondary); }
.theme-pill.active { background: var(--bg-card); color: var(--text-primary); box-shadow: var(--hv-shadow-card); }

/* ── Module toggles ───────────────────────────────────────────────────────── */
.module-toggles { display: flex; flex-direction: column; gap: 0.4rem; }
.module-toggle { display: flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; color: var(--text-secondary); cursor: pointer; }
.module-toggle input { cursor: pointer; }

/* ── Updates page ─────────────────────────────────────────────────────────── */
.updates-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px; margin-top: 12px; }
.updates-tab {
  padding: 8px 16px; font-size: 13px; color: var(--text-muted); cursor: pointer;
  border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit;
}
.updates-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.updates-tab:hover { color: var(--text-secondary); }
.updates-badge { background: var(--border); color: var(--text-secondary); font-size: 11px; padding: 1px 6px; border-radius: var(--hv-r-lg); margin-left: 4px; }
.updates-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); font-size: 13px; }

.activity-card {
  border-bottom: 1px solid var(--border); padding: 14px 0; cursor: pointer; transition: background 0.08s;
}
.activity-card:hover { background: var(--bg-card); padding: 14px 12px; margin: 0 -12px; }
.activity-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.activity-card-owner { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.activity-card-type { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.activity-card-time { font-size: 11px; color: var(--text-muted); }
.activity-card-goal { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.activity-card-excerpt {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5; font-style: italic;
  border-left: 2px solid var(--border); padding-left: 10px; margin-bottom: 8px;
}
.activity-card-status { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.activity-card-action { font-size: 12px; color: var(--accent); margin-left: auto; }
.activity-card-3p-counts { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.activity-card-blocking { font-size: 12px; color: var(--orange); margin-bottom: 6px; }

.waiting-section { margin-bottom: 32px; }
.waiting-section-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.waiting-goal-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.waiting-days { font-size: 12px; font-weight: 500; }
.waiting-nudge { font-size: 12px; color: var(--accent); text-decoration: none; margin-left: auto; padding: 4px 8px; }
.waiting-nudge:hover { text-decoration: underline; }
.waiting-threep-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-card); border-radius: var(--hv-r-sm); margin-bottom: 8px; }
.waiting-threep-name { font-size: 13px; color: var(--text-secondary); }
.waiting-threep-reminder { font-size: 12px; color: var(--accent); text-decoration: none; margin-left: auto; }
.waiting-threep-reminder:hover { text-decoration: underline; }

/* ── Cycles page ──────────────────────────────────────────────────────────── */
.cycles-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.cycles-heading { font-size: 1.1rem; font-weight: 500; }
.cycle-section-title {
  font-size: 0.78rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-secondary); margin: 1.25rem 0 0.5rem;
}
.cycle-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-md);
  padding: 1rem 1.25rem; margin-bottom: 0.6rem;
}
.cycle-archived { opacity: 0.65; }
.cycle-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.cycle-card-name { font-weight: 500; font-size: 0.92rem; }
.cycle-card-dates { font-size: 0.8rem; color: var(--text-secondary); }
.cycle-goal-count { margin-left: 0.75rem; color: var(--accent); font-size: 0.78rem; }
.cycle-learning { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.5rem; line-height: 1.4; }
.cycle-decisions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.cycle-decision {
  font-size: 0.72rem; background: var(--bg-hover); color: var(--text-secondary);
  padding: 0.15rem 0.45rem; border-radius: 4px;
}
.cycle-card-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }

.archive-goal-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border);
}
.archive-goal-label { font-size: 0.82rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-decision-select { width: 140px; flex-shrink: 0; }

/* ── Briefing view ────────────────────────────────────────────────────────── */
.briefing-view { max-width: 640px; padding: 1.5rem 0; }
.briefing-header { margin-bottom: 1.5rem; }
.briefing-greeting { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.briefing-date { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.2rem; }
.briefing-cards { display: flex; flex-direction: column; gap: 0; }

.triage-card {
  position: relative;
  background: transparent;
  border: none; border-radius: 0; outline: none; box-shadow: none;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px; padding-right: 2.5rem;
}
.triage-card:first-child { border-top: 1px solid var(--border); }
.triage-card:hover { background: var(--bg-card); }
.triage-dismiss {
  position: absolute; top: 14px; right: 12px;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 0.85rem; line-height: 1; padding: 0;
  opacity: 0; transition: opacity 0.15s;
}
.triage-card:hover .triage-dismiss { opacity: 1; }
.triage-dismiss:hover { color: var(--text-primary); }
.triage-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.triage-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.triage-title { font-size: 0.88rem; font-weight: 500; }
.triage-context { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; margin-bottom: 0.5rem; }
.triage-action {
  background: none; border: 1px solid var(--border); color: var(--accent);
  border-radius: var(--hv-r-sm); padding: 0.3rem 0.7rem; font-size: 0.78rem;
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.triage-action:hover { background: var(--bg-hover); border-color: var(--accent); }

.briefing-empty { text-align: center; padding: 3rem 0; }
.briefing-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; color: var(--green); }
.briefing-empty-title { font-size: 1rem; font-weight: 500; }
.briefing-empty-sub { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* ── Status indicator (dot + text) ─────────────────────────────────────────── */
.status-indicator { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.col-status .status-indicator { font-size: 0; } /* In table: dot only */
.col-status .status-indicator .status-dot { width: 9px; height: 9px; }

/* ── Goal detail meta bar ──────────────────────────────────────────────────── */
.goal-meta-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 16px 0; border-bottom: 1px solid var(--border);
  margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.goal-meta-left { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.goal-meta-sep { color: #333336; }
.goal-meta-right { display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--text-muted); }
.goal-meta-id { font-family: monospace; }
.goal-description-text { font-size: 16px; font-weight: 600; color: var(--text-primary); line-height: 1.4; margin: 0 0 24px 0; }

/* ── Status definitions ───────────────────────────────────────────────────── */
.status-defs-section { margin-top: 28px; }
.status-defs-title { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.status-defs-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.status-def-row { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border-subtle); }
.status-def-row:last-child { border-bottom: none; }
.status-def-header { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.status-def-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-def-textarea { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text-secondary); font-size: 12px; font-family: inherit; padding: 8px 10px; resize: none; min-height: 52px; outline: none; box-sizing: border-box; line-height: 1.5; }
.status-def-textarea:focus { border-color: var(--accent); color: var(--text-primary); }
.status-definition-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-style: italic; min-height: 16px; }

/* ── Objective alignment hints ─────────────────────────────────────────────── */
.obj-gap-hint { font-size: 12px; color: var(--text-muted); background: rgba(245,158,11,0.06); border-left: 2px solid var(--yellow); padding: 8px 12px; border-radius: 0 4px 4px 0; margin-top: 8px; line-height: 1.5; }
.obj-alignment-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.obj-alignment-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.obj-alignment-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.obj-alignment-count { font-size: 13px; color: var(--text-secondary); }
.obj-alignment-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── Objective Edit page ──────────────────────────────────────────────────── */
.obj-edit-page { max-width: 760px; margin: 0 auto; padding: 24px 0; }
.obj-edit-back { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; cursor: pointer; margin-bottom: 28px; background: none; border: none; padding: 0; }
.obj-edit-back:hover { color: var(--text-primary); }
.obj-edit-section { margin-bottom: 24px; }
.obj-edit-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.obj-edit-title-input { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm); color: var(--text-primary); font-size: 15px; font-weight: 500; font-family: inherit; padding: 12px 14px; resize: none; min-height: 60px; outline: none; line-height: 1.5; box-sizing: border-box; }
.obj-edit-title-input:focus { border-color: var(--accent); }
.obj-edit-desc-input { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm); color: var(--text-primary); font-size: 13px; font-family: inherit; padding: 12px 14px; resize: vertical; min-height: 200px; outline: none; line-height: 1.6; box-sizing: border-box; }
.obj-edit-desc-input:focus { border-color: var(--accent); }
.obj-edit-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.obj-edit-divider { border: none; border-top: 1px solid var(--border-subtle); margin: 24px 0; }

/* ── Goal Attachments ─────────────────────────────────────────────────────── */
.goal-attachments-section { margin-top: 12px; }
.goal-attachments-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.goal-attachment-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); font-size: 12px; }
.goal-attachment-icon { font-size: 14px; }
.goal-attachment-name { flex: 1; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-attachment-size { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.goal-attachment-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 0 2px; flex-shrink: 0; }
.goal-attachment-remove:hover { color: var(--red); }
.goal-attachment-upload { margin-top: 8px; border: 1px dashed var(--border); border-radius: var(--hv-r-sm); padding: 10px 14px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text-muted); transition: border-color 0.15s; }
.goal-attachment-upload:hover { border-color: var(--accent); color: var(--text-secondary); }
.goal-attachment-uploading { font-size: 12px; color: var(--text-muted); padding: 6px 0; font-style: italic; }
.goal-supporting-text { font-size: 13px; color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap; margin-bottom: 12px; }
.goal-view-attachments { margin-top: 8px; }
.goal-view-attachment-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); cursor: pointer; text-decoration: none; color: inherit; }
.goal-view-attachment-row:hover .goal-attachment-name { color: var(--accent); }
.goal-view-attachment-row:last-child { border-bottom: none; }
.goal-view-download-icon { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }

/* ── SMART Coach (goal detail) ─────────────────────────────────────────────── */
.smart-coach-panel { border-left: 3px solid var(--orange); background: rgba(247,107,21,0.06); border-radius: 0 var(--hv-r-sm) var(--hv-r-sm) 0; padding: 14px 18px; margin-bottom: 20px; position: relative; }
.smart-coach-label { font-size: 10px; font-weight: 600; color: var(--orange); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 8px; }
.smart-coach-header { font-size: 13px; color: var(--orange); font-weight: 500; margin-bottom: 12px; }
.smart-coach-issue { display: flex; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.smart-coach-issue-icon { color: var(--orange); flex-shrink: 0; font-size: 12px; margin-top: 1px; }
.smart-coach-issue-label { color: var(--text-primary); font-weight: 500; }
.smart-coach-criterion { font-size: 10px; color: var(--orange); background: rgba(247,107,21,0.15); border-radius: 3px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.smart-coach-issue-detail { color: var(--text-secondary); font-size: 12px; margin-top: 2px; line-height: 1.5; }
.smart-coach-rewrite-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 14px 0 6px 0; }
.smart-coach-rewrite-text { font-size: 13px; color: var(--text-primary); font-style: italic; line-height: 1.5; padding: 10px 12px; background: rgba(0,0,0,0.2); border-radius: 4px; margin-bottom: 6px; }
.smart-coach-note { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.smart-coach-actions { display: flex; gap: 8px; margin-top: 12px; }
.smart-coach-copy-btn { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); border-radius: var(--hv-r-xs); padding: 5px 12px; font-size: 12px; cursor: pointer; }
.smart-coach-copy-btn:hover { color: var(--text-primary); }
.smart-coach-apply-btn { background: rgba(247,107,21,0.15); border: 1px solid rgba(247,107,21,0.3); color: var(--orange); border-radius: var(--hv-r-xs); padding: 5px 12px; font-size: 12px; cursor: pointer; }
.smart-coach-apply-btn:hover { background: rgba(247,107,21,0.25); }
.smart-coach-dismiss { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.smart-coach-dismiss:hover { color: var(--text-secondary); }
.smart-coach-loading { font-size: 12px; color: var(--text-muted); }

/* ── Set-review close / modal dismiss ──────────────────────────────────────── */
.ai-coach-dismiss {
  background: none; border: none; color: var(--text-secondary); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0;
}
.ai-coach-dismiss:hover { color: var(--text-primary); }
.ai-coach-loading {
  padding: 0.6rem 0.75rem; font-size: 0.82rem; color: var(--text-secondary); font-style: italic;
}

/* ── Board Memo view ──────────────────────────────────────────────────────── */
.memo-view {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg-app); overflow-y: auto;
}
.memo-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-app); z-index: 10;
}
.memo-toolbar-actions { display: flex; gap: 0.5rem; }
.memo-content { padding: 2rem; max-width: 800px; margin: 0 auto; }
.memo-loading { text-align: center; padding: 3rem 0; color: var(--text-secondary); font-style: italic; }
.memo-paper { line-height: 1.6; }
.memo-header { margin-bottom: 2rem; }
.memo-header h1 { font-size: 1.5rem; font-weight: 500; }
.memo-header-meta { font-size: 0.88rem; color: var(--text-secondary); margin-top: 0.25rem; }
.memo-section { margin-bottom: 1.5rem; }
.memo-section h3 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
.memo-section-header { display: flex; align-items: center; justify-content: space-between; }
.memo-edit-toggle {
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  border-radius: 4px; padding: 0.15rem 0.5rem; font-size: 0.72rem; cursor: pointer;
}
.memo-edit-toggle:hover { color: var(--text-primary); border-color: var(--accent); }
.memo-section-display { font-size: 0.88rem; color: #d0cfc9; }
.memo-section-editor {
  width: 100%; min-height: 120px; padding: 0.6rem;
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border);
  border-radius: var(--hv-r-sm); font-size: 0.88rem; font-family: inherit;
  line-height: 1.6; resize: vertical;
}
.memo-financial { font-size: 0.88rem; color: #d0cfc9; }
.memo-goals-section { page-break-before: always; }
.memo-goal-block {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm);
  padding: 0.75rem 1rem; margin-bottom: 0.6rem;
}
.memo-goal-header { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; }
.memo-goal-status { font-size: 0.72rem; font-weight: 500; text-transform: uppercase; }
.memo-goal-desc { font-size: 0.88rem; font-weight: 500; }
.memo-goal-meta { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.35rem; }
.memo-goal-wdws { font-size: 0.84rem; color: #d0cfc9; line-height: 1.5; }
.memo-goal-ptg { font-size: 0.82rem; color: var(--yellow); margin-top: 0.35rem; line-height: 1.4; }

/* ── Print CSS ────────────────────────────────────────────────────────────── */
/* ── Bets page ────────────────────────────────────────────────────────────── */
.bets-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.bets-heading { font-size: 1.1rem; font-weight: 500; }
.bet-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-md);
  padding: 0.85rem 1rem; margin-bottom: 0.5rem;
}
.bet-closed { opacity: 0.55; }
.bet-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.bet-id { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }
.bet-quarter { font-size: 0.75rem; color: var(--text-muted); }
.bet-title { font-size: 0.9rem; font-weight: 500; }
.bet-desc { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.15rem; }
.bet-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.bet-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* ── 3Ps page ─────────────────────────────────────────────────────────────── */
.threep-document { max-width: 700px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.threep-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle); }
.threep-owner-select { font-size: 14px; font-weight: 500; color: var(--text-primary); background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--hv-r-sm); padding: 6px 10px; min-width: 160px; }
.threep-owner-select option { background: var(--bg-card); }
.threep-week-nav { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.threep-week-nav button { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 6px; font-size: 16px; }
.threep-week-nav button:hover { color: var(--text-primary); }
.threep-week-nav button:disabled { opacity: 0.3; cursor: default; }
.threep-guide { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm); padding: 14px 18px; font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

/* Mood */
.threep-mood-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-lg); margin-bottom: 16px; box-shadow: var(--hv-shadow-card); }
.threep-mood-label { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.threep-mood-options { display: flex; gap: 4px; }
.threep-mood-btn { width: 36px; height: 36px; border-radius: var(--hv-r-md); border: 2px solid transparent; background: none; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0.4; transition: all 0.15s; padding: 0; }
.threep-mood-btn:hover { opacity: 0.7; transform: scale(1.1); }
.threep-mood-btn.selected { opacity: 1; border-color: var(--accent); background: var(--accent-subtle); transform: scale(1.05); }

/* Cards */
.threep-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-lg); margin-bottom: 16px; overflow: hidden; box-shadow: var(--hv-shadow-card); }
.threep-card-header { padding: 14px 18px 10px; border-bottom: 1px solid var(--border-subtle); }
.threep-card-title { font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-right: 8px; }
.threep-card-sub { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--weight-body); }
.threep-card-body { padding: 4px 0; }
.threep-card-footer { padding: 10px 18px 14px; border-top: 1px solid var(--border-subtle); }
.threep-card-footer button { background: none; border: none; color: var(--accent); font-size: 12px; font-weight: 500; cursor: pointer; padding: 4px 0; font-family: inherit; transition: color 0.1s; }
.threep-card-footer button:hover { color: var(--accent-hover); }

/* Items */
.threep-item-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--border-subtle); transition: background 0.1s; }
.threep-item-row:last-child { border-bottom: none; }
.threep-item-row:hover { background: var(--bg-hover); }
.threep-item-icon { font-size: 10px; color: var(--text-muted); margin-top: 4px; flex-shrink: 0; line-height: 1; }
.threep-item-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.threep-item-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; }
.threep-item-chip-row { display: flex; }
.threep-item-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.1s; flex-shrink: 0; }
.threep-item-row:hover .threep-item-actions { opacity: 1; }
.threep-item-delete { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0 3px; line-height: 1; border-radius: 3px; }
.threep-item-delete:hover { color: var(--red); background: var(--red-subtle); }

/* Goal chip */
.threep-goal-chip { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 7px; border-radius: 4px; background: var(--accent-subtle); color: var(--accent); margin-left: 6px; cursor: pointer; white-space: nowrap; flex-shrink: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.threep-goal-chip:hover { background: var(--accent-border); }
.threep-linked-preview { display: flex; align-items: center; gap: 4px; padding: 2px 0 4px; }

/* Add form */
.threep-add-form { margin-top: 6px; margin-bottom: 8px; padding: 0 18px; }
.threep-add-textarea { width: 100%; background: var(--bg-card); border: 1px solid var(--accent); border-radius: 4px; color: var(--text-primary); font-size: 13px; font-family: inherit; padding: 8px 10px; resize: none; min-height: 60px; outline: none; box-sizing: border-box; }
.threep-add-goal-hint { font-size: 11px; color: var(--text-muted); margin: 4px 0; }
.threep-add-actions { display: flex; gap: 8px; margin-top: 6px; }
.threep-problem-extras { margin-top: 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); }
.threep-severity-opts label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; margin-right: 8px; }

/* Submit + review */
.threep-submit-btn { width: 100%; height: 46px; background: var(--btn-primary-bg); color: var(--btn-primary-text); border: none; border-radius: var(--hv-r-lg); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; box-shadow: 0 2px 8px rgba(91,91,214,0.2); font-family: inherit; }
.threep-submit-btn:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(91,91,214,0.3); transform: translateY(-1px); }
.threep-submit-btn:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(91,91,214,0.2); }
.threep-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.threep-submit-btn.submitted { background: transparent; border: 2px solid var(--green); color: var(--green); box-shadow: none; font-weight: 550; }
.threep-edit-notice { font-size: 12px; color: var(--text-muted); background: var(--accent-subtle); border-left: 2px solid var(--accent); padding: 8px 12px; border-radius: 0 4px 4px 0; margin-bottom: 16px; }

/* ── Settings toggle + 3P lock ────────────────────────────────────────────── */
.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.settings-toggle-label { font-size: 13px; color: var(--text-primary); }
.settings-toggle-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.settings-toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.settings-toggle input { opacity: 0; width: 0; height: 0; }
.settings-toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: var(--hv-r-lg); cursor: pointer; transition: background 0.2s; }
.settings-toggle-slider:before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; bottom: 3px; background: var(--text-muted); border-radius: 50%; transition: 0.2s; }
.settings-toggle input:checked + .settings-toggle-slider { background: var(--hv-wip-bd); }
.settings-toggle input:checked + .settings-toggle-slider:before { background: var(--accent); transform: translateX(16px); }
.threep-locked-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; margin-bottom: 12px; }
.threep-edit-notice { font-size: 12px; color: var(--text-muted); background: var(--accent-subtle); border-left: 2px solid var(--accent); padding: 8px 12px; border-radius: 0 4px 4px 0; margin-bottom: 16px; }

/* ── 3P Coach panel ───────────────────────────────────────────────────────── */
.threep-coach-panel { border: 1px solid var(--accent-border); background: var(--accent-subtle); border-radius: var(--hv-r-lg); padding: 20px 22px; margin: 16px 0; box-shadow: 0 1px 4px var(--hv-shadow); }
.threep-coach-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.threep-coach-score { font-size: var(--text-lg); color: var(--text-primary); margin-bottom: 6px; letter-spacing: 2px; }
.threep-coach-summary { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: 14px; line-height: var(--leading-normal); }
.threep-coach-section { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 14px 0 8px; padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.threep-coach-issue { margin-bottom: 10px; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-md); border-left: 3px solid transparent; }
.threep-coach-issue.coach-issue-block { border-left-color: var(--red); }
.threep-coach-issue.coach-issue-warn { border-left-color: var(--yellow); }
.coach-severity-icon { font-weight: 600; }
.threep-coach-quote { font-size: 12px; color: var(--text-secondary); font-style: italic; margin-bottom: 3px; }
.threep-coach-problem { font-size: 12px; color: var(--yellow); margin-bottom: 3px; }
.threep-coach-suggestion { font-size: 12px; color: var(--text-primary); }
.threep-coach-strength { font-size: 12px; color: var(--green); margin-top: 8px; }
.threep-coach-issue-actions { display: flex; gap: 6px; margin-top: 6px; }
.threep-coach-apply-btn { background: var(--hv-accent-soft); border: 1px solid var(--hv-wip-bd); color: var(--accent); border-radius: 4px; padding: 3px 10px; font-size: 11px; cursor: pointer; white-space: nowrap; }
.threep-coach-apply-btn:hover { background: var(--accent-border); }
.threep-coach-apply-btn.applied { background: transparent; border-color: var(--border); color: var(--text-muted); cursor: default; }
.threep-coach-copy-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); border-radius: 4px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
.threep-coach-copy-btn:hover { color: var(--text-secondary); }
.threep-coach-issue.applied { border-left: 2px solid var(--hv-good-bd); }
.threep-coach-apply-all-btn { background: var(--hv-accent-soft); border: 1px solid var(--hv-wip-bd); color: var(--accent); border-radius: var(--hv-r-xs); padding: 4px 12px; font-size: 12px; cursor: pointer; margin-left: auto; }
.threep-coach-apply-all-btn:hover { background: rgba(91,91,214,0.22); }
.threep-coach-score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.threep-review-btn { display: none; /* replaced by coach-cta-btn */ }

/* ── Coach CTA button ─────────────────────────────────────────────────── */
.coach-cta-row { margin-top: 16px; }
.coach-cta-btn {
  width: 100%; padding: 16px 18px; border-radius: var(--hv-r-lg); cursor: pointer;
  border: 1.5px dashed var(--accent-border); background: var(--accent-subtle);
  text-align: left; font-family: inherit; transition: all 0.15s;
}
.coach-cta-btn:hover { background: var(--hv-accent-soft); border-color: var(--accent); box-shadow: 0 2px 8px var(--hv-shadow); }
.coach-cta-btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.coach-cta-label { display: block; font-size: 14px; font-weight: 600; color: var(--accent); }
.coach-cta-sub { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* ── Coach rewrite blocks ─────────────────────────────────────────────── */
.coach-rewrite-block { margin-top: 8px; }
.coach-rewrite-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.coach-rewrite-text { font-size: 13px; color: var(--text-primary); line-height: 1.45; background: var(--accent-subtle); padding: 8px 10px; border-radius: 4px; margin-bottom: 6px; }
.coach-rewrite-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.coach-apply-rewrite-btn, .coach-edit-apply-btn, .coach-dismiss-btn {
  font-size: 12px; padding: 5px 12px; border-radius: var(--hv-r-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary);
  font-family: inherit; transition: all 0.12s; font-weight: 500;
}
.coach-apply-rewrite-btn { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 1px 2px rgba(91,91,214,0.2); }
.coach-apply-rewrite-btn:hover { background: var(--accent-hover); box-shadow: 0 2px 4px rgba(91,91,214,0.3); }
.coach-edit-apply-btn:hover { border-color: var(--accent); color: var(--accent); }
.coach-dismiss-btn { color: var(--text-muted); border: none; }
.coach-dismiss-btn:hover { color: var(--text-secondary); }
.coach-applied-indicator { font-size: 12px; color: var(--green, #059669); font-weight: 500; padding: 4px 0; }
.coach-edit-textarea {
  width: 100%; font-size: 13px; padding: 8px 10px; border-radius: 4px;
  border: 1px solid var(--accent); background: var(--bg-app); color: var(--text-primary);
  font-family: inherit; resize: vertical; line-height: 1.4;
}
.coach-guidance { font-size: 12px; color: var(--text-muted); font-style: italic; margin: 6px 0; }

/* ── Seeded Coach feedback (display-only) ─────────────────────────────── */
.coach-state-badge {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: var(--hv-r-md);
  font-weight: 600; margin-left: 6px; vertical-align: middle;
}
.coach-state-applied { background: var(--hv-good-bg); color: var(--green, #059669); }
.coach-state-dismissed { background: rgba(150,150,150,0.15); color: var(--text-muted); }
.coach-state-pending { background: rgba(243,156,18,0.12); color: var(--status-yellow, #f39c12); }
.seeded-feedback-item { margin: 6px 0; padding: 6px 0; }
.seeded-feedback-label { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 3px; }
.seeded-writing .seeded-feedback-label { color: var(--text-secondary); }
.seeded-ceo .seeded-feedback-label { color: var(--accent); }
.coach-skill-notice { font-size: 11px; color: var(--text-muted); font-style: italic; margin-bottom: 8px; }

/* ── CEO Review feedback ──────────────────────────────────────────────── */
.ceo-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--border);
}
.ceo-whole-obs {
  padding: 12px 14px; border-radius: var(--hv-r-sm); margin-bottom: 12px;
  background: var(--accent-subtle); border: 1px solid var(--hv-wip-bd);
}
.ceo-entry-feedback {
  padding: 10px 12px; border-radius: var(--hv-r-sm); margin-bottom: 8px;
  background: var(--accent-subtle); border-left: 3px solid var(--hv-wip-bd);
}
.ceo-entry-ref { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; cursor: pointer; }
.ceo-entry-ref:hover { color: var(--accent); }
.ceo-question-icon { font-size: 14px; margin-bottom: 4px; }
.ceo-question-text { font-size: 13px; color: var(--text-primary); font-style: italic; line-height: 1.45; margin-bottom: 6px; }
.ceo-starter { margin-bottom: 6px; }
.ceo-starter summary {
  font-size: 12px; color: var(--accent); cursor: pointer; user-select: none;
}
.ceo-starter summary:hover { text-decoration: underline; }
.ceo-starter-text {
  font-size: 12px; color: var(--text-secondary); line-height: 1.45;
  padding: 8px 10px; margin-top: 4px; border-radius: 4px; background: var(--bg-hover);
  display: flex; align-items: flex-start; gap: 8px;
}
.ceo-copy-starter {
  font-size: 11px; padding: 2px 8px; border-radius: 4px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
  cursor: pointer; font-family: inherit;
}
.ceo-dismiss-entry, .ceo-dismiss-obs {
  font-size: 11px; color: var(--text-muted); background: none; border: none;
  cursor: pointer; padding: 2px 0; font-family: inherit;
}
.ceo-dismiss-entry:hover, .ceo-dismiss-obs:hover { color: var(--text-secondary); }

/* ── Inline editing ───────────────────────────────────────────────────── */
.threep-inline-edit {
  width: 100%; font-size: 13px; padding: 6px 8px; border-radius: var(--hv-r-sm);
  border: 1px solid var(--accent); background: var(--bg-app); color: var(--text-primary);
  font-family: inherit; resize: vertical; line-height: 1.5;
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.threep-item-text:hover { background: var(--bg-hover); border-radius: 4px; }
.threep-item-highlight { animation: itemHighlight 1.5s ease; }
@keyframes itemHighlight {
  0% { background: var(--hv-accent-soft); }
  100% { background: transparent; }
}
.coach-jump-to { cursor: pointer; }
.coach-jump-to:hover { color: var(--accent); }
.threep-coach-issue.dismissed { display: none; }

/* ── Carry-forward review tray ───────────────────────────────────────────── */
.threep-carry-btn { margin-left: 10px; opacity: 0.75; }
.threep-carry-btn:hover { opacity: 1; }
.carry-tray {
  margin-top: 10px;
  border: 1px dashed var(--accent-border);
  border-radius: var(--hv-r-sm);
  padding: 10px 12px 8px;
  background: var(--accent-subtle);
}
.carry-tray-header {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
}
.carry-tray-items { display: flex; flex-direction: column; gap: 6px; }
.carry-tray-item { display: flex; gap: 6px; align-items: flex-start; }
.carry-tray-text {
  flex: 1;
  font-size: 13px;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  resize: vertical;
  min-height: 34px;
  font-family: inherit;
}
/* Override .threep-card-footer button baseline for tray buttons */
.carry-tray .carry-tray-del {
  background: none !important; border: none !important;
  color: var(--text-muted) !important; cursor: pointer;
  font-size: 16px; padding: 2px 4px; line-height: 1; flex-shrink: 0;
}
.carry-tray .carry-tray-del:hover { color: var(--text-primary) !important; }
.carry-tray-cap-note { font-size: 11px; color: var(--text-muted); font-style: italic; margin-top: 4px; }
.carry-tray-actions { display: flex; gap: 8px; margin-top: 10px; }
.carry-tray .carry-tray-save {
  background: var(--accent) !important; color: #fff !important;
  border: none !important; border-radius: var(--hv-r-sm); padding: 4px 12px;
  font-size: 12px; font-weight: 500; cursor: pointer;
}
.carry-tray .carry-tray-save:hover { background: var(--accent-hover) !important; }
.carry-tray .carry-tray-discard {
  background: transparent !important; color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important; border-radius: var(--hv-r-sm);
  padding: 4px 12px; font-size: 12px; cursor: pointer;
}

/* ── @ mention dropdown ───────────────────────────────────────────────────── */
.at-mention-dropdown { position: absolute; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm); min-width: 320px; max-height: 300px; overflow-y: auto; z-index: 1000; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.at-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.at-option:hover { background: var(--bg-hover); color: var(--text-primary); }
.at-option .at-owner { margin-left: auto; color: var(--text-muted); font-size: 11px; padding-left: 8px; white-space: nowrap; }
.at-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Status (Project Status + WBR) ────────────────────────────────────────── */
.status-document { max-width: 720px; margin: 0 auto; padding: 0 0 80px 0; }
.status-format-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.status-format-tab { padding: 10px 20px; font-size: 13px; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }
.status-format-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.status-week-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.status-week-label { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.status-week-btn { background: none; border: 1px solid var(--border); color: var(--text-muted); border-radius: 4px; width: 28px; height: 28px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.status-week-btn:hover { color: var(--text-primary); border-color: var(--accent); }
.status-week-btn:disabled { opacity: 0.3; cursor: default; }
.status-section { margin-bottom: 28px; }
.status-section-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.status-section-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.status-input { width: 100%; }
.status-textarea { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm); color: var(--text-primary); font-size: 13px; font-family: inherit; padding: 12px 14px; resize: vertical; outline: none; line-height: 1.6; box-sizing: border-box; }
.status-textarea:focus { border-color: var(--accent); }
.status-textarea.tall { min-height: 180px; }
.status-textarea.medium { min-height: 120px; }
.status-textarea.short { min-height: 80px; }
.status-title-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.status-period-label { font-size: 13px; color: var(--text-muted); padding-top: 10px; white-space: nowrap; }
.status-goal-selector { width: 100%; margin-bottom: 12px; }
.status-goal-pullout { background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: var(--hv-r-sm); padding: 12px 16px; margin-top: 8px; }
.status-goal-status-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.status-hl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .status-hl-row { grid-template-columns: 1fr; } }
.status-links-list { margin-bottom: 8px; }
.status-link-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.status-link-url { flex: 2; }
.status-link-label { flex: 1; }
.status-link-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0 4px; flex-shrink: 0; }
.status-link-remove:hover { color: var(--red); }
.status-add-link-btn { background: none; border: 1px dashed var(--border); border-radius: 4px; color: var(--text-muted); font-size: 12px; padding: 6px 12px; cursor: pointer; width: 100%; text-align: left; }
.status-add-link-btn:hover { border-color: var(--accent); color: var(--text-secondary); }
/* ── Actions page ─────────────────────────────────────────────────────────── */
.actions-page { padding: 24px 0; }
.actions-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.actions-title { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.actions-filters { display: flex; gap: 8px; margin-bottom: 16px; }
.actions-filter-select { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm); color: var(--text-secondary); font-size: 12px; font-family: inherit; padding: 5px 10px; outline: none; cursor: pointer; }
.actions-table { width: 100%; border-collapse: collapse; }
.actions-table th { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 12px 10px 0; text-align: left; border-bottom: 1px solid var(--border); }
.actions-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; font-size: 13px; color: var(--text-primary); }
.actions-table tr:hover td { background: var(--bg-card); }
.actions-number { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.actions-action-text { cursor: pointer; line-height: 1.4; }
.actions-action-text:hover { color: var(--accent); }
.actions-inline-select { background: transparent; border: none; color: var(--text-primary); font-size: 12px; font-family: inherit; cursor: pointer; outline: none; padding: 2px 4px; border-radius: 4px; }
.actions-inline-select:hover { background: var(--bg-hover); }
.actions-inline-date { background: transparent; border: none; color: var(--text-secondary); font-size: 12px; font-family: inherit; cursor: pointer; outline: none; padding: 2px 4px; border-radius: 4px; width: 90px; }
.actions-inline-date:hover { background: var(--bg-hover); }
.action-status-open { background: rgba(96,96,104,0.15); color: var(--text-secondary); }
.action-status-in-progress { background: var(--accent-subtle); color: var(--accent); }
.action-status-resolved { background: var(--green-subtle); color: var(--green); }
.action-status-wont-fix { color: var(--text-muted); }
.action-source-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.action-source-3p { background: var(--orange-subtle); color: var(--orange); }
.action-source-weekly-status { background: var(--accent-subtle); color: var(--accent); }
.action-source-wbr { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.action-source-manual { background: rgba(96,96,104,0.12); color: var(--text-secondary); }
.actions-delete-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 3px; }
.actions-delete-btn:hover { color: var(--red); background: var(--red-subtle); }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; background: var(--red); color: #fff; font-size: 10px; font-weight: 600; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px; margin-left: 6px; line-height: 1; }
.actions-add-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-sm); padding: 16px; margin-bottom: 16px; }

/* ── PS Risks table ───────────────────────────────────────────────────────── */
.ps-risks-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.ps-risks-table th { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 8px 8px 0; text-align: left; border-bottom: 1px solid var(--border); }
.ps-risks-table td { padding: 6px 8px 6px 0; vertical-align: middle; border-bottom: 1px solid var(--border-subtle); }
.ps-risks-table tr:last-child td { border-bottom: none; }
.ps-risk-input { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text-primary); font-size: 13px; font-family: inherit; padding: 6px 8px; outline: none; box-sizing: border-box; }
.ps-risk-input:focus { border-color: var(--accent); }
.ps-risk-owner-select { width: 100%; min-width: 120px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text-primary); font-size: 13px; font-family: inherit; padding: 6px 8px; outline: none; }
.ps-risk-owner-select:focus { border-color: var(--accent); }
.ps-risk-date-input { width: 130px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; color: var(--text-primary); font-size: 13px; font-family: inherit; padding: 6px 8px; outline: none; }
.ps-risk-date-input:focus { border-color: var(--accent); }
.ps-risk-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 0 4px; line-height: 1; }
.ps-risk-remove:hover { color: var(--red); }
.ps-risk-col-risk { width: auto; }
.ps-risk-col-owner { width: 150px; }
.ps-risk-col-date { width: 140px; }
.ps-risk-col-del { width: 28px; }
.ps-add-risk-btn { background: none; border: 1px dashed var(--border); border-radius: 4px; color: var(--text-muted); font-size: 12px; padding: 6px 14px; cursor: pointer; width: 100%; text-align: left; margin-top: 4px; }
.ps-add-risk-btn:hover { border-color: var(--accent); color: var(--text-secondary); }

.wbr-header { margin-bottom: 24px; }
.wbr-title-input { width: 100%; background: transparent; border: none; border-bottom: 1px solid transparent; color: var(--text-primary); font-size: 16px; font-weight: 600; font-family: inherit; padding: 4px 0; outline: none; transition: border-color 0.15s; box-sizing: border-box; }
.wbr-title-input:focus { border-bottom-color: var(--accent); }
.wbr-title-input::placeholder { color: var(--border); font-weight: 400; }
.wbr-week-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; margin-bottom: 14px; }
.wbr-meta-row { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.wbr-meta-field { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.wbr-meta-label { color: var(--text-muted); white-space: nowrap; font-size: 12px; }
.wbr-meta-select { background: transparent; border: none; border-bottom: 1px solid var(--border); color: var(--text-primary); font-size: 13px; font-family: inherit; padding: 2px 4px; outline: none; cursor: pointer; min-width: 120px; }
.wbr-meta-select:focus { border-bottom-color: var(--accent); }
.wbr-meta-select option { background: var(--bg-card); }
.wbr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .wbr-grid { grid-template-columns: 1fr; } }
.status-submit-bar { position: fixed; bottom: 0; left: 200px; right: 0; background: var(--bg-sidebar); border-top: 1px solid var(--border); padding: 12px 32px; display: flex; align-items: center; gap: 12px; z-index: 100; }
.status-autosave-label { font-size: 11px; color: var(--text-muted); margin-right: auto; }
.status-export-btn { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); border-radius: var(--hv-r-sm); padding: 0 12px; height: 34px; font-size: 13px; cursor: pointer; position: relative; }
.status-submit-btn { background: var(--accent); border: none; color: #fff; border-radius: var(--hv-r-sm); padding: 0 20px; height: 34px; font-size: 13px; font-weight: 500; cursor: pointer; }
.status-submit-btn.submitted { background: transparent; border: 1px solid var(--green); color: var(--green); }
.status-content { padding-bottom: 72px; }

/* ── Goal PDF print styles ────────────────────────────────────────────────── */
#goal-print-area { display: none; }
.pdf-header { font-size: 14pt; font-weight: 500; margin-bottom: 1.5rem; color: #333; }
.pdf-goal-section { margin-bottom: 1.5rem; }
.pdf-goal-top {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary);
}
.pdf-goal-desc { font-size: 1rem; font-weight: 500; margin: 0.35rem 0; color: var(--text-primary); }
.pdf-goal-meta { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.pdf-section-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary); border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.75rem;
}
.pdf-section-text { font-size: 0.84rem; color: #d0cfc9; line-height: 1.5; margin-top: 0.25rem; }

@media print {
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .no-print, .app-shell, .sidebar, .top-bar, .memo-toolbar,
  #error-banner, .modal-backdrop,
  .memo-edit-toggle { display: none !important; }

  /* Board memo print */
  .memo-view { position: static; background: #fff; }
  .memo-content { padding: 0; max-width: none; }
  .memo-header h1 { font-size: 16pt; color: #000; }
  .memo-header-meta { color: #333; }
  .memo-section h3 { color: #000; border-bottom: 1px solid #ccc; font-size: 12pt; }
  .memo-section-display, .memo-financial, .memo-goal-wdws,
  .memo-goal-desc, .memo-goal-meta { color: #000; }
  .memo-section-editor { display: none !important; }
  .memo-goal-block { background: #f9f9f9; border: 1px solid #ddd; }
  .memo-goal-status { color: #000; }
  .memo-goal-ptg { color: #666; }
  .memo-goals-section { page-break-before: always; }

  /* Goal PDF print */
  #goal-print-area { display: block !important; background: #fff; }
  .pdf-header { color: #000; font-size: 14pt; }
  .pdf-goal-section { page-break-before: always; }
  .pdf-goal-section:first-of-type { page-break-before: avoid; }
  .pdf-goal-top { color: #666; }
  .pdf-goal-desc { color: #000; font-size: 12pt; font-weight: 600; }
  .pdf-goal-meta { color: #333; }
  .pdf-section-label { color: #666; border-top: 1px solid #ccc; font-size: 9pt; }
  .pdf-section-text { color: #000; font-size: 10.5pt; line-height: 1.6; }
}

/* ── Set Review modal ─────────────────────────────────────────────────────── */
.set-review-modal { max-width: 560px; }
.set-review-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.set-review-header h2 { font-size: 1rem; font-weight: 500; }
.set-review-content { max-height: 400px; overflow-y: auto; }
.set-review-text { font-size: 0.84rem; line-height: 1.6; color: #d0cfc9; }

/* ── Placeholder view ─────────────────────────────────────────────────────── */
.placeholder-view { padding: 2rem 0; max-width: 500px; }
.placeholder-view h2 { font-size: 1.1rem; font-weight: 500; margin-bottom: 0.5rem; }
.placeholder-view p  { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; }

/* ── Settings page (two-panel) ────────────────────────────────────────────── */
.settings-shell { display: flex; gap: 0; min-height: 400px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-lg); overflow: hidden; }
.settings-nav {
  width: 180px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px; padding: 0.5rem 0;
  background: var(--bg-app);
}
.settings-nav-item {
  background: none; border: none; color: var(--text-secondary); font-family: inherit;
  text-align: left; padding: 0.55rem 1.1rem; font-size: 0.84rem; font-weight: 450;
  cursor: pointer; border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.settings-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.settings-nav-item.active {
  color: var(--accent); font-weight: 550; background: var(--accent-subtle);
  border-left-color: var(--accent);
}
.settings-content { flex: 1; padding: 1.25rem 1.75rem; min-width: 0; }
.settings-section h3 { font-size: var(--text-xl); font-weight: var(--weight-heading); color: var(--text-primary); margin-bottom: 1rem; letter-spacing: -0.01em; }

/* Team rows */
.team-row {
  display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem;
}
.team-row input, .team-row select { flex: 1; min-width: 0; }
.team-row .team-email { flex: 1.2; }
.team-row .team-permission { flex: 0.9; }
.team-row .team-reports-to { flex: 1.2; min-width: 0; }
.team-row .btn-delete { flex-shrink: 0; padding: 0.2rem 0.5rem; font-size: 0.8rem; }
.team-row-header { margin-bottom: 0.15rem; }
.team-col-label { flex: 1; min-width: 0; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 0.25rem; }
.team-col-label:nth-child(3) { flex: 1.2; }
.team-col-label:nth-child(4) { flex: 0.9; }
.team-col-label:nth-child(5) { flex: 1.2; }
#team-save-feedback { font-size: var(--text-sm); min-height: 1.4em; margin-top: 0.35rem; }
#team-save-feedback.team-feedback-error { color: var(--red, #c0392b); }
#team-save-feedback.team-feedback-saved { color: var(--accent); }

/* Goal set rows */
.goal-set-row {
  display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem;
}
.goal-set-row .goal-set-name { flex: 0 0 140px; }
.goal-set-row .goal-set-desc { flex: 1; min-width: 0; }
.goal-set-row input {
  background: var(--bg-app); color: var(--text-primary); border: 1px solid var(--border);
  border-radius: var(--hv-r-sm); padding: 0.35rem 0.55rem; font-size: 0.84rem; font-family: inherit;
}
.goal-set-row input:focus { outline: none; border-color: var(--accent); }
.goal-set-row .btn-delete { flex-shrink: 0; padding: 0.2rem 0.5rem; font-size: 0.8rem; }

/* ── Shared with me ───────────────────────────────────────────────────── */
.shared-item {
  padding: 14px 16px; border-bottom: 1px solid var(--border-subtle);
  transition: background 0.12s; border-radius: var(--hv-r-sm); margin-bottom: 2px;
}
.shared-item:hover { background: var(--bg-hover); }
.shared-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.shared-item-author { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.shared-item-ago { font-size: 11px; color: var(--text-muted); }
.shared-item-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.shared-item-preview { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* ── Recipient chips ──────────────────────────────────────────────────── */
.recipient-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.recipient-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--hv-r-xl); font-size: 12px;
  background: var(--bg-hover); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.recipient-remove {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 13px; padding: 0; line-height: 1;
}
.recipient-remove:hover { color: var(--status-red); }
.recipient-add-select {
  font-size: 12px; padding: 3px 8px; border-radius: var(--hv-r-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); cursor: pointer;
}

/* ── Free tier banner ─────────────────────────────────────────────────── */
.free-tier-banner {
  padding: 16px 18px; border-radius: var(--hv-r-lg);
  background: var(--accent-subtle); border: 1px solid var(--accent-border);
  color: var(--text-secondary); font-size: 13px; line-height: 1.5;
}

/* ── No-problems banner ───────────────────────────────────────────────── */
.noproblems-banner {
  padding: 14px 16px; border-radius: var(--hv-r-md); margin-bottom: 12px;
  background: rgba(243,156,18,0.08); border: 1px solid rgba(243,156,18,0.25);
  color: var(--text-secondary); font-size: 13px; line-height: 1.5;
}
.noproblems-banner-text { margin-bottom: 10px; }
.noproblems-banner-actions { display: flex; gap: 8px; }

/* ── Paste truncation banner ───────────────────────────────────────────── */
.paste-truncation-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 4px; font-size: 12px;
  background: rgba(243,156,18,0.08); border: 1px solid rgba(243,156,18,0.2);
  color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4;
}
.paste-truncation-close {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 14px; padding: 0 0 0 8px; flex-shrink: 0;
}

/* ── Item cap message ─────────────────────────────────────────────────── */
.threep-cap-msg {
  font-size: 11px; color: var(--text-muted); padding: 4px 0; font-style: italic;
}

/* ── Notes panel ──────────────────────────────────────────────────────── */
.notes-separator { border-top: 1px solid var(--border); margin: 28px 0 24px; }
.notes-panel { margin-bottom: 24px; }
.notes-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.notes-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.notes-save-indicator { font-size: 11px; color: var(--text-muted); }
.notes-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.notes-textarea {
  width: 100%; font-size: 13px; padding: 12px 14px; border-radius: var(--hv-r-md);
  border: 1px solid var(--border); background: var(--bg-app); color: var(--text-primary);
  font-family: inherit; resize: vertical; line-height: 1.6; min-height: 160px;
  transition: border-color 0.15s;
}
.notes-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.notes-textarea::placeholder { color: var(--text-muted); }
.notes-readonly-text {
  font-size: 13px; color: var(--text-primary); line-height: 1.5;
  padding: 10px 12px; border-radius: var(--hv-r-sm); background: var(--bg-hover);
  white-space: pre-wrap; word-wrap: break-word;
}
.notes-empty { font-size: 13px; color: var(--text-muted); font-style: italic; padding: 10px 0; }

/* ── Cadence radios ───────────────────────────────────────────────────── */
.cadence-radio-group { display: flex; gap: 16px; }
.cadence-radio { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.cadence-radio input { accent-color: var(--accent); }

/* ── Gate annotations ──────────────────────────────────────────────────── */
.gate-banner {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px;
  border-radius: var(--hv-r-sm); font-size: 12px; line-height: 1.45; margin-bottom: 8px;
}
.gate-banner-error { background: rgba(229,77,78,0.08); border: 1px solid rgba(229,77,78,0.25); color: var(--status-red, #e74c3c); }
.gate-banner-warn { background: rgba(243,156,18,0.08); border: 1px solid rgba(243,156,18,0.25); color: var(--status-yellow, #f39c12); }
.gate-banner-icon { flex-shrink: 0; font-weight: 600; }
.gate-banner-msg { flex: 1; }

.gate-error { border-left: 3px solid var(--status-red, #e74c3c) !important; }
.gate-warn { border-left: 3px solid var(--status-yellow, #f39c12) !important; }

.gate-annotation {
  padding: 6px 12px 6px 16px; font-size: 12px; line-height: 1.4;
  margin: 0 0 2px 20px; border-radius: 0 0 4px 4px;
}
.gate-annotation-error { background: rgba(229,77,78,0.06); color: var(--status-red, #e74c3c); }
.gate-annotation-warn { background: rgba(243,156,18,0.06); color: var(--status-yellow, #f39c12); }
.gate-annotation-msg { font-weight: 500; }
.gate-annotation-sug { color: var(--text-muted); margin-top: 2px; font-style: italic; }

.gate-check-btn {
  font-size: 12px; padding: 8px 14px; border-radius: var(--hv-r-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); cursor: pointer; font-family: inherit;
  white-space: nowrap; flex-shrink: 0; transition: all 0.15s;
}
.gate-check-btn:hover { border-color: var(--accent); color: var(--accent); }
.gate-check-btn:disabled { opacity: 0.5; cursor: default; }

/* ── CEO Home ──────────────────────────────────────────────────────────────── */
.ceo-home-page { max-width: 1280px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.ceoh-greeting { margin-bottom: 40px; }
.ceoh-greeting-text { font-size: 2rem; font-weight: var(--weight-heading); color: var(--text-primary); letter-spacing: -0.02em; line-height: var(--leading-tight); }
.ceoh-date { font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--text-secondary); margin-top: 6px; }

.ceoh-section { margin-bottom: 48px; }
.ceoh-section-header {
  font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle);
}
.ceoh-summary { font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--text-primary); margin-bottom: 12px; }
.ceoh-section-footer { text-align: right; margin-top: 10px; }
.ceoh-section-footer a { font-size: var(--text-sm); color: var(--text-secondary); text-decoration: none; }
.ceoh-section-footer a:hover { color: var(--accent); }
.ceoh-empty { font-size: var(--text-sm); color: var(--text-muted); }
.ceoh-empty a { color: var(--accent); text-decoration: none; }

/* Team rows */
.ceoh-team-list { display: flex; flex-direction: column; }
.ceoh-team-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px;
  border-bottom: 1px solid var(--border-subtle); transition: background 0.1s;
}
.ceoh-team-row:last-child { border-bottom: none; }
.ceoh-clickable { cursor: pointer; }
.ceoh-clickable:hover { background: var(--bg-hover); border-radius: 4px; }
.ceoh-status-icon { width: 20px; text-align: center; flex-shrink: 0; font-size: 14px; }
.ceoh-submitted { color: var(--accent); }
.ceoh-pending { color: var(--text-disabled); }
.ceoh-team-name { flex: 1; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-primary); }
.ceoh-team-role { font-weight: var(--weight-body); color: var(--text-muted); }
.ceoh-team-score { font-size: var(--text-sm); color: var(--text-primary); min-width: 70px; text-align: center; }
.ceoh-team-time { font-size: var(--text-xs); color: var(--text-muted); min-width: 120px; text-align: right; }

/* Commitments */
.ceoh-commitment {
  font-size: var(--text-base); color: var(--text-primary); padding: 6px 4px;
  line-height: var(--leading-normal); transition: background 0.1s; border-radius: 4px;
}
.ceoh-commitment:hover { background: var(--bg-hover); }

/* Decisions */
.ceoh-decision {
  padding: 8px 4px; border-bottom: 1px solid var(--border-subtle);
  transition: background 0.1s; border-radius: 4px;
}
.ceoh-decision:last-child { border-bottom: none; }
.ceoh-decision:hover { background: var(--bg-hover); }
.ceoh-decision-author { font-weight: var(--weight-semibold); }
.ceoh-decision-deadline { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; padding-left: 4px; }

/* ── This Week ─────────────────────────────────────────────────────────────── */
.ceoh-thisweek-loading { display: flex; flex-direction: column; gap: 10px; }
@keyframes ceoh-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.ceoh-tw-skeleton {
  height: 18px; border-radius: var(--hv-r-sm);
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border) 50%, var(--bg-hover) 75%);
  background-size: 600px 100%;
  animation: ceoh-shimmer 1.4s infinite linear;
}
.ceoh-tw-skeleton--short { width: 55%; }

/* Digest list */
.ceoh-digest-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.ceoh-digest-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-md); transition: background 0.1s; }
.ceoh-digest-item--clickable { cursor: pointer; }
.ceoh-digest-item--clickable:hover { background: color-mix(in srgb, var(--accent-subtle, rgba(99,102,241,0.08)) 50%, var(--bg-hover)); border-color: color-mix(in srgb, var(--accent) 20%, var(--border)); }
.ceoh-digest-badge {
  flex-shrink: 0; font-size: 10px; font-weight: var(--weight-semibold);
  letter-spacing: 0.05em; padding: 2px 7px; border-radius: var(--hv-r-lg); margin-top: 1px;
}
.ceoh-badge--pattern   { background: var(--accent-subtle); color: var(--accent); }
.ceoh-badge--ai        { background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--orange); }
.ceoh-badge--recurring { background: color-mix(in srgb, var(--yellow) 15%, transparent); color: color-mix(in srgb, var(--yellow) 80%, var(--text-primary)); }
.ceoh-badge--stalling  { background: color-mix(in srgb, var(--yellow) 15%, transparent); color: color-mix(in srgb, var(--yellow) 80%, var(--text-primary)); }
.ceoh-badge--plan      { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.ceoh-badge--new       { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.ceoh-digest-body { flex: 1; min-width: 0; }
.ceoh-digest-headline { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-primary); line-height: var(--leading-tight); }
.ceoh-digest-detail { font-size: var(--text-xs); color: var(--text-secondary); margin-top: 3px; line-height: var(--leading-normal); }

/* Subsection label */
.ceoh-subsection-label {
  font-size: 10px; font-weight: var(--weight-semibold); letter-spacing: 0.07em;
  color: var(--text-disabled); text-transform: uppercase; margin-bottom: 10px;
}

/* Pattern cards */
.ceoh-pattern-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.ceoh-pattern-card {
  padding: 12px 14px; border-radius: var(--hv-r-md); background: var(--bg-card);
  border-left: 3px solid var(--border);
}
.ceoh-pattern-card--confirmed { border-left-color: var(--accent); border: 1px solid var(--border); border-left: 3px solid var(--accent); }
.ceoh-pattern-card--ai        { border: 1px dashed var(--border); border-left: 3px dashed color-mix(in srgb, var(--orange) 60%, var(--border)); }
.ceoh-pattern-tag {
  display: inline-block; font-size: 10px; font-weight: var(--weight-semibold);
  letter-spacing: 0.05em; padding: 2px 7px; border-radius: var(--hv-r-lg); margin-bottom: 6px;
}
.ceoh-pattern-tag--confirmed { background: var(--accent-subtle); color: var(--accent); }
.ceoh-pattern-tag--ai        { background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--orange); }
.ceoh-pattern-desc { font-size: var(--text-sm); color: var(--text-primary); font-weight: var(--weight-medium); margin-bottom: 4px; line-height: var(--leading-tight); }
.ceoh-pattern-goal-id { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 8px; font-family: monospace; }
.ceoh-pattern-people { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ceoh-pattern-person {
  display: flex; gap: 6px; align-items: baseline; font-size: var(--text-xs);
  padding: 4px 8px; background: var(--bg-hover); border-radius: var(--hv-r-xs); cursor: pointer;
  transition: background 0.1s;
}
.ceoh-pattern-person:hover { background: color-mix(in srgb, var(--accent-subtle) 60%, var(--bg-hover)); }
.ceoh-pattern-person-name { font-weight: var(--weight-semibold); color: var(--text-primary); flex-shrink: 0; }
.ceoh-pattern-person-text { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Historical flags */
.ceoh-hist-list { display: flex; flex-direction: column; gap: 8px; }
.ceoh-hist-item { display: flex; align-items: flex-start; gap: 8px; font-size: var(--text-sm); color: var(--text-primary); line-height: var(--leading-normal); }
.ceoh-hist-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* Chat */
.ceoh-chat-input-row { margin-bottom: 10px; }
.ceoh-chat-input {
  width: 100%; font-size: var(--text-sm); padding: 10px 14px; border-radius: var(--hv-r-md);
  border: 1px solid var(--border); background: var(--bg-card); font-family: inherit;
}
.ceoh-chat-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.ceoh-chat-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ceoh-chat-example {
  font-size: var(--text-xs); color: var(--text-secondary); cursor: pointer;
  padding: 4px 10px; border: 1px solid var(--border-subtle); border-radius: var(--hv-r-xl);
  transition: all 0.1s;
}
.ceoh-chat-example:hover { border-color: var(--accent); color: var(--accent); }
.ceoh-chat-response { margin: 12px 0; }
.ceoh-chat-loading { font-size: var(--text-sm); color: var(--text-muted); }
.ceoh-chat-answer { font-size: var(--text-sm); color: var(--text-primary); line-height: var(--leading-normal); padding: 12px 14px; background: var(--bg-hover); border-radius: var(--hv-r-md); }
.ceoh-chat-privacy { font-size: var(--text-xs); color: var(--text-disabled); margin-top: 8px; }

/* ── Daily Log ─────────────────────────────────────────────────────────────── */
.daily-log-page { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.dlog-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.dlog-title { font-size: var(--text-2xl); font-weight: var(--weight-heading); color: var(--text-primary); letter-spacing: -0.015em; line-height: var(--leading-tight); }
.dlog-today-badge { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--accent); background: var(--accent-subtle); padding: 2px 8px; border-radius: var(--hv-r-lg); vertical-align: middle; margin-left: 6px; }
.dlog-subtitle { font-size: var(--text-sm); color: var(--text-muted); margin-top: 4px; }
.dlog-search-btn { background: none; border: none; font-size: 18px; cursor: pointer; padding: 4px; color: var(--text-muted); transition: color 0.1s; }
.dlog-search-btn:hover { color: var(--text-primary); }

.dlog-search-panel { margin-bottom: 12px; }
.dlog-search-input { width: 100%; font-size: var(--text-sm); padding: 8px 12px; border-radius: var(--hv-r-md); }
.dlog-search-results { margin-top: 8px; }
.dlog-search-result { padding: 8px 12px; border-bottom: 1px solid var(--border-subtle); cursor: pointer; transition: background 0.1s; border-radius: 4px; }
.dlog-search-result:hover { background: var(--bg-hover); }
.dlog-search-date { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-secondary); display: block; margin-bottom: 2px; }
.dlog-search-snippet { font-size: var(--text-sm); color: var(--text-muted); }
.dlog-search-empty { font-size: var(--text-sm); color: var(--text-muted); padding: 8px 0; }

.dlog-textarea {
  width: 100%; max-width: 90ch; min-height: 480px; font-size: var(--text-base); padding: 20px 24px;
  border: 1px solid var(--border); border-radius: var(--hv-r-lg); background: var(--bg-card);
  color: var(--text-primary); font-family: inherit; resize: vertical;
  line-height: var(--leading-normal); transition: border-color 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); display: block;
}
.dlog-textarea:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-subtle); }
.dlog-textarea::placeholder { color: var(--text-disabled); }

.dlog-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 0 4px; }
.dlog-save-indicator { font-size: var(--text-xs); color: var(--text-muted); }
.dlog-nav { display: flex; gap: 6px; align-items: center; }
.dlog-nav-btn { background: none; border: 1px solid var(--border); color: var(--text-secondary); font-size: var(--text-xs); padding: 4px 10px; border-radius: var(--hv-r-sm); cursor: pointer; font-family: inherit; transition: all 0.1s; }
.dlog-nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.dlog-nav-btn:disabled { opacity: 0.3; cursor: default; }
.dlog-today-btn { color: var(--accent); border-color: var(--accent-border); }

.dlog-actions-panel { margin-top: 12px; }
.dlog-actions-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-md); }
.dlog-actions-label { font-size: var(--text-xs); color: var(--text-muted); margin-right: auto; }
.dlog-action-btn { font-size: var(--text-xs); font-weight: var(--weight-medium); padding: 4px 10px; border-radius: var(--hv-r-sm); border: 1px solid var(--border); background: var(--bg-app); color: var(--text-secondary); cursor: pointer; font-family: inherit; transition: all 0.1s; }
.dlog-action-btn:hover { border-color: var(--accent); color: var(--accent); }

.dlog-action-modal { padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-lg); margin-top: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.dlog-action-title { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); margin-bottom: 8px; }
.dlog-action-original { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.dlog-action-suggested { font-size: var(--text-sm); color: var(--text-primary); margin-bottom: 10px; line-height: 1.5; padding: 8px 10px; background: var(--bg-hover); border-radius: var(--hv-r-sm); }
.dlog-action-loading { font-size: var(--text-sm); color: var(--text-muted); }
.dlog-action-buttons { display: flex; gap: 8px; margin-top: 8px; }
.dlog-radio { font-size: var(--text-sm); margin-right: 12px; cursor: pointer; }
.dlog-radio input { margin-right: 4px; accent-color: var(--accent); }

.dlog-decisions-header { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-secondary); margin: 8px 0 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.dlog-decision-item { font-size: var(--text-sm); color: var(--text-primary); padding: 3px 0; line-height: 1.4; }

.dlog-header-right { display: flex; align-items: center; gap: 12px; }
.dlog-team-status {
  font-size: var(--text-xs); color: var(--accent); text-decoration: none;
  font-weight: var(--weight-medium);
}
.dlog-team-status:hover { text-decoration: underline; }

.dlog-plans-reminder {
  max-width: 90ch; margin: 0 0 14px; padding: 12px 16px;
  background: var(--bg-hover); border: 1px solid var(--border-subtle); border-radius: var(--hv-r-md);
}
.dlog-plans-reminder-header {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px;
}
.dlog-plans-reminder-title {
  font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.dlog-plans-reminder-edit {
  font-size: var(--text-xs); color: var(--accent); text-decoration: none; font-weight: var(--weight-medium);
}
.dlog-plans-reminder-edit:hover { text-decoration: underline; }
.dlog-plans-reminder-list { display: flex; flex-direction: column; gap: 2px; }
.dlog-plans-reminder-item {
  font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.45;
}
.dlog-plans-reminder-num { color: var(--text-muted); font-weight: var(--weight-medium); margin-right: 4px; }
.dlog-plans-reminder-empty { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.45; }
.dlog-plans-reminder-empty a { color: var(--accent); text-decoration: none; }
.dlog-plans-reminder-empty a:hover { text-decoration: underline; }

.dlog-privacy { font-size: var(--text-xs); color: var(--text-disabled); text-align: center; margin-top: 24px; padding: 0 16px; }

/* ── Read receipts ─────────────────────────────────────────────────────────── */
.read-receipt-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 18px; border-radius: var(--hv-r-full); font-size: var(--text-sm); font-weight: var(--weight-medium);
  color: var(--text-secondary); background: var(--bg-hover); border: 1px solid var(--border);
  cursor: pointer; font-family: inherit; transition: all 0.12s; margin: 16px 0;
}
.read-receipt-btn:hover { background: var(--accent-subtle); border-color: var(--accent-border); color: var(--accent); }
.read-receipt-btn:disabled { opacity: 0.5; cursor: default; }
.read-receipt-done { font-size: var(--text-sm); color: var(--text-muted); margin: 16px 0; }
.read-receipt-author-panel { margin: 16px 0; }
.read-receipt-row { font-size: var(--text-sm); color: var(--text-secondary); padding: 3px 0; }
.read-receipt-read { color: var(--text-muted); }
.read-receipt-unread { color: var(--text-disabled); }

/* (3P Tabs removed — sidebar navigation replaces tabs) */

/* ── Work Log ─────────────────────────────────────────────────────────────── */
.worklog-page { max-width: 700px; margin: 0 auto; padding: 0 8px; }
.worklog-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px;
}
.worklog-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.worklog-owner { font-size: 13px; color: var(--text-muted); }
.worklog-export-btn {
  font-size: 12px; padding: 6px 14px; border-radius: var(--hv-r-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.worklog-export-btn:hover { border-color: var(--accent); color: var(--accent); }

.worklog-month-group { margin-bottom: 32px; }
.worklog-month-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.worklog-week { margin-bottom: 20px; padding-left: 4px; }
.worklog-week-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.worklog-week-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.worklog-week-mood { font-size: 16px; line-height: 1; }
.worklog-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 5px 0; font-size: 13px; color: var(--text-primary); line-height: 1.5;
}
.worklog-item-dot { color: var(--green, #059669); font-size: 8px; margin-top: 6px; flex-shrink: 0; }
.worklog-item-text { flex: 1; }
.worklog-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.worklog-empty-title { font-size: 15px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.worklog-empty-sub { font-size: 13px; margin-bottom: 16px; }
.worklog-cta-btn {
  font-size: 13px; padding: 8px 16px; border-radius: var(--hv-r-sm);
  background: var(--accent-subtle, rgba(79,70,229,0.08));
  border: 1px solid var(--accent-border, rgba(79,70,229,0.2));
  color: var(--accent); cursor: pointer; font-family: inherit;
}

/* ── Weekly Review ─────────────────────────────────────────────────────────── */
.review-page { padding: 1.5rem 2rem 3rem; max-width: 960px; margin: 0 auto; }
.review-header { margin-bottom: 1.5rem; }
.review-title { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.review-week { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }
.review-filter-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.review-filter-row select {
  font-size: 0.82rem; padding: 0.35rem 0.6rem; border-radius: var(--hv-r-sm);
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary);
}
.review-section-header {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 1.5rem 0 0.75rem; padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.review-section-label { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.review-section-count {
  font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem;
  border-radius: var(--hv-r-lg); background: var(--bg-hover); color: var(--text-secondary);
}

/* Goal cards */
.review-goal-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--hv-r-lg);
  padding: 1rem 1.1rem; margin-bottom: 0.75rem; border-left: 4px solid var(--border);
  transition: box-shadow 0.15s;
}
.review-goal-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.review-goal-card.status-red { border-left-color: var(--status-red, #e74c3c); }
.review-goal-card.status-yellow { border-left-color: var(--status-yellow, #f39c12); }
.review-goal-card.status-grey { border-left-color: var(--text-muted); }

.review-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.review-card-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.review-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.review-status-dot.red { background: var(--status-red, #e74c3c); }
.review-status-dot.yellow { background: var(--status-yellow, #f39c12); }
.review-status-dot.grey { background: var(--text-muted); }
.review-status-label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.review-goal-id { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono, monospace); }
.review-card-owner { font-size: 0.78rem; color: var(--text-muted); }

.review-goal-description {
  font-size: 0.88rem; color: var(--text-primary); font-weight: 500;
  margin-bottom: 0.5rem; line-height: 1.4; cursor: pointer;
}
.review-goal-description:hover { color: var(--accent); }

.review-update-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.2rem; }
.review-update-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; margin-bottom: 0.35rem; }
.review-update-age { font-size: 0.72rem; color: var(--text-muted); }
.review-update-age.stale { color: var(--status-yellow, #f39c12); font-weight: 600; }
.review-no-recovery { font-size: 0.78rem; color: var(--status-red, #e74c3c); font-style: italic; margin-top: 0.35rem; }

.review-card-actions { display: flex; gap: 0.5rem; margin-top: 0.65rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.review-action-btn {
  font-size: 0.78rem; padding: 0.3rem 0.7rem; border-radius: var(--hv-r-sm);
  border: 1px solid var(--border); background: var(--bg-app); color: var(--text-secondary);
  cursor: pointer; transition: all 0.15s;
}
.review-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.review-action-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.review-action-btn.primary:hover { background: var(--accent-hover); }

/* On Track (green) section */
.review-on-track-header {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.5rem 0; user-select: none;
}
.review-on-track-chevron { font-size: 0.75rem; color: var(--text-muted); transition: transform 0.2s; }
.review-on-track-chevron.open { transform: rotate(90deg); }
.review-on-track-body { overflow: hidden; }
.review-on-track-body.collapsed { display: none; }

.review-green-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-secondary); cursor: pointer;
  transition: background 0.1s; border-radius: 4px;
}
.review-green-row:hover { background: var(--bg-hover); }
.review-green-row .review-status-dot { background: var(--status-green, #27ae60); }
.review-green-row--expanded { background: var(--bg-hover); border-radius: 4px 4px 0 0; border-bottom-color: transparent; }

.review-row-detail {
  background: var(--bg-card); border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--hv-r-sm) var(--hv-r-sm); padding: 14px 18px; margin-bottom: 4px;
  animation: reviewDetailIn 0.15s ease;
}
@keyframes reviewDetailIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.review-row-detail-desc {
  font-size: 0.82rem; color: var(--text-primary); line-height: 1.5;
  margin-bottom: 12px; font-weight: 500;
}
.review-row-detail-stand { margin-bottom: 4px; }

.review-all-clear {
  text-align: center; padding: 2.5rem 1rem; color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .sidebar { transform: translateX(-220px); }
  body.sidebar-open .sidebar { transform: translateX(0); z-index: 150; }
  .main-area { margin-left: 0; }
  .topbar-search { display: none; }
  .topbar-username { display: none; }
  .topbar-search-kbd { display: none; }
  #error-banner { left: 0; }
  .toolbar { padding: 0.45rem 0.75rem; flex-wrap: wrap; gap: 0.35rem; }
  .toolbar input[type="search"] { min-width: 0; flex: 1 1 100%; }
  .toolbar select { flex: 1 1 auto; min-width: 0; }
  .modal { padding: 1.1rem; border-radius: var(--hv-r-md); max-height: 96vh; }
  .form-row { grid-template-columns: 1fr; }
  .modal-actions, .soft-warning-actions { flex-direction: column-reverse; }
  .btn-cancel, .btn-save { width: 100%; text-align: center; justify-content: center; }
  .kotas-table { font-size: 0.78rem; }
  .col-desc { min-width: 160px; }
  .kotas-header-table { font-size: 0.77rem; }
  .detail-content { padding: 1rem 0.75rem 3rem; }
  .analytics-wrapper { padding: 1rem 0.75rem 2rem; }
  .briefing-view { padding: 1rem 0; }
  .briefing-greeting { font-size: 1.1rem; }
  .triage-card { padding: 0.7rem 0.75rem; padding-right: 2rem; }
  .settings-shell { flex-direction: column; }
  .settings-nav { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .settings-nav-item { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
  .settings-nav-item.active { border-left-color: transparent; border-bottom-color: var(--accent); }
  .team-row { flex-wrap: wrap; }
  .memo-content { padding: 1rem; }
  .threep-document { padding: 0 0 32px; }
}
