@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --wine-950: #2b1e18;
  --wine-900: #5a1028;
  --wine-800: #5a1028;
  --wine-700: #5a1028;
  --wine-600: #5a1028;
  --champagne: #f2e8dc;
  --champagne-soft: #f8f2eb;
  --terracotta: #a65f3d;
  --cream: #ffffff;
  --paper: #ffffff;
  --ink: #2b1e18;
  --muted: #8d7a6b;
  --line: rgba(141,122,107,.24);
  --green: #3f4a2f;
  --green-soft: rgba(63,74,47,.10);
  --amber: #a65f3d;
  --amber-soft: rgba(166,95,61,.11);
  --red: #5a1028;
  --red-soft: rgba(90,16,40,.09);
  --blue: #426c8d;
  --blue-soft: #eaf2f8;
  --shadow: 0 12px 34px rgba(43, 30, 24, .07);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { background: var(--cream); overflow-x:hidden; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #fff; font-family: "Lato", Arial, sans-serif; overflow-x:hidden; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(166,95,61,.28); outline-offset: 2px; }
svg { display: block; }

.app-shell { width:100%; min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0,1fr); }
.app-shell::before { content:""; position:fixed; inset:0 0 auto 0; z-index:40; height:4px; background:linear-gradient(90deg, #b77a32 0, #d1a45d 42%, #b77a32 100%); box-shadow:0 1px 0 rgba(58,10,21,.12); pointer-events:none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 20; display: flex; flex-direction: column; color: #fff; background:
  radial-gradient(circle at 15% 0, rgba(184,111,65,.12), transparent 31%),
  linear-gradient(180deg, #561026 0%, #48101f 54%, #321a1a 100%); box-shadow:8px 0 28px rgba(43,30,24,.06); }
.brand { position:relative; height:104px; flex:0 0 104px; display:grid; place-items:center; padding:7px 0 0; border:0; background:transparent; overflow:hidden; }
.brand::before { content:""; width:58px; height:80px; background:#c58a3a; -webkit-mask-image:url('./assets/logo-paula-transparente.png?v=20260928-15'); mask-image:url('./assets/logo-paula-transparente.png?v=20260928-15'); -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:0 0; mask-position:0 0; -webkit-mask-size:306px auto; mask-size:306px auto; }
.brand-logo { width:70px; height:86px; background:none; }
.brand-mark { width: 54px; height: 62px; position: relative; flex: 0 0 auto; color: var(--champagne); border: 1px solid rgba(195,134,54,.55); border-radius: 50%; font-family: "Manrope", "Lato", sans-serif; }
.brand-mark.original-mark { border:0; border-radius:12px; background-image:url('./assets/monograma-paula.png'); background-repeat:no-repeat; background-position:center; background-size:170% auto; box-shadow:0 0 0 1px rgba(195,134,54,.32); }
.brand-mark span { position: absolute; left: 9px; top: 5px; font-size: 20px; }
.brand-mark i { position: absolute; right: 7px; bottom: 4px; font-size: 18px; font-style: normal; }
.brand strong { display:block; font-family: "Manrope", "Lato", sans-serif; font-size: 15px; letter-spacing: .1px; white-space:nowrap; }
.sidebar-foot small { display:block; margin-top: 3px; color: var(--champagne); font-size: 8px; text-transform: uppercase; letter-spacing: 1.4px; white-space:nowrap; }
.nav { flex: 1; min-height:0; padding: 16px 12px; overflow-y: auto; scrollbar-width:thin; scrollbar-color:#713346 #45101f; scrollbar-gutter:stable; }
.nav::-webkit-scrollbar { width:7px; }
.nav::-webkit-scrollbar-track { background:#45101f; }
.nav::-webkit-scrollbar-thumb { border:1px solid #45101f; border-radius:999px; background:#713346; }
.nav::-webkit-scrollbar-thumb:hover { background:#834257; }
.nav p { margin: 18px 12px 8px; color: rgba(255,255,255,.42); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; }
.nav p:first-child { margin-top: 0; }
.nav-item { width: 100%; display:flex; align-items:center; gap: 11px; min-height: 42px; margin: 3px 0; padding: 10px 12px; border: 0; border-radius: 10px; color: rgba(255,255,255,.73); background: transparent; font-size: 13px; text-align:left; transition: .18s ease; }
.nav-item:hover { color:#fff; background: rgba(255,255,255,.08); }
.nav-item.is-active { color: #fff; background: linear-gradient(90deg, rgba(242,232,220,.18), rgba(255,255,255,.06)); box-shadow: inset 3px 0 var(--terracotta); }
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.8; }
.nav-item b { margin-left:auto; min-width:20px; padding:2px 6px; border-radius:10px; color:var(--wine-950); background:var(--champagne); font-size:10px; text-align:center; }
.nav-section { margin:4px 0 12px; }
.nav-group { width:100%; min-height:40px; display:flex; align-items:center; gap:11px; padding:9px 11px; border:0; border-radius:10px; color:rgba(255,255,255,.82); background:transparent; text-align:left; }
.nav-group:hover { background:rgba(255,255,255,.07); color:#fff; }
.nav-group svg { width:17px; height:17px; color:var(--champagne); stroke-width:1.8; }
.nav-group strong { flex:1; font-size:13px; font-weight:600; }
.nav-group i { font-style:normal; color:rgba(255,255,255,.45); transition:transform .18s; }
.nav-section.is-open .nav-group i { transform:rotate(180deg); }
.nav-children { display:none; padding:3px 0 2px 28px; }
.nav-section.is-open .nav-children { display:grid; }
.nav-subitem { position:relative; width:100%; min-height:34px; padding:7px 10px; border:0; border-radius:8px; color:rgba(255,255,255,.61); background:transparent; font-size:13px; line-height:1.35; text-align:left; }
.nav-subitem:hover { color:#fff; background:rgba(255,255,255,.06); }
.nav-subitem.is-active { color:#fff; background:rgba(242,232,220,.12); }
.nav-subitem.is-active::before { content:""; position:absolute; left:-10px; top:10px; width:4px; height:14px; border-radius:4px; background:var(--champagne); }
.nav-subitem b { float:right; min-width:20px; padding:2px 6px; border-radius:10px; color:var(--wine-950); background:var(--champagne); font-size:10px; text-align:center; }
.sidebar-foot { display:flex; align-items:center; gap:10px; padding:16px 14px; border-top:1px solid rgba(255,255,255,.09); }
.sidebar-foot .avatar { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; color:var(--wine-950); background:var(--champagne); font-size:11px; font-weight:700; }
.sidebar-foot > div:nth-child(2) { min-width:0; flex:1; }
.sidebar-foot strong { display:block; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.workspace { grid-column:2; width:100%; max-width:100%; min-width:0; background:#fff; overflow-x:hidden; }
.topbar { position:sticky; top:0; z-index:15; height:82px; display:flex; align-items:center; gap:20px; padding:4px 36px 0; border-bottom:1px solid var(--line); background:rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.context-selectors { display:flex; align-items:center; gap:18px; }
.context-selectors label { display:grid; gap:3px; color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.85px; }
.context-selectors select { min-width:160px; padding:0 22px 0 0; border:0; color:var(--ink); background:transparent; font-size:14px; font-weight:600; }
.top-separator { width:1px; height:34px; background:var(--line); }
.top-actions { margin-left:auto; display:flex; gap:10px; }
.mobile-menu { display:none !important; }
.content { width:100%; max-width:1520px; min-width:0; margin:0 auto; padding:30px 36px 56px; background:#fff; }

.page-head { display:flex; align-items:flex-end; gap:24px; margin-bottom:22px; }
.page-head > div:first-child { flex:1; }
.eyebrow { margin:0 0 6px; color:var(--wine-600); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:1.25px; }
h1,h2,h3 { font-family:"Manrope", "Lato", Arial, sans-serif; letter-spacing:-.025em; }
h1 { margin:0; font-size:29px; line-height:1.2; color:var(--wine-900); font-weight:800; }
h2 { margin:0; font-size:22px; line-height:1.25; color:var(--wine-900); font-weight:700; }
h3 { margin:0; font-size:16px; line-height:1.3; color:var(--wine-900); font-weight:700; }
.subtitle { margin:7px 0 0; color:var(--muted); font-size:14px; }
.status-pill { display:inline-flex; align-items:center; gap:7px; padding:8px 12px; border:1px solid #cfe7da; border-radius:999px; color:var(--green); background:var(--green-soft); font-size:11px; font-weight:700; }
.status-pill::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }

.button { min-height:39px; display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 14px; border-radius:9px; border:1px solid transparent; font-size:12px; font-weight:700; transition:.17s ease; }
.button svg { width:15px; height:15px; }
.button:disabled { cursor:not-allowed; opacity:.42; box-shadow:none; transform:none; }
.button.primary { color:#fff; background:var(--wine-700); box-shadow:0 8px 20px rgba(43,30,24,.14); }
.button.primary:hover { background:var(--wine-600); transform:translateY(-1px); }
.button.secondary { color:var(--wine-800); border-color:var(--line); background:#fff; }
.button.secondary:hover { border-color:rgba(141,122,107,.42); background:#faf9f7; }
.ghost-button { color:var(--muted); background:transparent; }
.icon-button { width:36px; height:36px; display:grid; place-items:center; padding:0; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:#fff; }
.icon-button svg { width:17px; height:17px; }
.icon-button.ghost { color:rgba(255,255,255,.7); border-color:transparent; background:transparent; }

.stage-strip { display:grid; grid-template-columns:repeat(4,1fr); margin-bottom:22px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; box-shadow:var(--shadow); overflow:hidden; }
.stage { position:relative; display:flex; gap:10px; align-items:center; min-height:66px; padding:14px 17px; border-right:1px solid var(--line); }
.stage:last-child { border:0; }
.stage-icon { width:32px; height:32px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; color:var(--green); background:var(--green-soft); }
.stage-icon.warn { color:var(--amber); background:var(--amber-soft); }
.stage-icon svg { width:15px; height:15px; }
.stage strong { display:block; font-size:11px; }
.stage small { display:block; margin-top:3px; color:var(--muted); font-size:10px; }

.kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:13px; margin-bottom:22px; }
.kpi-card { min-height:124px; position:relative; padding:14px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 8px 25px rgba(43,30,24,.045); overflow:hidden; }
.kpi-card::after { content:""; position:absolute; inset:auto -18px -28px auto; width:70px; height:70px; border-radius:50%; background:var(--champagne-soft); opacity:.48; }
.kpi-label { min-height:29px; display:flex; justify-content:space-between; gap:7px; color:var(--muted); font-size:10px; line-height:1.3; }
.kpi-icon { width:25px; height:25px; display:grid; place-items:center; flex:0 0 auto; border-radius:7px; color:var(--wine-700); background:rgba(242,232,220,.62); }
.kpi-icon svg { width:14px; height:14px; }
.kpi-value { display:block; max-width:100%; margin:7px 0 6px; overflow:hidden; color:var(--wine-900); font:700 clamp(15px,1.35vw,20px) "Manrope","Lato",sans-serif; font-variant-numeric:tabular-nums; letter-spacing:-.55px; line-height:1.18; text-overflow:ellipsis; white-space:nowrap; }
.delta { position:relative; z-index:1; display:inline-flex; align-items:center; gap:4px; font-size:10px; font-weight:700; }
.delta.positive { color:var(--green); }
.delta.negative { color:var(--red); }
.delta.neutral { color:var(--muted); }

.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(280px,.75fr); gap:18px; min-width:0; margin-bottom:18px; }
.dashboard-grid.equal { grid-template-columns:repeat(2,minmax(0,1fr)); }
.dashboard-grid.equal > .card { align-self:start; }
.dashboard-grid > *, .home-hero > *, .overview-cards > * { min-width:0; }
.card { min-width:0; border:1px solid var(--line); border-radius:var(--radius); background:#fff; box-shadow:0 9px 28px rgba(43,30,24,.045); }
.card-head { min-height:66px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 19px; border-bottom:1px solid var(--line); }
.card-head h3 { font-size:15px; }
.card-head p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.card-body { padding:16px 18px; }
.card-body:has(> .chart) { padding-bottom:14px; }
.card-action { border:0; color:var(--wine-600); background:transparent; font-size:10px; font-weight:700; }
.section-tabs { display:flex; gap:4px; margin:-4px 0 22px; padding:5px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 7px 20px rgba(43,30,24,.035); overflow-x:auto; }
.section-tab { min-height:37px; flex:0 0 auto; padding:8px 13px; border:0; border-radius:8px; color:var(--muted); background:transparent; font-size:12px; font-weight:600; white-space:nowrap; }
.section-tab:hover { color:var(--wine-700); background:rgba(242,232,220,.45); }
.section-tab.is-active { color:#fff; background:var(--wine-700); box-shadow:0 5px 12px rgba(43,30,24,.14); }

.home-hero { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr); gap:18px; margin-bottom:18px; }
.project-summary { position:relative; min-height:245px; padding:24px; color:#fff; border-radius:18px; background:linear-gradient(145deg,var(--wine-700),var(--wine-950)); box-shadow:0 15px 35px rgba(43,30,24,.15); overflow:hidden; }
.project-summary::after { content:""; position:absolute; width:190px; height:190px; right:-58px; bottom:-72px; border:1px solid rgba(242,232,220,.30); border-radius:50%; box-shadow:0 0 0 32px rgba(242,232,220,.05); }
.project-summary .eyebrow { color:var(--champagne); }
.project-summary h2 { max-width:520px; margin-bottom:8px; color:#fff; font-size:28px; }
.project-summary > p { max-width:560px; margin:0 0 22px; color:rgba(255,255,255,.7); font-size:13px; line-height:1.55; }
.project-progress-head { display:flex; justify-content:space-between; gap:10px; margin-bottom:7px; color:rgba(255,255,255,.78); font-size:11px; }
.project-summary .progress-track { max-width:520px; height:8px; background:rgba(255,255,255,.15); }
.project-summary .progress-track span { background:var(--champagne); }
.project-meta { display:flex; gap:18px; flex-wrap:wrap; margin-top:16px; }
.project-meta div { display:grid; gap:3px; }
.project-meta small { color:rgba(255,255,255,.5); font-size:9px; text-transform:uppercase; letter-spacing:.7px; }
.project-meta strong { font-size:11px; }
.meeting-card { min-height:245px; padding:22px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow); }
.date-chip { width:58px; height:62px; display:grid; place-items:center; align-content:center; margin:18px 0 14px; border-radius:13px; color:#fff; background:var(--wine-700); }
.date-chip strong { font:800 24px "Manrope","Lato",sans-serif; line-height:1; }
.date-chip span { margin-top:3px; color:var(--champagne-soft); font-size:9px; text-transform:uppercase; }
.meeting-card h3 { font-size:17px; }
.meeting-card p { margin:6px 0 16px; color:var(--muted); font-size:11px; line-height:1.45; }
.meeting-meta { display:flex; gap:12px; color:var(--muted); font-size:10px; }

.overview-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:18px; }
.overview-card { padding:18px; border:1px solid var(--line); border-radius:15px; background:#fff; box-shadow:0 8px 24px rgba(43,30,24,.04); }
.overview-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.overview-card-head h3 { font-size:15px; }
.overview-card-head span { min-width:28px; height:28px; display:grid; place-items:center; border-radius:8px; color:var(--wine-700); background:rgba(242,232,220,.55); }
.overview-card-head svg { width:14px; height:14px; }
.overview-card .big-number { display:block; margin:16px 0 4px; color:var(--wine-900); font:700 26px "Manrope","Lato",sans-serif; }
.overview-card p { min-height:34px; margin:0 0 14px; color:var(--muted); font-size:12px; line-height:1.5; }
.metric-row { display:flex; gap:10px; }
.metric-row span { flex:1; padding:8px; border-radius:8px; background:#faf9f7; color:var(--muted); font-size:9px; text-align:center; }
.metric-row b { display:block; margin-bottom:2px; color:var(--ink); font-size:12px; }
.quick-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; min-width:0; }
.quick-link { min-width:0; min-height:86px; display:grid; place-items:center; align-content:center; gap:7px; padding:10px; border:1px solid var(--line); border-radius:12px; color:var(--wine-700); background:#fff; font-size:11px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; text-align:center; }
.quick-link:hover { border-color:rgba(166,95,61,.38); background:rgba(242,232,220,.26); transform:translateY(-1px); }
.quick-link svg { width:18px; height:18px; }

.timeline { position:relative; display:grid; gap:0; }
.timeline::before { content:""; position:absolute; left:17px; top:18px; bottom:18px; width:1px; background:#dfd6d8; }
.timeline-item { position:relative; display:grid; grid-template-columns:35px minmax(0,1fr) auto auto; gap:13px; align-items:flex-start; min-height:76px; padding:8px 0; }
.timeline-dot { position:relative; z-index:1; width:35px; height:35px; display:grid; place-items:center; border:4px solid #fff; border-radius:50%; color:var(--muted); background:#eee8e9; font-size:10px; font-weight:700; }
.timeline-item.done .timeline-dot { color:#fff; background:var(--green); }
.timeline-item.active .timeline-dot { color:var(--wine-950); background:var(--champagne); box-shadow:0 0 0 4px var(--champagne-soft); }
.timeline-item h3 { margin-top:3px; font:700 12px "Lato",sans-serif; }
.timeline-item p { margin:5px 0 0; color:var(--muted); font-size:10px; }
.timeline-item .tag { margin-top:4px; }

.subtabs { display:flex; gap:4px; margin-bottom:16px; padding-bottom:9px; border-bottom:1px solid var(--line); overflow-x:auto; }
.subtab { padding:7px 10px; border:0; border-radius:7px; color:var(--muted); background:transparent; font-size:10px; font-weight:700; }
.subtab.is-active { color:var(--wine-700); background:rgba(242,232,220,.60); }
.meeting-list { display:grid; gap:10px; }
.meeting-row { display:grid; grid-template-columns:58px minmax(0,1fr) auto auto; gap:13px; align-items:center; padding:13px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.meeting-row .date { color:var(--wine-800); font:700 13px "Manrope","Lato",sans-serif; text-align:center; }
.meeting-row .date small { display:block; color:var(--muted); font:500 8px "Lato",sans-serif; text-transform:uppercase; }
.meeting-row strong { display:block; font-size:11px; }
.meeting-row p { margin:4px 0 0; color:var(--muted); font-size:9px; }
.project-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:10px; align-items:stretch; margin-bottom:18px; }
.project-overview > div { padding:14px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.project-overview small { display:block; color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.55px; }
.project-overview strong { display:block; margin-top:5px; color:var(--wine-900); font:800 19px "Manrope","Lato",sans-serif; }
.project-overview > .button { align-self:stretch; }
.record-actions,.row-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.mini-button { min-height:27px; padding:5px 8px; border:1px solid var(--line); border-radius:7px; color:var(--wine-700); background:#fff; font-size:8px; font-weight:700; cursor:pointer; }
.mini-button:hover { border-color:var(--champagne); background:#fcf7ef; }
.mini-button.danger { color:var(--red); }
.record-form { margin-bottom:18px; padding:18px; border:1px solid rgba(197,138,58,.42); border-radius:15px; background:#fffaf3; }
.record-form > header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:15px; }
.record-form > header h3 { margin-top:2px; font-size:17px; }
.record-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.record-grid textarea { width:100%; padding:9px 11px; resize:vertical; border:1px solid #ddd5d7; border-radius:8px; color:var(--ink); background:#fff; font:inherit; }
.record-form > footer { display:flex; justify-content:flex-end; gap:8px; margin-top:15px; padding-top:14px; border-top:1px solid var(--line); }
.task-table { min-width:900px; }
.contract-table { min-width:930px; }
.contract-table td:first-child strong,.contract-table td:first-child small { display:block; }
.contract-table td:first-child small { margin-top:3px; color:var(--muted); font-size:8px; }
.task-table td:first-child strong { display:block; }
.task-table td:first-child small { display:block; margin-top:3px; color:var(--muted); font-size:8px; }
.whatsapp-preview { margin-top:18px; padding:16px; border:1px solid #cfe4d7; border-radius:14px; background:#f5fbf7; }
.whatsapp-preview header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.whatsapp-preview textarea { width:100%; min-height:170px; padding:12px; margin-bottom:10px; resize:vertical; border:1px solid #cfe4d7; border-radius:9px; color:var(--ink); background:#fff; font:10px/1.55 "Lato",sans-serif; }

.contract-head { display:grid; grid-template-columns:1.1fr .9fr; gap:18px; }
.contract-status { padding:23px; border-radius:16px; color:#fff; background:linear-gradient(135deg,var(--wine-700),var(--wine-900)); }
.contract-status .eyebrow { color:var(--champagne); }
.contract-status h2 { margin:8px 0 5px; color:#fff; }
.contract-status p { margin:0; color:rgba(255,255,255,.66); font-size:11px; }
.contract-progress { margin-top:22px; }
.contract-progress .progress-track { background:rgba(255,255,255,.15); }
.contract-progress .progress-track span { background:var(--champagne); }
.definition-list { display:grid; grid-template-columns:repeat(2,1fr); gap:12px 18px; }
.definition-list div { padding-bottom:10px; border-bottom:1px solid var(--line); }
.definition-list dt { color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.6px; }
.definition-list dd { margin:5px 0 0; font-size:11px; font-weight:700; }

.editable-table input { width:88px; padding:6px 7px; border:1px solid var(--line); border-radius:6px; text-align:right; }
.premise-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:16px; }
.premise { display:grid; gap:5px; padding:12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--muted); font-size:9px; }
.premise input { width:100%; min-height:36px; padding:7px 8px; border:1px solid #ddd5d7; border-radius:7px; color:var(--ink); background:#fff; font-size:11px; font-weight:700; }
.calculator-layout { display:grid; grid-template-columns:minmax(300px,.8fr) minmax(340px,1.2fr); gap:18px; }
.form-stack { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.result-panel { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.result-box { padding:16px; border-radius:12px; background:#f8f4f3; }
.result-box.primary-result { color:#fff; background:var(--wine-700); }
.result-box small { display:block; color:inherit; opacity:.7; font-size:9px; text-transform:uppercase; letter-spacing:.6px; }
.result-box strong { display:block; margin-top:6px; font:700 21px "Manrope","Lato",sans-serif; }

.strategy-flow { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-bottom:18px; }
.strategy-step { position:relative; min-height:85px; padding:13px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.strategy-step.is-active { border-color:var(--champagne); box-shadow:inset 0 3px var(--champagne); }
.strategy-step b { display:block; margin-bottom:7px; color:var(--champagne); font:700 18px "Manrope","Lato",sans-serif; }
.strategy-step strong { font-size:10px; }
.matrix { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.matrix-cell { min-height:135px; padding:14px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.matrix-cell strong { display:block; margin-bottom:9px; font-size:11px; }
.matrix-cell ul { margin:0; padding-left:16px; color:var(--muted); font-size:9px; line-height:1.7; }

.kanban { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.kanban-col { min-height:280px; padding:12px; border-radius:13px; background:#eee8e8; }
.kanban-col h3 { display:flex; justify-content:space-between; margin:0 2px 10px; font:700 10px "Lato",sans-serif; text-transform:uppercase; }

@media (max-width:1100px) {
  .home-hero,.contract-head,.calculator-layout { grid-template-columns:1fr; }
  .overview-cards { grid-template-columns:repeat(2,1fr); }
  .quick-links { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .strategy-flow { grid-template-columns:repeat(3,1fr); }
  .kanban { grid-template-columns:repeat(2,1fr); }
}

.chart { width:100%; min-height:0; }
.chart svg { width:100%; height:auto; max-height:210px; overflow:visible; }
.chart-label { fill:#8d7a6b; font-size:9px; font-family:"Lato", sans-serif; }
.chart-value { fill:#6b4f43; font:700 8px "Lato",sans-serif; }
.chart-grid { stroke:#eee8e9; stroke-width:1; }
.chart-line { fill:none; stroke:var(--wine-700); stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.chart-area { fill:url(#wineArea); }
.chart-target { fill:none; stroke:var(--champagne); stroke-width:1.5; stroke-dasharray:5 4; }
.chart-dot { fill:#fff; stroke:var(--wine-700); stroke-width:2; }
.chart-legend { display:flex; gap:18px; margin-top:5px; color:var(--muted); font-size:10px; }
.chart-legend span { display:inline-flex; align-items:center; gap:6px; }
.chart-legend i { width:16px; height:2px; display:inline-block; background:var(--wine-700); }
.chart-legend i.target { background:var(--champagne); }
.bar { fill:var(--wine-700); rx:3; }
.bar.muted { fill:rgba(141,122,107,.32); }
.bar.target { fill:var(--champagne); }

.highlight-list { display:grid; gap:10px; }
.highlight { display:grid; grid-template-columns:34px 1fr; gap:11px; padding:11px; border-radius:11px; background:#faf9f7; }
.highlight .tone { width:34px; height:34px; display:grid; place-items:center; border-radius:9px; }
.highlight .tone svg { width:16px; height:16px; }
.tone.good { color:var(--green); background:var(--green-soft); }
.tone.attention { color:var(--amber); background:var(--amber-soft); }
.tone.risk { color:var(--red); background:var(--red-soft); }
.tone.info { color:var(--blue); background:var(--blue-soft); }
.highlight strong { display:block; font-size:11px; line-height:1.45; }
.highlight p { margin:3px 0 0; color:var(--muted); font-size:10px; line-height:1.45; }

.finance-table { width:100%; border-collapse:collapse; font-size:11px; }
.finance-table th { padding:10px 12px; color:var(--muted); background:#faf8f7; border-bottom:1px solid var(--line); font-size:9px; text-align:right; text-transform:uppercase; letter-spacing:.65px; }
.finance-table th:first-child { text-align:left; }
.finance-table td { padding:10px 12px; border-bottom:1px solid #f1eded; text-align:right; }
.finance-table td:first-child { text-align:left; }
.finance-table tr:last-child td { border-bottom:0; }
.finance-table tr.total td { color:var(--wine-900); background:rgba(242,232,220,.36); font-weight:700; }
.finance-table tr.subtotal td { font-weight:700; }
.finance-table .indent { padding-left:28px; color:var(--muted); }
.finance-table .negative { color:var(--red); }
.finance-table .positive { color:var(--green); }
.table-wrap { overflow:auto; }
.annual-table-wrap { width:100%; max-width:100%; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; }
.annual-table { width:100%; min-width:0; table-layout:fixed; font-size:8.5px; font-variant-numeric:tabular-nums; }
.annual-table th,.annual-table td { padding:7px 4px; overflow:hidden; text-overflow:clip; white-space:nowrap; }
.annual-table th { position:sticky; top:0; z-index:3; color:#fff; background:var(--wine-700); }
.annual-table th:first-child,.annual-table td:first-child { position:sticky; left:0; width:28%; min-width:0; max-width:none; z-index:2; overflow:hidden; text-align:left; text-overflow:ellipsis; white-space:nowrap; }
.annual-table th:first-child { z-index:4; background:var(--wine-700); }
.annual-table td:first-child { background:#fff; }
.finance-table tr.excel-subtotal td,.finance-table tr.excel-total td { color:var(--wine-900); background:#f4eadb; font-weight:800; }
.finance-table tr.excel-subtotal td:first-child,.finance-table tr.excel-total td:first-child { background:#f4eadb; }
.finance-table tr.excel-grand td { color:#fff; background:var(--wine-700); font-weight:800; }
.finance-table tr.excel-grand td:first-child { background:var(--wine-700); }
.finance-table tr.excel-grand .negative { color:#fff; }
.finance-table tr.excel-non-operating td { color:var(--wine-900); background:#fbf5ec; font-weight:700; border-top:1px solid rgba(197,138,58,.28); }
.finance-table tr.excel-non-operating td:first-child { background:#fbf5ec; }
.budget-comparison td,.budget-comparison th { padding-top:9px; padding-bottom:9px; }
.history-table { min-width:640px; font-variant-numeric:tabular-nums; }
.history-table th:first-child,.history-table td:first-child { min-width:130px; }
.scenario-table { min-width:940px; font-variant-numeric:tabular-nums; }
.scenario-table th:first-child,.scenario-table td:first-child { min-width:300px; text-align:left; }
.scenario-table td { white-space:nowrap; }
.scenario-inputs { grid-template-columns:repeat(4,minmax(0,1fr)); }
.scenario-parameters { grid-template-columns:repeat(2,minmax(0,1fr)); }
.parity-strip { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 18px; padding:12px 14px; border:1px solid #d6e1cf; border-radius:12px; background:#f7faf4; }
.parity-strip > div { display:grid; grid-template-columns:auto 1fr; column-gap:8px; align-items:center; margin-right:auto; }
.parity-strip strong { font-size:11px; }
.parity-strip small { grid-column:2; color:var(--muted); font-size:9px; }
.parity-dot { width:9px; height:9px; border-radius:50%; background:var(--amber); }
.parity-dot.is-ok { background:var(--green); }
.parity-check { padding:5px 7px; border-radius:7px; color:var(--green); background:var(--green-soft); font-size:8px; font-weight:700; }
.parity-check.is-different { color:var(--amber); background:var(--amber-soft); }
.mini-grid.compact .mini-stat { min-width:0; }
.progress-track { height:6px; border-radius:10px; background:#eee8e9; overflow:hidden; }
.progress-track span { height:100%; display:block; border-radius:10px; background:var(--wine-700); }

.mini-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.mini-stat { padding:15px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.mini-stat small { display:block; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.75px; }
.mini-stat strong { display:block; max-width:100%; margin:7px 0 4px; overflow:hidden; color:var(--wine-900); font:700 clamp(14px,1.25vw,19px) "Manrope","Lato",sans-serif; font-variant-numeric:tabular-nums; letter-spacing:-.45px; text-overflow:ellipsis; white-space:nowrap; }
.mini-stat span { color:var(--muted); font-size:10px; }
.scenario-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.scenario { padding:17px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.scenario.featured { border-color:var(--champagne); box-shadow:inset 0 3px var(--champagne); }
.scenario .scenario-name { display:flex; align-items:center; justify-content:space-between; color:var(--wine-700); font-size:11px; font-weight:700; }
.scenario .badge { padding:3px 7px; border-radius:999px; color:var(--wine-700); background:var(--champagne-soft); font-size:8px; text-transform:uppercase; }
.scenario h3 { margin:12px 0 4px; font-size:22px; }
.scenario p { margin:0 0 13px; color:var(--muted); font-size:10px; }
.scenario dl { margin:0; display:grid; gap:7px; }
.scenario dl div { display:flex; justify-content:space-between; gap:10px; padding-top:7px; border-top:1px solid #f0ebec; font-size:10px; }
.scenario dt { color:var(--muted); }
.scenario dd { margin:0; font-weight:700; }

.balance-equation { display:grid; grid-template-columns:1fr 36px 1fr 36px 1fr; align-items:center; gap:9px; margin-bottom:16px; }
.balance-box { min-width:0; padding:18px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.balance-box small { color:var(--muted); font-size:10px; }
.balance-box strong { display:block; max-width:100%; margin-top:7px; overflow:hidden; color:var(--wine-900); font:700 clamp(16px,1.45vw,21px) "Manrope","Lato",sans-serif; font-variant-numeric:tabular-nums; letter-spacing:-.4px; text-overflow:ellipsis; white-space:nowrap; }
.equation-sign { text-align:center; color:var(--champagne); font:700 24px "Manrope","Lato",sans-serif; }
.balance-details { align-items:start; }
.balance-detail-table { table-layout:fixed; width:100%; font-size:9.5px; }
.balance-detail-table td { padding:8px 10px; }
.balance-detail-table td:first-child { width:auto; overflow:hidden; text-align:left; text-overflow:ellipsis; white-space:nowrap; }
.balance-detail-table td:last-child { width:112px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.balance-detail-table .excel-total td,
.balance-detail-table .excel-grand td { font-weight:800; }

.indicator-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.gauge-card { padding:18px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.gauge-head { display:flex; justify-content:space-between; gap:10px; }
.gauge-head strong { font-size:11px; }
.gauge-head span { color:var(--muted); font-size:10px; }
.gauge-value { display:block; margin:15px 0 8px; color:var(--wine-900); font:700 26px "Manrope","Lato",sans-serif; }
.gauge-foot { display:flex; justify-content:space-between; margin-top:7px; color:var(--muted); font-size:9px; }

.indicator-summary-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.indicator-summary { min-width:0; padding:14px; border:1px solid var(--line); border-radius:13px; color:var(--ink); background:#fff; text-align:left; cursor:pointer; transition:.16s ease; }
.indicator-summary:hover,.indicator-summary.is-active { border-color:rgba(197,138,58,.62); box-shadow:0 8px 22px rgba(70,24,38,.08); transform:translateY(-1px); }
.indicator-summary.is-active { box-shadow:inset 0 3px var(--champagne),0 8px 22px rgba(70,24,38,.08); }
.indicator-summary-top { display:flex; justify-content:space-between; align-items:center; color:var(--wine-700); font-size:10px; }
.indicator-summary > strong { display:block; margin:10px 0 5px; overflow:hidden; color:var(--wine-900); font:800 clamp(16px,1.4vw,21px) "Manrope","Lato",sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.indicator-summary > small { display:block; min-height:29px; color:var(--muted); font-size:9px; line-height:1.45; }
.indicator-summary-foot { display:block; margin-top:8px; font-size:8.5px; }
.status-dot { width:8px; height:8px; border-radius:50%; background:#a69ca1; }
.status-dot.good { background:var(--green); }
.status-dot.attention,.status-dot.review { background:var(--amber); }
.status-dot.risk { background:var(--red); }
.indicator-filters { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 16px; padding:7px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.filter-chip { min-height:32px; padding:7px 12px; border:0; border-radius:9px; color:var(--muted); background:transparent; font-size:9px; font-weight:700; cursor:pointer; }
.filter-chip:hover,.filter-chip.is-active { color:#fff; background:var(--wine-700); }
.indicator-group { margin-bottom:14px; border:1px solid var(--line); border-radius:15px; background:#fff; overflow:hidden; box-shadow:0 8px 25px rgba(43,30,24,.035); }
.indicator-group > header { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; padding:14px 16px; border-bottom:1px solid var(--line); }
.indicator-group > header h3 { margin:2px 0 0; font-size:15px; }
.indicator-group > header > span { color:var(--muted); font-size:9px; }
.indicator-table { min-width:850px; }
.indicator-table th:nth-child(n+2),.indicator-table td:nth-child(n+2) { text-align:center; }
.indicator-table td:first-child { min-width:205px; }
.indicator-table td:first-child strong { display:inline-block; min-width:47px; color:var(--wine-700); }
.indicator-table td:first-child small { color:var(--muted); font-size:9px; }
.indicator-table td:nth-child(5) { max-width:260px; color:var(--muted); font-size:8.5px; line-height:1.4; }
.indicator-row { cursor:pointer; transition:.12s ease; }
.indicator-row:hover td,.indicator-row.is-selected td { background:#fcf7ef; }
.indicator-row.is-selected td:first-child { box-shadow:inset 3px 0 var(--champagne); }
.indicator-status { display:inline-flex; align-items:center; min-height:22px; padding:4px 8px; border-radius:999px; color:#756b70; background:#f1eeee; font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.35px; white-space:nowrap; }
.indicator-status.good { color:var(--green); background:var(--green-soft); }
.indicator-status.attention,.indicator-status.review { color:var(--amber); background:var(--amber-soft); }
.indicator-status.risk { color:var(--red); background:var(--red-soft); }
.indicator-detail { margin-top:18px; padding:18px; border:1px solid rgba(197,138,58,.38); border-radius:16px; background:linear-gradient(145deg,#fff 0%,#fffaf3 100%); }
.indicator-detail > header { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:16px; }
.indicator-detail h2 { margin:2px 0 4px; color:var(--wine-900); font-size:19px; }
.indicator-detail header p:last-child { margin:0; color:var(--muted); font-size:9px; }
.indicator-detail-grid { display:grid; grid-template-columns:minmax(190px,.35fr) minmax(0,1fr); gap:18px; align-items:center; }
.indicator-current { padding:18px; border-radius:13px; color:#fff; background:var(--wine-700); }
.indicator-current small,.indicator-current span { display:block; font-size:9px; line-height:1.45; opacity:.78; }
.indicator-current strong { display:block; margin:9px 0; font:800 27px "Manrope","Lato",sans-serif; }
.indicator-chart .chart svg { max-height:170px; }
.indicator-method { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); gap:16px; margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.indicator-method h3 { margin-bottom:6px; font-size:11px; }
.indicator-method p { margin:0; color:var(--muted); font-size:10px; line-height:1.5; }
.indicator-method dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin:0; }
.indicator-method dl > div { padding:9px 10px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.indicator-method dt { color:var(--muted); font-size:8px; }
.indicator-method dd { margin:4px 0 0; color:var(--wine-900); font-size:10px; font-weight:800; }
.indicator-detail > .highlight { margin-top:14px; }
.reference-actions { display:flex; gap:8px; }
.reference-groups { display:grid; gap:14px; margin-top:18px; }
.reference-group { border:1px solid var(--line); border-radius:14px; background:#fff; overflow:hidden; }
.reference-group > header { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 15px; border-bottom:1px solid var(--line); }
.reference-group > header h3 { font-size:14px; }
.reference-group > header span { color:var(--muted); font-size:9px; }
.reference-table { min-width:820px; }
.reference-table td:first-child strong { display:block; color:var(--wine-700); }
.reference-table td:first-child small { color:var(--muted); font-size:8.5px; }
.reference-table label { display:grid; gap:3px; color:var(--muted); font-size:8px; }
.reference-table input { width:92px; min-height:34px; padding:6px 8px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:#fff; font-size:10px; text-align:right; }
.formula-source { display:block; max-width:220px; color:var(--muted); font-size:8.5px; line-height:1.45; }

.alert-board { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.alert-column { min-height:300px; padding:14px; border-radius:14px; background:#efe9e8; }
.alert-column h3 { display:flex; justify-content:space-between; align-items:center; margin:0 2px 12px; font:700 11px "Lato",sans-serif; text-transform:uppercase; letter-spacing:.8px; }
.alert-column h3 b { display:grid; place-items:center; min-width:20px; height:20px; border-radius:10px; background:#fff; font-size:9px; }
.task-card { padding:13px; margin-bottom:9px; border:1px solid var(--line); border-radius:11px; background:#fff; box-shadow:0 5px 14px rgba(52,20,31,.04); }
.task-card .task-top { display:flex; justify-content:space-between; gap:8px; }
.task-card strong { font-size:11px; line-height:1.4; }
.task-card p { margin:6px 0 10px; color:var(--muted); font-size:10px; line-height:1.45; }
.tag { display:inline-flex; padding:3px 7px; border-radius:99px; color:var(--amber); background:var(--amber-soft); font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.tag.red { color:var(--red); background:var(--red-soft); }
.tag.green { color:var(--green); background:var(--green-soft); }

.import-start { display:grid; grid-template-columns:1.2fr .8fr; gap:18px; }
.drop-zone { min-height:260px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:28px; border:1.5px dashed rgba(141,122,107,.42); border-radius:14px; background:#fcfbfa; text-align:center; cursor:pointer; transition:.17s; }
.drop-zone:hover, .drop-zone.is-dragging { border-color:var(--wine-600); background:rgba(242,232,220,.32); }
.drop-icon { width:52px; height:52px; display:grid; place-items:center; margin-bottom:13px; border-radius:15px; color:var(--wine-700); background:rgba(242,232,220,.65); }
.drop-icon svg { width:24px; height:24px; }
.drop-zone h3 { margin-bottom:7px; }
.drop-zone p { max-width:360px; margin:0 0 15px; color:var(--muted); font-size:11px; line-height:1.5; }
.supported { margin-top:12px; color:#9b9297; font-size:9px; }
.demo-file { display:flex; gap:11px; align-items:center; margin-top:14px; padding:12px 14px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.demo-file .file-icon { width:36px; height:36px; display:grid; place-items:center; color:var(--green); background:var(--green-soft); border-radius:9px; }
.demo-file strong { display:block; font-size:10px; }
.demo-file small { color:var(--muted); font-size:9px; }
.demo-file button { margin-left:auto; }
.architecture { padding:17px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.architecture h3 { margin-bottom:13px; }
.arch-flow { display:grid; gap:8px; }
.arch-node { display:flex; align-items:center; gap:10px; padding:10px; border-radius:9px; background:#faf9f7; }
.arch-node b { width:25px; height:25px; display:grid; place-items:center; flex:0 0 auto; border-radius:7px; color:#fff; background:var(--wine-700); font-size:9px; }
.arch-node strong { display:block; font:700 10px "Lato",sans-serif; }
.arch-node small { display:block; margin-top:2px; color:var(--muted); font-size:8px; }
.arch-arrow { height:8px; margin-left:22px; border-left:1px dashed var(--champagne); }

.model-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.model-card { padding:17px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.model-card .model-icon { width:34px; height:34px; display:grid; place-items:center; margin-bottom:12px; border-radius:9px; color:var(--wine-700); background:rgba(242,232,220,.65); }
.model-card .model-icon svg { width:16px; height:16px; }
.model-card p { margin:6px 0 13px; min-height:44px; color:var(--muted); font-size:10px; line-height:1.5; }
.model-card ul { margin:0; padding:0; list-style:none; display:grid; gap:6px; }
.model-card li { display:flex; gap:7px; color:#5f585d; font-size:9px; }
.model-card li::before { content:"•"; color:var(--champagne); }

.modal-backdrop { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:24px; background:rgba(31,8,17,.62); backdrop-filter:blur(5px); }
.modal-backdrop[hidden] { display:none; }
.modal { width:min(1040px,calc(100vw - 32px)); max-height:calc(100vh - 32px); display:flex; flex-direction:column; border:1px solid rgba(255,255,255,.4); border-radius:19px; background:#fff; box-shadow:0 25px 80px rgba(31,8,17,.3); overflow:hidden; }
.small-modal { width:min(650px,calc(100vw - 32px)); }
.modal-head { display:flex; gap:20px; align-items:flex-start; padding:20px 24px; border-bottom:1px solid var(--line); }
.modal-head > div { flex:1; }
.modal-head h2 { font-size:21px; }
.modal-head p:last-child { max-width:700px; margin:6px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.stepper { display:grid; grid-template-columns:repeat(5,1fr); padding:16px 24px 0; background:#fff; }
.step { position:relative; display:flex; align-items:center; gap:8px; padding-bottom:14px; color:#a0979c; border-bottom:2px solid var(--line); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
.step .step-number { width:23px; height:23px; display:grid; place-items:center; border-radius:50%; color:#978d92; background:#eee9e9; font-size:9px; }
.step.is-active { color:var(--wine-700); border-color:var(--wine-700); }
.step.is-active .step-number { color:#fff; background:var(--wine-700); }
.step.is-done { color:var(--green); border-color:var(--green); }
.step.is-done .step-number { color:#fff; background:var(--green); }
.modal-body { min-height:360px; padding:22px 24px; overflow-y:auto; background:#fcfbfa; }
.modal-foot { display:flex; align-items:center; gap:9px; padding:14px 24px; border-top:1px solid var(--line); background:#fff; }
.spacer { flex:1; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; padding:24px; }
.field { display:grid; gap:6px; color:var(--ink); font-size:10px; font-weight:700; }
.field.full { grid-column:1/-1; }
.field input,.field select,.mapping-select,.sheet-select { width:100%; min-height:40px; padding:9px 11px; border:1px solid #ddd5d7; border-radius:8px; color:var(--ink); background:#fff; font-size:11px; }
.form-note { display:flex; gap:8px; padding:11px; border-radius:9px; color:var(--blue); background:var(--blue-soft); font-size:10px; line-height:1.45; }
.form-note svg { width:15px; height:15px; flex:0 0 auto; }
.modal-form-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:6px; }

.file-summary { display:flex; align-items:center; gap:13px; padding:14px; margin-bottom:17px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.file-summary .file-icon { width:40px; height:40px; display:grid; place-items:center; flex:0 0 auto; color:var(--green); background:var(--green-soft); border-radius:10px; }
.file-summary strong { display:block; font-size:11px; }
.file-summary small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.file-summary .tag { margin-left:auto; }
.sheet-picker { display:flex; align-items:center; gap:12px; margin-bottom:15px; }
.sheet-picker label { color:var(--muted); font-size:10px; font-weight:700; }
.sheet-select { width:230px; }
.preview-table { width:100%; border-collapse:collapse; min-width:650px; font-size:9px; }
.preview-table th,.preview-table td { max-width:190px; padding:8px 9px; border:1px solid var(--line); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left; }
.preview-table th { color:var(--wine-800); background:rgba(242,232,220,.55); }
.preview-wrap { border:1px solid var(--line); border-radius:10px; background:#fff; overflow:auto; }
.mapping-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.mapping-row { display:grid; grid-template-columns:150px 1fr; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.mapping-row label { font-size:10px; font-weight:700; }
.mapping-row label small { display:block; margin-top:3px; color:var(--muted); font-size:8px; font-weight:400; }
.mapping-row.required label::after { content:" *"; color:var(--red); }
.mapping-select { min-height:36px; }
.validation-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:17px; }
.validation-stat { padding:13px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.validation-stat span { display:grid; place-items:center; width:27px; height:27px; margin-bottom:9px; border-radius:8px; }
.validation-stat strong { display:block; font-size:16px; font-family:"Manrope","Lato",sans-serif; color:var(--wine-900); }
.validation-stat small { color:var(--muted); font-size:8px; }
.issue-list { display:grid; gap:8px; }
.issue { display:grid; grid-template-columns:26px 1fr auto; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.issue .issue-icon { width:26px; height:26px; display:grid; place-items:center; border-radius:7px; }
.issue strong { display:block; font-size:10px; }
.issue small { color:var(--muted); font-size:8px; }
.process-panel { max-width:650px; margin:20px auto; text-align:center; }
.process-icon { width:64px; height:64px; display:grid; place-items:center; margin:0 auto 15px; border-radius:20px; color:var(--green); background:var(--green-soft); }
.process-icon svg { width:30px; height:30px; }
.process-panel h3 { font-size:21px; }
.process-panel > p { margin:8px auto 19px; max-width:500px; color:var(--muted); font-size:11px; line-height:1.55; }
.process-list { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; text-align:left; }
.process-list div { padding:11px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.process-list strong { display:block; font-size:9px; }
.process-list small { display:block; margin-top:3px; color:var(--muted); font-size:8px; }

.validation-context { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.validation-context > div { padding:11px 13px; border:1px solid var(--line); border-radius:10px; background:var(--champagne-soft); }
.validation-context small,.validation-context strong { display:block; }
.validation-context small { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.5px; }
.validation-context strong { margin-top:4px; color:var(--wine-900); font-size:13px; }
.review-panel,.reconciliation-panel,.closing-governance { margin-top:16px; padding:17px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 8px 24px rgba(43,30,24,.04); }
.review-panel > header,.reconciliation-panel > header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:13px; }
.review-header-actions { display:flex; align-items:center; gap:8px; }
.review-panel h3,.reconciliation-panel h3 { margin:2px 0 4px; font-size:15px; }
.review-panel header p:not(.eyebrow) { margin:0; color:var(--muted); font-size:9px; }
.review-panel footer { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.review-table { width:100%; border-collapse:collapse; font-size:9px; }
.review-table th,.review-table td { padding:9px 8px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.review-table th { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.45px; }
.review-table td small { display:block; margin-top:3px; color:var(--muted); line-height:1.35; }
.inline-correction,.review-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:7px; }
.inline-correction input { min-height:31px; padding:5px 7px; border:1px solid var(--line); border-radius:7px; font:inherit; }
.mini-button.is-selected { border-color:var(--wine-700); color:#fff; background:var(--wine-700); }
.reconciliation-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.reconciliation-grid > div { padding:13px; border-radius:11px; background:var(--champagne-soft); }
.reconciliation-grid h4 { margin:0 0 9px; color:var(--wine-900); font-size:11px; }
.reconciliation-grid dl { display:grid; gap:0; margin:0; }
.reconciliation-grid dl > div { display:flex; justify-content:space-between; gap:16px; padding:7px 0; border-bottom:1px solid rgba(90,58,48,.1); font-size:9px; }
.reconciliation-grid dt { color:var(--muted); }
.reconciliation-grid dd { margin:0; color:var(--ink); font-weight:800; text-align:right; }
.reconciliation-grid .total { margin-top:3px; border-bottom:0; color:var(--wine-900); font-size:10px; }
.reconciliation-grid .positive dd { color:var(--green); }
.reconciliation-grid .negative dd { color:#a11b32; }
.closing-governance { display:grid; grid-template-columns:minmax(180px,.8fr) minmax(360px,1.5fr) auto; align-items:center; gap:18px; margin:0 0 18px; }
.closing-governance h3 { margin:2px 0 4px; font-size:18px; }
.closing-governance p:not(.eyebrow) { margin:0; color:var(--muted); font-size:9px; }
.closing-equation { display:grid; grid-template-columns:1fr auto 1fr auto 1fr; align-items:center; gap:9px; }
.closing-equation span { min-width:0; padding:10px; border-radius:9px; background:var(--champagne-soft); }
.closing-equation small,.closing-equation strong { display:block; }
.closing-equation small { color:var(--muted); font-size:8px; }
.closing-equation strong { margin-top:4px; color:var(--wine-900); font-size:12px; }
.closing-equation b { color:var(--mustard); font-size:17px; }
.closing-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.closing-audit { grid-column:1/-1; margin:0; padding:11px 14px 0 30px; border-top:1px solid var(--line); color:var(--muted); font-size:8px; line-height:1.5; }

.source-role-field { display:grid; gap:6px; margin-bottom:13px; color:var(--wine-800); font-size:11px; font-weight:700; }
.source-role-field select { width:100%; min-height:42px; padding:9px 11px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:#fff; }
.source-role-field small { color:var(--muted); font-size:9px; font-weight:400; }
.weboss-import-note { display:grid; gap:4px; margin-top:12px; padding:12px 14px; border:1px solid rgba(66,108,141,.18); border-radius:10px; color:var(--blue); background:var(--blue-soft); }
.weboss-import-note strong { font-size:10px; }
.weboss-import-note span { font-size:9px; line-height:1.45; }

.preparation-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.preparation-metrics > div { min-width:0; padding:17px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 8px 24px rgba(43,30,24,.04); }
.preparation-metrics span { display:block; color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.55px; }
.preparation-metrics strong { display:block; margin:7px 0 4px; color:var(--wine-900); font:800 22px "Manrope","Lato",sans-serif; }
.preparation-metrics small { display:block; color:var(--muted); font-size:9px; line-height:1.4; }
.dashboard-grid .process-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
.source-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.source-card { min-width:0; padding:15px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.source-card-head { display:flex; align-items:center; gap:10px; margin-bottom:13px; }
.source-card-head > span { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border-radius:10px; color:var(--wine-700); background:var(--champagne-soft); }
.source-card-head svg { width:17px; height:17px; }
.source-card h3 { font-size:13px; }
.source-card-head small { color:var(--muted); font-size:9px; }
.source-card dl { display:grid; gap:9px; margin:0 0 13px; }
.source-card dl > div { display:grid; gap:2px; }
.source-card dt { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.55px; }
.source-card dd { margin:0; color:var(--ink); font-size:10px; line-height:1.4; }

.toast-region { position:fixed; z-index:80; right:22px; bottom:22px; display:grid; gap:8px; }
.toast { width:min(350px,calc(100vw - 44px)); display:flex; gap:10px; align-items:flex-start; padding:13px 14px; border:1px solid var(--line); border-radius:11px; background:#fff; box-shadow:var(--shadow); animation:toast-in .2s ease-out; }
.toast .tone { width:29px; height:29px; display:grid; place-items:center; flex:0 0 auto; border-radius:8px; }
.toast strong { display:block; font-size:10px; }
.toast p { margin:3px 0 0; color:var(--muted); font-size:9px; line-height:1.4; }
@keyframes toast-in { from { transform:translateY(8px); opacity:0; } }

.auth-backdrop { position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:24px; background:linear-gradient(145deg,rgba(74,7,16,.97),rgba(37,16,16,.98)); }
.auth-backdrop[hidden] { display:none; }
.auth-locked .app-shell { filter:blur(8px); pointer-events:none; user-select:none; }
.auth-card { width:min(440px,100%); padding:34px 38px 30px; border:1px solid rgba(215,168,53,.32); border-radius:22px; background:#fff; box-shadow:0 28px 80px rgba(20,4,9,.35); text-align:center; }
.auth-brand { display:flex; justify-content:center; margin:-8px 0 14px; }
.auth-monogram { width:68px; height:86px; background:url('./assets/monograma-paula-favicon.png?v=20260928-16') center/contain no-repeat; }
.auth-card h1 { margin:4px 0 10px; color:var(--wine-900); font-family:Georgia,serif; font-size:29px; line-height:1.1; }
.auth-intro { max-width:340px; margin:0 auto 22px; color:var(--muted); font-size:13px; line-height:1.55; }
.auth-form { display:grid; gap:12px; text-align:left; }
.auth-form[hidden] { display:none !important; }
.auth-form label { display:grid; gap:6px; color:var(--wine-900); font-size:11px; font-weight:700; }
.auth-form input { width:100%; height:44px; padding:0 13px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); font:inherit; font-size:14px; outline:none; }
.auth-form input:focus { border-color:var(--wine-700); box-shadow:0 0 0 3px rgba(103,11,33,.1); }
.auth-primary,.auth-secondary { width:100%; justify-content:center; height:44px; }
#auth-signup[hidden] { display:none !important; }
.auth-message { margin:0; padding:10px 12px; border-radius:9px; background:#f6f0e8; color:var(--wine-900); font-size:11px; line-height:1.45; }
.auth-message[data-tone="risk"] { background:#fff0f1; color:#a11b32; }
.auth-message[data-tone="good"] { background:#edf8f2; color:#246443; }
.auth-note { display:block; margin-top:18px; color:var(--muted); font-size:10px; line-height:1.45; }

.account-modal { width:min(500px,calc(100vw - 32px)); }
.account-modal .modal-head p:not(.eyebrow) { margin:5px 0 0; color:var(--muted); font-size:11px; }
.account-identity { display:flex; align-items:center; gap:11px; margin:18px 0; padding:12px 14px; border:1px solid var(--line); border-radius:11px; background:var(--champagne-soft); }
.account-identity > span { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border-radius:10px; color:var(--wine-700); background:#fff; }
.account-identity svg { width:17px; height:17px; }
.account-identity small,.account-identity strong { display:block; }
.account-identity small { margin-bottom:2px; color:var(--muted); font-size:9px; }
.account-identity strong { color:var(--wine-900); font-size:12px; }
.account-password-form { display:grid; gap:12px; }
.account-password-form label { display:grid; gap:6px; color:var(--wine-900); font-size:11px; font-weight:700; }
.account-password-form input { width:100%; height:44px; padding:0 13px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); font:inherit; font-size:14px; outline:none; }
.account-password-form input:focus { border-color:var(--wine-700); box-shadow:0 0 0 3px rgba(103,11,33,.1); }
.account-password-form .modal-form-actions { justify-content:flex-end; margin-top:2px; }
.account-signout { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:18px; padding-top:16px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }

@media (max-width:560px) {
  .auth-backdrop { padding:14px; }
  .auth-card { padding:26px 20px 24px; border-radius:17px; }
  .auth-card h1 { font-size:25px; }
}

.empty-state { max-width:550px; margin:40px auto; text-align:center; }
.empty-state .drop-icon { margin:0 auto 13px; }
.empty-state p { color:var(--muted); font-size:11px; line-height:1.5; }

.confirm-modal { width:min(520px,calc(100vw - 32px)); align-items:center; padding:32px; text-align:center; }
.confirm-symbol { width:52px; height:52px; display:grid; place-items:center; margin-bottom:16px; border-radius:16px; color:var(--wine-700); background:var(--champagne); }
.confirm-symbol svg { width:23px; height:23px; }
.confirm-modal h2 { margin-bottom:10px; }
.confirm-modal > p:not(.eyebrow) { max-width:420px; margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.confirm-modal > p strong { color:var(--wine-700); }
.switch-safety { display:flex; align-items:center; gap:8px; margin:20px 0; padding:11px 13px; border-radius:10px; color:var(--green); background:var(--green-soft); font-size:11px; font-weight:700; text-align:left; }
.switch-safety svg { width:16px; height:16px; flex:0 0 auto; }
.confirm-actions { width:100%; display:flex; justify-content:center; gap:10px; }

.empty-client-panel { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr); gap:18px; min-height:430px; padding:34px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow); }
.empty-client-copy { align-self:center; max-width:650px; }
.empty-client-copy .empty-seal { width:58px; height:58px; display:grid; place-items:center; margin-bottom:25px; border-radius:17px; color:var(--wine-700); background:var(--champagne); }
.empty-client-copy .empty-seal svg { width:26px; height:26px; }
.empty-client-copy h2 { max-width:590px; margin-bottom:12px; font-size:30px; }
.empty-client-copy > p:not(.eyebrow) { max-width:590px; margin:0 0 22px; color:var(--muted); font-size:14px; line-height:1.65; }
.empty-client-checks { align-self:center; padding:24px; border-left:1px solid var(--line); }
.empty-client-checks h3 { margin-bottom:18px; }
.empty-client-checks > div { display:grid; grid-template-columns:30px 1fr; gap:11px; padding:14px 0; border-bottom:1px solid var(--line); }
.empty-client-checks > div:last-child { border-bottom:0; }
.empty-client-checks > div > span { width:30px; height:30px; display:grid; place-items:center; border-radius:9px; color:var(--green); background:var(--green-soft); }
.empty-client-checks svg { width:15px; height:15px; }
.empty-client-checks p { margin:0; }
.empty-client-checks strong { display:block; font-size:12px; }
.empty-client-checks small { display:block; margin-top:4px; color:var(--muted); font-size:10px; line-height:1.45; }

@media (max-width:1200px) {
  .kpi-grid { grid-template-columns:repeat(3,1fr); }
  .indicator-grid,.model-grid { grid-template-columns:repeat(2,1fr); }
  .indicator-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .preparation-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .app-shell { display:block; }
  .sidebar { transform:translateX(-100%); transition:.2s ease; box-shadow:16px 0 45px rgba(31,8,17,.28); }
  body.menu-open .sidebar { transform:translateX(0); }
  .workspace { min-width:0; }
  .mobile-menu { display:grid !important; }
  .topbar { padding:0 18px; }
  .top-actions .secondary span:last-child { display:none; }
  .content { padding:24px 18px 42px; }
  .dashboard-grid,.dashboard-grid.equal,.import-start,.home-hero,.calculator-layout,.contract-head,.empty-client-panel { grid-template-columns:1fr; }
  .empty-client-checks { border-left:0; border-top:1px solid var(--line); }
  .stage-strip { grid-template-columns:repeat(2,1fr); }
  .stage:nth-child(2) { border-right:0; }
  .stage:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .balance-equation { grid-template-columns:1fr; }
  .equation-sign { transform:rotate(90deg); }
  .alert-board { grid-template-columns:1fr; }
  .indicator-detail-grid,.indicator-method { grid-template-columns:1fr; }
  .meeting-row,.timeline-item { grid-template-columns:48px minmax(0,1fr); }
  .meeting-row > .tag,.timeline-item > .tag { grid-column:2; justify-self:start; }
  .meeting-row > .row-actions,.timeline-item > .row-actions { grid-column:2; }
  .closing-governance { grid-template-columns:1fr; }
  .closing-actions { justify-content:flex-start; }
}
@media (max-width:650px) {
  .context-selectors { gap:10px; }
  .context-selectors label { display:none; }
  .top-separator { display:none; }
  .top-actions { gap:6px; }
  .top-actions .button { padding:9px 10px; }
  .top-actions .primary span:last-child { display:none; }
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .mini-grid,.scenario-grid,.indicator-grid,.model-grid,.overview-cards,.quick-links,.strategy-flow,.kanban,.premise-grid,.form-stack,.result-panel,.preparation-metrics,.source-grid,.dashboard-grid .process-list { grid-template-columns:1fr; }
  .page-head { align-items:flex-start; flex-direction:column; }
  .stage-strip { grid-template-columns:1fr; }
  .stage { border-right:0; border-bottom:1px solid var(--line); }
  .mapping-grid,.validation-grid,.form-grid,.validation-context,.reconciliation-grid { grid-template-columns:1fr; }
  .closing-equation { grid-template-columns:1fr; }
  .closing-equation b { text-align:center; }
  .mapping-row { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .step span:last-child { display:none; }
  .modal-backdrop { padding:8px; }
  .modal { width:100%; max-height:calc(100vh - 16px); }
  .confirm-actions { flex-direction:column-reverse; }
  .confirm-actions .button { width:100%; }
  .empty-client-panel { padding:22px; }
  .indicator-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reference-actions { flex-direction:column; }
  .project-overview,.record-grid { grid-template-columns:1fr; }
}

@media print {
  body { background:#fff; }
  .sidebar,.topbar,.stage-strip,.card-action,.button,.toast-region { display:none !important; }
  .app-shell,.workspace { display:block; }
  .content { max-width:none; padding:10mm; }
  .card,.kpi-card { break-inside:avoid; box-shadow:none; }
  .kpi-grid { grid-template-columns:repeat(3,1fr); }
  .dashboard-grid { grid-template-columns:1.4fr .8fr; }
}
