:root {
  --ink: #242424;
  --muted: #6c6c6c;
  --paper: #f6f6f5;
  --white: #ffffff;
  --charcoal: #292929;
  --charcoal-2: #1d1d1d;
  --orange: #f25f3a;
  --orange-dark: #c94121;
  --orange-soft: #fff0eb;
  --gray: #686868;
  --line: #e2e2df;
  --green: #247657;
  --yellow: #a86f00;
  --red: #b13b32;
  --blue: #305f9b;
  --shadow: 0 18px 50px rgba(31, 31, 31, .10);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 10px; color: var(--orange-dark); font-size: .74rem; font-weight: 850; letter-spacing: .14em; }
.brand-logo { width: 48px; height: 48px; flex: 0 0 auto; object-fit: cover; border-radius: 13px; background: white; }
.brand-logo--large { width: 76px; height: 76px; border-radius: 19px; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); background: var(--white); }
.login-brand { min-height: 100vh; padding: clamp(40px, 7vw, 96px); display: flex; flex-direction: column; justify-content: space-between; color: white; background: radial-gradient(circle at 75% 20%, rgba(242,95,58,.24), transparent 30%), linear-gradient(145deg, var(--charcoal), #151515); }
.login-brand .eyebrow { color: #ff8a6c; }
.login-brand h1 { max-width: 760px; margin: 0; font-size: clamp(2.7rem, 5.3vw, 5.9rem); line-height: .96; letter-spacing: -.065em; }
.login-copy { max-width: 590px; margin: 28px 0 0; color: #dededb; font-size: 1.05rem; line-height: 1.7; }
.login-metric { display: grid; grid-template-columns: auto 1fr; column-gap: 22px; align-items: end; width: max-content; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.18); }
.login-metric span, .login-metric small { grid-column: 2; color: #c3c3c0; }
.login-metric strong { grid-row: 1 / 3; font-size: 3.3rem; color: #ff7958; letter-spacing: -.06em; }
.login-card { width: min(100%, 540px); margin: auto; padding: 50px clamp(28px, 6vw, 72px); }
.login-card h2 { margin: 0; font-size: 2.4rem; letter-spacing: -.04em; }
.login-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.login-tools .eyebrow { margin-bottom: 0; }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 60px; }
label { display: grid; gap: 8px; color: #3f3f3d; font-size: .86rem; font-weight: 750; }
.login-card form { display: grid; gap: 18px; margin-top: 32px; }
input, select, textarea { width: 100%; padding: 13px 14px; color: var(--ink); background: var(--white); border: 1px solid #cececa; border-radius: 10px; outline: none; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--orange-dark); box-shadow: 0 0 0 3px rgba(242,95,58,.15); }
.button { min-height: 44px; padding: 10px 17px; border: 0; border-radius: 10px; font-weight: 800; }
.button.primary { background: var(--orange-dark); color: white; box-shadow: 0 7px 18px rgba(201,65,33,.20); }
.button.primary:hover { background: #ac3419; }
.button.secondary { color: var(--orange-dark); background: var(--orange-soft); border: 1px solid #ffd1c5; }
.button.ghost { background: #ededeb; color: var(--ink); }
.button.small { min-height: 36px; padding: 7px 12px; font-size: .78rem; }
.button.full { width: 100%; margin-top: 5px; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; justify-content: end; }
.demo-note { margin-top: 24px; color: #8a8a86; font-size: .77rem; text-align: center; }
.connection-badge { display: inline-flex; width: fit-content; margin: 12px 0 0; padding: 7px 10px; border-radius: 999px; color: #6a4310; background: #fff4dc; font-size: .75rem; font-weight: 800; }
.connection-badge.online { color: #175e43; background: #e8f6ef; }
.connection-badge.demo { color: #8d321b; background: var(--orange-soft); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px; color: white; background: var(--charcoal-2); z-index: 30; }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-row div { display: grid; gap: 3px; }
.brand-row small, .sidebar-footer small { color: #a8a8a3; font-size: .72rem; }
nav { display: grid; gap: 5px; }
.nav-label { margin: 20px 10px 7px; color: #81817d; font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 10px; color: #cfcfca; background: transparent; text-align: left; font-weight: 650; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.09); }
.nav-item.active { box-shadow: inset 3px 0 var(--orange); }
.nav-icon { width: 22px; color: #ff8a6c; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 16px 6px 0; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.user-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: #33140d; background: var(--orange); font-size: .75rem; font-weight: 900; }
.user-summary { min-width: 0; flex: 1; display: grid; gap: 2px; }
.user-summary strong, .user-summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; color: inherit; background: rgba(255,255,255,.08); }
.workspace { min-width: 0; }
.topbar { min-height: 92px; display: flex; align-items: center; gap: 18px; padding: 20px clamp(22px, 4vw, 52px); background: rgba(246,246,245,.94); backdrop-filter: blur(15px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { margin: 3px 0 0; font-size: clamp(1.35rem, 2.2vw, 2rem); letter-spacing: -.035em; }
.breadcrumb { margin: 0; color: #7d7d79; font-size: .73rem; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.language-control { display: block; }
.language-control select { width: auto; min-width: 64px; min-height: 38px; padding: 7px 28px 7px 10px; border-radius: 10px; color: var(--ink); background-color: white; font-size: .76rem; font-weight: 850; }
.install-button { min-height: 38px; padding: 7px 12px; }
.network-status { padding: 6px 9px; border-radius: 999px; color: #7a2816; background: var(--orange-soft); font-size: .7rem; font-weight: 850; }
.notification { position: relative; color: var(--orange-dark); background: white; border: 1px solid var(--line); font-size: 1rem; font-weight: 900; }
.notification b { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; color: white; background: var(--orange-dark); border: 2px solid var(--paper); border-radius: 999px; font-size: .63rem; }
.notification b:empty, .notification b[data-count="0"] { display: none; }
.menu-button { display: none; border: 0; background: transparent; font-size: 1.4rem; }
.page-content { padding: clamp(24px, 4vw, 52px); outline: none; }

.hero-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; padding: 23px 25px; color: white; background: linear-gradient(105deg, var(--charcoal), #444441); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-strip h2 { margin: 0 0 6px; font-size: 1.2rem; }
.hero-strip p { margin: 0; color: #d4d4d0; }
.progress-ring { flex: 0 0 auto; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; position: relative; font-weight: 900; }
.progress-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--charcoal); }
.progress-ring span { position: relative; z-index: 1; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.sandbox-banner { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; padding: 16px 18px; color: #5e2b1e; background: var(--orange-soft); border: 1px solid #ffcbbb; border-radius: 14px; }
.sandbox-banner strong { display: block; color: var(--orange-dark); }
.sandbox-banner p { margin: 4px 0 0; font-size: .82rem; line-height: 1.45; }
.sandbox-icon { flex: 0 0 auto; padding: 7px 9px; color: white; background: var(--orange-dark); border-radius: 8px; font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.provider-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.channel-card { display: flex; align-items: center; gap: 11px; padding: 15px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.channel-card > div { min-width: 0; flex: 1; }
.channel-card strong, .channel-card small { display: block; }
.channel-card small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.channel-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--charcoal); border-radius: 11px; font-size: .72rem; font-weight: 900; }
.signature-notice { display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; margin-bottom: 18px; padding: 17px 18px; color: white; background: linear-gradient(110deg, var(--charcoal), #474744); border-radius: 15px; }
.signature-notice strong { display: block; }
.signature-notice p { margin: 4px 0 0; color: #d2d2ce; font-size: .8rem; line-height: 1.5; }
.signature-seal { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid #ff8a6c; border-radius: 50%; color: #ff8a6c; font-weight: 900; }
.evidence-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.evidence-flow article { position: relative; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.evidence-flow span { color: var(--orange-dark); font-size: .68rem; font-weight: 900; letter-spacing: .1em; }
.evidence-flow strong, .evidence-flow small { display: block; }
.evidence-flow strong { margin-top: 8px; font-size: .84rem; }
.evidence-flow small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.hash-chip { display: inline-flex; max-width: 150px; padding: 5px 8px; overflow: hidden; color: #5d321f; background: var(--orange-soft); border-radius: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.provider-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.provider-card > div { min-width: 0; flex: 1; }
.provider-card strong, .provider-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-card strong { font-size: .83rem; }
.provider-card small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.provider-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--charcoal); border-radius: 10px; font-size: .7rem; font-weight: 900; }
.payment-method { display: inline-flex; padding: 6px 9px; color: #4f2b23; background: var(--orange-soft); border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.table-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.fiscal-note { margin: 17px 0 0; padding: 14px 16px; color: #5f5f5b; background: white; border-left: 4px solid var(--charcoal); border-radius: 8px; font-size: .78rem; line-height: 1.55; }
.launch-banner { display:flex;align-items:center;gap:16px;margin-bottom:18px;padding:18px;color:#fff;background:linear-gradient(110deg,#292929,#454541);border-radius:15px; }
.launch-banner.ready { background:linear-gradient(110deg,#174c38,#267557); }
.launch-banner strong { display:block; }
.launch-banner p { margin:4px 0 0;color:#d7d7d2;font-size:.8rem;line-height:1.45; }
.launch-score { width:54px;height:54px;display:grid;place-items:center;flex:0 0 auto;border:2px solid var(--orange);border-radius:50%;color:#ff8a6c;font-weight:900; }
.readiness-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px; }
.readiness-card { display:grid;grid-template-columns:38px 1fr auto;gap:11px;align-items:center;padding:15px;background:white;border:1px solid var(--line);border-radius:13px; }
.readiness-card > span { width:34px;height:34px;display:grid;place-items:center;border-radius:10px;color:white;background:var(--orange-dark);font-weight:900; }
.readiness-card.ready > span { background:var(--green); }
.readiness-card strong,.readiness-card small { display:block; }
.readiness-card small { margin-top:3px;color:var(--muted);font-size:.68rem; }
.readiness-card b { color:var(--orange-dark);font-size:.62rem;letter-spacing:.08em; }
.readiness-card.ready b { color:var(--green); }
.operations-grid { display:grid;grid-template-columns:minmax(0,1.4fr) minmax(310px,.6fr);gap:18px; }
.go-live-gates { display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin-top:18px;overflow:hidden;color:white;background:#555;border-radius:15px; }
.go-live-gates h2 { grid-column:1/-1;margin:0;padding:18px 20px;background:var(--charcoal-2);font-size:1rem; }
.go-live-gates div { padding:18px;background:var(--charcoal); }
.go-live-gates strong { color:#ff8a6c;font-size:.82rem; }
.go-live-gates p { margin:7px 0 0;color:#c9c9c4;font-size:.74rem;line-height:1.45; }
.inline-notice { padding: 12px 14px; color: #74331f; background: var(--orange-soft); border-radius: 10px; font-size: .78rem; font-weight: 700; }
.crm-pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: -7px 0 18px; }
.crm-pipeline article { position: relative; overflow: hidden; min-height: 82px; padding: 15px 16px 18px; background: var(--charcoal); border-radius: 13px; color: white; }
.crm-pipeline small { color: #c8c8c3; font-size: .75rem; font-weight: 750; }
.crm-pipeline strong { display: block; margin-top: 6px; font-size: 1.45rem; }
.crm-pipeline span { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--orange); }
.sponsor-filters { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(180px, .35fr) auto; }
.crm-tier { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #ededeb; font-size: .75rem; font-weight: 850; }
.crm-tier.gold { color: #704900; background: #fff0bb; }
.crm-tier.silver { color: #4f5961; background: #e9edf0; }
.crm-tier.bronze { color: #754029; background: #f5dfd4; }
.crm-tier.strategic { color: white; background: var(--orange-dark); }
.follow-up { display: inline-flex; padding: 5px 7px; border-radius: 7px; background: #eeeeeb; white-space: nowrap; font-size: .72rem; font-weight: 750; }
.follow-up.overdue { color: #8b251e; background: #fde7e4; }
.follow-up.due-soon { color: #7b4f00; background: #fff1cf; }
.follow-up.scheduled { color: #1d6047; background: #e8f4ee; }
.last-contact { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.compact-select { min-width: 128px; padding: 8px 28px 8px 9px; font-size: .75rem; }
.crm-finance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 18px; overflow: hidden; color: white; background: rgba(255,255,255,.16); border-radius: 15px; }
.crm-finance div { padding: 20px; background: var(--charcoal); }
.crm-finance small { display: block; color: #bdbdb8; font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.crm-finance strong { display: block; margin-top: 8px; color: #ff8a6c; font-size: 1.25rem; }
.metric-card, .panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(31,31,31,.045); }
.metric-card { padding: 20px; }
.metric-card small { color: var(--muted); font-weight: 700; }
.metric-card strong { display: block; margin-top: 12px; font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.055em; }
.metric-card .trend { margin: 10px 0 0; color: var(--green); font-size: .76rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 18px; }
.panel { padding: 23px; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 1rem; }
.panel-heading a, .text-button { padding: 0; border: 0; color: var(--orange-dark); background: transparent; text-decoration: none; font-size: .78rem; font-weight: 800; }
.text-button:disabled { color:#9a9a95;cursor:not-allowed; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th { padding: 11px 10px; color: #7c7c78; border-bottom: 1px solid var(--line); text-align: left; font-size: .68rem; letter-spacing: .08em; }
td { padding: 15px 10px; border-bottom: 1px solid #eeeeeb; font-size: .84rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #fcf4f1; }
.project-name { display: grid; gap: 3px; }
.project-name small { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; background: #edf6f1; color: var(--green); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.idea { background: #f0f0ef; color: #686864; }
.status.planning { background: #fff5dc; color: #8e6100; }
.status.done { background: #edf0f4; color: #4f6174; }
.status.closed { background: #efe9f5; color: #66517e; }
.status.warning { background: #fff0eb; color: var(--orange-dark); }
.progress { height: 7px; overflow: hidden; background: #e9e9e6; border-radius: 999px; }
.progress span { display: block; height: 100%; background: var(--orange); border-radius: inherit; }
.alert-list { display: grid; gap: 12px; }
.alert-item { display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: start; padding: 12px; background: #f8f8f6; border-radius: 12px; }
.alert-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--orange-soft); color: var(--orange-dark); font-size: .72rem; font-weight: 900; }
.alert-item strong { display: block; font-size: .81rem; }
.alert-item p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading h2 { margin: 0; font-size: 1.7rem; letter-spacing: -.04em; }
.page-heading p { margin: 7px 0 0; color: var(--muted); }
.filters { display: flex; gap: 9px; flex-wrap: wrap; }
.dashboard-filters { margin-bottom: 16px; }
.finance-filters { margin-bottom: 20px; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.finance-filters input, .finance-filters select, .dashboard-filters input, .dashboard-filters select { width: auto; min-width: 160px; min-height: 40px; padding: 8px 11px; }
.filter-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: white; color: #5a5a56; font-size: .75rem; font-weight: 700; }
.filter-chip.active { color: white; background: var(--charcoal); border-color: var(--charcoal); }
.search-input { max-width: 310px; min-height: 38px; padding: 8px 12px; }
.chart { min-height: 245px; display: flex; align-items: end; gap: 14px; padding: 22px 8px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 57px, #efefec 58px 59px); }
.bar-group { flex: 1; min-width: 28px; display: flex; align-items: end; justify-content: center; gap: 4px; position: relative; height: 200px; }
.bar { width: 16px; border-radius: 6px 6px 0 0; background: var(--orange); }
.bar.out { background: #b9b9b5; }
.bar.over { background: var(--red); }
.bar-label { position: absolute; top: calc(100% + 8px); font-size: .65rem; color: var(--muted); }
.money-income { color: var(--green); }
.money-expense { color: var(--red); }
.danger-text { color: var(--red); }
.split-card { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.share { padding: 22px; border-radius: 16px; background: #f3f3f1; }
.share strong { display: block; margin-top: 9px; font-size: 1.8rem; }
.share.imilo { background: var(--charcoal); color: white; }
.share.falia { background: var(--orange-soft); color: #772714; }

.project-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px; }
.project-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 26px; margin-bottom: 18px; color: white; background: linear-gradient(115deg, var(--charcoal), #474744); border-radius: var(--radius); }
.project-hero h2 { margin: 7px 0 9px; font-size: clamp(1.65rem, 3vw, 2.4rem); letter-spacing: -.04em; }
.project-hero p { max-width: 780px; margin: 0; color: #d7d7d3; line-height: 1.6; }
.project-score { display: grid; place-items: center; align-content: center; width: 120px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.08); text-align: center; }
.project-score strong { font-size: 2rem; color: #ff8667; }
.project-score small { color: #c8c8c4; }
.project-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.project-meta div { display: grid; gap: 4px; }
.project-meta small { color: #aaa; font-size: .68rem; }
.project-tabs { display: flex; gap: 8px; margin: 0 0 18px; padding: 6px; overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 13px; }
.project-tab { flex: 0 0 auto; padding: 9px 13px; border: 0; border-radius: 9px; color: #656560; background: transparent; font-weight: 750; }
.project-tab.active { color: #702510; background: var(--orange-soft); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.summary-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fafaf8; }
.summary-card small { color: var(--muted); }
.summary-card strong { display: block; margin-top: 7px; font-size: 1.1rem; }
.timeline { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 0 0 20px; }
.timeline-item::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: #e3e3df; }
.timeline-item:last-child::after { display: none; }
.timeline-dot { width: 16px; height: 16px; margin-top: 2px; border: 4px solid #ffd4c9; border-radius: 50%; background: var(--orange); z-index: 1; }
.timeline-item.done .timeline-dot { border-color: #cde8dc; background: var(--green); }
.timeline-item strong { font-size: .85rem; }
.timeline-item p { margin: 3px 0 0; color: var(--muted); font-size: .75rem; }
.item-list { display: grid; gap: 10px; }
.list-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fafaf8; }
.list-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orange-dark); }
.list-row strong { display: block; font-size: .84rem; }
.list-row small { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.avatar-stack { display: flex; }
.avatar-chip { width: 36px; height: 36px; display: grid; place-items: center; margin-left: -7px; border: 3px solid white; border-radius: 50%; color: #fff; background: var(--charcoal); font-size: .68rem; font-weight: 850; }
.avatar-chip:first-child { margin-left: 0; }
.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }

dialog { width: min(720px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: auto; border: 0; border-radius: 20px; box-shadow: 0 35px 100px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15,15,15,.62); backdrop-filter: blur(4px); }
.dialog-form { padding: 25px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.dialog-heading h2 { margin: 0; font-size: 1.55rem; }
.dialog-heading .icon-button { color: var(--ink); background: #eeeeeb; font-size: 1.3rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid .wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: end; gap: 10px; margin-top: 24px; }
.calculation-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.calc-item { padding: 13px; border-radius: 11px; background: #f0f0ed; }
.calc-item small { display: block; color: var(--muted); font-size: .68rem; }
.calc-item strong { display: block; margin-top: 5px; font-size: .95rem; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; padding: 13px 17px; color: white; background: var(--charcoal-2); border-radius: 11px; box-shadow: var(--shadow); transform: translateY(30px); opacity: 0; pointer-events: none; transition: .25s ease; z-index: 100; }
.toast.show { transform: translateY(0); opacity: 1; }
.notification-dialog { width: min(760px, calc(100% - 28px)); }
.notification-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -7px 0 16px; }
.notification-toolbar p { margin: 0; font-size: .84rem; }
.notification-list { display: grid; gap: 10px; max-height: 380px; overflow: auto; padding-right: 4px; }
.notification-card { display: grid; grid-template-columns: 12px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fafaf8; }
.notification-card.unread { background: var(--orange-soft); border-color: #ffd0c3; }
.notification-card button { align-self: center; }
.notification-dot { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--blue); }
.notification-dot.warning { background: var(--yellow); }
.notification-dot.urgent { background: var(--red); }
.notification-card strong { display: block; font-size: .88rem; }
.notification-card p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.notification-card small { display: block; margin-top: 7px; color: #858580; font-size: .7rem; }
.preference-card { margin-top: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.preference-card summary { cursor: pointer; color: var(--ink); font-weight: 800; }
.preference-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.preference-form .dialog-actions { grid-column: 1 / -1; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border-radius: 11px; background: #f5f5f2; }
.switch-row span { display: grid; gap: 3px; }
.switch-row small { color: var(--muted); font-size: .7rem; font-weight: 500; }
.switch-row input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--orange-dark); }
.contract-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.contract-meta span { padding: 4px 7px; color: #5f5f5b; background: #efefec; border-radius: 999px; font-size: .68rem; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(0,0,0,.42); }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
  .evidence-flow { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .readiness-grid { grid-template-columns:repeat(2,1fr); }
  .operations-grid { grid-template-columns:1fr; }
  .go-live-gates { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-card { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
  .mobile-brand { display: flex; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 278px; transition: transform .25s ease; box-shadow: 18px 0 45px rgba(0,0,0,.23); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: block; }
  .topbar { padding: 16px 18px; }
  .page-content { padding: 23px 18px; }
  .project-meta { grid-template-columns: repeat(2, 1fr); }
  .crm-pipeline { grid-template-columns: repeat(2, 1fr); }
  .sponsor-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
  .metrics, .provider-grid, .channel-grid, .evidence-flow, .form-grid, .calculation-preview, .split-card, .summary-grid, .crm-pipeline, .crm-finance, .sponsor-filters, .readiness-grid, .go-live-gates { grid-template-columns: 1fr; }
  .signature-notice { grid-template-columns: auto 1fr; }
  .signature-notice > .status { grid-column: 2; justify-self: start; }
  .form-grid .wide { grid-column: auto; }
  .top-actions .button { width: 42px; overflow: hidden; white-space: nowrap; padding: 0 12px; font-size: 0; }
  .top-actions .button::first-letter { font-size: 1rem; }
  .top-actions { gap: 7px; }
  .language-control select { min-width: 54px; padding: 7px 22px 7px 8px; }
  .network-status { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80; box-shadow: var(--shadow); }
  .hero-strip { align-items: start; }
  .progress-ring { width: 64px; height: 64px; }
  .page-heading { align-items: start; flex-direction: column; }
  .filters { width: 100%; }
  .finance-filters > *, .dashboard-filters > * { width: 100% !important; }
  .button-row { width: 100%; justify-content: stretch; }
  .button-row .button { flex: 1; }
  .search-input { max-width: none; }
  .project-hero { grid-template-columns: 1fr; }
  .project-score { width: 100%; grid-template-columns: auto auto; justify-content: space-between; }
  .project-meta { grid-template-columns: 1fr; }
  .preference-form { grid-template-columns: 1fr; }
  .preference-form .dialog-actions { grid-column: auto; }
  .notification-card { grid-template-columns: 10px minmax(0,1fr); }
  .notification-card button { grid-column: 2; justify-self: start; }
}

@media print {
  .sidebar, .topbar, .filters, .button-row, button, dialog, .toast, .sidebar-backdrop { display: none !important; }
  .app-shell { display: block; }
  .page-content { padding: 0; }
  .panel, .metric-card { box-shadow: none; break-inside: avoid; }
  body { background: white; }
}
