:root {
  --navy: #0b2450;
  --blue: #245bc4;
  --cyan: #25b9dc;
  --ink: #172b43;
  --muted: #61748a;
  --line: #dce7f0;
  --soft: #f4f8fb;
  --white: #fff;
  --success: #14805e;
  --danger: #b43b4b;
  --shadow: 0 18px 48px rgba(14, 42, 74, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.1; letter-spacing: -.025em; }
h1 { font-size: clamp(2.15rem, 5vw, 4.6rem); }
h2 { font-size: clamp(1.75rem, 3vw, 3rem); }
h3 { font-size: 1.12rem; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .75rem 1.2rem; border: 1px solid transparent; border-radius: 10px; color: #fff; background: linear-gradient(115deg, var(--blue), #188fd4); font-weight: 750; box-shadow: 0 9px 24px rgba(36,91,196,.20); transition: transform .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(36,91,196,.25); }
.button.small { min-height: 38px; padding: .55rem .9rem; font-size: .88rem; }
.button.secondary { color: var(--blue); background: #eaf2fb; box-shadow: none; }
.button.ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); box-shadow: none; }
.button.ghost-dark { color: var(--navy); background: transparent; border-color: #b9c8d7; box-shadow: none; }
.eyebrow { display: block; margin-bottom: .8rem; color: #2286be; font-size: .75rem; font-weight: 850; letter-spacing: .14em; }

.public-body { overflow-x: hidden; color: #253c54; background: #fff; }
.public-header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; width: min(1180px, calc(100% - 40px)); height: 92px; margin: auto; }
.public-brand img { width: 164px; height: 68px; object-fit: contain; object-position: left center; }
.public-header nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); font-size: .93rem; font-weight: 650; }
.public-header nav > a:not(.button):hover { color: var(--blue); }
.hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); min-height: 660px; padding: 72px max(20px, calc((100vw - 1180px)/2)); background: linear-gradient(128deg, #f9fcfe 0%, #eef7fb 55%, #e6f5fa 100%); }
.hero:before { content: ""; position: absolute; right: -9%; top: 5%; width: 46vw; height: 46vw; border-radius: 50%; background: radial-gradient(circle, rgba(43,188,222,.18), transparent 68%); }
.hero-copy { position: relative; z-index: 1; max-width: 650px; }
.hero h1 { margin-bottom: 1.3rem; font-size: clamp(2.55rem, 5.3vw, 5rem); }
.hero-copy > p { max-width: 620px; color: #4c6378; font-size: clamp(1rem, 1.7vw, 1.2rem); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0; }
.hero .ghost { color: var(--navy); border-color: #a9c3d8; background: rgba(255,255,255,.55); }
.trust-row { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; color: #526c82; font-size: .86rem; }
.hero-panel { position: relative; z-index: 1; display: grid; place-items: center; }
.blueprint { position: relative; display: flex; flex-direction: column; justify-content: end; width: min(440px, 92vw); aspect-ratio: .9; padding: 2.2rem; overflow: hidden; border: 1px solid rgba(44,124,182,.18); border-radius: 36px; background: linear-gradient(145deg, #0e315e, #194e88 60%, #247fb0); color: #fff; box-shadow: 0 30px 70px rgba(10,47,85,.22); }
.blueprint:before, .blueprint:after { content:""; position:absolute; border:1px solid rgba(126,221,239,.22); transform:rotate(26deg); }
.blueprint:before { inset: -25% 18% 20% -20%; }
.blueprint:after { inset: 12% -18% -35% 28%; }
.blueprint > * { position: relative; z-index: 1; }
.blueprint > span { position: absolute; top: 9%; right: 10%; color: rgba(255,255,255,.10); font-size: 9rem; font-weight: 900; line-height: 1; }
.blueprint strong { max-width: 300px; margin-bottom: .35rem; font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.1; }
.blueprint small { color: #bdebf3; }
.section, .service-grid, .process, .lead-section { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.intro { max-width: 790px; margin-top: 110px; margin-bottom: 54px; text-align: center; }
.intro p { color: var(--muted); font-size: 1.07rem; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 120px; }
.service-grid article { min-width: 0; padding: 1.7rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 28px rgba(25,62,93,.05); }
.service-grid p { margin: 0; color: var(--muted); font-size: .94rem; }
.service-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 1rem; border-radius: 10px; color: #268fc2; background: #eaf7fb; font-size: .76rem; }
.process { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 8vw, 7rem); padding: 82px 68px; border-radius: 28px; background: #f2f7fa; }
.process ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.process li { position: relative; display: grid; grid-template-columns: 1fr 1.7fr; gap: 1rem; min-width: 0; padding: 1.25rem 0 1.25rem 2.7rem; border-bottom: 1px solid #d3e1ea; counter-increment: steps; }
.process li:before { content: "0" counter(steps); position: absolute; left: 0; top: 1.15rem; color: #299ac9; font-weight: 800; }
.process li span { color: var(--muted); font-size: .92rem; }
.lead-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 8vw, 7rem); margin-top: 120px; margin-bottom: 120px; padding: 70px; border-radius: 30px; color: #dce9f4; background: linear-gradient(130deg, #0b2345, #123e70); }
.lead-section h2 { color: #fff; }
.lead-section p { color: #c5d4e2; }
.contact-list { display: grid; gap: .6rem; margin-top: 2rem; font-weight: 700; overflow-wrap: anywhere; }
.lead-form { display: grid; gap: .85rem; padding: 1.7rem; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.lead-form small { color: var(--muted); font-size: .74rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.public-footer { display: flex; align-items: center; gap: 2rem; padding: 38px max(20px, calc((100vw - 1180px)/2)); border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.public-footer img { width: 130px; height: 50px; object-fit: contain; object-position: left; }
.public-footer p { flex: 1; margin: 0; }

label { display: grid; gap: .38rem; color: #41576c; font-size: .84rem; font-weight: 720; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #cbd9e4; border-radius: 9px; padding: .7rem .78rem; color: var(--ink); background: #fff; outline: none; }
input, select { min-height: 43px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #4f97cc; box-shadow: 0 0 0 3px rgba(44,142,202,.12); }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: linear-gradient(135deg,#edf5fa,#fff); }
.login-card { width: min(440px, 100%); padding: 2.2rem; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.login-card > img { width: 175px; height: 85px; margin-bottom: 1.2rem; object-fit: contain; object-position: left; }
.login-card h1 { margin-bottom: .5rem; font-size: 2rem; }
.login-card > p { color: var(--muted); }
.login-card form { display: grid; gap: 1rem; margin: 1.5rem 0; }
.login-card > a { color: var(--blue); font-size: .88rem; font-weight: 700; }
.error, .success-box, .info-box { padding: .85rem 1rem; border-radius: 9px; }
.error { color: #8d2635; background: #fff0f2; }
.success-box { margin-top: 1rem; color: #0e694c; background: #e9f8f2; font-weight: 750; }

.app-body { min-height: 100vh; background: #f3f7fa; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 250px; padding: 1.25rem; color: #d9e5ef; background: #0d294a; }
.brand { display: flex; align-items: center; gap: .7rem; padding-bottom: 1.25rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand img { width: 54px; height: 48px; padding: 4px; border-radius: 8px; background: #fff; object-fit: contain; }
.brand span { display: grid; color: #fff; font-weight: 800; }
.brand small { color: #a9bed0; font-size: .66rem; font-weight: 500; }
.sidebar nav { display: grid; gap: .25rem; margin-top: 1.5rem; }
.sidebar nav a { padding: .72rem .8rem; border-radius: 8px; color: #c5d5e2; font-size: .9rem; font-weight: 650; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-user { display: grid; margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user small { color: #a9bed0; }
.link-button { padding: .35rem 0; border: 0; color: #91cce4; background: none; font-weight: 700; }
.app-shell { min-height: 100vh; margin-left: 250px; padding: 42px clamp(22px, 4vw, 58px); }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.5rem; }
.app-header h1 { margin-bottom: .3rem; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.app-header p { margin: 0; color: var(--muted); }
.panel { min-width: 0; padding: 1.35rem; border: 1px solid #dce7ef; border-radius: 14px; background: #fff; box-shadow: 0 6px 20px rgba(20,54,85,.04); }
.panel h2 { font-size: 1.2rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 1.2rem; }
.metric-grid article { min-width: 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.metric-grid span { display: block; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.metric-grid strong { display: block; margin-top: .3rem; color: var(--navy); font-size: clamp(1.35rem, 3vw, 2.1rem); line-height: 1.1; }
.metric-grid.compact { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
.dashboard-grid, .detail-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); gap: 1rem; }
.stack { display: grid; gap: .9rem; }
.list-row, .campaign { display: grid; gap: .2rem; padding: .85rem 0; border-bottom: 1px solid #edf1f4; }
.list-row small, .campaign small { color: var(--muted); }
.campaign footer { display: flex; gap: 1rem; color: var(--muted); font-size: .78rem; }
.status, .temp { display: inline-flex; width: max-content; max-width: 100%; padding: .22rem .5rem; border-radius: 999px; color: #1f6281; background: #e8f4f8; font-size: .7rem; font-weight: 800; }
.temp.quente { color: #a03a28; background: #fff0eb; }
.temp.morno { color: #8a6817; background: #fff8dc; }
.temp.frio { color: #326d93; background: #eaf5fb; }
.task-list, .timeline { margin: 0; padding-left: 1.2rem; }
.task-list li, .timeline li { margin-bottom: .7rem; }
.toolbar { display: flex; gap: .7rem; margin-bottom: 1rem; }
.kanban { display: grid; grid-template-columns: repeat(7, minmax(230px, 1fr)); gap: 12px; padding-bottom: .8rem; overflow-x: auto; }
.kanban-column { min-width: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #eaf0f4; }
.kanban-column > header { display: flex; justify-content: space-between; padding: .2rem .2rem .7rem; color: #3a5067; font-size: .78rem; font-weight: 800; }
.lead-card { display: grid; gap: .45rem; min-width: 0; margin-bottom: .65rem; padding: .85rem; border-radius: 9px; background: #fff; box-shadow: 0 4px 12px rgba(20,49,75,.05); }
.lead-card strong, .lead-card small { overflow-wrap: anywhere; }
.lead-card small { color: var(--muted); }
.lead-card footer { display: flex; justify-content: space-between; gap: .5rem; margin-top: .4rem; color: var(--muted); font-size: .7rem; }
.empty { margin: .7rem 0; color: #8191a0; font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .wide, .form-grid fieldset.wide { grid-column: 1 / -1; }
.form-grid fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.form-grid legend { padding: 0 .3rem; color: var(--navy); font-weight: 800; }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.item-row { display: grid; grid-template-columns: minmax(220px,3fr) 80px 100px 130px 38px; gap: .55rem; margin-bottom: .6rem; }
.remove-item { border: 0; border-radius: 8px; color: #a93849; background: #fff0f2; font-size: 1.2rem; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem .65rem; border-bottom: 1px solid #e9eff3; text-align: left; vertical-align: top; font-size: .83rem; }
th { color: #52677a; background: #f6f9fb; font-size: .72rem; letter-spacing: .03em; }
td small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.letterhead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid #35a8d4; }
.letterhead img { width: 130px; height: 70px; object-fit: contain; object-position: left; }
.proposal-total { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; padding: 1rem; border-radius: 10px; background: #edf6fa; }
.proposal-total strong { color: var(--navy); font-size: 1.35rem; }
.toast { position: fixed; top: 20px; right: 22px; z-index: 30; max-width: min(400px, calc(100vw - 44px)); padding: .8rem 1rem; border-radius: 9px; color: #fff; background: #14795c; box-shadow: var(--shadow); }
.info-box { color: #31566b; background: #edf6fa; }

.proposal-public-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(920px, calc(100% - 36px)); margin: 25px auto; }
.proposal-public-head img { width: 175px; height: 80px; object-fit: contain; object-position: left; }
.proposal-public-head span { color: var(--muted); font-weight: 700; }
.proposal-public { width: min(920px, calc(100% - 36px)); margin: 50px auto 100px; }
.proposal-public h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.proposal-public form { display: grid; gap: 1rem; margin-top: 1.2rem; }

@media (max-width: 980px) {
  .public-header nav a:not(.button) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 65px; padding-bottom: 80px; }
  .hero-copy { max-width: 760px; }
  .blueprint { aspect-ratio: 1.3; width: 100%; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .process, .lead-section { grid-template-columns: 1fr; padding: 50px 38px; }
  .sidebar { position: relative; inset: auto; width: 100%; }
  .sidebar nav { grid-template-columns: repeat(3,1fr); }
  .sidebar-user { display: none; }
  .app-shell { margin-left: 0; padding-top: 28px; }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .item-row { grid-template-columns: minmax(180px,1fr) 80px 95px; }
  .item-row input:nth-of-type(4) { grid-column: 1 / 3; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .public-header { height: 76px; width: calc(100% - 28px); }
  .public-brand img { width: 125px; height: 55px; }
  .public-header .button { padding: .5rem .65rem; font-size: .75rem; }
  .hero { padding-inline: 20px; }
  .hero h1 { font-size: clamp(2.25rem, 12vw, 3.5rem); }
  .blueprint { aspect-ratio: 1; padding: 1.5rem; border-radius: 22px; }
  .blueprint > span { font-size: 6rem; }
  .section, .service-grid, .process, .lead-section { width: calc(100% - 28px); }
  .intro { margin-top: 75px; }
  .service-grid { grid-template-columns: 1fr; margin-bottom: 80px; }
  .process, .lead-section { padding: 35px 22px; border-radius: 20px; }
  .process li { grid-template-columns: 1fr; }
  .lead-section { margin-top: 75px; margin-bottom: 75px; }
  .two, .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide, .form-grid fieldset.wide { grid-column: auto; }
  .public-footer { align-items: flex-start; flex-direction: column; gap: .8rem; }
  .sidebar { padding: 1rem; }
  .sidebar nav { display: flex; padding-bottom: .4rem; overflow-x: auto; }
  .sidebar nav a { flex: 0 0 auto; }
  .app-shell { padding: 22px 14px; }
  .app-header { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .toolbar { flex-direction: column; }
  .panel { padding: 1rem; }
  .item-row { grid-template-columns: 1fr 70px; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
  .item-row input:nth-of-type(1) { grid-column: 1 / -1; }
  .item-row input:nth-of-type(3), .item-row input:nth-of-type(4) { grid-column: auto; }
  .proposal-public-head { align-items: flex-start; flex-direction: column; }
  .proposal-total { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
