:root { --ink: #0f172a; --muted: #64748b; --accent: #4f46e5; --accent-2: #06b6d4; --soft: #eef2ff; --line: #e2e8f0; --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%) fixed; color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.navbar { background: rgba(15, 23, 42, .92) !important; backdrop-filter: blur(10px); }
.navbar-brand { font-weight: 700; letter-spacing: -.02em; }
.navbar-brand .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); margin-right: .45rem; }
.navbar .nav-link.active { color: #fff !important; background: rgba(255, 255, 255, .12); border-radius: .5rem; }
.nav-tabs .nav-link { color: var(--muted); } .nav-tabs .nav-link.active { color: var(--accent); font-weight: 600; }
.page-head h1 { font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.page-head p { color: var(--muted); max-width: 52rem; }
.card { border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 600; padding: .85rem 1.1rem; }
.card-header.d-flex { flex-wrap: wrap; gap: .5rem; } .card-header .form-select { max-width: 100%; min-width: 0; }
.kpi { padding: 1rem 1.1rem; border-radius: 1rem; background: #fff; border: 1px solid var(--line); height: 100%; }
.kpi .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpi .value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.kpi .sub { font-size: .8rem; color: var(--muted); }
.kpi.accent { background: linear-gradient(135deg, var(--accent), #6366f1 60%, var(--accent-2)); color: #fff; border: 0; }
.kpi.accent .label, .kpi.accent .sub { color: rgba(255, 255, 255, .8); }
.formula { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; background: var(--soft); color: #3730a3; padding: .15rem .45rem; border-radius: .35rem; white-space: nowrap; }
.formula-box { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: #0f172a; color: #e2e8f0; border-radius: .75rem; padding: .9rem 1rem; font-size: .85rem; line-height: 1.7; overflow-x: auto; }
.formula-box b { color: #a5b4fc; font-weight: 600; }
.table-steps td, .table-steps th { vertical-align: middle; font-size: .88rem; }
.table-steps td:nth-child(3) { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--muted); word-break: break-word; }
.table-steps td:last-child { font-weight: 700; text-align: right; white-space: nowrap; }
.factor label { cursor: help; }
.factor-group .card-header { display: flex; justify-content: space-between; align-items: center; }
.factor .form-select.changed { border-color: var(--accent); background-color: var(--soft); }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca; }
.btn-outline-primary { --bs-btn-color: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); }
.sticky-lg { position: sticky; top: 5rem; }
@media (max-width: 991.98px) { .sticky-lg { position: static; } }
.chart-box { position: relative; height: 280px; }
.diff-up { color: #dc2626; } .diff-down { color: #16a34a; }
.tool-card { transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; color: inherit; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(79, 70, 229, .14); color: inherit; }
.tool-card .icon { width: 2.6rem; height: 2.6rem; border-radius: .8rem; display: grid; place-items: center; background: var(--soft); color: var(--accent); font-size: 1.3rem; }
.evidence td { font-size: .85rem; } .evidence mark { background: #fef08a; padding: 0 .15rem; border-radius: .2rem; }
.chat { height: 360px; overflow-y: auto; background: #f8fafc; border-radius: .75rem; padding: .75rem; }
.msg { max-width: 88%; padding: .6rem .85rem; border-radius: .9rem; margin-bottom: .55rem; font-size: .9rem; line-height: 1.5; }
.msg.bot { background: #fff; border: 1px solid var(--line); }
.msg.me { background: var(--accent); color: #fff; margin-left: auto; }
.msg ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.chip { border: 1px solid #c7d2fe; background: #fff; color: #3730a3; border-radius: 999px; padding: .25rem .75rem; font-size: .8rem; margin: 0 .35rem .35rem 0; }
.chip:hover { background: var(--soft); }
.dropzone { border: 2px dashed #c7d2fe; border-radius: .9rem; padding: 1rem; text-align: center; color: var(--muted); cursor: pointer; transition: background .15s; }
.dropzone.over, .dropzone:hover { background: var(--soft); }
.empty { color: var(--muted); text-align: center; padding: 2.5rem 1rem; }
footer { color: var(--muted); font-size: .85rem; }
.spinner-border-sm { width: .9rem; height: .9rem; }
