:root {
    --bg: #000000;
    --surface: #0f0f0f;
    --surface-card: #0f0f0f;
    --surface-hover: #141414;
    --border: rgba(255, 255, 255, 0.15);
    --border-muted: rgba(255, 255, 255, 0.1);
    --sidebar: #161616;
    --sidebar-border: rgba(255, 255, 255, 0.15);
    --text-high: #fafafa;
    --text-mid: #a1a1aa;
    --text-dim: #9ca3af;

    --inc-green: #baffc9;
    --org-purple: #d4c4f8;
    --app-yellow: #ffe4c4;
    --lab-cyan: #c9c9ff;
    --dao-pink: #bae1ff;
    --pastel-lavender: #d4c4f8;
    --pastel-mint: #baffc9;
    --pastel-sky: #bae1ff;
    --pastel-peach: #ffe4c4;
    --pastel-amber: #ffe4c4;
    --pastel-rose: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Geist', 'Geist Fallback', system-ui, sans-serif; }
body { background: var(--bg); color: var(--text-high); min-height: 100vh; display: flex; line-height: 1.5; overflow-x: hidden; }

/* Canonical Left Sidebar Shell matching app_base.html */
.sidebar {
    width: 16rem;
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--sidebar);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform 0.2s ease;
}
.sidebar.sidebar-hidden { transform: translateX(-100%); }
.sidebar-header {
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.brand-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-logo-img { width: 24px; height: 24px; border-radius: 2px; }
.brand-title { font-family: 'Abril Fatface', Georgia, serif; font-size: 15px; font-weight: 400; color: var(--text-high); letter-spacing: -0.01em; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.text-mono-label {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    padding: 0 8px;
    margin-bottom: 6px;
    display: block;
}
.sidebar-links-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text-high);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-link:hover { background: rgba(255, 255, 255, 0.06); }
.sidebar-link.active {
    background: #1e1e1e;
    color: var(--text-high);
    font-weight: 500;
}
.sidebar-link svg { flex-shrink: 0; color: var(--text-mid); }
.sidebar-link.active svg { color: var(--inc-green); }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.sidebar-login {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #1f1f1f;
    border: 1px solid var(--sidebar-border);
    text-decoration: none;
    color: var(--text-high);
    font-size: 12px;
    font-weight: 500;
    transition: background 0.15s ease;
}
.sidebar-login:hover { background: #262626; }
.sidebar-login svg { color: var(--text-mid); }

/* Main Area with sticky top header */
.main-wrapper {
    margin-left: 16rem;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.2s ease;
}
.sidebar.sidebar-hidden ~ .main-wrapper { margin-left: 0; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 45;
}

@media (max-width: 768px) {
    .main-wrapper { margin-left: 0; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.sidebar-mobile-open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
}

.app-header {
    height: 56px;
    position: sticky;
    top: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    z-index: 40;
}
.sidebar-trigger {
    background: transparent;
    border: none;
    color: var(--text-high);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.sidebar-trigger:hover { background: rgba(255, 255, 255, 0.06); }
.header-divider { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 12px; }
.breadcrumb-root { color: var(--text-dim); }
.breadcrumb-sep { width: 12px; height: 12px; color: var(--text-dim); }
.breadcrumb-active { color: var(--text-high); font-weight: 500; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.badge { background: rgba(186, 255, 201, 0.1); color: var(--inc-green); padding: 4px 10px; border-radius: 9999px; font-size: 11px; font-weight: 600; border: 1px solid rgba(186, 255, 201, 0.2); }


.container { max-width: 1240px; margin: 0 auto; padding: 24px; width: 100%; flex: 1; }

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

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }

/* Canonical Sharp Cards (border-radius: 0) */
.card { background: var(--surface-card); border: 1px solid var(--border); border-radius: 0; padding: 24px; position: relative; }
.card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: #000000; border: 1px solid var(--border); }

h2 { font-size: 18px; font-weight: 600; margin-bottom: 6px; color: var(--text-high); }
p.subtitle { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; }

label { display: block; font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 14px; margin-bottom: 4px; }
input, select, textarea { width: 100%; background: #0f0f0f; border: 1px solid var(--border); border-radius: 0.375rem; padding: 10px 12px; color: var(--text-high); font-size: 13px; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--inc-green); }

/* Canonical FreshCredit Slider (2px track, 16px square thumb) */
input[type="range"], .fc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2px;
    background: hsl(0 0% 98.5%);
    outline: none;
    cursor: pointer;
    margin: 10px 0;
    padding: 0;
    border: none;
}
input[type="range"]::-webkit-slider-thumb, .fc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--inc-green);
    border-radius: 0;
    cursor: pointer;
    border: none;
    margin-top: -7px;
    box-shadow: none;
}
input[type="range"]::-moz-range-thumb, .fc-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--inc-green);
    border-radius: 0;
    cursor: pointer;
    border: none;
}

.btn-primary { background: var(--inc-green); color: #000000; border: none; padding: 10px 18px; border-radius: 0.375rem; font-weight: 600; font-size: 13px; cursor: pointer; transition: opacity 0.15s; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-high); border: 1px solid var(--border); padding: 10px 18px; border-radius: 0.375rem; font-weight: 500; font-size: 13px; cursor: pointer; transition: background-color 0.15s; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

.table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 12px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { color: var(--text-dim); font-weight: 600; font-size: 11px; }

.chip { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; margin-right: 4px; margin-bottom: 4px; }
.chip-strength { background: rgba(186, 255, 201, 0.15); color: var(--pastel-mint); }
.chip-blind { background: rgba(255, 228, 196, 0.15); color: var(--pastel-peach); }
.chip-open { background: rgba(186, 225, 255, 0.15); color: var(--pastel-sky); border: 1px solid var(--pastel-sky); }
.chip-resolved { background: rgba(186, 255, 201, 0.15); color: var(--pastel-mint); border: 1px solid var(--pastel-mint); }

.alert-thoughtful { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--pastel-rose); color: var(--pastel-peach); padding: 14px; border-radius: 0; margin-top: 16px; font-size: 13px; display: none; }
.alert-consensus { background: rgba(186, 255, 201, 0.1); border: 1px solid var(--pastel-mint); color: var(--pastel-mint); padding: 14px; border-radius: 0; margin-top: 16px; font-size: 13px; display: none; }

.score-box { text-align: right; margin-left: auto; }
.score-val { font-size: 22px; font-weight: 800; color: var(--pastel-lavender); }
.score-lbl { font-size: 10px; color: var(--text-dim); text-transform: uppercase; }

.feed-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }

.card-header-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.topic-details-panel { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.topic-title { color: var(--text-high); font-size: 16px; font-weight: 600; }
.topic-desc { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.criteria-box { background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 10px; margin-top: 12px; }
.criteria-label { font-size: 11px; font-weight: 700; color: var(--text-high); }
.criteria-text { font-size: 12px; color: var(--text-mid); margin-top: 4px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.conf-disp { color: var(--text-high); font-weight: 700; font-family: 'Geist Mono', monospace; }
.resolve-panel { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.resolve-panel-label { font-size: 12px; font-weight: 700; color: var(--text-high); margin-bottom: 8px; }
.btn-resolve { margin-top: 12px; width: 100%; border-color: var(--border); }
.section-header-clean { font-size: 13px; font-weight: 600; margin-top: 24px; color: var(--text-high); }
.topic-form-mt { margin-top: 12px; }
.input-mb8 { margin-bottom: 8px; }
.select-mb8 { margin-bottom: 8px; }
.btn-full { width: 100%; }
.dot-notice { margin-left: 10px; font-size: 12px; color: var(--inc-green); }
.dots-feed-scroll { margin-top: 12px; max-height: 380px; overflow-y: auto; }
.cards-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.subtitle-mb0 { margin-bottom: 0; }
.teams-list-mt { margin-top: 14px; }
.meeting-box { background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 16px; margin-bottom: 20px; }
.meeting-box-label { font-size: 12px; font-weight: 700; color: var(--text-high); margin-bottom: 8px; }
.meeting-trigger-row { display: flex; gap: 10px; }

/* Semantic CSS classes replacing JS inline styles for CSP compliance */
.text-inc-bold { color: var(--inc-green); font-weight: 600; }
.dot-score-val { color: var(--inc-green); font-weight: 700; font-family: 'Geist Mono', monospace; }
.card-user-name { font-size: 16px; font-weight: 700; color: var(--text-high); }
.card-user-role { font-size: 12px; color: var(--text-dim); }
.chip-archetype { background: rgba(255, 228, 196, 0.15); color: var(--app-yellow); margin-top: 4px; }
.card-stats-row { display: flex; gap: 12px; font-size: 11px; margin-bottom: 12px; color: var(--text-mid); }
.section-sublabel { font-size: 11px; color: var(--text-dim); text-transform: uppercase; margin-bottom: 4px; }
.dim-note { color: var(--text-dim); font-size: 11px; }
.text-high-strong { color: var(--text-high); }
.text-dim-desc { font-size: 12px; color: var(--text-dim); }
.table-link-vote { color: var(--inc-green); font-size: 11px; text-decoration: none; }
.table-link-vote:hover { text-decoration: underline; }
.table-cell-dim { font-size: 11px; color: var(--text-dim); }

