:root {
  --paper: #f3f6fb;
  --surface: #fff;
  --ink: #14263f;
  --muted: #52637a;
  --line: #dce5f0;
  --navy: #05274f;
  --accent: #075da8;
  font: 14px Geist, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
body { display: flex; flex-direction: column; min-height: 100vh; }
.site-footer { margin-top: auto; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 11px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--navy);
  color: #fffdf8;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--accent); text-decoration: none; }
.secondary, .danger { background: transparent; border-color: #cdd9e8; color: var(--ink); }
.secondary:hover, .danger:hover { background: #eff5fc; }
.danger { color: #8d3c36; border-color: #e1c7bf; }
:focus-visible { outline: 2px solid #087abd; outline-offset: 3px; }
.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 max(20px, calc((100% - 1160px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  min-height: 58px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand:hover { text-decoration: none; }
.brand-image { position: relative; display: block; overflow: hidden; width: 72px; aspect-ratio: 2.06; }
.brand-image img { position: absolute; top: 50%; left: 0; width: 100%; height: auto; transform: translateY(-50.5%); }
.brand-label { padding-left: 9px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.masthead nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.masthead nav a { color: var(--muted); padding: 8px 10px; border-radius: 7px; white-space: nowrap; font-size: 13px; font-weight: 550; }
.masthead nav a:hover, .masthead nav a.active { color: var(--accent); background: #edf5ff; text-decoration: none; }
.exit { background: transparent; color: var(--muted); padding-inline: 8px; font-size: 13px; }
.exit:hover { color: var(--accent); background: #edf5ff; }
.profile { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; }
.portal-content { max-width: 960px; }
.invoice-remove { margin-top: 6px; color: var(--muted); }
.invoice-remove summary, .portal-pix summary { width: fit-content; cursor: pointer; }
.invoice-remove button, .portal-pix label { margin-top: 5px; }
.portal-pix input { min-width: 160px; }
.content { max-width: 1200px; margin: auto; padding: 23px clamp(14px, 3vw, 24px) 42px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.heading-date { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
h1 { font-size: clamp(22px, 3vw, 29px); font-weight: 700; line-height: 1.2; letter-spacing: -.04em; }
h2 { font-size: 15px; font-weight: 650; line-height: 1.3; letter-spacing: -.015em; }
p { line-height: 1.5; color: var(--muted); }
.heading p { margin-top: 4px; font-size: 13px; }
.client-heading-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.active-contract-total { display: grid; gap: 2px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.active-contract-total span { font-size: 10px; color: var(--muted); }
.active-contract-total strong { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-head, .panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.summary-head { margin-bottom: 8px; }
.panel-head a, .panel-head span { font-size: 12px; font-weight: 650; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.metric-details { display: contents; }
.metric { display: grid; align-content: start; gap: 5px; min-width: 0; min-height: 92px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 12px; }
.metric span, .metric small { color: var(--muted); font-size: 11px; }
.metric span { font-weight: 650; }
.metric strong { font-size: clamp(17px, 2vw, 23px); font-weight: 700; line-height: 1.1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric.featured { background: var(--navy); color: white; border-color: transparent; box-shadow: inset 0 2px #24bed6; }
.metric.featured span, .metric.featured small { color: #c7dafa; }
.metric.featured strong { color: #fff; }
.metric-details .metric:last-child small { color: #735126; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(245px, 1fr); gap: 12px; align-items: start; }
.contract-counts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.contract-count { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.contract-count strong { font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.contract-count.active { color: #256347; background: #f0f9f3; border-color: #d3e9da; }
.contract-count.inactive { color: #795819; background: #fffaf0; border-color: #efe2c4; }
.contract-count.closed { color: #52637a; background: #f3f6fb; }
@media (max-width: 450px) { .contract-count { flex-direction: column; align-items: start; } }
.panel { min-width: 0; margin-bottom: 12px; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; scroll-margin-top: 20px; }
.panel > p, .panel > .actions, .panel > label, .panel > .period { margin-top: 14px; }
.empty { border-top: 1px solid var(--line); padding: 18px 0 5px; font-size: 14px; }
.table-wrap { overflow-x: auto; margin-top: 15px; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { color: var(--muted); font-size: 12px; background: #f2f6fc; }
td, th { padding: 9px 10px; border-bottom: 1px solid var(--line); }
td { font-size: 13px; }
td small, .list-item small { color: var(--muted); margin-top: 3px; display: block; }
td:nth-child(2) { overflow-wrap: anywhere; }
.badge { display: inline-block; border-radius: 99px; background: #ebede5; color: #495448; padding: 5px 9px; font-size: 11px !important; font-weight: 700; white-space: nowrap; }
.badge.mint { color: #295b45; background: #e4eee2; }
.badge.amber { color: #755614; background: #f5ead0; }
.badge.red { color: #843a34; background: #f4e1d9; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 13px 0; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-top: 12px; }
label { font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
label[hidden] { display: none; }
.contact-emails { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.contact-email-row { display: grid; grid-template-columns: minmax(0,1fr) auto 78px; align-items: end; gap: 9px; }
.contact-email-row .check { min-height: 36px; }
.extra-emails { display: grid; gap: 7px; margin-top: 7px; }
.add-email { margin-top: 8px; }
.recipient-list { padding: 0; margin: 0; list-style: none; }
.recipient-list li + li { margin-top: 3px; }
.charge-value { white-space: nowrap; }
.charge-row-actions { display: flex; flex-wrap: wrap; gap: 4px; min-width: 190px; max-width: 320px; }
.row-action { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--accent); font-size: 11px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.row-action:hover { background: #edf5ff; color: var(--accent); text-decoration: none; }
#cancel-charge summary { cursor: pointer; color: #8d3c36; font-weight: 600; }
.charge-row-actions { flex-wrap: nowrap; min-width: 0; max-width: none; gap: 3px; }
.charge-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 31px; color: #52718e; border-radius: 5px; flex: 0 0 auto; }
.charge-icon svg { width: 19px; height: 19px; }
.charge-icon:hover { background: #edf5ff; color: var(--accent); }
.charge-icon.danger { border: 0; color: #a4534c; }
.charge-icon.bank-paid { color: #168145; background: #e9f8ee; }
.charge-icon.bank-pending { color: #8795a5; }
#charge-dialog { width: min(850px,calc(100% - 24px)); max-height: 88vh; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px #051d4a40; }
#charge-dialog::backdrop { background: #05172d80; }
.dialog-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 9px 15px; background: white; border-bottom: 1px solid var(--line); z-index: 1; font-size: 12px; font-weight: 600; color: var(--muted); }
.dialog-close { min-height: 28px; padding: 2px 9px; font-size: 22px; }
.dialog-body { padding: 15px; }
.dialog-body > .panel { margin: 0; }
.dialog-body > .alert { margin-bottom: 10px; }
.mail-compose .mail-attachment { padding: 9px 11px; border: 1px dashed var(--line); border-radius: 6px; font-size: 12px; }
button:disabled { opacity: .55; cursor: not-allowed; }
.invoice-period { margin-bottom: 12px; }
.login-check { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #f3f7fc; font-size: 12px; }
.backup-codes { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 7px; padding-left: 18px; }
.client-service-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 140px; max-width: 260px; padding: 0; margin: 0; list-style: none; }
.client-service-list li { padding: 4px 7px; border-radius: 5px; background: #edf5ff; color: var(--accent); font-size: 11px; font-weight: 600; }
.unassigned-services { color: var(--muted); font-size: 12px; }
@media (max-width: 550px) {
  .contact-email-row { grid-template-columns: minmax(0,1fr) auto; }
  .contact-email-row label:first-child { grid-column: 1 / -1; }
}
input:not([type=checkbox]), textarea, select { width: 100%; border: 1px solid #cdd9e8; border-radius: 5px; padding: 7px 9px; background: #fff; color: var(--ink); min-height: 36px; }
textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.period, .actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.check { flex-direction: row; align-items: center; font-weight: 500; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.service-list { border: 1px solid var(--line); border-radius: 5px; display: flex; flex-wrap: wrap; gap: 13px; padding: 12px; }
legend { font-size: 13px; font-weight: 700; }
.service-types { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 8px; }
.service-types .check { padding: 7px; border-radius: 5px; background: #f3f7fc; }
.break { overflow-wrap: anywhere; }
.alert { background: #e4eee2; color: #315441; border: 1px solid #c7daca; border-radius: 6px; padding: 11px 13px; margin-bottom: 14px; }
.alert.error { color: #843a34; background: #f4e1d9; border-color: #e7c9bf; }
.positive { color: #33634c; font-weight: 700; }
.negative { color: #8f4b38; font-weight: 700; }
.trend { display: grid; gap: 12px; margin-top: 18px; }
.trend-row { display: grid; grid-template-columns: 65px repeat(2,minmax(0,1fr)); gap: 12px; align-items: center; font-size: 12px; }
.trend-value { display: grid; grid-template-columns: minmax(5px,1fr) auto; align-items: center; gap: 8px; color: var(--muted); }
.trend meter { width: 100%; height: 12px; }
.trend meter::-webkit-meter-bar { border: 0; background: #eaf1f8; border-radius: 3px; }
.trend meter.in::-webkit-meter-optimum-value { background: #138aad; }
.trend meter.out::-webkit-meter-optimum-value { background: #b66b63; }
.trend meter.in::-moz-meter-bar { background: #138aad; }
.trend meter.out::-moz-meter-bar { background: #b66b63; }
.document { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; border-block: 1px solid var(--line); padding: 20px 0; margin: 18px 0; }
.public { width: min(720px, calc(100% - 28px)); margin: 38px auto 28px; }
.public h1 { font-size: 23px; }
.public-brand { display: flex; justify-content: center; margin-bottom: 14px; }
.public-brand .brand-image { width: 110px; }
.landing-wrap { width: min(1090px, calc(100% - 40px)); margin-inline: auto; }
.landing-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.landing-header .landing-wrap { display: grid; grid-template-columns: 1fr auto auto; gap: 22px; align-items: center; min-height: 64px; }
.landing-header .brand-image { width: 92px; }
.landing-header nav { display: flex; align-items: center; gap: 20px; font-size: 13px; font-weight: 600; }
.landing-header nav a { color: var(--muted); }
.landing-hero {
  isolation: isolate;
  color: #fff;
  background: radial-gradient(ellipse at 85% 70%, #095076 0%, transparent 58%), linear-gradient(120deg,#041d40,#072f53);
  overflow: hidden;
  position: relative;
}
.landing-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(#8dd8ff20 1px,transparent 1px),linear-gradient(90deg,#8dd8ff20 1px,transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse at 83% 75%, #000 0%, transparent 68%);
}
.hero-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(270px,340px); align-items: center; gap: clamp(28px,6vw,75px); padding-block: clamp(35px,6vw,72px); }
.hero-copy h1 { font-size: clamp(31px,4vw,53px); line-height: 1.04; letter-spacing: -.06em; margin-block: 12px 15px; }
.hero-copy h1 span { color: #78ddf2; }
.hero-copy > p { color: #d6e4f4; max-width: 49ch; }
.hero-copy .hero-label { color: #c2f396; font-size: 12px; font-weight: 700; letter-spacing: .065em; text-transform: uppercase; }
.proposal { margin-top: 20px; gap: 8px; background: #bef285; color: #132c20; }
.proposal:hover { background: #d1ffa6; }
.login { margin: 0; padding: 21px; color: var(--ink); border-color: #ffffff40; box-shadow: 0 14px 38px #020e2b44; scroll-margin-top: 16px; }
.login h2 { font-size: 22px; }
.login > p { margin: 5px 0 0; font-size: 13px; }
.login .alert { margin: 11px 0 0; }
.login .form-grid { grid-template-columns: 1fr; }
.login input, .login button { min-height: 40px; }
.login-help { display: inline-block; margin-top: 11px; font-size: 12px; }
.landing-services { padding-block: 23px 30px; scroll-margin-top: 12px; }
.landing-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.landing-section-head h2 { font-size: 19px; }
.landing-section-head a { font-size: 12px; font-weight: 650; }
.service-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.service-grid article { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 13px; }
.service-grid h3 { font-size: 14px; margin: 0 0 5px; }
.service-grid p { font-size: 13px; }
.service-icon { display: grid; place-items: center; position: relative; width: 31px; height: 31px; margin-bottom: 9px; color: #08618a; background: #e6f6fb; border-radius: 7px; }
.service-icon::before, .service-icon::after { content: ""; display: block; }
.service-icon.suporte::before { width: 15px; height: 11px; border: 1.5px solid currentColor; border-radius: 2px; transform: translateY(-1px); }
.service-icon.suporte::after { position: absolute; bottom: 7px; width: 8px; border-bottom: 1.5px solid currentColor; }
.service-icon.chamados::before { width: 12px; height: 15px; border: 1.5px solid currentColor; border-radius: 2px; }
.service-icon.chamados::after { position: absolute; width: 6px; height: 4px; border-block: 1px solid currentColor; }
.service-icon.rede::before { width: 13px; height: 13px; border: 1.5px solid transparent; border-top-color: currentColor; border-left-color: currentColor; border-radius: 50%; transform: translateY(2px) rotate(45deg); }
.service-icon.rede::after { position: absolute; width: 3px; height: 3px; bottom: 9px; background: currentColor; border-radius: 50%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1050px) {
  .masthead { gap: 3px 12px; padding: 7px 14px; grid-template-columns: 1fr auto; }
  .masthead nav { grid-area: 2 / 1 / 3 / -1; flex-wrap: wrap; }
  .dashboard { grid-template-columns: 1fr; }
}
@media (max-width: 550px) {
  .heading { align-items: start; flex-wrap: wrap; margin-bottom: 13px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trend-value { display: flex; flex-direction: column; align-items: end; gap: 3px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 20ch; }
  .service-grid { grid-template-columns: 1fr; }
  .landing-header .landing-wrap { gap: 9px; }
  .landing-header nav { gap: 8px; }
}
@media (max-width: 450px) {
  .landing-header nav a:first-child { display: none; }
  .landing-header .brand-image { width: 72px; }
  .landing-header .button { padding-inline: 8px; font-size: 12px; }
}
@media print {
  .site-footer { display: none; }
  :root { background: white; }
  .masthead, .heading, .actions, .contract-list, .print, .public-brand, .content > .panel:not(:has(.document)), .content > .alert, .panel:has(.document) > label { display: none; }
  .public, .content { margin: 0; padding: 0; width: 100%; }
  .panel, .document { border: 0; padding: 0; }
}
