:root {
  --navy: #102a43;
  --navy-2: #0b1f33;
  --blue: #1f6f8b;
  --blue-soft: #e8f2f6;
  --teal: #2a7f78;
  --orange: #d99032;
  --orange-soft: #fff3df;
  --green: #2f855a;
  --green-soft: #e8f6ee;
  --purple: #6b5ca5;
  --red: #c94a4a;
  --red-soft: #fff0f0;
  --ink: #243b53;
  --muted: #6b7c8f;
  --line: #dde5ec;
  --surface: #ffffff;
  --background: #f4f7fa;
  --radius: 16px;
  --shadow: 0 12px 35px rgba(16,42,67,.08);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100%; color: var(--ink); background: var(--background); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: linear-gradient(180deg,var(--navy-2),var(--navy)); color: #fff; padding: 22px 16px; z-index: 40; display: flex; flex-direction: column; overflow-x:hidden; transition:width .22s ease,transform .22s ease; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; letter-spacing: -.5px; color: var(--navy); background: linear-gradient(145deg,#fff,#bcdde8); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; margin-bottom: 18px; }
.brand strong { display: block; font-size: 16px; }
.brand span { display: block; color: #a9bfd0; font-size: 11px; margin-top: 2px; }
.nav-list { display: flex; flex-direction: column; gap: 5px; padding-top: 22px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: #c8d6e2; font-weight: 600; transition: .18s ease; }
.nav-item > span { width: 22px; text-align: center; color: #93b4c7; font-weight: 800; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(74,169,190,.21); box-shadow: inset 3px 0 #67c1d2; }
.nav-item.active > span { color: #8ed7e3; }
.nav-section { padding: 18px 12px 7px; color: #7692a6; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; }
.sidebar-footer { margin-top: auto; display: grid; gap: 10px; }
.plan-card { border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); border-radius: 12px; padding: 13px; }
.plan-card strong, .plan-card small { display:block; }
.plan-card strong { margin: 5px 0; font-size: 12px; }
.plan-card small { color:#a9bfd0; line-height: 1.45; }
.eyebrow { display: block; text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 800; color: var(--blue); }
.sidebar .eyebrow { color: #7fc6d4; }
.logout { border-top: 1px solid rgba(255,255,255,.08); border-radius: 0; }
.sidebar-logout-form { margin:0; }.sidebar-logout-form .logout { width:100%; border-right:0; border-bottom:0; border-left:0; background:transparent; text-align:left; }
.main-content { margin-left: 248px; min-height:100vh; transition:margin-left .22s ease; }
.topbar { height: 72px; padding: 0 30px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display:flex; align-items:center; justify-content:space-between; position: sticky; top:0; z-index:25; backdrop-filter: blur(12px); }
.topbar-company strong { display:block; margin-top: 3px; }
.topbar-user { display:flex; align-items:center; gap:10px; }
.topbar-user strong,.topbar-user span { display:block; }
.topbar-user span { color:var(--muted); font-size:11px; margin-top:2px; }
.avatar { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:var(--blue-soft); color:var(--blue); font-weight:800; }
.avatar.small { width:34px; height:34px; }
.mobile-menu { display:none; }
.menu-toggle { flex:0 0 40px; width:40px; height:40px; display:grid; place-items:center; border-radius:10px; color:var(--blue); }
.menu-toggle:hover,.menu-toggle:focus-visible { background:var(--blue-soft); outline:2px solid transparent; }
.menu-toggle svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.sidebar-collapsed .sidebar { width:96px; padding:22px 16px; scrollbar-width:none; -ms-overflow-style:none; }
.sidebar-collapsed .sidebar::-webkit-scrollbar { display:none; }
.sidebar-collapsed .main-content { margin-left:96px; }
.sidebar-collapsed .brand { justify-content:center; padding:0 0 22px; }
.sidebar-collapsed .brand > div:last-child,.sidebar-collapsed .plan-card,.sidebar-collapsed .nav-chevron { display:none; }
.sidebar-collapsed .nav-section { display:none; }
.sidebar-collapsed .nav-list { align-items:center; gap:8px; padding-top:20px; }
.sidebar-collapsed .nav-group { width:64px; }
.sidebar-collapsed .nav-item { width:64px; min-height:48px; padding:0; justify-content:center; gap:0; font-size:0; white-space:nowrap; overflow:hidden; }
.sidebar-collapsed .nav-item > span { width:24px; height:24px; display:grid; place-items:center; }
.sidebar-collapsed .nav-item > span svg { width:23px; height:23px; }
.sidebar-collapsed .nav-submenu { display:none; }
.sidebar-collapsed .sidebar-footer { align-items:center; }
.sidebar-collapsed .sidebar-logout-form,.sidebar-collapsed .sidebar-logout-form .logout { width:64px; }
.icon-button { border:0; background:transparent; font-size:22px; }
.page-container { padding: 28px 30px 44px; max-width: 1600px; margin:0 auto; }
.page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:24px; }
.page-heading.compact { align-items:flex-start; }
.page-heading h1 { margin:5px 0 4px; color:var(--navy); font-size:28px; letter-spacing:-.035em; }
.page-heading p { margin:0; color:var(--muted); }
.back-link { display:inline-block; color:var(--blue); font-weight:700; font-size:12px; margin-bottom:12px; }
.btn { display:inline-flex; align-items:center; justify-content:center; border-radius:10px; border:1px solid transparent; min-height:40px; padding:0 16px; font-weight:750; transition:.17s ease; white-space:nowrap; }
.btn:hover { transform:translateY(-1px); }
.btn-primary { color:#fff; background:var(--blue); box-shadow:0 7px 18px rgba(31,111,139,.22); }
.btn-primary:hover { background:#185d76; }
.btn-secondary { color:var(--ink); background:#fff; border-color:var(--line); }
.btn-secondary:hover { border-color:#b7c7d3; }
.btn-block { width:100%; }
.filter-inline,.filter-bar { display:flex; align-items:flex-end; gap:10px; }
.filter-inline label,.filter-bar label { display:grid; gap:5px; }
.filter-inline label span,.filter-bar label span { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.filter-inline input,.filter-bar input,.filter-bar select { height:40px; border:1px solid var(--line); background:#fff; border-radius:9px; padding:0 11px; color:var(--ink); }
.filter-bar { padding:14px; background:#fff; border:1px solid var(--line); border-radius:12px; margin-bottom:15px; }
.kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; }
.kpi-card { position:relative; padding:19px; min-height:145px; border-radius:var(--radius); background:#fff; border:1px solid var(--line); box-shadow:0 8px 24px rgba(16,42,67,.045); overflow:hidden; }
.kpi-card::before { content:""; position:absolute; inset:0 0 auto 0; height:3px; background:var(--accent); }
.kpi-card > span,.kpi-card > strong,.kpi-card > small { display:block; }
.kpi-card > span { color:var(--muted); font-weight:650; margin-top:13px; }
.kpi-card > strong { color:var(--navy); font-size:24px; letter-spacing:-.035em; margin:7px 0 4px; }
.kpi-card > small { color:#93a1af; }
.kpi-icon { position:absolute; top:16px; right:16px; width:34px; height:34px; display:grid; place-items:center; border-radius:10px; color:var(--accent); background:var(--soft); font-weight:900; }
.accent-blue { --accent:var(--blue); --soft:var(--blue-soft); }.accent-orange { --accent:var(--orange); --soft:var(--orange-soft); }.accent-green { --accent:var(--green); --soft:var(--green-soft); }.accent-purple { --accent:var(--purple); --soft:#f0edfa; }
.mini-kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); margin:15px 0; border:1px solid var(--line); background:#fff; border-radius:13px; overflow:hidden; }
.mini-kpi-grid > div { padding:14px 18px; border-right:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mini-kpi-grid > div:last-child { border:0; }.mini-kpi-grid span { color:var(--muted); }.mini-kpi-grid strong { color:var(--navy); font-size:17px; }
.dashboard-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; margin-bottom:15px; }
.panel { background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 8px 25px rgba(16,42,67,.035); }
.panel-header { padding:18px 20px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); }
.panel-header h2 { margin:4px 0 0; color:var(--navy); font-size:17px; }
.panel-header a { color:var(--blue); font-size:12px; font-weight:750; }
.bar-chart { padding:18px 20px; min-height:260px; }
.bar-row { margin-bottom:18px; }.bar-row:last-child { margin-bottom:0; }
.bar-label { display:flex; justify-content:space-between; gap:12px; margin-bottom:6px; font-size:12px; }.bar-label span { color:var(--muted); }.bar-label strong { color:var(--ink); }
.bar-track { height:8px; border-radius:99px; background:#edf2f5; overflow:hidden; }.bar-fill { height:100%; border-radius:inherit; min-width:2px; }.bar-fill.blue { background:linear-gradient(90deg,var(--blue),#62b7c8); }.bar-fill.orange { background:linear-gradient(90deg,var(--orange),#efb665); }
.table-panel { overflow:hidden; }.table-wrap { width:100%; overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:900px; }
th { padding:11px 14px; background:#f8fafc; color:#607386; text-align:left; font-size:10px; text-transform:uppercase; letter-spacing:.07em; border-bottom:1px solid var(--line); white-space:nowrap; }
td { padding:13px 14px; border-bottom:1px solid #edf1f4; vertical-align:middle; color:#40566a; }
tbody tr:hover { background:#fbfcfd; } tbody tr:last-child td { border-bottom:0; }
td strong,td small { display:block; } td strong { color:var(--ink); } td small { color:#8898a7; margin-top:4px; font-size:11px; max-width:320px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.badge { display:inline-flex; align-items:center; border-radius:99px; padding:5px 9px; font-size:10px; font-weight:800; white-space:nowrap; }
.badge-aprovado,.badge-pago { color:var(--green); background:var(--green-soft); }.badge-pendente { color:#a86414; background:var(--orange-soft); }.badge-status { color:var(--blue); background:var(--blue-soft); }
.progress-cell { min-width:140px; }.progress { width:100%; height:6px; border-radius:99px; background:#e9eff3; overflow:hidden; margin-bottom:5px; }.progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--blue),#5cb9c8); }.progress-cell small { text-align:right; }
.actions { text-align:right; white-space:nowrap; }.actions.wide { min-width:112px; }.actions > a,.actions > form { display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; margin-left:4px; }.actions > :first-child { margin-left:0; }.actions form { margin-top:0; margin-bottom:0; }
.icon-link { width:30px; height:30px; display:grid; place-items:center; border-radius:8px; border:0; background:#eef4f7; color:var(--blue); font-weight:900; }.icon-link:hover { background:#dcebf0; }.icon-link.danger { color:var(--red); background:var(--red-soft); }.icon-link.approve { color:var(--green); background:var(--green-soft); }
.empty-cell,.empty-state { text-align:center; color:var(--muted); padding:35px!important; }
.is-hidden { display:none!important; }
.badge-addendum { color:#8a5a16; background:#fff1d8; }
.form-panel { padding:24px; max-width:1100px; }.form-section { margin:2px 0 16px; }.form-section:not(:first-child) { padding-top:23px; margin-top:23px; border-top:1px solid var(--line); }.form-section h2 { margin:5px 0 0; color:var(--navy); font-size:17px; }
.form-grid { display:grid; gap:16px; }.form-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }.span-2 { grid-column:span 2; }.span-3,.full { grid-column:1/-1; }
.field { display:grid; gap:7px; }.field > span { color:#526a7d; font-size:11px; font-weight:750; }.field input,.field select,.field textarea { width:100%; border:1px solid #cfdbe4; background:#fff; color:var(--ink); border-radius:9px; padding:10px 11px; outline:none; transition:.15s; }.field input,.field select { height:42px; }.field textarea { resize:vertical; min-height:84px; }.field input:focus,.field select:focus,.field textarea:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,111,139,.11); }
.form-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:26px; padding-top:20px; border-top:1px solid var(--line); }
.calculation-preview { margin-top:22px; padding:17px; display:grid; grid-template-columns:repeat(3,1fr); gap:14px; background:linear-gradient(135deg,#f0f7fa,#f8fbfc); border:1px solid #d5e7ed; border-radius:12px; }.calculation-preview div { padding:0 12px; border-right:1px solid #d5e7ed; }.calculation-preview div:nth-child(3) { border:0; }.calculation-preview span,.calculation-preview strong { display:block; }.calculation-preview span { color:var(--muted); font-size:11px; }.calculation-preview strong { color:var(--navy); font-size:18px; margin-top:5px; }.calculation-preview small { grid-column:1/-1; color:#7690a0; padding-top:8px; }
.summary-strip { display:grid; grid-template-columns:repeat(3,1fr); background:linear-gradient(120deg,var(--navy),#173c59); color:#fff; border-radius:14px; margin-bottom:15px; overflow:hidden; box-shadow:var(--shadow); }.summary-strip > div { padding:18px 22px; border-right:1px solid rgba(255,255,255,.12); }.summary-strip > div:last-child { border:0; }.summary-strip span,.summary-strip strong { display:block; }.summary-strip span { color:#a9c1d1; font-size:11px; }.summary-strip strong { margin-top:6px; font-size:21px; }.summary-strip.payments { background:linear-gradient(120deg,#183b54,#2b6579); }
.info-callout { padding:14px 16px; margin-top:14px; color:#536c7c; background:#eaf4f7; border:1px solid #d3e6ec; border-radius:11px; }
.payment-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }.payment-card { padding:19px; background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 8px 24px rgba(16,42,67,.04); }.payment-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding-bottom:15px; border-bottom:1px solid var(--line); }.payment-card-header > div { display:flex; align-items:center; gap:10px; }.payment-card-header strong,.payment-card-header small { display:block; }.payment-card-header small { color:var(--muted); margin-top:3px; }.payment-metrics { display:grid; grid-template-columns:repeat(2,1fr); gap:9px; margin:15px 0; }.payment-metrics > div { padding:11px; border-radius:9px; background:#f6f9fb; }.payment-metrics span,.payment-metrics strong { display:block; }.payment-metrics span { color:var(--muted); font-size:10px; }.payment-metrics strong { color:var(--navy); margin-top:5px; }.payment-metrics .total { background:var(--blue-soft); }.payment-metrics .total strong { color:var(--blue); font-size:17px; }
.payment-form { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; }.payment-form .btn { grid-column:1/-1; }.payment-form .field input,.payment-form .field select { height:38px; padding:7px 9px; }
.flash-stack { display:grid; gap:8px; margin-bottom:14px; }.flash { display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-radius:9px; font-weight:650; }.flash button { border:0; background:transparent; font-size:18px; }.flash-success { color:var(--green); background:var(--green-soft); }.flash-danger { color:var(--red); background:var(--red-soft); }
.sidebar-overlay { display:none; }

/* Login */
.login-body { background:#eef3f6; }.login-layout { min-height:100vh; display:grid; grid-template-columns:1.1fr .9fr; }.login-hero { padding:42px 58px; color:#fff; background:radial-gradient(circle at 80% 10%,rgba(90,183,200,.25),transparent 28%),linear-gradient(140deg,#0a1e31,#143a56 65%,#1d6075); display:flex; flex-direction:column; justify-content:space-between; }.login-brand { display:flex; align-items:center; gap:10px; font-weight:800; font-size:18px; }.login-brand > span { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; color:var(--navy); background:#fff; }.login-copy { max-width:610px; }.hero-pill { display:inline-flex; padding:7px 10px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08); border-radius:99px; color:#aee0e8; font-size:11px; font-weight:750; }.login-copy h1 { max-width:570px; font-size:50px; line-height:1.02; letter-spacing:-.052em; margin:22px 0 18px; }.login-copy > p { max-width:540px; color:#b7cad7; font-size:17px; line-height:1.6; }.login-features { margin-top:37px; display:grid; gap:13px; }.login-features > div { display:flex; align-items:center; gap:13px; }.login-features b { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; background:rgba(255,255,255,.1); color:#8bd5e0; }.login-features span { color:#d8e5ec; }.login-hero > small { color:#81a1b4; }
.login-panel { display:grid; place-items:center; padding:35px; }.login-card { width:min(420px,100%); padding:36px; background:#fff; border:1px solid var(--line); border-radius:22px; box-shadow:0 25px 70px rgba(16,42,67,.13); }.login-card h2 { margin:6px 0 4px; color:var(--navy); font-size:28px; letter-spacing:-.035em; }.login-card > p { color:var(--muted); margin:0 0 24px; }.login-card .field { margin-bottom:14px; }.demo-access { margin-top:18px; padding:12px; border-radius:9px; background:#f3f7f9; text-align:center; }.demo-access strong,.demo-access span { display:block; }.demo-access strong { color:var(--navy); font-size:11px; }.demo-access span { color:var(--muted); font-size:11px; margin-top:4px; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns:repeat(2,1fr); }.payment-cards { grid-template-columns:1fr; }
}
@media (max-width: 900px) {
  .sidebar,.sidebar-collapsed .sidebar { width:248px; transform:translateX(-100%); padding:22px 16px; scrollbar-width:auto; }.sidebar.open { transform:translateX(0); }.sidebar-overlay { position:fixed; inset:0; background:rgba(4,18,31,.45); z-index:35; }.sidebar-overlay.show { display:block; }.main-content,.sidebar-collapsed .main-content { margin-left:0; }.sidebar-collapsed .brand { justify-content:flex-start; padding:0 8px 24px; }.sidebar-collapsed .brand > div:last-child,.sidebar-collapsed .nav-section,.sidebar-collapsed .plan-card,.sidebar-collapsed .nav-chevron { display:block; }.sidebar-collapsed .nav-list { align-items:stretch; gap:5px; padding-top:22px; }.sidebar-collapsed .nav-group { width:auto; }.sidebar-collapsed .nav-item { width:auto; min-height:42px; padding:0 12px; justify-content:flex-start; gap:11px; overflow:visible; font-size:inherit; }.sidebar-collapsed .nav-item > span { width:22px; height:auto; display:block; }.sidebar-collapsed .nav-item > span svg { width:20px; height:20px; }.sidebar-collapsed .nav-submenu { display:grid; }.sidebar-collapsed .sidebar-footer,.sidebar-collapsed .sidebar-logout-form,.sidebar-collapsed .sidebar-logout-form .logout { width:auto; }.topbar { padding:0 18px; }.topbar-company { display:none; }.page-container { padding:22px 18px 35px; }.dashboard-grid { grid-template-columns:1fr; }.login-layout { grid-template-columns:1fr; }.login-hero { display:none; }.login-panel { min-height:100vh; }
}
@media (max-width: 680px) {
  .page-heading { align-items:stretch; flex-direction:column; }.filter-inline { justify-content:space-between; }.kpi-grid,.mini-kpi-grid,.summary-strip { grid-template-columns:1fr; }.mini-kpi-grid > div,.summary-strip > div { border-right:0; border-bottom:1px solid var(--line); }.summary-strip > div { border-color:rgba(255,255,255,.12); }.form-grid.three { grid-template-columns:1fr; }.span-2,.span-3 { grid-column:auto; }.calculation-preview { grid-template-columns:1fr; }.calculation-preview div { border-right:0; border-bottom:1px solid #d5e7ed; padding-bottom:10px; }.payment-form { grid-template-columns:repeat(2,1fr); }.topbar-user > div:last-child { display:none; }.filter-bar { align-items:stretch; flex-direction:column; }.filter-bar .btn { align-self:flex-start; }
}

/* v1.4 — multiempresa, orçamentos, folha e medições */
.nav-group { margin:0; }
.nav-group summary { list-style:none; cursor:pointer; }
.nav-group summary::-webkit-details-marker { display:none; }
.nav-group summary b { margin-left:auto; color:#7999ac; transition:.18s; }
.nav-group[open] summary b { transform:rotate(180deg); }
.nav-submenu { display:grid; gap:3px; margin:3px 0 5px 34px; padding-left:10px; border-left:1px solid rgba(255,255,255,.12); }
.nav-subitem { padding:8px 10px; border-radius:8px; color:#9eb5c5; font-size:12px; font-weight:650; }
.nav-subitem:hover,.nav-subitem.active { color:#fff; background:rgba(255,255,255,.07); }
.company-switcher select { height:36px; min-width:250px; max-width:420px; border:1px solid var(--line); background:#fff; color:var(--navy); font-weight:750; border-radius:9px; padding:0 34px 0 10px; }
.company-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.company-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:20px; box-shadow:0 8px 25px rgba(16,42,67,.035); }
.company-card.current { border-color:#82c5d3; box-shadow:0 0 0 3px rgba(31,111,139,.08); }
.company-card-head { display:flex; align-items:center; gap:12px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.company-card-head > div:nth-child(2) { flex:1; }.company-card-head strong,.company-card-head small { display:block; }.company-card-head small { color:var(--muted); margin-top:3px; }
.company-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:var(--blue); background:var(--blue-soft); font-weight:900; }
.company-details { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:16px 0; }.company-details div { padding:11px; background:#f6f9fb; border-radius:9px; }.company-details span,.company-details strong { display:block; }.company-details span { color:var(--muted); font-size:10px; }.company-details strong { color:var(--navy); margin-top:4px; }
.company-actions,.payroll-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }.current-label { color:var(--green); background:var(--green-soft); border-radius:99px; padding:8px 12px; font-size:11px; font-weight:800; }.check-field { display:flex; align-items:center; gap:9px; color:var(--ink); font-weight:650; }.check-field input { width:17px; height:17px; }
.payroll-actions { padding:14px 0 17px; }.generated-note { color:var(--muted); font-size:12px; }.payroll-snapshot,.measurement-list,.work-measurement-status { margin-top:15px; }
.measurement-kpis { margin-bottom:15px; }.row-overdue { background:#fff7f0; }.compact-btn { min-height:34px; padding:0 11px; font-size:11px; }
.wide-form { max-width:1400px; }.budget-items { display:grid; gap:8px; overflow:auto; }.budget-item { display:grid; grid-template-columns:.95fr 1.3fr 2fr .55fr .75fr .85fr .9fr 32px; gap:8px; align-items:center; min-width:1220px; }.budget-item-head { padding:0 4px 5px; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }.budget-item input,.budget-item select { height:40px; min-width:0; border:1px solid #cfdbe4; border-radius:8px; padding:0 9px; color:var(--ink); background:#fff; }.budget-line-total { text-align:right; color:var(--navy); }.add-item-button { margin-top:12px; }.budget-total-box { margin:18px 0; margin-left:auto; width:min(440px,100%); display:grid; gap:8px; }.budget-total-box > div { display:flex; justify-content:space-between; padding:10px 13px; background:#f6f9fb; border-radius:9px; }.budget-total-box span { color:var(--muted); }.budget-total-box .grand { color:#fff; background:linear-gradient(120deg,var(--navy),#225f78); }.budget-total-box .grand span { color:#bfd2df; }.budget-total-box .grand strong { font-size:18px; }
.field small { color:var(--muted); font-size:10px; }
@media (max-width:1180px) { .company-grid { grid-template-columns:1fr; } }
@media (max-width:900px) { .company-switcher select { min-width:180px; max-width:240px; } }
@media (max-width:680px) { .company-details { grid-template-columns:1fr; }.company-switcher { display:none; }.payroll-actions { align-items:stretch; }.payroll-actions .btn { width:100%; } }
.sidebar { overflow-y:auto; }

/* v1.6 - produção com múltiplos itens, medições detalhadas e configurações multiempresa */
.btn-danger-soft { color:var(--red); background:var(--red-soft); border-color:#f3caca; }
.payroll-summary { grid-template-columns:repeat(4,1fr); }
.payroll-metrics { grid-template-columns:repeat(3,1fr); }
/* v1.7 - formulário de produção alinhado à identidade visual do sistema */
.production-entry-form { max-width:1320px; display:grid; gap:20px; }
.production-entry-form .form-panel { max-width:none; padding:0; }
.production-card { overflow:hidden; border-color:var(--line); box-shadow:0 10px 30px rgba(16,42,67,.045); }
.production-section-header { display:flex; align-items:flex-start; gap:13px; padding:20px 22px; border-bottom:1px solid var(--line); background:linear-gradient(180deg,#fff,#fbfdfe); }
.production-section-header-action { align-items:center; justify-content:space-between; }
.production-section-title { display:flex; align-items:flex-start; gap:13px; }
.production-section-number { flex:0 0 auto; width:35px; height:35px; display:grid; place-items:center; border-radius:10px; color:var(--blue); background:var(--blue-soft); font-size:11px; font-weight:850; }
.production-section-header h2,.production-summary-header h2 { margin:4px 0 3px; color:var(--navy); font-size:18px; letter-spacing:-.02em; }
.production-section-header p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.production-add-button { min-height:38px; color:var(--blue); border-color:#bfd3dd; background:#fff; }
.production-add-button:hover { color:#fff; border-color:var(--blue); background:var(--blue); }
.production-items-footer { display:flex; align-items:center; gap:13px; padding:0 18px 18px; border-top:1px solid var(--line); background:var(--surface-soft); }
.production-items-footer .production-add-button { margin-top:16px; background:var(--surface); }
.production-items-footer small { margin-top:16px; color:var(--muted); line-height:1.4; }
.production-identification-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:17px; padding:22px; }
.production-field-work { grid-column:span 5; }
.production-field-company { grid-column:span 4; }
.production-field-status { grid-column:span 3; }
.production-field-employee { grid-column:span 4; }
.production-field-job { grid-column:span 3; }
.production-field-competence { grid-column:span 3; }
.production-field-discount { grid-column:span 2; }
.production-field-notes { grid-column:1/-1; }
.production-identification input[readonly] { color:#496275; background:#f5f8fa; border-color:#d9e2e8; }
.production-identification textarea { min-height:76px; }
.production-items { display:grid; gap:14px; padding:18px 20px 20px; overflow:visible; background:#f8fafc; }
.production-item { min-width:0; overflow:hidden; border:1px solid #dbe4eb; border-radius:13px; background:#fff; box-shadow:0 5px 15px rgba(16,42,67,.025); }
.production-item-top { min-height:58px; padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #e6edf2; background:#fbfdfe; }
.production-item-title { display:flex; align-items:center; gap:11px; min-width:0; }
.production-item-title > div { min-width:0; }
.production-item-title strong,.production-item-title small { display:block; }
.production-item-title strong { color:var(--navy); font-size:13px; }
.production-item-title small { color:var(--muted); margin-top:3px; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.production-item-index { flex:0 0 auto; width:31px; height:31px; display:grid; place-items:center; border-radius:9px; color:var(--blue); background:var(--blue-soft); font-size:10px; font-weight:850; }
.production-item-grid { display:grid; grid-template-columns:repeat(18,minmax(0,1fr)); gap:14px; align-items:end; padding:16px; }
.production-item-service { grid-column:span 6; }
.production-item-group { grid-column:span 4; }
.production-item-description { grid-column:span 8; }
.production-item-location { grid-column:span 6; }
.production-item-quantity { grid-column:span 2; }
.production-item-unit { grid-column:span 2; }
.production-item-price { grid-column:span 4; }
.production-line-summary { grid-column:span 4; min-height:42px; display:flex; flex-direction:column; justify-content:center; align-items:flex-end; padding:7px 11px; border:1px solid #cfe1e8; border-radius:9px; background:var(--blue-soft); }
.production-line-summary span { color:#587687; font-size:9px; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.production-line-total { margin-top:3px; color:var(--navy); font-size:15px; white-space:nowrap; }
.production-summary-panel { overflow:hidden; }
.production-summary-header { padding:17px 20px; display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid var(--line); }
.production-summary-header small { color:var(--muted); }
.production-total-box { display:grid; grid-template-columns:repeat(3,1fr); background:#fff; }
.production-total-box > div { min-height:86px; padding:16px 20px; display:flex; flex-direction:column; justify-content:center; border-right:1px solid var(--line); }
.production-total-box > div:last-child { border-right:0; }
.production-total-box span { color:var(--muted); font-weight:750; text-transform:uppercase; letter-spacing:.055em; font-size:10px; }
.production-total-box strong { color:var(--navy); margin-top:7px; font-size:22px; letter-spacing:-.025em; }
.production-total-box .discount { background:#fffafa; }
.production-total-box .discount strong { color:var(--red); }
.production-total-box .grand { color:#fff; background:linear-gradient(125deg,var(--navy),var(--blue)); }
.production-total-box .grand span { color:#c2dbe4; }
.production-total-box .grand strong { color:#fff; font-size:26px; }
.production-actions { margin-top:0; padding-top:0; border-top:0; }
.measurement-items { display:grid; gap:8px; overflow:auto; }
.measurement-item { display:grid; grid-template-columns:.90fr 1.18fr 1.55fr 1.15fr .52fr .66fr .78fr .80fr 32px; gap:8px; align-items:center; min-width:1420px; }
.measurement-item-head { padding:0 4px 5px; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
.measurement-item input,.measurement-item select { height:40px; min-width:0; border:1px solid #cfdbe4; border-radius:8px; padding:0 9px; color:var(--ink); background:#fff; }
.measurement-line-total { text-align:right; color:var(--navy); white-space:nowrap; }
.measurement-items-title { position:relative; }
.dynamic-items-footer { display:flex; align-items:center; gap:12px; margin-top:12px; }
.dynamic-items-footer small { color:var(--muted); }
.measurement-total { margin:18px 0 24px auto; width:min(420px,100%); display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-radius:10px; color:#fff; background:linear-gradient(120deg,var(--navy),#225f78); }
.measurement-total span { color:#c5d7e2; font-weight:700; }
.measurement-total strong { font-size:21px; }
.attachment-list { margin-top:16px; padding:15px; border:1px solid var(--line); border-radius:10px; background:#f7fafb; }
.attachment-list > strong { display:block; margin-bottom:9px; color:var(--navy); }
.attachment-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-top:1px solid var(--line); }
.attachment-row a { color:var(--blue); font-weight:700; }
.production-heading .eyebrow { display:block; margin-top:12px; }
.info-callout + .company-grid { margin-top:15px; }
@media (max-width:1100px) {
  .payroll-summary { grid-template-columns:repeat(2,1fr); }
  .payroll-metrics { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:680px) {
  .payroll-summary,.payroll-metrics { grid-template-columns:1fr; }
  .measurement-items-title .btn { position:static; margin-top:10px; }
}

@media (max-width:1050px) {
  .production-field-work,.production-field-company,.production-field-employee { grid-column:span 6; }
  .production-field-status,.production-field-job,.production-field-competence,.production-field-discount { grid-column:span 3; }
  .production-item-service,.production-item-location { grid-column:span 6; }
  .production-item-group { grid-column:span 4; }
  .production-item-description { grid-column:span 8; }
  .production-item-quantity,.production-item-unit { grid-column:span 2; }
  .production-item-price,.production-line-summary { grid-column:span 4; }
}
@media (max-width:760px) {
  .production-section-header,.production-section-header-action,.production-section-title,.production-summary-header { align-items:flex-start; }
  .production-section-header-action,.production-summary-header { flex-direction:column; }
  .production-add-button { width:100%; }
  .production-identification-grid,.production-item-grid { grid-template-columns:1fr; }
  .production-field-work,.production-field-company,.production-field-status,.production-field-employee,.production-field-job,.production-field-competence,.production-field-discount,.production-field-notes,.production-item-service,.production-item-group,.production-item-description,.production-item-location,.production-item-quantity,.production-item-unit,.production-item-price,.production-line-summary { grid-column:auto; }
  .production-total-box { grid-template-columns:1fr; }
  .production-total-box > div { border-right:0; border-bottom:1px solid var(--line); }
  .production-total-box > div:last-child { border-bottom:0; }
  .production-item-title small { white-space:normal; }
}

/* v1.8 - fluxo operacional e relatórios de produção em PDF */
.workflow-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; margin-bottom:14px; }
.workflow-card { position:relative; min-height:190px; display:flex; flex-direction:column; padding:19px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; box-shadow:0 8px 24px rgba(16,42,67,.045); overflow:hidden; transition:.18s ease; }
.workflow-card::before { content:""; position:absolute; inset:0 0 auto 0; height:4px; background:var(--workflow-accent,var(--blue)); }
.workflow-card:hover { transform:translateY(-2px); border-color:#c6d6e0; box-shadow:0 14px 32px rgba(16,42,67,.08); }
.workflow-card-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:20px; }
.workflow-number { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; color:var(--workflow-accent,var(--blue)); background:var(--workflow-soft,var(--blue-soft)); font-size:11px; font-weight:900; }
.workflow-status { color:#8a9aa8; font-size:9px; text-transform:uppercase; letter-spacing:.08em; font-weight:850; }
.workflow-label { color:var(--muted); font-weight:700; }
.workflow-card > strong { color:var(--navy); margin:7px 0 5px; font-size:24px; letter-spacing:-.035em; }
.workflow-card > small { color:#8a9aa8; line-height:1.45; }
.workflow-link { margin-top:auto; padding-top:15px; color:var(--workflow-accent,var(--blue)); font-size:11px; font-weight:800; }
.workflow-measurement { --workflow-accent:#1f6f8b; --workflow-soft:#e8f2f6; }
.workflow-production { --workflow-accent:#347f9a; --workflow-soft:#edf5f8; }
.workflow-payroll { --workflow-accent:#d08a2e; --workflow-soft:#fff3df; }
.workflow-received { --workflow-accent:#2a7f78; --workflow-soft:#e8f4f2; }
.workflow-explanation { display:grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto 1fr; align-items:center; gap:8px 10px; margin-bottom:15px; padding:13px 16px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.workflow-explanation > span { width:23px; height:23px; display:grid; place-items:center; border-radius:7px; color:var(--blue); background:var(--blue-soft); font-size:9px; font-weight:900; }
.workflow-explanation p { margin:0; color:var(--muted); font-size:11px; line-height:1.4; }
.workflow-explanation strong { color:var(--ink); }
.dashboard-heading-actions { flex-wrap:wrap; justify-content:flex-end; }
.production-report-panel { display:flex; align-items:center; justify-content:space-between; gap:22px; padding:18px 20px; margin:15px 0; }
.production-report-copy { display:flex; align-items:center; gap:14px; min-width:0; }
.production-report-copy h2 { margin:4px 0 3px; color:var(--navy); font-size:17px; }
.production-report-copy p { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.production-report-icon { flex:0 0 auto; width:46px; height:46px; display:grid; place-items:center; border-radius:12px; color:var(--blue); background:var(--blue-soft); font-size:10px; font-weight:900; letter-spacing:.04em; }
.production-report-actions { display:flex; align-items:flex-end; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.production-employee-pdf-form { display:flex; align-items:flex-end; gap:8px; }
.production-employee-pdf-form label { display:grid; gap:5px; }
.production-employee-pdf-form label span { color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.08em; font-weight:850; }
.production-employee-pdf-form select { min-width:245px; height:40px; border:1px solid var(--line); border-radius:9px; padding:0 10px; color:var(--ink); background:#fff; }
.btn:disabled,.btn.is-disabled { pointer-events:none; opacity:.48; box-shadow:none; }
.icon-link.pdf-link { width:38px; font-size:8px; letter-spacing:.02em; }
@media (max-width:1180px) {
  .workflow-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workflow-explanation { grid-template-columns:auto 1fr auto 1fr; }
  .production-report-panel { align-items:flex-start; flex-direction:column; }
  .production-report-actions { width:100%; justify-content:flex-start; }
}
@media (max-width:680px) {
  .workflow-grid { grid-template-columns:1fr; }
  .workflow-explanation { grid-template-columns:auto 1fr; }
  .dashboard-heading-actions { width:100%; align-items:stretch; }
  .dashboard-heading-actions .btn { width:100%; }
  .production-report-actions,.production-employee-pdf-form { width:100%; align-items:stretch; flex-direction:column; }
  .production-employee-pdf-form select { width:100%; min-width:0; }
  .production-report-actions .btn { width:100%; }
}

/* Refinamento visual — Gestão de obras */
:root {
  --navy:#123c26;
  --navy-2:#092a19;
  --blue:#1d7a45;
  --blue-soft:#e8f5ec;
  --teal:#278654;
  --orange:#6f8f3d;
  --orange-soft:#f0f6e8;
  --green:#168345;
  --green-soft:#e7f6ec;
  --purple:#477b5b;
  --red:#bd3f46;
  --red-soft:#fff0f1;
  --ink:#1e3126;
  --muted:#66756c;
  --line:#dce7df;
  --surface:#fff;
  --background:#f4f8f5;
  --radius:16px;
  --shadow:0 16px 42px rgba(19,60,38,.09);
}
html { background:var(--background); }
body { font-size:14px; line-height:1.45; -webkit-font-smoothing:antialiased; }
::selection { color:#fff; background:#287b4b; }
button,input,select,textarea,a { -webkit-tap-highlight-color:transparent; }
:where(a,button,input,select,textarea,summary):focus-visible { outline:3px solid rgba(34,135,77,.35); outline-offset:2px; }

.sidebar { width:260px; padding:22px 16px 18px; background:radial-gradient(circle at 20% 0,rgba(78,153,105,.18),transparent 28%),linear-gradient(180deg,#0b301d 0%,#123c26 55%,#0d321f 100%); box-shadow:10px 0 34px rgba(7,38,22,.09); }
.brand { gap:12px; padding:0 7px 22px; border-bottom-color:rgba(230,248,235,.12); }
.brand-mark { width:40px; height:40px; border-radius:12px; color:#0e4829; background:linear-gradient(145deg,#f6fff8,#bde7c9); box-shadow:0 9px 24px rgba(0,0,0,.2); }
.brand-mark.large { width:58px; height:58px; margin-bottom:20px; border-radius:17px; font-size:17px; }
.brand strong { font-size:16px; letter-spacing:-.01em; }
.brand span { color:#a9c8b3; font-size:10px; letter-spacing:.055em; text-transform:uppercase; }
.nav-list { gap:4px; padding-top:18px; }
.nav-item { min-height:44px; gap:11px; padding:0 12px; border-radius:11px; color:#c0d5c6; font-size:13px; font-weight:650; }
.nav-item > span.nav-icon { flex:0 0 auto; width:20px; height:20px; display:grid; place-items:center; color:#8db79a; }
.nav-icon svg,.nav-chevron svg,.mobile-menu svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.nav-item:hover { color:#fff; background:rgba(231,250,236,.08); }
.nav-item.active { color:#fff; background:linear-gradient(90deg,rgba(75,169,105,.3),rgba(75,169,105,.13)); box-shadow:inset 3px 0 #79d397; }
.nav-item.active > span.nav-icon { color:#9be2b2; }
.nav-section { padding:18px 12px 6px; color:#749a80; font-size:9px; letter-spacing:.16em; }
.nav-group summary b.nav-chevron { width:18px; height:18px; display:grid; place-items:center; color:#87ad93; }
.nav-submenu { margin-left:22px; padding:3px 0 3px 17px; border-left-color:rgba(221,243,227,.17); }
.nav-subitem { min-height:36px; display:flex; align-items:center; color:#9fbdA8; border-radius:8px; }
.nav-subitem:hover,.nav-subitem.active { color:#fff; background:rgba(225,247,231,.08); }
.sidebar .eyebrow { color:#85c79a; }
.plan-card { border-color:rgba(221,243,227,.12); background:rgba(236,253,241,.065); border-radius:13px; }
.plan-card small { color:#a7c2af; }
.logout { border-top-color:rgba(221,243,227,.1); }

.main-content { margin-left:260px; }
.topbar { height:74px; padding:0 32px; border-bottom-color:rgba(206,223,211,.85); background:rgba(255,255,255,.91); box-shadow:0 4px 18px rgba(26,68,42,.035); }
.topbar-company strong { color:var(--navy); }
.company-switcher select { height:40px; min-width:260px; border-color:#d3e1d7; color:var(--navy); border-radius:10px; }
.avatar { width:40px; height:40px; color:#176b3b; background:linear-gradient(145deg,#e8f7ed,#cef0d9); border:1px solid #c5e6cf; }
.icon-button { width:42px; height:42px; display:grid; place-items:center; border-radius:11px; color:var(--navy); }
.mobile-menu svg { width:23px; height:23px; }
.page-container { padding:30px 32px 48px; }
.page-heading { margin-bottom:25px; }
.page-heading h1 { color:#143b27; font-size:29px; font-weight:780; letter-spacing:-.04em; }
.page-heading p { max-width:720px; line-height:1.55; }
.eyebrow { color:#267647; letter-spacing:.13em; }
.back-link { min-height:32px; display:inline-flex; align-items:center; color:#1a7542; }

.btn { min-height:44px; padding:0 17px; border-radius:10px; font-weight:750; box-shadow:none; }
.btn:hover { transform:translateY(-1px); }
.btn-primary { color:#fff; background:linear-gradient(135deg,#1d7a45,#16673a); box-shadow:0 8px 19px rgba(25,113,62,.19); }
.btn-primary:hover { background:linear-gradient(135deg,#176a3b,#115a31); box-shadow:0 10px 24px rgba(25,113,62,.24); }
.btn-secondary { color:#294436; background:#fff; border-color:#d1dfd5; box-shadow:0 3px 10px rgba(23,67,40,.03); }
.btn-secondary:hover { color:#175f36; border-color:#90bea0; background:#fbfefc; }
.btn-danger-soft { border-color:#efc7ca; }
.compact-btn { min-height:38px; }
.filter-inline input,.filter-bar input,.filter-bar select { height:44px; border-color:#d1dfd5; border-radius:10px; }
.filter-bar { padding:16px; border-color:var(--line); border-radius:14px; box-shadow:0 6px 20px rgba(20,61,37,.035); }

.kpi-grid { gap:16px; }
.kpi-card { min-height:148px; padding:20px; border-color:#dbe7de; box-shadow:0 10px 28px rgba(19,60,38,.055); }
.kpi-card::before { height:4px; }
.kpi-card > strong { color:#153c27; font-size:25px; }
.kpi-icon { width:38px; height:38px; border-radius:11px; }
.accent-blue { --accent:#1b7843; --soft:#e7f5ec; }
.accent-orange { --accent:#557d34; --soft:#eff6e8; }
.accent-green { --accent:#26925a; --soft:#e8f7ee; }
.accent-purple { --accent:#3b7752; --soft:#eaf4ed; }
.mini-kpi-grid { border-radius:15px; box-shadow:0 6px 20px rgba(19,60,38,.035); }
.mini-kpi-grid strong { color:#153c27; }
.panel,.company-card,.payment-card,.workflow-card { border-color:#dbe7de; box-shadow:0 10px 30px rgba(19,60,38,.05); }
.panel-header { padding:19px 21px; }
.panel-header h2 { color:#153c27; }
.panel-header a { color:#1c7643; }
.bar-track,.progress { background:#e9f0eb; }
.bar-fill.blue { background:linear-gradient(90deg,#176d3c,#52ad74); }
.bar-fill.orange { background:linear-gradient(90deg,#527b35,#89ad5c); }
.progress span { background:linear-gradient(90deg,#1c7843,#55af77); }

table { min-width:900px; }
th { padding:12px 14px; color:#426550; background:#eff6f1; border-bottom-color:#d5e3d9; }
td { padding:14px; color:#475e50; border-bottom-color:#e8efea; }
td strong { color:#223a2b; }
tbody tr { transition:background .14s ease; }
tbody tr:hover { background:#f4faf6; }
.badge { min-height:25px; padding:5px 10px; }
.badge-aprovado,.badge-pago { color:#156b39; background:#e4f5ea; }
.badge-pendente { color:#5d7431; background:#eff5e6; }
.badge-status { color:#1c7141; background:#e5f4ea; }
.icon-link { width:36px; height:36px; color:#1b7542; background:#edf6f0; border-radius:9px; }
.icon-link:hover { background:#dceee2; }
.icon-link.pdf-link { width:42px; min-height:36px; }
.actions > a,.actions > form { margin-left:6px; }
.actions > :first-child { margin-left:0; }

.form-panel { padding:26px; }
.form-section h2,.production-section-header h2,.production-summary-header h2 { color:#153c27; }
.field > span { color:#496454; }
.field input,.field select,.field textarea,.budget-item input,.budget-item select,.measurement-item input,.measurement-item select { min-height:44px; border-color:#cddcd1; border-radius:10px; }
.field input:hover,.field select:hover,.field textarea:hover { border-color:#9fbda8; }
.field input:focus,.field select:focus,.field textarea:focus,.budget-item input:focus,.budget-item select:focus,.measurement-item input:focus,.measurement-item select:focus { border-color:#27804c; box-shadow:0 0 0 3px rgba(39,128,76,.13); outline:none; }
.form-actions { margin-top:28px; padding-top:22px; }
.calculation-preview { color:#294837; background:linear-gradient(135deg,#eef8f1,#f8fbf9); border-color:#d5e8db; }
.calculation-preview strong { color:#153c27; }
.calculation-preview div { border-color:#d5e8db; }
.summary-strip { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.summary-strip,.summary-strip.payments { background:linear-gradient(125deg,#0f3822,#1b5b36); box-shadow:0 15px 34px rgba(16,61,34,.16); }
.summary-strip span { color:#bad5c3; }
.info-callout { color:#41614d; background:#ebf6ee; border-color:#d3e7d8; }
.payment-metrics > div,.company-details div,.budget-total-box > div { background:#f4f8f5; }
.payment-metrics .total { background:#e6f4eb; }
.payment-metrics .total strong { color:#176c3b; }
.budget-total-box .grand,.measurement-total { background:linear-gradient(125deg,#123c26,#1b7140); }
.budget-total-box .grand span,.measurement-total span { color:#c0d9c8; }
.flash { min-height:46px; border:1px solid transparent; }
.flash-success { color:#176b3b; background:#e6f6eb; border-color:#cbe9d4; }

.company-card.current { border-color:#75b78b; box-shadow:0 0 0 3px rgba(39,128,76,.1),0 12px 30px rgba(19,60,38,.06); }
.company-icon { color:#176c3b; background:#e4f4e9; }
.current-label { color:#156b39; background:#e4f5ea; }
.check-field input { accent-color:#1c7843; }

.production-card { box-shadow:0 12px 32px rgba(19,60,38,.055); }
.production-section-header { background:linear-gradient(180deg,#fff,#f8fbf9); }
.production-section-number,.production-item-index { color:#176f3e; background:#e6f5eb; }
.production-add-button { color:#1b7542; border-color:#b8d8c2; }
.production-add-button:hover { border-color:#1d7a45; background:#1d7a45; }
.production-identification input[readonly] { color:#4e6758; background:#f4f8f5; border-color:#dae5dd; }
.production-items { background:#f2f7f3; }
.production-item { border-color:#d9e6dc; box-shadow:0 6px 18px rgba(20,61,37,.035); }
.production-item-top { background:#fafcfb; border-bottom-color:#e3ece6; }
.production-line-summary { border-color:#cbe3d2; background:#eaf6ed; }
.production-line-summary span { color:#4f755d; }
.production-total-box .grand { background:linear-gradient(125deg,#123c26,#1b7542); }
.production-total-box .grand span { color:#c5ddcc; }
.attachment-list { background:#f5f9f6; }

.workflow-card { min-height:194px; }
.workflow-card:hover { border-color:#a9cbb4; box-shadow:0 16px 34px rgba(19,60,38,.09); }
.workflow-card > strong { color:#153c27; }
.workflow-measurement { --workflow-accent:#176c3b; --workflow-soft:#e5f4ea; }
.workflow-production { --workflow-accent:#2a8852; --workflow-soft:#e9f6ed; }
.workflow-payroll { --workflow-accent:#557b35; --workflow-soft:#eff5e8; }
.workflow-received { --workflow-accent:#166b4a; --workflow-soft:#e5f3ed; }
.workflow-explanation { border-radius:14px; box-shadow:0 6px 20px rgba(19,60,38,.03); }
.workflow-explanation > span { color:#176f3e; background:#e6f5eb; }
.production-report-icon { color:#176f3e; background:#e6f5eb; }
.production-report-panel { border-color:#d8e6dc; }
.production-employee-pdf-form select { height:44px; border-color:#cddcd1; border-radius:10px; }

.client-attachment-panel { max-width:1100px; margin-top:18px; padding:24px; }
.client-attachment-panel .attachment-list { margin-top:0; }
.attachment-row > div { min-width:0; display:grid; gap:3px; }
.attachment-row > div a { overflow-wrap:anywhere; }
.attachment-row small { color:var(--muted); font-size:10px; }

.btn-whatsapp { color:#fff; background:#17884b; border-color:#17884b; }
.btn-whatsapp:hover { color:#fff; background:#11733e; border-color:#11733e; }
.btn-whatsapp:disabled,.whatsapp-link:disabled { cursor:not-allowed; opacity:.48; }
.production-document-buttons { display:flex; gap:8px; flex-wrap:wrap; }
.whatsapp-manual-note { max-width:430px; color:var(--muted); font-size:10px; line-height:1.45; }
.whatsapp-handoff-heading { margin-bottom:18px; }
.whatsapp-handoff-card { display:grid; grid-template-columns:64px minmax(0,1fr); gap:22px; max-width:850px; padding:30px; }
.whatsapp-handoff-status { width:58px; height:58px; display:grid; place-items:center; color:#fff; background:#17884b; border-radius:18px; font-size:15px; font-weight:900; box-shadow:0 12px 26px rgba(23,136,75,.2); }
.whatsapp-handoff-card h2 { margin:6px 0 18px; color:var(--navy); font-size:22px; }
.whatsapp-handoff-steps { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.whatsapp-handoff-steps li { display:grid; grid-template-columns:34px minmax(0,1fr); gap:12px; padding:14px 0; border-top:1px solid var(--line); }
.whatsapp-handoff-steps li > span { width:30px; height:30px; display:grid; place-items:center; color:var(--blue); background:var(--blue-soft); border-radius:9px; font-size:11px; font-weight:900; }
.whatsapp-handoff-steps strong,.whatsapp-handoff-steps small { display:block; }
.whatsapp-handoff-steps strong { color:var(--navy); }
.whatsapp-handoff-steps small { margin-top:4px; color:var(--muted); line-height:1.45; overflow-wrap:anywhere; }
.whatsapp-handoff-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:20px; }
.whatsapp-handoff-note { margin:12px 0 0; color:var(--muted); font-size:10px; }
.whatsapp-setup-link { color:#247a4b; font-size:11px; font-weight:750; }
.icon-link.whatsapp-link { width:36px; color:#137a42; background:#e2f5e9; font-size:10px; }
.whatsapp-log-status { margin-top:5px; font-weight:750; }
.whatsapp-log-status.success { color:#17884b; }.whatsapp-log-status.failed { color:var(--red); }
.whatsapp-connection-badge { display:flex; align-items:center; gap:8px; padding:10px 13px; border-radius:99px; font-size:11px; font-weight:800; }
.whatsapp-connection-badge span { width:8px; height:8px; border-radius:50%; }
.whatsapp-connection-badge.ready { color:#176f42; background:#e5f5eb; }.whatsapp-connection-badge.ready span { background:#20a15e; box-shadow:0 0 0 4px rgba(32,161,94,.13); }
.whatsapp-connection-badge.pending { color:#8a641e; background:#fff3df; }.whatsapp-connection-badge.pending span { background:#d59629; box-shadow:0 0 0 4px rgba(213,150,41,.13); }
.whatsapp-settings-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(290px,.75fr); gap:18px; align-items:start; }
.whatsapp-config-form { max-width:none; }
.whatsapp-config-form .form-section p { margin:6px 0 0; color:var(--muted); }
.whatsapp-enable-field { align-self:end; min-height:66px; padding:13px; border:1px solid var(--line); border-radius:10px; background:#f7fafb; }
.whatsapp-remove-token { margin-top:18px; color:var(--red); }
.whatsapp-status-card { padding:24px; }
.whatsapp-status-card h2,.whatsapp-guide h2 { margin:6px 0 18px; color:var(--navy); }
.whatsapp-status-list { display:grid; margin-bottom:20px; }
.whatsapp-status-list div { padding:12px 0; border-bottom:1px solid var(--line); }
.whatsapp-status-list span,.whatsapp-status-list strong,.whatsapp-status-list small { display:block; }
.whatsapp-status-list span { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
.whatsapp-status-list strong { margin-top:4px; color:var(--navy); overflow-wrap:anywhere; }
.whatsapp-status-list small { margin-top:3px; color:var(--muted); }
.whatsapp-status-note { margin:15px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.whatsapp-guide { margin-top:18px; padding:26px; }
.whatsapp-guide-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.whatsapp-steps { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.whatsapp-steps li { display:grid; grid-template-columns:38px 1fr; gap:14px; padding:17px 0; border-top:1px solid var(--line); }
.whatsapp-steps li > span { width:34px; height:34px; display:grid; place-items:center; color:#fff; background:var(--blue); border-radius:10px; font-weight:900; }
.whatsapp-steps strong { color:var(--navy); }.whatsapp-steps p { margin:5px 0 0; color:var(--muted); line-height:1.55; }
.template-preview { display:grid; gap:5px; margin-top:12px; padding:14px; border:1px solid #cae5d4; border-radius:10px; background:#edf8f1; }
.template-preview span { color:#27754b; font-size:10px; text-transform:uppercase; letter-spacing:.07em; font-weight:850; }
.template-preview strong { color:#1a4c30; }.template-preview small { color:#577563; }
.whatsapp-history { margin-top:18px; }.whatsapp-history td small { max-width:420px; }
@media (max-width:980px) { .whatsapp-settings-grid { grid-template-columns:1fr; } }
@media (max-width:680px) { .production-document-buttons,.production-document-buttons .btn { width:100%; }.whatsapp-guide-heading { flex-direction:column; }.whatsapp-guide-heading .btn { width:100%; }.whatsapp-handoff-card { grid-template-columns:1fr; padding:22px; }.whatsapp-handoff-actions,.whatsapp-handoff-actions .btn { width:100%; } }

/* Login */
.login-body { background:#f2f7f3; }
.login-layout { grid-template-columns:minmax(520px,1.08fr) minmax(430px,.92fr); }
.login-hero { position:relative; isolation:isolate; overflow:hidden; padding:44px 60px; background:radial-gradient(circle at 84% 12%,rgba(116,205,143,.22),transparent 28%),radial-gradient(circle at 10% 88%,rgba(56,139,83,.19),transparent 31%),linear-gradient(142deg,#082819,#103d25 58%,#176139); }
.login-hero::before,.login-hero::after { content:""; position:absolute; z-index:-1; border:1px solid rgba(218,247,226,.11); border-radius:50%; }
.login-hero::before { width:380px; height:380px; right:-130px; bottom:-130px; }
.login-hero::after { width:250px; height:250px; right:-60px; bottom:-60px; }
.login-brand { font-size:18px; letter-spacing:-.01em; }
.login-brand > span { width:40px; height:40px; color:#155f35; background:linear-gradient(145deg,#fff,#d8f2df); border-radius:12px; box-shadow:0 10px 28px rgba(0,0,0,.18); }
.hero-pill { padding:8px 12px; color:#aee7bf; border-color:rgba(208,243,218,.2); background:rgba(217,248,226,.08); text-transform:uppercase; letter-spacing:.1em; font-size:10px; }
.login-copy h1 { font-size:clamp(42px,4.2vw,60px); line-height:1.01; letter-spacing:-.055em; }
.login-copy > p { color:#bcd4c3; }
.login-features b { color:#9fe0b3; background:rgba(225,249,232,.1); }
.login-features span { color:#dbeade; }
.login-hero > small { color:#91b59d; }
.login-panel { position:relative; padding:42px; background:radial-gradient(circle at 100% 0,#e4f3e8,transparent 33%); }
.login-card { width:min(430px,100%); padding:39px; border-color:#d7e5da; box-shadow:0 28px 75px rgba(20,61,37,.13); }
.login-card h2 { color:#153c27; font-size:29px; }
.login-card .field input { height:46px; }
.login-card .btn { min-height:48px; margin-top:2px; }
.demo-access { margin-top:20px; padding:13px; background:#f1f7f3; border:1px solid #e0ebe3; }
.demo-access strong { color:#245438; }

@media (max-width:900px) {
  .sidebar { width:270px; }
  .main-content { margin-left:0; }
  .mobile-menu { display:grid; }
  .sidebar-overlay { background:rgba(5,35,19,.5); backdrop-filter:blur(2px); }
  .topbar { padding:0 18px; }
  .page-container { padding:24px 18px 40px; }
  .login-layout { grid-template-columns:1fr; }
  .login-panel { min-height:100vh; }
}
@media (max-width:680px) {
  .page-heading h1 { font-size:26px; }
  .page-heading .btn,.form-actions .btn { width:100%; }
  .form-actions { flex-direction:column-reverse; }
  .login-panel { padding:22px; }
  .login-card { padding:30px 24px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; animation-iteration-count:1!important; }
}

/* Ajuste pastel — paleta de sálvia suave */
:root {
  --navy:#4d6656;
  --navy-2:#f0f5f1;
  --blue:#708a78;
  --blue-soft:#f3f6f4;
  --teal:#819888;
  --orange:#9aa388;
  --orange-soft:#f7f8f3;
  --green:#789280;
  --green-soft:#f2f6f3;
  --purple:#8c9b91;
  --ink:#2d4034;
  --muted:#718078;
  --line:#e5ebe6;
  --background:#fafbfa;
  --shadow:0 15px 38px rgba(54,79,63,.055);
}
html,body { background:var(--background); }
::selection { color:#263a2e; background:#e2ece4; }
:where(a,button,input,select,textarea,summary):focus-visible { outline-color:rgba(92,123,102,.34); }

.sidebar { color:#3c5144; background:linear-gradient(180deg,#f8faf8 0%,#f1f6f2 58%,#ebf2ed 100%); border-right:1px solid #e1e8e3; box-shadow:8px 0 28px rgba(64,87,70,.04); }
.brand { border-bottom-color:#e1e9e3; }
.brand-mark { color:#526d5a; background:linear-gradient(145deg,#fff,#e1ebe3); border:1px solid #d5e1d8; box-shadow:0 7px 18px rgba(67,91,73,.08); }
.brand strong { color:#334d3d; }
.brand span { color:#8b9b90; }
.nav-item { color:#617367; }
.nav-item > span.nav-icon { color:#91a397; }
.nav-item:hover { color:#354d3d; background:rgba(255,255,255,.64); }
.nav-item.active { color:#405a48; background:linear-gradient(90deg,#e5eee7,#eff4f0); box-shadow:inset 3px 0 #a7bead; }
.nav-item.active > span.nav-icon { color:#698572; }
.nav-section { color:#8b9d90; }
.nav-group summary b.nav-chevron { color:#809587; }
.nav-submenu { border-left-color:#d9e3db; }
.nav-subitem { color:#6c8173; }
.nav-subitem:hover,.nav-subitem.active { color:#3d5846; background:rgba(255,255,255,.62); }
.sidebar .eyebrow { color:#6d8a76; }
.plan-card { border-color:#dce6de; background:rgba(255,255,255,.62); }
.plan-card strong { color:#3a5242; }
.plan-card small { color:#73867a; }
.logout { border-top-color:#dde6df; }

.topbar { background:rgba(252,253,252,.93); border-bottom-color:#e0e7e2; box-shadow:0 4px 16px rgba(55,78,62,.025); }
.topbar-company strong,.page-heading h1,.panel-header h2,.form-section h2,.production-section-header h2,.production-summary-header h2,.kpi-card > strong,.mini-kpi-grid strong,.workflow-card > strong,.login-card h2 { color:#395443; }
.avatar { color:#506f5a; background:#e9f1eb; border-color:#d4e2d7; }
.company-switcher select { color:#3f5c49; border-color:#d9e3dc; }
.eyebrow,.back-link,.panel-header a { color:#607f69; }

.btn-primary { color:#fff; background:#607a68; box-shadow:0 7px 17px rgba(71,99,79,.12); }
.btn-primary:hover { background:#566f5e; box-shadow:0 9px 21px rgba(71,99,79,.16); }
.btn-secondary { color:#405849; border-color:#d5e0d8; background:#fff; }
.btn-secondary:hover { color:#3f5c49; border-color:#a9beae; background:#fbfcfb; }
.filter-bar,.panel,.kpi-card,.company-card,.payment-card,.workflow-card,.login-card { border-color:#e6ece7; box-shadow:0 9px 26px rgba(54,78,61,.035); }
.filter-inline input,.filter-bar input,.filter-bar select,.field input,.field select,.field textarea,.budget-item input,.budget-item select,.measurement-item input,.measurement-item select,.production-employee-pdf-form select { border-color:#d8e2da; }
.field input:focus,.field select:focus,.field textarea:focus,.budget-item input:focus,.budget-item select:focus,.measurement-item input:focus,.measurement-item select:focus { border-color:#7d9d86; box-shadow:0 0 0 3px rgba(125,157,134,.14); }

.accent-blue { --accent:#91a997; --soft:#f2f6f3; }
.accent-orange { --accent:#a6ad95; --soft:#f6f7f2; }
.accent-green { --accent:#9bb2a1; --soft:#f2f6f3; }
.accent-purple { --accent:#9ca9a0; --soft:#f4f6f4; }
.bar-fill.blue,.progress span { background:linear-gradient(90deg,#91aa98,#bacabd); }
.bar-fill.orange { background:linear-gradient(90deg,#a2ab91,#cbd2bd); }
.bar-track,.progress { background:#edf1ee; }

th { color:#5f7466; background:#f0f4f1; border-bottom-color:#dfe7e1; }
td { color:#52655a; border-bottom-color:#edf1ee; }
tbody tr:hover { background:#f6f9f7; }
.badge-aprovado,.badge-pago,.badge-status { color:#4f725b; background:#eaf2ec; }
.badge-pendente { color:#727d5f; background:#f1f3ea; }
.icon-link { color:#587862; background:#edf3ef; }
.icon-link:hover { background:#e0ebe3; }

.summary-strip,.summary-strip.payments { color:#3e5546; background:linear-gradient(125deg,#f4f7f5,#e9f0ea); border:1px solid #dfe8e1; box-shadow:0 10px 26px rgba(63,87,69,.045); }
.summary-strip > div { border-color:#dfe8e1; }
.summary-strip span { color:#6a7d70; }
.summary-strip strong { color:#395443; }
.calculation-preview,.info-callout { background:linear-gradient(135deg,#f2f6f3,#fafbfa); border-color:#dfe9e1; }
.payment-metrics .total,.production-line-summary { background:#edf4ef; }
.payment-metrics .total strong,.production-section-number,.production-item-index,.production-report-icon { color:#5b7964; }
.budget-total-box .grand,.measurement-total,.production-total-box .grand { color:#405547; background:linear-gradient(125deg,#e6eee8,#dbe8de); }
.budget-total-box .grand span,.measurement-total span,.production-total-box .grand span { color:#607467; }
.production-total-box .grand strong { color:#354b3c; }
.production-items { background:#f5f8f6; }
.production-item { border-color:#e0e8e2; }
.production-add-button { color:#5b7964; border-color:#cad9ce; }
.production-add-button:hover { color:#fff; border-color:#607a68; background:#607a68; }
.company-card.current { border-color:#a7bdaa; box-shadow:0 0 0 3px rgba(130,159,139,.1),0 10px 28px rgba(54,78,61,.05); }
.company-icon,.current-label { color:#58745f; background:#eaf2ec; }

.workflow-card:hover { border-color:#bdcec1; box-shadow:0 14px 31px rgba(54,78,61,.07); }
.workflow-measurement { --workflow-accent:#8da393; --workflow-soft:#f2f6f3; }
.workflow-production { --workflow-accent:#99ad9d; --workflow-soft:#f4f7f5; }
.workflow-payroll { --workflow-accent:#a4aa93; --workflow-soft:#f6f7f2; }
.workflow-received { --workflow-accent:#899f94; --workflow-soft:#f2f6f4; }
.workflow-explanation > span { color:#617f69; background:#edf3ef; }

.login-body { background:#fafbfa; }
.login-hero { color:#3a5042; background:radial-gradient(circle at 84% 12%,rgba(255,255,255,.8),transparent 30%),radial-gradient(circle at 12% 88%,rgba(207,224,211,.36),transparent 33%),linear-gradient(142deg,#e7efe9,#f4f7f5 58%,#e1ebe3); }
.login-hero::before,.login-hero::after { border-color:rgba(91,123,101,.12); }
.login-brand > span { color:#5e7965; background:rgba(255,255,255,.9); border:1px solid #d9e4dc; box-shadow:0 8px 22px rgba(65,89,70,.07); }
.hero-pill { color:#647c6b; border-color:#d7e2da; background:rgba(255,255,255,.58); }
.login-copy h1 { color:#304a39; }
.login-copy > p { color:#596f61; }
.login-features b { color:#5f7b68; background:rgba(255,255,255,.55); border:1px solid #ccdad0; }
.login-features span { color:#455e4e; }
.login-hero > small { color:#708478; }
.login-panel { background:radial-gradient(circle at 100% 0,#f0f5f1,transparent 34%); }
.demo-access { background:#f3f6f4; border-color:#e3e9e4; }
.demo-access strong { color:#4a6653; }

@media (max-width:900px) {
  .sidebar-overlay { background:rgba(45,64,52,.3); }
}

/* Ajuste de intensidade — verde médio equilibrado */
:root {
  --navy:#315640;
  --navy-2:#e2eee5;
  --blue:#4f805e;
  --blue-soft:#e8f2eb;
  --teal:#5d896b;
  --orange:#829267;
  --orange-soft:#f1f4ea;
  --green:#588865;
  --green-soft:#e8f2eb;
  --purple:#688473;
  --ink:#294232;
  --muted:#66776c;
  --line:#dce7df;
  --background:#f8faf8;
}
.sidebar { color:#304b38; background:linear-gradient(180deg,#edf5ef 0%,#e2eee5 58%,#d9e8dd 100%); border-right-color:#cfdfd3; box-shadow:8px 0 28px rgba(43,78,53,.055); }
.brand { border-bottom-color:#cfdfd3; }
.brand-mark { color:#356245; background:linear-gradient(145deg,#fafffb,#cfe4d4); border-color:#bdd5c3; }
.brand strong { color:#294b35; }
.brand span { color:#708878; }
.nav-item { color:#4e6957; }
.nav-item > span.nav-icon { color:#628b6e; }
.nav-item:hover { color:#294b35; background:rgba(255,255,255,.62); }
.nav-item.active { color:#294f36; background:linear-gradient(90deg,#cde2d2,#dceade); box-shadow:inset 3px 0 #689a76; }
.nav-item.active > span.nav-icon { color:#3f7450; }
.nav-section { color:#748c7c; }
.nav-submenu { border-left-color:#c3d8c8; }
.nav-subitem { color:#5f7867; }
.nav-subitem:hover,.nav-subitem.active { color:#2f553b; background:rgba(255,255,255,.58); }
.plan-card { border-color:#c7dbcC; background:rgba(255,255,255,.5); }
.plan-card strong { color:#31543c; }
.plan-card small { color:#617969; }
.sidebar .eyebrow { color:#4f7e5d; }

.topbar-company strong,.page-heading h1,.panel-header h2,.form-section h2,.production-section-header h2,.production-summary-header h2,.kpi-card > strong,.mini-kpi-grid strong,.workflow-card > strong,.login-card h2 { color:#2c5138; }
.eyebrow,.back-link,.panel-header a { color:#4d7f5c; }
.avatar { color:#3f7550; background:#e1eee5; border-color:#cde0d2; }
.btn-primary { color:#fff; background:#4b7f5b; box-shadow:0 7px 17px rgba(51,108,70,.16); }
.btn-primary:hover { background:#3e704e; box-shadow:0 9px 21px rgba(51,108,70,.2); }
.btn-secondary:hover { color:#376b49; border-color:#91b39a; }
.field input:focus,.field select:focus,.field textarea:focus,.budget-item input:focus,.budget-item select:focus,.measurement-item input:focus,.measurement-item select:focus { border-color:#5f936d; box-shadow:0 0 0 3px rgba(76,132,91,.14); }

.accent-blue { --accent:#568563; --soft:#e5f0e8; }
.accent-orange { --accent:#809168; --soft:#eff3e9; }
.accent-green { --accent:#689472; --soft:#e8f2ea; }
.accent-purple { --accent:#668170; --soft:#ebf0ed; }
.bar-fill.blue,.progress span { background:linear-gradient(90deg,#4d825d,#8bb497); }
.bar-fill.orange { background:linear-gradient(90deg,#7c9064,#abb98f); }
th { color:#42644d; background:#e8f1ea; border-bottom-color:#d1dfd5; }
.badge-aprovado,.badge-pago,.badge-status { color:#356c47; background:#e2efe6; }
.icon-link { color:#417653; background:#e5f0e8; }

.summary-strip,.summary-strip.payments { color:#294b35; background:linear-gradient(125deg,#e2efe6,#cfe3d4); border-color:#c5d9ca; box-shadow:0 10px 26px rgba(47,89,58,.07); }
.summary-strip > div { border-color:#c5d9ca; }
.summary-strip span { color:#577161; }
.summary-strip strong { color:#2b5137; }
.budget-total-box .grand,.measurement-total,.production-total-box .grand { color:#294b35; background:linear-gradient(125deg,#d4e7d8,#bdd9c4); }
.budget-total-box .grand span,.measurement-total span,.production-total-box .grand span { color:#4d6b57; }
.production-total-box .grand strong { color:#294b35; }
.production-add-button { color:#467a56; border-color:#b6d1bd; }
.production-add-button:hover { border-color:#4b7f5b; background:#4b7f5b; }
.company-card.current { border-color:#89ad92; }

.workflow-measurement { --workflow-accent:#4f805e; --workflow-soft:#e5f0e8; }
.workflow-production { --workflow-accent:#62906d; --workflow-soft:#e8f2ea; }
.workflow-payroll { --workflow-accent:#7d8f65; --workflow-soft:#eff3e9; }
.workflow-received { --workflow-accent:#4e7962; --workflow-soft:#e5efea; }
.workflow-explanation > span { color:#3f7550; background:#e2eee5; }

.login-hero { color:#294735; background:radial-gradient(circle at 84% 12%,rgba(255,255,255,.72),transparent 30%),radial-gradient(circle at 12% 88%,rgba(151,190,160,.28),transparent 33%),linear-gradient(142deg,#d2e6d7,#ebf3ed 58%,#c6dfcc); }
.login-brand > span { color:#3d704d; background:rgba(255,255,255,.84); border-color:#bfd5c4; }
.hero-pill { color:#446f52; border-color:#b5cebb; background:rgba(255,255,255,.48); }
.login-copy h1 { color:#284b34; }
.login-copy > p { color:#4d6856; }
.login-features b { color:#447655; border-color:#bdd3c2; background:rgba(255,255,255,.52); }
.login-features span { color:#385742; }
.login-hero > small { color:#597463; }
.login-panel { background:radial-gradient(circle at 100% 0,#e6f0e8,transparent 34%); }

/* Contraste final — verde presente sobre superfícies brancas */
:root {
  --navy:#264f36;
  --navy-2:#356d49;
  --blue:#3f7d54;
  --blue-soft:#e4f0e7;
  --teal:#4f8460;
  --green:#478159;
  --green-soft:#e3efe6;
  --ink:#263b2e;
  --muted:#637068;
  --line:#dce5de;
  --surface:#fff;
  --background:#f7f9f7;
}
.sidebar { color:#fff; background:linear-gradient(180deg,#356d49 0%,#477d59 58%,#3b704e 100%); border-right-color:#326443; box-shadow:9px 0 30px rgba(29,67,42,.1); }
.brand { border-bottom-color:rgba(255,255,255,.17); }
.brand-mark { color:#346c48; background:linear-gradient(145deg,#fff,#dcecdf); border-color:rgba(255,255,255,.62); box-shadow:0 8px 20px rgba(25,59,37,.18); }
.brand strong { color:#fff; }
.brand span { color:#d3e5d8; }
.nav-item { color:#d7e7dc; }
.nav-item > span.nav-icon { color:#bdd8c4; }
.nav-item:hover { color:#fff; background:rgba(255,255,255,.1); }
.nav-item.active { color:#fff; background:rgba(255,255,255,.17); box-shadow:inset 3px 0 #c9e7d2; }
.nav-item.active > span.nav-icon { color:#e1f1e5; }
.nav-section { color:#b6d0bd; }
.nav-group summary b.nav-chevron { color:#c5ddcb; }
.nav-submenu { border-left-color:rgba(255,255,255,.21); }
.nav-subitem { color:#c7dccd; }
.nav-subitem:hover,.nav-subitem.active { color:#fff; background:rgba(255,255,255,.1); }
.sidebar .eyebrow { color:#c4dfcb; }
.plan-card { border-color:rgba(255,255,255,.2); background:rgba(255,255,255,.1); }
.plan-card strong { color:#fff; }
.plan-card small { color:#d2e4d7; }
.logout { border-top-color:rgba(255,255,255,.16); }

.topbar { background:rgba(255,255,255,.96); border-bottom-color:#dde6df; }
.page-container { background:var(--background); }
.panel,.kpi-card,.company-card,.payment-card,.workflow-card,.filter-bar,.form-panel,.production-card,.production-summary-panel,.production-report-panel { background:#fff; }
.btn-primary { color:#fff; background:#3d7c52; box-shadow:0 8px 19px rgba(43,111,67,.2); }
.btn-primary:hover { background:#316c46; box-shadow:0 10px 24px rgba(43,111,67,.25); }
.avatar { color:#2f6d46; background:#e3f0e7; border-color:#c9dfcf; }
.page-heading h1,.panel-header h2,.form-section h2,.production-section-header h2,.production-summary-header h2,.kpi-card > strong,.mini-kpi-grid strong,.workflow-card > strong,.login-card h2 { color:#244b33; }
.eyebrow,.back-link,.panel-header a { color:#39764f; }
.accent-blue { --accent:#3e7e54; --soft:#e3efe6; }
.accent-orange { --accent:#73865a; --soft:#eef2e8; }
.accent-green { --accent:#4f8a60; --soft:#e4f0e7; }
.accent-purple { --accent:#557762; --soft:#e8eeea; }
.bar-fill.blue,.progress span { background:linear-gradient(90deg,#3e7f54,#78ab86); }
.bar-fill.orange { background:linear-gradient(90deg,#71865a,#9ead82); }
th { color:#315e40; background:#e4f0e7; }
.icon-link { color:#327047; background:#e2efe6; }

.summary-strip,.summary-strip.payments { color:#fff; background:linear-gradient(125deg,#3d7450,#568665); border-color:#477b58; box-shadow:0 12px 29px rgba(36,89,52,.14); }
.summary-strip > div { border-color:rgba(255,255,255,.18); }
.summary-strip span { color:#d7e8dc; }
.summary-strip strong { color:#fff; }
.budget-total-box .grand,.measurement-total,.production-total-box .grand { color:#fff; background:linear-gradient(125deg,#39734d,#568867); }
.budget-total-box .grand span,.measurement-total span,.production-total-box .grand span { color:#d5e7da; }
.production-total-box .grand strong { color:#fff; }
.production-add-button:hover { border-color:#3d7c52; background:#3d7c52; }

.workflow-measurement { --workflow-accent:#397a50; --workflow-soft:#e2efe6; }
.workflow-production { --workflow-accent:#4b865d; --workflow-soft:#e5f0e8; }
.workflow-payroll { --workflow-accent:#6f8255; --workflow-soft:#edf1e7; }
.workflow-received { --workflow-accent:#3b7558; --workflow-soft:#e2ede8; }
.workflow-explanation > span { color:#316f46; background:#e2efe6; }

.login-hero { color:#fff; background:radial-gradient(circle at 84% 12%,rgba(216,241,223,.22),transparent 30%),radial-gradient(circle at 12% 88%,rgba(32,91,51,.18),transparent 33%),linear-gradient(142deg,#3d7450,#598766 58%,#477c58); }
.login-brand { color:#fff; }
.login-brand > span { color:#356d48; background:#fff; border-color:rgba(255,255,255,.75); box-shadow:0 9px 24px rgba(27,65,40,.18); }
.hero-pill { color:#e2f0e6; border-color:rgba(255,255,255,.3); background:rgba(255,255,255,.11); }
.login-copy h1 { color:#fff; }
.login-copy > p { color:#e2eee6; }
.login-features b { color:#eff8f1; border-color:rgba(255,255,255,.25); background:rgba(255,255,255,.12); }
.login-features span { color:#f0f6f2; }
.login-hero > small { color:#d1e3d6; }
.login-panel { background:#f8faf8; }
@media (max-width:900px) {
  .sidebar-overlay { background:rgba(25,58,36,.44); }
}

/* Identidade azul original — refinamento final */
:root {
  --navy:#102a43;
  --navy-2:#0b1f33;
  --blue:#1f6f8b;
  --blue-soft:#e8f2f6;
  --teal:#2a7f78;
  --orange:#d99032;
  --orange-soft:#fff3df;
  --green:#2f855a;
  --green-soft:#e8f6ee;
  --purple:#6b5ca5;
  --ink:#243b53;
  --muted:#6b7c8f;
  --line:#dde5ec;
  --surface:#fff;
  --background:#f4f7fa;
  --shadow:0 15px 38px rgba(16,42,67,.08);
}
html,body,.page-container { background:var(--background); }
::selection { color:#fff; background:#2f7f98; }
:where(a,button,input,select,textarea,summary):focus-visible { outline-color:rgba(31,111,139,.35); }

.sidebar { color:#fff; background:radial-gradient(circle at 20% 0,rgba(77,143,165,.18),transparent 29%),linear-gradient(180deg,#0b1f33 0%,#102a43 58%,#0d263d 100%); border-right-color:#153651; box-shadow:9px 0 30px rgba(8,30,48,.12); }
.brand { border-bottom-color:rgba(255,255,255,.12); }
.brand-mark { color:#12364e; background:linear-gradient(145deg,#fff,#c6e2ec); border-color:rgba(255,255,255,.58); box-shadow:0 8px 21px rgba(0,0,0,.2); }
.brand strong { color:#fff; }
.brand span { color:#abc4d4; }
.nav-item { color:#c8d6e2; }
.nav-item > span.nav-icon { color:#93b4c7; }
.nav-item:hover { color:#fff; background:rgba(255,255,255,.08); }
.nav-item.active { color:#fff; background:linear-gradient(90deg,rgba(74,169,190,.26),rgba(74,169,190,.13)); box-shadow:inset 3px 0 #72c5d5; }
.nav-item.active > span.nav-icon { color:#98dbe6; }
.nav-section { color:#7895a8; }
.nav-group summary b.nav-chevron { color:#8ba8ba; }
.nav-submenu { border-left-color:rgba(255,255,255,.15); }
.nav-subitem { color:#a3bac9; }
.nav-subitem:hover,.nav-subitem.active { color:#fff; background:rgba(255,255,255,.08); }
.sidebar .eyebrow { color:#83ccda; }
.plan-card { border-color:rgba(255,255,255,.13); background:rgba(255,255,255,.07); }
.plan-card strong { color:#fff; }
.plan-card small { color:#abc1cf; }
.logout { border-top-color:rgba(255,255,255,.11); }

.topbar { background:rgba(255,255,255,.95); border-bottom-color:#dde5ec; box-shadow:0 4px 18px rgba(16,42,67,.035); }
.panel,.kpi-card,.company-card,.payment-card,.workflow-card,.filter-bar,.form-panel,.production-card,.production-summary-panel,.production-report-panel { background:#fff; border-color:#dde5ec; box-shadow:0 9px 27px rgba(16,42,67,.045); }
.topbar-company strong,.page-heading h1,.panel-header h2,.form-section h2,.production-section-header h2,.production-summary-header h2,.kpi-card > strong,.mini-kpi-grid strong,.workflow-card > strong,.login-card h2 { color:#102a43; }
.eyebrow,.back-link,.panel-header a { color:#1f6f8b; }
.avatar { color:#1f6f8b; background:#e8f2f6; border-color:#d1e5ec; }
.company-switcher select { color:#153a54; border-color:#d5e1e8; }
.btn-primary { color:#fff; background:linear-gradient(135deg,#1f6f8b,#185d76); box-shadow:0 8px 19px rgba(31,111,139,.21); }
.btn-primary:hover { background:linear-gradient(135deg,#195e77,#124f66); box-shadow:0 10px 24px rgba(31,111,139,.26); }
.btn-secondary { color:#2d475b; border-color:#d3dee6; background:#fff; }
.btn-secondary:hover { color:#1a637e; border-color:#9cbfce; }
.field input:focus,.field select:focus,.field textarea:focus,.budget-item input:focus,.budget-item select:focus,.measurement-item input:focus,.measurement-item select:focus { border-color:#3b8199; box-shadow:0 0 0 3px rgba(31,111,139,.13); }

.accent-blue { --accent:#1f6f8b; --soft:#e8f2f6; }
.accent-orange { --accent:#d08a2e; --soft:#fff3df; }
.accent-green { --accent:#2f855a; --soft:#e8f6ee; }
.accent-purple { --accent:#6b5ca5; --soft:#f0edfa; }
.bar-fill.blue,.progress span { background:linear-gradient(90deg,#1f6f8b,#62b7c8); }
.bar-fill.orange { background:linear-gradient(90deg,#d08a2e,#efb665); }
.bar-track,.progress { background:#edf2f5; }
th { color:#506f82; background:#eef4f7; border-bottom-color:#d9e5eb; }
td { color:#40566a; border-bottom-color:#edf1f4; }
tbody tr:hover { background:#f7fafc; }
.badge-aprovado,.badge-pago { color:#2f855a; background:#e8f6ee; }
.badge-status { color:#1f6f8b; background:#e8f2f6; }
.badge-pendente { color:#a86414; background:#fff3df; }
.icon-link { color:#1f6f8b; background:#eaf2f6; }
.icon-link:hover { background:#dcebf0; }

.summary-strip,.summary-strip.payments { color:#fff; background:linear-gradient(125deg,#102a43,#1d526d); border-color:#244d65; box-shadow:0 13px 31px rgba(16,42,67,.17); }
.summary-strip > div { border-color:rgba(255,255,255,.14); }
.summary-strip span { color:#bfd3df; }
.summary-strip strong { color:#fff; }
.calculation-preview,.info-callout { background:linear-gradient(135deg,#edf5f8,#f8fbfc); border-color:#d7e8ee; }
.payment-metrics .total,.production-line-summary { background:#e8f2f6; }
.payment-metrics .total strong,.production-section-number,.production-item-index,.production-report-icon { color:#1f6f8b; }
.budget-total-box .grand,.measurement-total,.production-total-box .grand { color:#fff; background:linear-gradient(125deg,#102a43,#225f78); }
.budget-total-box .grand span,.measurement-total span,.production-total-box .grand span { color:#c5dbe5; }
.production-total-box .grand strong { color:#fff; }
.production-items { background:#f5f8fa; }
.production-item { border-color:#dbe5eb; }
.production-add-button { color:#1f6f8b; border-color:#bdd4de; }
.production-add-button:hover { border-color:#1f6f8b; background:#1f6f8b; }
.company-card.current { border-color:#80bacb; box-shadow:0 0 0 3px rgba(31,111,139,.09),0 10px 28px rgba(16,42,67,.05); }
.company-icon,.current-label { color:#1f6f8b; background:#e8f2f6; }

.workflow-measurement { --workflow-accent:#1f6f8b; --workflow-soft:#e8f2f6; }
.workflow-production { --workflow-accent:#347f9a; --workflow-soft:#edf5f8; }
.workflow-payroll { --workflow-accent:#d08a2e; --workflow-soft:#fff3df; }
.workflow-received { --workflow-accent:#2a7f78; --workflow-soft:#e8f4f2; }
.workflow-explanation > span { color:#1f6f8b; background:#e8f2f6; }

.login-body { background:#eef3f6; }
.login-hero { color:#fff; background:radial-gradient(circle at 84% 12%,rgba(95,184,201,.24),transparent 30%),radial-gradient(circle at 12% 88%,rgba(30,105,133,.2),transparent 33%),linear-gradient(142deg,#0b1f33,#143a56 60%,#1d6075); }
.login-brand { color:#fff; }
.login-brand > span { color:#163f57; background:#fff; border-color:rgba(255,255,255,.76); box-shadow:0 9px 24px rgba(0,0,0,.19); }
.hero-pill { color:#b6e2ea; border-color:rgba(255,255,255,.24); background:rgba(255,255,255,.09); }
.login-copy h1 { color:#fff; }
.login-copy > p { color:#c3d5df; }
.login-features b { color:#a6dbe5; border-color:rgba(255,255,255,.18); background:rgba(255,255,255,.1); }
.login-features span { color:#e3edf2; }
.login-hero > small { color:#9bb7c8; }
.login-panel { background:radial-gradient(circle at 100% 0,#e7f0f4,transparent 34%); }
.login-card { border-color:#d7e3ea; box-shadow:0 27px 72px rgba(16,42,67,.13); }
.demo-access { background:#f2f6f8; border-color:#e1e9ee; }
.demo-access strong { color:#23485e; }
@media (max-width:900px) {
  .sidebar-overlay { background:rgba(4,18,31,.48); }
}

/* Ajuste fino — seletor da empresa operacional */
.topbar-company { display:grid; justify-items:center; text-align:center; }
.topbar-company .eyebrow { width:100%; text-align:center; }
.company-switcher { position:relative; display:block; }
.company-switcher::after { content:""; position:absolute; right:15px; top:50%; width:7px; height:7px; border-right:2px solid #163f57; border-bottom:2px solid #163f57; transform:translateY(-68%) rotate(45deg); pointer-events:none; }
.company-switcher select { appearance:none; -webkit-appearance:none; text-align:center; text-align-last:center; padding-left:42px; padding-right:42px; }
.company-switcher select::-ms-expand { display:none; }
@media (max-width:900px) {
  .topbar-company { display:none; }
}

/* Valores de serviço por obra */
.service-default-title,.service-work-title { margin-top:24px; }
.service-default-title p,.service-work-title p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.service-work-title { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.service-work-prices { display:grid; gap:9px; padding:16px; border:1px solid var(--line); border-radius:13px; background:#f5f9fc; }
.service-work-price-row { display:grid; grid-template-columns:minmax(280px,2fr) minmax(145px,.8fr) minmax(145px,.8fr) 38px; gap:10px; align-items:center; }
.service-work-price-head { padding:0 5px 3px; color:var(--muted); font-size:10px; font-weight:850; letter-spacing:.065em; text-transform:uppercase; }
.service-work-price-row select,.service-work-price-row input { width:100%; height:44px; min-width:0; border:1px solid #cbd9e2; border-radius:10px; padding:0 11px; color:var(--ink); background:#fff; }
.service-work-price-row select:focus,.service-work-price-row input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,111,139,.12); outline:none; }
@media (max-width:760px) {
  .service-work-title { align-items:stretch; flex-direction:column; }
  .service-work-title .btn { width:100%; }
  .service-work-prices { overflow:auto; }
  .service-work-price-row { min-width:720px; }
}

/* Central de envio das produções */
.delivery-center { overflow:hidden; padding:0; }
.delivery-center-header { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:23px 25px 21px; border-bottom:1px solid var(--line); background:linear-gradient(135deg,#fff 58%,#f3f8fa); }
.delivery-center-title { display:flex; align-items:center; gap:16px; min-width:0; }
.delivery-center-title .production-report-icon { display:grid; place-items:center; width:56px; height:56px; flex:0 0 56px; border:1px solid #d5e7ed; border-radius:17px; font-size:13px; font-weight:900; letter-spacing:.04em; background:#eaf4f7; }
.delivery-center-title h2 { margin:3px 0 5px; color:var(--navy); font-size:21px; line-height:1.2; }
.delivery-center-title p { margin:0; color:var(--muted); font-size:13px; line-height:1.5; }
.delivery-general-link { display:inline-flex; align-items:center; gap:8px; flex:0 0 auto; min-height:40px; padding:0 13px; color:#28526a; border:1px solid #d2e0e7; border-radius:11px; background:#fff; font-size:12px; font-weight:800; text-decoration:none; transition:.18s ease; }
.delivery-general-link span { font-size:17px; line-height:1; }
.delivery-general-link:hover { color:var(--blue); border-color:#9fc3d0; box-shadow:0 6px 15px rgba(16,42,67,.07); }
.delivery-workspace { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr); gap:22px; padding:23px 25px; }
.delivery-form { display:grid; grid-template-columns:minmax(260px,1fr) auto; gap:12px 14px; align-content:center; }
.delivery-employee-field { display:grid; gap:7px; min-width:0; }
.delivery-employee-field > span,.delivery-status-caption { color:#567084; font-size:10px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.delivery-employee-field select { width:100%; height:48px; min-width:0; padding:0 39px 0 14px; color:var(--navy); border:1px solid #cfdde5; border-radius:12px; background:#fff; font-family:inherit; font-size:14px; font-weight:700; outline:none; transition:.18s ease; }
.delivery-employee-field select:focus { border-color:#55a0b7; box-shadow:0 0 0 3px rgba(31,111,139,.11); }
.delivery-actions { display:flex; align-items:flex-end; gap:9px; }
.delivery-actions .btn { min-height:48px; white-space:nowrap; }
.delivery-help { grid-column:1 / -1; display:block; min-height:18px; color:var(--muted); font-size:11px; line-height:1.5; }
.delivery-status-card { position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:9px; min-height:110px; padding:17px 19px; border:1px solid #d8e4ea; border-radius:15px; background:#f8fafc; }
.delivery-status-card::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; border-radius:15px 0 0 15px; background:#b7c4cc; }
.delivery-status-card:has(.tone-progress)::before { background:#e1a32e; }
.delivery-status-card:has(.tone-success)::before { background:#2f855a; }
.delivery-status-card:has(.tone-warning)::before { background:#d1782b; }
.delivery-status-card p { margin:0; color:#5f7485; font-size:12px; line-height:1.45; }
.delivery-badge { display:inline-flex; align-items:center; gap:7px; width:max-content; max-width:100%; min-height:27px; padding:4px 10px; border-radius:999px; font-size:11px; font-weight:850; line-height:1.25; text-decoration:none; white-space:nowrap; }
.delivery-badge i { width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:currentColor; box-shadow:0 0 0 3px rgba(112,130,144,.12); }
.delivery-badge.tone-neutral { color:#607483; background:#e9eef2; }
.delivery-badge.tone-progress { color:#95600d; background:#fff0c9; }
.delivery-badge.tone-success { color:#21744c; background:#ddf3e7; }
.delivery-badge.tone-warning { color:#a65019; background:#ffeadb; }
.delivery-reset-button { padding:0; color:#6b7c8f; border:0; border-bottom:1px solid #adb9c2; background:transparent; font-size:10px; font-weight:750; cursor:pointer; }
.delivery-reset-button:hover { color:#bc3e43; border-color:#bc3e43; }
#deliveryResetForm { display:none; }
.delivery-confirm-panel { display:flex; align-items:center; gap:13px; margin:0 25px 21px; padding:14px 15px; border:1px solid #efcc7e; border-radius:14px; background:linear-gradient(135deg,#fff8e9,#fffdf8); }
.delivery-confirm-panel[hidden] { display:none; }
.delivery-confirm-icon { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; color:#8b5b0d; border-radius:12px; background:#ffe7ad; font-size:18px; font-weight:900; }
.delivery-confirm-copy { display:grid; gap:2px; min-width:0; margin-right:auto; }
.delivery-confirm-copy strong { color:#5f4314; font-size:13px; }
.delivery-confirm-copy span { color:#8b6f3d; font-size:11px; line-height:1.45; }
.delivery-confirm-panel .btn { white-space:nowrap; }
.delivery-history { border-top:1px solid var(--line); background:#fbfcfd; }
.delivery-history > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 25px; color:#385367; font-size:12px; font-weight:850; cursor:pointer; list-style:none; }
.delivery-history > summary::-webkit-details-marker { display:none; }
.delivery-history > summary::before { content:"+"; display:grid; place-items:center; width:22px; height:22px; margin-right:9px; color:var(--blue); border:1px solid #cfdee6; border-radius:7px; background:#fff; }
.delivery-history[open] > summary::before { content:"−"; }
.delivery-history > summary span { margin-right:auto; }
.delivery-history > summary small { color:#7a8d9b; font-size:10px; font-weight:650; }
.delivery-history-table { overflow:auto; border-top:1px solid #e8edf1; background:#fff; }
.delivery-history-table table { min-width:680px; }
.delivery-history-table th,.delivery-history-table td { padding:11px 25px; font-size:11px; }
.delivery-history-table .delivery-badge { font-size:10px; }
.delivery-empty-state { display:flex; align-items:center; gap:14px; padding:25px; }
.delivery-empty-state > span { display:grid; place-items:center; width:48px; height:48px; flex:0 0 48px; color:#7c92a1; border-radius:14px; background:#edf2f5; font-size:11px; font-weight:900; }
.delivery-empty-state strong { color:var(--navy); font-size:14px; }
.delivery-empty-state p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.table-muted { color:#a7b2ba; }

@media (max-width:1180px) {
  .delivery-workspace { grid-template-columns:1fr; }
  .delivery-status-card { min-height:92px; }
}
@media (max-width:820px) {
  .delivery-center-header { align-items:flex-start; padding:19px; }
  .delivery-center-title { align-items:flex-start; }
  .delivery-center-title .production-report-icon { width:47px; height:47px; flex-basis:47px; border-radius:14px; }
  .delivery-workspace { padding:19px; }
  .delivery-form { grid-template-columns:1fr; }
  .delivery-actions,.delivery-help { grid-column:1; }
  .delivery-actions .btn { flex:1; }
  .delivery-confirm-panel { align-items:flex-start; flex-wrap:wrap; margin:0 19px 19px; }
  .delivery-confirm-panel form { width:100%; }
  .delivery-confirm-panel .btn { width:100%; }
  .delivery-history > summary { padding:14px 19px; }
}
@media (max-width:560px) {
  .delivery-general-link { padding:0 10px; }
  .delivery-center-title p { display:none; }
  .delivery-actions { flex-direction:column; align-items:stretch; }
  .delivery-actions .btn { width:100%; }
}

/* v1.10 - níveis de acesso, perfil e frequência de obra */
.form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.topbar-user { padding:6px 8px; border-radius:11px; transition:.16s ease; }
.topbar-user:hover { background:var(--blue-soft); }
.access-denied-card { width:min(680px,100%); margin:60px auto; padding:38px; text-align:center; }
.access-denied-card h1 { margin:9px 0; color:var(--navy); font-size:27px; }
.access-denied-card p { max-width:560px; margin:0 auto; color:var(--muted); line-height:1.65; }
.access-denied-card .form-actions { justify-content:center; }
.access-denied-icon { width:52px; height:52px; margin:0 auto 17px; display:grid; place-items:center; border-radius:15px; color:#a86414; background:var(--orange-soft); font-size:24px; font-weight:900; }

.profile-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(300px,.8fr); gap:18px; align-items:start; }
.profile-card,.theme-card { max-width:none; }
.profile-heading { display:flex; align-items:center; gap:15px; margin-bottom:24px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.profile-heading h2,.theme-card h2 { margin:4px 0 4px; color:var(--navy); font-size:19px; }
.profile-heading p,.theme-card > p { margin:0; color:var(--muted); line-height:1.5; }
.profile-avatar { width:52px; height:52px; font-size:18px; }
.profile-actions { grid-column:1/-1; margin-top:0; }
.theme-options { display:grid; gap:10px; margin-top:20px; }
.theme-option { position:relative; display:grid; grid-template-columns:72px 1fr; align-items:center; gap:12px; padding:11px; border:1px solid var(--line); border-radius:11px; background:#fff; cursor:pointer; }
.theme-option input { position:absolute; opacity:0; pointer-events:none; }
.theme-option:has(input:checked) { border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,111,139,.10); }
.theme-preview { height:42px; display:grid; grid-template-columns:18px 1fr; grid-template-rows:13px 1fr; overflow:hidden; border:1px solid rgba(16,42,67,.14); border-radius:7px; background:#f4f7fa; }
.theme-preview i { grid-row:1/-1; background:#102a43; }.theme-preview b { background:#fff; }.theme-preview em { margin:5px; border-radius:3px; background:#fff; }
.theme-swatch-emerald .theme-preview i { background:#176b55; }.theme-swatch-emerald .theme-preview { background:#f0f8f5; }
.theme-swatch-violet .theme-preview i { background:#5a4b91; }.theme-swatch-violet .theme-preview { background:#f5f2fb; }
.theme-swatch-dark .theme-preview i { background:#090f1a; }.theme-swatch-dark .theme-preview { background:#172131; }.theme-swatch-dark .theme-preview b,.theme-swatch-dark .theme-preview em { background:#263448; }
.access-summary { margin-top:20px; padding:16px; border-radius:11px; background:var(--blue-soft); }
.access-summary span,.access-summary strong,.access-summary small { display:block; }.access-summary span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }.access-summary strong { margin:5px 0; color:var(--navy); font-size:18px; }.access-summary small { color:var(--muted); line-height:1.45; }

.role-guide { display:flex; flex-wrap:wrap; gap:9px; margin:-8px 0 16px; }
.role-guide > div { display:flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--line); border-radius:99px; background:#fff; color:var(--muted); font-size:11px; }
.role-dot { width:8px; height:8px; border-radius:50%; background:#8296a6; }.role-admin { --role-color:#1f6f8b; }.role-finance { --role-color:#6b5ca5; }.role-foreman { --role-color:#d08a2e; }.role-painter { --role-color:#2f855a; }
.role-dot.role-admin,.role-dot.role-finance,.role-dot.role-foreman,.role-dot.role-painter { background:var(--role-color); }
.role-badge { color:var(--role-color); background:color-mix(in srgb,var(--role-color) 12%,white); }
.role-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.role-option { position:relative; display:flex; min-height:88px; padding:16px; border:1px solid var(--line); border-radius:12px; background:#fff; cursor:pointer; }
.role-option input { width:17px; height:17px; margin:2px 12px 0 0; accent-color:var(--blue); }
.role-option strong,.role-option small { display:block; }.role-option strong { color:var(--navy); }.role-option small { margin-top:5px; color:var(--muted); line-height:1.45; }
.role-option:has(input:checked) { border-color:var(--blue); background:var(--blue-soft); box-shadow:0 0 0 3px rgba(31,111,139,.08); }
.access-active { margin-top:17px; }

.attendance-heading { align-items:center; }
.attendance-filters { display:grid; grid-template-columns:180px minmax(230px,1fr) minmax(220px,.8fr) auto; }
.attendance-filters select,.attendance-daily-selector select { height:40px; border:1px solid var(--line); background:#fff; border-radius:9px; padding:0 11px; color:var(--ink); }
.attendance-pdf-panel { display:grid; grid-template-columns:minmax(310px,.9fr) minmax(520px,1.1fr); gap:22px; align-items:center; padding:20px 22px; margin-bottom:15px; }
.attendance-pdf-copy { display:flex; align-items:center; gap:14px; }.attendance-pdf-copy h2 { margin:4px 0; color:var(--navy); }.attendance-pdf-copy p { margin:0; color:var(--muted); line-height:1.45; }
.pdf-symbol { flex:0 0 auto; width:48px; height:48px; display:grid; place-items:center; border-radius:13px; color:var(--blue); background:var(--blue-soft); font-size:11px; font-weight:900; }
.attendance-pdf-actions { display:grid; grid-template-columns:1fr .8fr auto; align-items:end; gap:10px; }.attendance-pdf-actions label { display:grid; gap:5px; }.attendance-pdf-actions label > span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }.attendance-pdf-actions select { height:40px; min-width:0; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); padding:0 9px; }.attendance-pdf-buttons { display:flex; gap:8px; }
.attendance-summary-table { margin-bottom:15px; }.attendance-summary-table .panel-header small { color:var(--muted); }.tone-warning { color:#a86414; }.tone-success { color:var(--green); }
.attendance-records .notes-cell { display:block; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attendance-status.status-presente { color:var(--green); background:var(--green-soft); }.attendance-status.status-falta { color:var(--red); background:var(--red-soft); }.attendance-status.status-atestado { color:#6b5ca5; background:#f0edfa; }.attendance-status.status-folga,.attendance-status.status-ferias { color:var(--blue); background:var(--blue-soft); }
.attendance-daily-selector { display:grid; grid-template-columns:190px minmax(320px,1fr) auto; }
.attendance-rule-strip { display:grid; grid-template-columns:1.35fr .9fr .8fr auto; overflow:hidden; margin-bottom:15px; border:1px solid var(--line); border-radius:13px; background:#fff; }.attendance-rule-strip > div { min-height:70px; display:flex; flex-direction:column; justify-content:center; padding:14px 18px; border-right:1px solid var(--line); }.attendance-rule-strip > div:last-child { border-right:0; }.attendance-rule-strip span { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }.attendance-rule-strip strong { margin-top:5px; color:var(--navy); font-size:16px; }.attendance-rule-action a { white-space:nowrap; color:var(--blue); font-size:11px; font-weight:850; }
.attendance-entry-form table { min-width:1210px; }.table-select,.table-input { width:100%; height:38px; min-width:110px; border:1px solid #cfdbe4; border-radius:8px; padding:0 9px; color:var(--ink); background:#fff; }.attendance-time { min-width:95px; }.attendance-break,.attendance-required { min-width:105px; }.attendance-notes { min-width:230px; }.attendance-entry-row { transition:.14s ease; }.attendance-entry-row.is-not-selected { opacity:.62; }.attendance-entry-row.is-absence { background:#fff8f8; }.attendance-save { padding:17px 20px; margin:0; }
.heading-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.schedule-callout { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:17px 18px; border:1px solid var(--line); border-radius:12px; background:var(--blue-soft); }.schedule-callout strong,.schedule-callout p { display:block; }.schedule-callout strong { color:var(--navy); }.schedule-callout p { margin:5px 0 0; color:var(--muted); }.schedule-callout > span { color:var(--muted); font-size:11px; font-weight:750; }
.schedule-help { display:flex; flex-wrap:wrap; align-items:baseline; gap:7px 14px; margin-bottom:16px; padding:14px 16px; border-radius:11px; color:var(--ink); background:var(--blue-soft); }.schedule-help strong { color:var(--navy); }.schedule-help span { color:var(--muted); font-size:12px; }
.schedule-table-wrap { overflow:auto; border:1px solid var(--line); border-radius:12px; }.schedule-table { min-width:760px; }.schedule-table td { vertical-align:middle; }.schedule-table td:first-child strong,.schedule-table td:first-child small { display:block; }.schedule-table td:first-child small { margin-top:3px; color:var(--muted); }.schedule-switch { display:inline-flex; align-items:center; gap:8px; min-width:88px; color:var(--navy); font-weight:800; cursor:pointer; }.schedule-switch input { width:17px; height:17px; accent-color:var(--blue); }.schedule-result { white-space:nowrap; color:var(--navy); }.schedule-row { transition:.15s ease; }.schedule-row.is-day-off { opacity:.58; background:#f5f7f9; }
.painter-pdf-card { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:20px 22px; margin-bottom:15px; }.painter-pdf-card > div { display:flex; align-items:center; gap:13px; }.painter-pdf-card h2 { margin:4px 0; color:var(--navy); }.painter-pdf-card p { margin:0; color:var(--muted); }
.operational-kpis { margin-bottom:15px; }.operational-kpis .kpi-card:hover { transform:translateY(-2px); }.operational-recent { margin-top:15px; }

/* Temas individuais padronizados */
.theme-emerald { --navy:#174d40; --navy-2:#10382f; --blue:#19745b; --blue-soft:#e5f3ee; --background:#f3f8f6; --ink:#244b40; --muted:#657d75; --line:#d7e5df; }
.theme-emerald .sidebar { background:linear-gradient(180deg,#0f342b,#17624f); }
.theme-emerald .btn-primary { background:#19745b; box-shadow:0 8px 19px rgba(25,116,91,.22); }
.theme-emerald .nav-item.active { background:rgba(94,190,155,.22); box-shadow:inset 3px 0 #7bd0b1; }
.theme-violet { --navy:#443873; --navy-2:#312754; --blue:#6654a5; --blue-soft:#efebf9; --background:#f7f5fb; --ink:#3d3657; --muted:#756f88; --line:#e1ddec; }
.theme-violet .sidebar { background:linear-gradient(180deg,#2d244d,#514184); }
.theme-violet .btn-primary { background:#6654a5; box-shadow:0 8px 19px rgba(102,84,165,.22); }
.theme-violet .nav-item.active { background:rgba(171,151,233,.22); box-shadow:inset 3px 0 #c2aff3; }
.theme-dark { --navy:#e5edf6; --navy-2:#080d16; --blue:#62b3d0; --blue-soft:#1f3444; --ink:#dbe6f0; --muted:#96a8b9; --line:#344356; --surface:#1b2635; --background:#111927; --shadow:0 12px 35px rgba(0,0,0,.24); }
.theme-dark .sidebar { background:linear-gradient(180deg,#070c14,#101c2c); }
.theme-dark .topbar { background:rgba(24,35,50,.96); border-color:var(--line); }
.theme-dark .panel,.theme-dark .kpi-card,.theme-dark .company-card,.theme-dark .payment-card,.theme-dark .workflow-card,.theme-dark .filter-bar,.theme-dark .form-panel,.theme-dark .production-card,.theme-dark .production-summary-panel,.theme-dark .production-report-panel,.theme-dark .attendance-rule-strip,.theme-dark .theme-option,.theme-dark .role-option,.theme-dark .schedule-callout { background:#1b2635; border-color:var(--line); }
.theme-dark th { color:#a9bac9; background:#243244; border-color:var(--line); }.theme-dark td { color:#c4d0dc; border-color:#2d3b4d; }.theme-dark tbody tr:hover { background:#202e40; }
.theme-dark .field input,.theme-dark .field select,.theme-dark .field textarea,.theme-dark .filter-inline input,.theme-dark .filter-bar input,.theme-dark .filter-bar select,.theme-dark .attendance-pdf-actions select,.theme-dark .table-input,.theme-dark .table-select,.theme-dark .company-switcher select { color:var(--ink); background:#151f2d; border-color:#3a4b60; }
.theme-dark .btn-secondary { color:var(--ink); background:#202d3e; border-color:#405268; }.theme-dark .production-items { background:#151f2d; }.theme-dark .production-item { background:#1b2635; border-color:#344356; }.theme-dark .production-item-top,.theme-dark .production-section-header { background:#202d3e; border-color:#344356; }.theme-dark .theme-option:has(input:checked),.theme-dark .role-option:has(input:checked) { background:#1f3444; }
.theme-dark .attendance-rule-strip > div,.theme-dark .profile-heading { border-color:var(--line); }.theme-dark .access-summary,.theme-dark .schedule-help { background:#1f3444; }.theme-dark .schedule-row.is-day-off { background:#151f2d; }

@media (max-width:1150px) {
  .profile-layout { grid-template-columns:1fr; }.profile-actions { grid-column:auto; }
  .attendance-pdf-panel { grid-template-columns:1fr; }.attendance-pdf-actions { grid-template-columns:1fr 1fr; }.attendance-pdf-buttons { grid-column:1/-1; justify-content:flex-end; }
  .attendance-filters { grid-template-columns:1fr 1fr; }
}
@media (max-width:720px) {
  .form-grid.two,.role-options,.attendance-rule-strip,.attendance-filters,.attendance-daily-selector,.attendance-pdf-actions { grid-template-columns:1fr; }
  .attendance-rule-strip > div { border-right:0; border-bottom:1px solid var(--line); }.attendance-rule-strip > div:last-child { border-bottom:0; }
  .attendance-pdf-buttons { grid-column:auto; flex-direction:column; }.attendance-pdf-buttons .btn { width:100%; }
  .painter-pdf-card { align-items:flex-start; flex-direction:column; }
  .schedule-callout { align-items:flex-start; flex-direction:column; }
}

/* v1.11 — navegação por áreas, financeiro, permissões e temas integrais */
.nav-icon svg,.nav-chevron svg,.icon-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.nav-item { flex:0 0 auto; }
.nav-item .nav-icon { display:grid; place-items:center; flex:0 0 22px; }
.nav-chevron { margin-left:auto; display:grid; place-items:center; }
.nav-chevron svg { width:16px; height:16px; }

.financial-filters { display:grid; grid-template-columns:160px minmax(230px,1fr) 180px 180px auto; align-items:end; }
.financial-filters label { min-width:0; }
.financial-filters select,.financial-filters input { width:100%; }
.financial-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; margin-bottom:15px; }
.financial-summary-card { position:relative; overflow:hidden; min-height:126px; padding:21px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); }
.financial-summary-card::before { content:""; position:absolute; inset:0 0 auto; height:4px; background:var(--card-tone); }
.financial-summary-card span,.financial-summary-card strong,.financial-summary-card small { display:block; }
.financial-summary-card span { color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.financial-summary-card strong { margin:10px 0 5px; color:var(--card-tone); font-size:25px; letter-spacing:-.035em; }
.financial-summary-card small { color:var(--muted); }
.financial-summary-card.income,.financial-summary-card.result.positive { --card-tone:#25855f; }
.financial-summary-card.expense,.financial-summary-card.result.negative { --card-tone:#c34f55; }
.financial-table .numeric { text-align:right; }
.financial-type.income { color:#237a59; background:#e6f5ee; }
.financial-type.expense { color:#b34349; background:#fff0f1; }
.tone-danger { color:#b34349; }
.badge-cancelado { color:#8a5260; background:#f5eaed; }
.table-muted { color:var(--muted); }

.access-profile-list { display:grid; gap:16px; }
.access-profile-card { padding:22px; }
.access-profile-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:17px; border-bottom:1px solid var(--line); }
.access-profile-identity { display:flex; align-items:center; gap:12px; }
.access-profile-identity .role-dot { width:12px; height:12px; }
.access-profile-header h2 { margin:4px 0 0; color:var(--navy); font-size:19px; }
.access-profile-fields { display:grid; grid-template-columns:minmax(220px,.75fr) minmax(360px,1.25fr); gap:14px; padding:18px 0; }
.permission-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.permission-option { display:flex; gap:9px; min-height:74px; padding:12px; border:1px solid var(--line); border-radius:11px; background:var(--surface); cursor:pointer; }
.permission-option input { flex:0 0 auto; width:16px; height:16px; margin-top:2px; accent-color:var(--blue); }
.permission-option strong,.permission-option small { display:block; }
.permission-option strong { color:var(--navy); font-size:12px; }
.permission-option small { margin-top:4px; color:var(--muted); font-size:10px; line-height:1.4; }
.permission-option:has(input:checked) { border-color:color-mix(in srgb,var(--blue) 55%,var(--line)); background:var(--blue-soft); }
.permission-option.is-protected { cursor:default; opacity:.83; }

.theme-blue,.theme-emerald,.theme-violet,.theme-dark { color:var(--ink); background:var(--background); }
.theme-blue .panel,.theme-emerald .panel,.theme-violet .panel,
.theme-blue .kpi-card,.theme-emerald .kpi-card,.theme-violet .kpi-card,
.theme-blue .financial-summary-card,.theme-emerald .financial-summary-card,.theme-violet .financial-summary-card { background:var(--surface); border-color:var(--line); }
.theme-emerald .topbar,.theme-violet .topbar { background:var(--surface); border-color:var(--line); }
.theme-emerald .btn-secondary,.theme-violet .btn-secondary,
.theme-emerald .field input,.theme-emerald .field select,.theme-emerald .field textarea,
.theme-violet .field input,.theme-violet .field select,.theme-violet .field textarea,
.theme-emerald .filter-bar,.theme-violet .filter-bar,
.theme-emerald .filter-bar input,.theme-emerald .filter-bar select,
.theme-violet .filter-bar input,.theme-violet .filter-bar select { color:var(--ink); background:var(--surface); border-color:var(--line); }
.theme-dark .financial-summary-card,.theme-dark .access-profile-card,.theme-dark .permission-option { background:var(--surface); border-color:var(--line); }
.theme-dark .financial-type.income { color:#79d7ad; background:#1d3d33; }
.theme-dark .financial-type.expense { color:#f39aa0; background:#482a31; }
.theme-dark .badge-cancelado { color:#e6a8b7; background:#422b34; }
.theme-dark .permission-option:has(input:checked) { background:var(--blue-soft); }
.theme-dark .company-card,.theme-dark .payment-card,.theme-dark .workflow-card,.theme-dark .filter-bar,.theme-dark .form-panel,
.theme-dark .production-card,.theme-dark .production-summary-panel,.theme-dark .production-report-panel,
.theme-dark .attendance-rule-strip,.theme-dark .theme-option,.theme-dark .role-option,.theme-dark .schedule-callout,
.theme-dark .financial-summary-card,.theme-dark .access-profile-card { background:var(--surface); }

@media (max-width:1120px) {
  .financial-filters { grid-template-columns:1fr 1fr; }
  .permission-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px) {
  .financial-summary-grid,.financial-filters,.access-profile-fields,.permission-grid { grid-template-columns:1fr; }
  .access-profile-header { align-items:flex-start; flex-direction:column; }
}

/* v1.8.14 — refinamento geral de alinhamento (somente interface) */
:root {
  --ui-control-height:44px;
  --ui-section-gap:18px;
}

/* Estrutura, títulos e ações de página */
.page-container { width:100%; }
.page-heading { align-items:flex-end; gap:30px; }
.page-heading.compact { align-items:flex-end; }
.page-heading > div:first-child { min-width:0; }
.page-heading h1 { line-height:1.12; }
.page-heading p { line-height:1.55; }
.page-heading > .btn,
.page-heading > .company-actions,
.page-heading > .filter-inline { flex:0 0 auto; margin-bottom:1px; }
.company-actions form,
.payroll-actions form,
.filter-inline > form { margin:0; }
.filter-inline > form { display:flex; align-items:flex-end; }
.filter-inline,.company-actions,.payroll-actions { row-gap:9px; }
.filter-inline .btn,.filter-bar .btn { min-height:var(--ui-control-height); }
.filter-inline input,.filter-bar input,.filter-bar select { min-height:var(--ui-control-height); }

/* Superfícies e cabeçalhos internos */
.panel,.company-card,.payment-card,.workflow-card,.kpi-card { border-radius:16px; }
.panel-header { min-height:72px; align-items:center; padding:18px 21px; }
.panel-header > div { min-width:0; }
.panel-header h2 { line-height:1.25; }
.form-section { margin-bottom:17px; }
.form-section:not(:first-child) { margin-top:26px; padding-top:25px; }
.form-section h2 { line-height:1.3; }
.info-callout { line-height:1.55; }
.empty-cell,.empty-state { line-height:1.55; }

/* Tabelas: mesma altura, alinhamento vertical e ações estáveis */
.table-panel table { font-variant-numeric:tabular-nums; }
.table-panel thead tr { height:48px; }
.table-panel tbody tr { height:68px; }
.table-panel th { padding:12px 15px; vertical-align:middle; line-height:1.3; }
.table-panel td { padding:14px 15px; vertical-align:middle; line-height:1.45; }
.table-panel td strong { line-height:1.35; }
.table-panel td small { margin-top:5px; line-height:1.4; }
.table-panel .badge,.table-panel .delivery-badge { vertical-align:middle; }
.actions { padding-left:10px!important; text-align:right; vertical-align:middle; }
.actions > a,.actions > form { vertical-align:middle; }
.actions form { line-height:0; }
.actions .icon-link { flex:0 0 auto; vertical-align:middle; }
.icon-link { padding:0; line-height:1; }
.icon-link.pdf-link { height:36px; }
.progress-cell .progress { margin-top:2px; }

/* Formulários e controles */
.form-panel { width:100%; }
.form-grid { column-gap:18px; row-gap:18px; align-items:start; }
.field { min-width:0; align-content:start; }
.field > span { display:flex; align-items:flex-end; min-height:16px; line-height:1.35; }
.field input,.field select { height:var(--ui-control-height); }
.field textarea { line-height:1.5; }
.field small { display:block; line-height:1.45; }
.form-actions { align-items:center; min-height:66px; margin-top:27px; padding-top:21px; }
.form-actions form { margin:0; }
.check-field { min-height:var(--ui-control-height); }
.check-field span { line-height:1.4; }

/* Linhas dinâmicas de orçamento, medição, produção e serviços */
.budget-item,.measurement-item,.service-work-price-row { min-height:var(--ui-control-height); }
.budget-item-head,.measurement-item-head,.service-work-price-head { min-height:26px; align-items:end; line-height:1.3; }
.budget-item input,.budget-item select,
.measurement-item input,.measurement-item select,
.service-work-price-row input,.service-work-price-row select { height:var(--ui-control-height); }
.budget-line-total,.measurement-line-total { display:flex; align-items:center; justify-content:flex-end; min-height:var(--ui-control-height); }
.budget-total-box > div { min-height:44px; align-items:center; }
.measurement-total { min-height:58px; }
.measurement-items-title { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto auto; column-gap:18px; align-items:end; }
.measurement-items-title > .eyebrow,.measurement-items-title > h2 { grid-column:1; }
.measurement-items-title > h2 { grid-row:2; }
.measurement-items-title .btn { position:static; grid-column:2; grid-row:1 / 3; align-self:end; }
.service-work-title { align-items:flex-end; }
.service-work-title > div { min-width:0; }
.service-work-price-row .icon-link { justify-self:center; }
.production-identification-grid,.production-item-grid { align-items:start; }
.production-item-grid .field { align-self:start; }
.production-line-summary { min-height:var(--ui-control-height); align-self:end; }
.production-item-top { align-items:center; }
.production-summary-header { min-height:72px; }
.production-actions { min-height:44px; }

/* Indicadores e cartões */
.summary-strip > div { display:flex; flex-direction:column; justify-content:center; min-height:88px; }
.summary-strip span { line-height:1.35; }
.summary-strip strong { line-height:1.2; font-variant-numeric:tabular-nums; }
.mini-kpi-grid > div { min-height:64px; }
.mini-kpi-grid span { line-height:1.35; }
.kpi-card { display:flex; flex-direction:column; justify-content:center; }
.kpi-card > span { padding-right:42px; line-height:1.35; }
.kpi-card > strong { line-height:1.15; font-variant-numeric:tabular-nums; }
.workflow-card > strong { line-height:1.15; font-variant-numeric:tabular-nums; }
.workflow-card > small { min-height:34px; }
.workflow-explanation p { min-width:0; }

/* Cartões de empresas e folha */
.company-grid { align-items:stretch; }
.company-card { display:flex; flex-direction:column; height:100%; }
.company-card-head { align-items:center; min-height:60px; }
.company-card-head > div:nth-child(2) { min-width:0; }
.company-card-head strong,.company-card-head small { overflow-wrap:anywhere; }
.company-details { align-items:stretch; }
.company-details > div { display:flex; flex-direction:column; justify-content:center; min-height:62px; }
.company-details strong { line-height:1.35; overflow-wrap:anywhere; }
.company-actions { margin-top:auto; padding-top:2px; }
.company-actions .btn { min-height:42px; }
.payment-cards { align-items:stretch; }
.payment-card { display:flex; flex-direction:column; height:100%; }
.payment-card-header { align-items:center; min-height:55px; }
.payment-card-header > div { min-width:0; }
.payment-card-header > div > div { min-width:0; }
.payment-card-header strong,.payment-card-header small { overflow-wrap:anywhere; }
.payment-metrics > div { display:flex; flex-direction:column; justify-content:center; min-height:67px; }
.payment-form { align-items:end; margin-top:auto; }
.payment-form .field { align-self:end; }
.payment-form .btn { min-height:var(--ui-control-height); }
.attachment-row { min-height:50px; }
.attachment-row > div { min-width:0; }
.attachment-row a { overflow-wrap:anywhere; }

/* Central de envio e login */
.delivery-workspace { align-items:stretch; }
.delivery-form { align-self:center; }
.delivery-status-card { height:100%; }
.delivery-history-table td { height:auto; }
.login-card .field > span { min-height:16px; }
.login-card .field input { min-height:46px; }
.login-card .btn { min-height:46px; }

@media (max-width:1180px) {
  .mini-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mini-kpi-grid > div:nth-child(2) { border-right:0; }
  .mini-kpi-grid > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
}

@media (max-width:980px) {
  .page-heading:not(.compact) { align-items:stretch; flex-direction:column; gap:18px; }
  .page-heading > .filter-inline,.page-heading > .company-actions { align-self:flex-start; margin-bottom:0; }
  .dashboard-heading-actions { justify-content:flex-start; }
}

@media (max-width:760px) {
  .form-grid.three { grid-template-columns:1fr; }
  .span-2,.span-3 { grid-column:auto; }
  .measurement-items-title { grid-template-columns:1fr; grid-template-rows:auto; }
  .measurement-items-title > .eyebrow,.measurement-items-title > h2,.measurement-items-title .btn { grid-column:1; grid-row:auto; }
  .measurement-items-title .btn { width:100%; margin-top:4px; }
  .service-work-title { align-items:stretch; }
  .panel-header { min-height:0; }
}

@media (max-width:680px) {
  .page-heading,.page-heading.compact { align-items:stretch; gap:17px; }
  .page-heading > .filter-inline,.page-heading > .company-actions { width:100%; align-self:stretch; }
  .filter-inline { align-items:stretch; flex-wrap:wrap; }
  .filter-inline > form { flex:1 1 190px; }
  .filter-inline > form label,.filter-inline input { width:100%; }
  .company-actions > .btn,.company-actions > form,.company-actions > form .btn { flex:1 1 100%; width:100%; }
  .mini-kpi-grid { grid-template-columns:1fr; }
  .mini-kpi-grid > div { border-right:0; border-bottom:1px solid var(--line); }
  .mini-kpi-grid > div:last-child { border-bottom:0; }
  .form-actions { min-height:0; }
  .payment-form { grid-template-columns:1fr; }
  .payment-form .full,.payment-form .btn { grid-column:1; }
  .delivery-status-card { height:auto; }
}

/* v1.8.15 — identidade visual da empresa nos documentos */
.company-brand-section p { max-width:760px; margin-top:7px; color:var(--muted); line-height:1.5; }
.company-logo-editor {
  display:grid;
  grid-template-columns:minmax(220px,300px) minmax(0,1fr);
  gap:22px;
  align-items:stretch;
  padding:20px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f7fafc;
}
.company-logo-preview {
  min-height:142px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:17px;
  overflow:hidden;
  border-radius:12px;
  background-color:var(--surface,#fff);
  background-image:linear-gradient(45deg,var(--surface-soft,#edf3f6) 25%,transparent 25%),linear-gradient(-45deg,var(--surface-soft,#edf3f6) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--surface-soft,#edf3f6) 75%),linear-gradient(-45deg,transparent 75%,var(--surface-soft,#edf3f6) 75%);
  background-size:18px 18px;
  background-position:0 0,0 9px,9px -9px,-9px 0;
  box-shadow:inset 0 0 0 1px var(--line,#d8e3e8);
}
.company-logo-preview img { display:block; max-width:100%; max-height:108px; width:auto; height:auto; object-fit:contain; }
.company-logo-placeholder { display:grid; place-items:center; gap:5px; color:var(--blue); text-align:center; }
.company-logo-placeholder span { font-size:18px; font-weight:900; letter-spacing:.14em; }
.company-logo-placeholder small { color:var(--muted); font-size:11px; }
.company-logo-controls { display:flex; flex-direction:column; justify-content:center; min-width:0; }
.company-logo-controls .field input[type="file"] { height:auto; min-height:var(--ui-control-height); padding:8px 10px; background:#fff; }
.company-logo-controls .field input[type="file"]::file-selector-button {
  min-height:32px;
  margin-right:11px;
  padding:0 13px;
  border:0;
  border-radius:8px;
  background:var(--blue-soft);
  color:var(--blue);
  font-weight:800;
  cursor:pointer;
}
.company-logo-help { margin:9px 0 0; color:var(--muted); font-size:11.5px; line-height:1.5; }
.company-logo-file { margin-top:8px; color:var(--navy); font-size:11.5px; font-weight:750; overflow-wrap:anywhere; }
.company-logo-remove { margin-top:11px; color:#8d2933; }
.company-notes-grid { margin-top:20px; }
.company-brand-icon { overflow:hidden; padding:0; background:#e8f2f6; }
.company-brand-icon img { width:100%; height:100%; object-fit:contain; background:#102a43; }
.company-brand-icon span { font-size:11px; letter-spacing:.08em; }

@media (max-width:760px) {
  .company-logo-editor { grid-template-columns:1fr; padding:16px; }
  .company-logo-preview { min-height:128px; }
}

/* v1.8.16 — personalização assistida dos PDFs */
.pdf-customize-heading { align-items:flex-end; }
.pdf-customize-layout { display:grid; grid-template-columns:minmax(420px,.88fr) minmax(520px,1.12fr); gap:20px; align-items:start; }
.pdf-settings-panel { padding:22px; }
.pdf-settings-panel .form-section:first-child { margin-top:0; padding-top:0; }
.pdf-settings-panel .form-section p { margin:7px 0 0; color:var(--muted); line-height:1.45; }
.form-grid.two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.pdf-settings-grid .full { grid-column:1/-1; }
.pdf-toggle-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:17px; }
.pdf-toggle { display:flex; gap:10px; align-items:flex-start; min-height:74px; padding:13px; border:1px solid var(--line); border-radius:12px; background:#f8fafc; cursor:pointer; }
.pdf-toggle > input[type="hidden"] { display:none; }
.pdf-toggle > input[type="checkbox"] { width:18px; height:18px; margin-top:2px; accent-color:var(--blue); }
.pdf-toggle span,.pdf-toggle strong,.pdf-toggle small { display:block; }
.pdf-toggle span { min-width:0; }
.pdf-toggle strong { color:var(--navy); font-size:12px; line-height:1.3; }
.pdf-toggle small { margin-top:4px; color:var(--muted); line-height:1.35; }
.pdf-color-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:17px; }
.pdf-color-field { display:grid; grid-template-columns:42px minmax(0,1fr); grid-template-rows:auto auto; gap:5px 10px; align-items:center; padding:11px; border:1px solid var(--line); border-radius:11px; background:#f8fafc; }
.pdf-color-field span { grid-column:1/-1; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.pdf-color-field input { width:42px; height:36px; padding:2px; border:1px solid var(--line); border-radius:8px; background:#fff; cursor:pointer; }
.pdf-color-field strong { font-size:11px; color:var(--navy); font-variant-numeric:tabular-nums; }
.pdf-settings-actions { display:flex; flex-wrap:wrap; gap:9px; align-items:center; margin-top:24px; padding-top:19px; border-top:1px solid var(--line); }
.btn.btn-text { min-height:42px; padding-inline:9px; border:0; background:transparent; color:var(--muted); }
.btn.btn-text:hover { color:#9b2937; background:#fff1f2; }
.pdf-preview-panel { position:sticky; top:82px; overflow:hidden; }
.pdf-preview-header { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:74px; padding:17px 19px; border-bottom:1px solid var(--line); }
.pdf-preview-header h2 { margin-top:4px; color:var(--navy); }
.pdf-preview-status { padding:7px 10px; border-radius:99px; background:#e8f2f6; color:var(--blue); font-size:10px; font-weight:850; }
.pdf-preview-status.loading { background:#fff4db; color:#87610d; }
.pdf-preview-frame { min-height:520px; background:#dce5eb; padding:10px; }
.pdf-preview-frame iframe { display:block; width:100%; height:68vh; min-height:500px; border:0; border-radius:8px; background:#fff; }
.pdf-preview-help { margin:0; padding:13px 18px 16px; color:var(--muted); font-size:11px; line-height:1.45; }

@media (max-width:1180px) {
  .pdf-customize-layout { grid-template-columns:1fr; }
  .pdf-preview-panel { position:static; }
}
@media (max-width:680px) {
  .form-grid.two,.pdf-toggle-grid,.pdf-color-grid { grid-template-columns:1fr; }
  .pdf-settings-panel { padding:17px; }
  .pdf-settings-actions,.pdf-settings-actions .btn { width:100%; }
  .pdf-preview-frame { min-height:420px; padding:7px; }
  .pdf-preview-frame iframe { height:520px; min-height:0; }
}

/* v1.9.0 — estoque integrado, controle de EPI e retenção das medições */
.badge-danger { color:#a3303a; background:#fff0f0; }
.stock-kpis,.epi-kpis { margin-bottom:15px; }
.stock-panel-header { align-items:flex-end; gap:22px; }
.stock-filters { margin-left:auto; display:grid; grid-template-columns:minmax(180px,1.35fr) minmax(130px,.8fr) minmax(110px,.65fr) auto; gap:9px; align-items:end; }
.stock-filters .field { gap:5px; }
.stock-filters input,.stock-filters select,.stock-filters .btn { min-height:42px; }
.stock-balance { color:var(--green); white-space:nowrap; }
.stock-balance.is-low { color:#a86414; }
.stock-balance.is-empty { color:var(--red); }
.stock-move-link { color:var(--blue); background:var(--blue-soft); font-size:18px; }
.stock-history { margin-top:15px; }
.stock-current-card,.stock-heading-balance { display:flex; flex-direction:column; justify-content:center; min-height:84px; padding:13px 16px; border:1px solid #cfe1e8; border-radius:11px; background:var(--blue-soft); }
.stock-current-card span,.stock-heading-balance span { color:#587687; font-size:10px; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.stock-current-card strong,.stock-heading-balance strong { margin-top:6px; color:var(--navy); font-size:21px; }
.stock-current-card small { margin-top:4px; color:var(--muted); }
.stock-heading-balance { min-width:220px; align-items:flex-end; }
.table-muted { color:var(--muted); font-size:11px; font-weight:700; }
.row-cancelled td { color:#8493a0; background:#f7f9fa; }
.row-cancelled strong { color:#6f7d88; }

.epi-delivery-form { max-width:1320px; display:grid; gap:18px; }
.epi-card { overflow:hidden; }
.epi-identification-grid { padding:22px; }
.epi-items { display:grid; gap:9px; padding:18px 20px 22px; overflow:auto; background:#f8fafc; }
.epi-item { display:grid; grid-template-columns:1.55fr 1.05fr .72fr .68fr 36px; gap:9px; align-items:center; min-width:1050px; min-height:46px; }
.epi-item-head { min-height:26px; padding:0 4px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.epi-item select,.epi-item input { height:42px; min-width:0; border:1px solid #cfdbe4; border-radius:9px; padding:0 10px; color:var(--ink); background:#fff; }
.epi-identification { color:#526a7d; line-height:1.35; }
.epi-available { color:var(--navy); font-variant-numeric:tabular-nums; white-space:nowrap; }
.epi-no-stock { margin:0 20px 20px; }
.epi-no-stock a { color:var(--blue); font-weight:800; }
.epi-notes-card { padding:20px 22px; }
.btn:disabled { opacity:.52; cursor:not-allowed; }

.measurement-retention-editor { margin:20px 0 12px auto; width:min(900px,100%); min-height:150px; display:grid; grid-template-columns:minmax(280px,1.35fr) repeat(2,minmax(190px,.85fr)); gap:18px; align-items:center; padding:22px; border:1px solid var(--line); border-radius:15px; background:var(--surface-soft,#f7fafc); }
.measurement-retention-editor h3 { margin:4px 0 3px; color:var(--navy); font-size:17px; }
.measurement-retention-editor p { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.measurement-retention-copy { align-self:center; padding-right:10px; }
.measurement-retention-editor .field { align-self:center; grid-template-rows:17px 44px minmax(32px,auto); gap:6px; }
.measurement-retention-editor .field > span { display:flex; align-items:center; }
.measurement-retention-editor .field input,.measurement-retention-editor .field select { height:44px; }
.measurement-retention-editor .field small { min-height:32px; color:var(--muted); line-height:1.45; }
.measurement-financial-summary { margin:0 0 24px auto; width:min(720px,100%); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden; border-radius:12px; box-shadow:0 8px 24px rgba(16,42,67,.08); }
.measurement-financial-summary > div { min-height:76px; display:flex; flex-direction:column; justify-content:center; padding:14px 17px; border-right:1px solid var(--line); background:#fff; }
.measurement-financial-summary > div:last-child { border-right:0; }
.measurement-financial-summary span { color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.055em; text-transform:uppercase; }
.measurement-financial-summary strong { margin-top:6px; color:var(--navy); font-size:20px; font-variant-numeric:tabular-nums; }
.measurement-financial-summary .retention { background:#fff9f3; }
.measurement-financial-summary .retention strong { color:#a86414; }
.measurement-financial-summary .grand { background:linear-gradient(120deg,var(--navy),#225f78); }
.measurement-financial-summary .grand span { color:#c5d7e2; }
.measurement-financial-summary .grand strong { color:#fff; font-size:22px; }

@media (max-width:1180px) {
  .stock-panel-header { align-items:stretch; flex-direction:column; }
  .stock-filters { width:100%; margin-left:0; }
}
@media (max-width:780px) {
  .stock-filters { grid-template-columns:1fr 1fr; }
  .stock-filters .btn { width:100%; }
  .stock-heading-balance { min-width:0; align-items:flex-start; }
  .measurement-retention-editor { grid-template-columns:1fr 1fr; }
  .measurement-retention-editor > div:first-child { grid-column:1/-1; }
}
@media (max-width:560px) {
  .stock-filters,.measurement-retention-editor,.measurement-financial-summary { grid-template-columns:1fr; }
  .measurement-financial-summary > div { border-right:0; border-bottom:1px solid var(--line); }
  .measurement-financial-summary > div:last-child { border-bottom:0; }
}

/* Aplicação final do tema em todas as superfícies adicionadas nas versões anteriores. */
.theme-emerald .topbar,.theme-violet .topbar { background:var(--surface); border-color:var(--line); }
.theme-emerald .eyebrow,.theme-emerald .back-link,.theme-emerald .panel-header a { color:var(--blue); }
.theme-violet .eyebrow,.theme-violet .back-link,.theme-violet .panel-header a { color:var(--blue); }
.theme-dark .company-logo-editor,.theme-dark .pdf-toggle,.theme-dark .pdf-color-field,
.theme-dark .epi-items,.theme-dark .epi-item,.theme-dark .measurement-retention-editor,
.theme-dark .measurement-financial-summary > div,.theme-dark .stock-current-card,
.theme-dark .stock-heading-balance,.theme-dark .company-logo-controls input[type="file"] { background:var(--surface); border-color:var(--line); color:var(--ink); }
.theme-dark .pdf-preview-frame { background:#0d1521; }
.theme-dark .pdf-preview-frame iframe { background:#fff; }
.theme-dark .epi-item select,.theme-dark .epi-item input,
.theme-dark .budget-item select,.theme-dark .budget-item input,
.theme-dark .measurement-item select,.theme-dark .measurement-item input,
.theme-dark .service-work-price-row select,.theme-dark .service-work-price-row input { background:#151f2d; border-color:#3a4b60; color:var(--ink); }
.theme-dark .company-logo-editor,.theme-dark .epi-items,.theme-dark .measurement-retention-editor { box-shadow:none; }

/* v1.11.1 — identidade cromática integral, contraste e alinhamento final */
.theme-blue {
  --surface:#fff; --surface-raised:#fff; --surface-soft:#f4f8fb; --control:#fff;
  --row-hover:#f8fbfd; --focus-ring:rgba(31,111,139,.18);
}
.theme-emerald {
  --surface:#fff; --surface-raised:#fff; --surface-soft:#f0f7f4; --control:#fff;
  --row-hover:#f4faf7; --focus-ring:rgba(25,116,91,.18);
}
.theme-violet {
  --surface:#fff; --surface-raised:#fff; --surface-soft:#f6f3fb; --control:#fff;
  --row-hover:#faf8fd; --focus-ring:rgba(102,84,165,.18);
}
.theme-dark {
  color-scheme:dark;
  --navy:#f7fbff; --navy-2:#070e18; --blue:#78d2ed; --blue-soft:#17394a;
  --ink:#eaf1f7; --muted:#b4c3d1; --line:#3a5067; --surface:#152334;
  --surface-raised:#1b2c40; --surface-soft:#203247; --control:#0f1d2c;
  --background:#09131f; --row-hover:#1d3045; --focus-ring:rgba(120,210,237,.24);
  --shadow:0 14px 36px rgba(0,0,0,.34);
}

.theme-blue .topbar,.theme-emerald .topbar,.theme-violet .topbar { background:color-mix(in srgb,var(--surface) 95%,transparent); }
.theme-dark .topbar { background:rgba(15,29,44,.97); box-shadow:0 8px 28px rgba(0,0,0,.20); }
.theme-dark .sidebar { background:radial-gradient(circle at 10% 0,rgba(120,210,237,.13),transparent 30%),linear-gradient(180deg,#07101b,#0e1d2d 62%,#091522); }
.theme-dark .brand span,.theme-dark .plan-card small,.theme-dark .nav-section { color:#b4c7d7; }
.theme-dark .nav-item,.theme-dark .nav-subitem { color:#c8d7e4; }
.theme-dark .nav-item:hover,.theme-dark .nav-subitem:hover { color:#fff; background:rgba(120,210,237,.10); }
.theme-dark .nav-item.active,.theme-dark .nav-subitem.active { color:#fff; background:rgba(120,210,237,.18); box-shadow:inset 3px 0 #78d2ed; }
.theme-dark .nav-item > span.nav-icon,.theme-dark .nav-item.active > span.nav-icon { color:#9de3f5; }

.theme-blue .panel,.theme-emerald .panel,.theme-violet .panel,.theme-dark .panel,
.theme-blue .kpi-card,.theme-emerald .kpi-card,.theme-violet .kpi-card,.theme-dark .kpi-card,
.theme-blue .payment-card,.theme-emerald .payment-card,.theme-violet .payment-card,.theme-dark .payment-card,
.theme-blue .company-card,.theme-emerald .company-card,.theme-violet .company-card,.theme-dark .company-card,
.theme-blue .financial-summary-card,.theme-emerald .financial-summary-card,.theme-violet .financial-summary-card,.theme-dark .financial-summary-card,
.theme-blue .role-option,.theme-emerald .role-option,.theme-violet .role-option,.theme-dark .role-option,
.theme-blue .theme-option,.theme-emerald .theme-option,.theme-violet .theme-option,.theme-dark .theme-option,
.theme-blue .permission-option,.theme-emerald .permission-option,.theme-violet .permission-option,.theme-dark .permission-option,
.theme-blue .filter-bar,.theme-emerald .filter-bar,.theme-violet .filter-bar,.theme-dark .filter-bar,
.theme-blue .mini-kpi-grid,.theme-emerald .mini-kpi-grid,.theme-violet .mini-kpi-grid,.theme-dark .mini-kpi-grid,
.theme-blue .measurement-financial-summary > div,.theme-emerald .measurement-financial-summary > div,.theme-violet .measurement-financial-summary > div,.theme-dark .measurement-financial-summary > div {
  color:var(--ink); background:var(--surface); border-color:var(--line);
}

.theme-blue .field input,.theme-blue .field select,.theme-blue .field textarea,
.theme-emerald .field input,.theme-emerald .field select,.theme-emerald .field textarea,
.theme-violet .field input,.theme-violet .field select,.theme-violet .field textarea,
.theme-dark .field input,.theme-dark .field select,.theme-dark .field textarea,
.theme-blue .filter-inline input,.theme-emerald .filter-inline input,.theme-violet .filter-inline input,.theme-dark .filter-inline input,
.theme-blue .filter-bar input,.theme-blue .filter-bar select,.theme-emerald .filter-bar input,.theme-emerald .filter-bar select,
.theme-violet .filter-bar input,.theme-violet .filter-bar select,.theme-dark .filter-bar input,.theme-dark .filter-bar select,
.theme-blue .company-switcher select,.theme-emerald .company-switcher select,.theme-violet .company-switcher select,.theme-dark .company-switcher select,
.theme-blue .table-input,.theme-blue .table-select,.theme-emerald .table-input,.theme-emerald .table-select,
.theme-violet .table-input,.theme-violet .table-select,.theme-dark .table-input,.theme-dark .table-select,
.theme-blue .budget-item input,.theme-blue .budget-item select,.theme-emerald .budget-item input,.theme-emerald .budget-item select,
.theme-violet .budget-item input,.theme-violet .budget-item select,.theme-dark .budget-item input,.theme-dark .budget-item select,
.theme-blue .measurement-item input,.theme-blue .measurement-item select,.theme-emerald .measurement-item input,.theme-emerald .measurement-item select,
.theme-violet .measurement-item input,.theme-violet .measurement-item select,.theme-dark .measurement-item input,.theme-dark .measurement-item select,
.theme-blue .epi-item input,.theme-blue .epi-item select,.theme-emerald .epi-item input,.theme-emerald .epi-item select,
.theme-violet .epi-item input,.theme-violet .epi-item select,.theme-dark .epi-item input,.theme-dark .epi-item select,
.theme-blue .service-work-price-row input,.theme-blue .service-work-price-row select,
.theme-emerald .service-work-price-row input,.theme-emerald .service-work-price-row select,
.theme-violet .service-work-price-row input,.theme-violet .service-work-price-row select,
.theme-dark .service-work-price-row input,.theme-dark .service-work-price-row select {
  color:var(--ink); background:var(--control); border-color:var(--line);
}
.theme-blue input:focus,.theme-blue select:focus,.theme-blue textarea:focus,
.theme-emerald input:focus,.theme-emerald select:focus,.theme-emerald textarea:focus,
.theme-violet input:focus,.theme-violet select:focus,.theme-violet textarea:focus,
.theme-dark input:focus,.theme-dark select:focus,.theme-dark textarea:focus {
  border-color:var(--blue); box-shadow:0 0 0 3px var(--focus-ring); outline:none;
}
.theme-dark input::placeholder,.theme-dark textarea::placeholder { color:#8297aa; opacity:1; }

.theme-dark .field > span,.theme-dark .filter-inline label span,.theme-dark .filter-bar label span,
.theme-dark .pdf-color-field span,.theme-dark .attendance-pdf-actions label > span { color:#c1d0dc; }
.theme-dark td,.theme-dark td strong,.theme-dark .kpi-card > strong,.theme-dark .panel-header h2,
.theme-dark .form-section h2,.theme-dark .payment-metrics strong,.theme-dark .company-details strong { color:var(--ink); }
.theme-dark td small,.theme-dark .kpi-card > small,.theme-dark .payment-card-header small { color:var(--muted); }
.theme-dark th { color:#d4e0e9; background:#22364b; border-color:var(--line); }
.theme-dark td { border-color:#2c4156; }
.theme-dark tbody tr:hover { background:var(--row-hover); }

.theme-dark .btn-primary { color:#07141e; background:linear-gradient(135deg,#8bdcf0,#66c5e1); box-shadow:0 8px 20px rgba(102,197,225,.22); }
.theme-dark .btn-primary:hover { background:linear-gradient(135deg,#a3e5f4,#78d2ed); }
.theme-dark .btn-secondary { color:#edf6fb; background:#22364b; border-color:#4a6279; }
.theme-dark .btn-secondary:hover { color:#fff; border-color:#78d2ed; background:#294158; }
.theme-dark .icon-link { color:#9de3f5; background:#203a4c; }
.theme-dark .icon-link:hover { background:#285064; }

.theme-blue .measurement-retention-editor,.theme-emerald .measurement-retention-editor,.theme-violet .measurement-retention-editor,.theme-dark .measurement-retention-editor,
.theme-blue .epi-items,.theme-emerald .epi-items,.theme-violet .epi-items,.theme-dark .epi-items,
.theme-blue .production-items,.theme-emerald .production-items,.theme-violet .production-items,.theme-dark .production-items,
.theme-blue .service-work-prices,.theme-emerald .service-work-prices,.theme-violet .service-work-prices,.theme-dark .service-work-prices,
.theme-blue .pdf-toggle,.theme-emerald .pdf-toggle,.theme-violet .pdf-toggle,.theme-dark .pdf-toggle,
.theme-blue .pdf-color-field,.theme-emerald .pdf-color-field,.theme-violet .pdf-color-field,.theme-dark .pdf-color-field,
.theme-blue .delivery-status-card,.theme-emerald .delivery-status-card,.theme-violet .delivery-status-card,.theme-dark .delivery-status-card {
  color:var(--ink); background:var(--surface-soft); border-color:var(--line);
}
.theme-dark .delivery-center-header { background:linear-gradient(135deg,var(--surface) 58%,var(--surface-soft)); }
.theme-dark .delivery-history,.theme-dark .delivery-history-table { background:var(--surface); border-color:var(--line); }
.theme-dark .delivery-general-link { color:var(--ink); background:var(--surface-raised); border-color:var(--line); }

/* Tema institucional personalizado: a cor escolhida alimenta todo o ecossistema. */
.theme-custom .sidebar { background:linear-gradient(180deg,var(--navy-2),var(--navy)); }
.theme-custom .nav-item.active { background:color-mix(in srgb,var(--blue) 28%,transparent); box-shadow:inset 3px 0 var(--blue); }
.theme-custom .nav-item.active > span,.theme-custom .nav-item:hover { color:#fff; }
.theme-custom .btn-primary { color:var(--theme-on-primary,#fff); background:var(--blue); box-shadow:0 7px 18px color-mix(in srgb,var(--blue) 28%,transparent); }
.theme-custom .btn-primary:hover { background:color-mix(in srgb,var(--blue) 84%,#07121b); }
.theme-custom .summary-strip,.theme-custom .summary-strip.payments,
.theme-custom .measurement-financial-summary .grand,.theme-custom .production-total-box .grand {
  background:linear-gradient(120deg,var(--navy),var(--blue));
}
.theme-custom .page-heading h1,.theme-custom .panel-header h2,.theme-custom .form-section h2,
.theme-custom .kpi-card > strong,.theme-custom td strong { color:var(--navy); }
.theme-custom .topbar { border-color:color-mix(in srgb,var(--blue) 24%,#dde5ec); }
.theme-custom .avatar,.theme-custom .icon-link,.theme-custom .payment-metrics .total { color:var(--blue); background:var(--blue-soft); }
.theme-custom .progress span,.theme-custom .bar-fill.blue { background:linear-gradient(90deg,var(--blue),color-mix(in srgb,var(--blue) 52%,#fff)); }

.theme-swatch-custom .theme-preview i { background:var(--custom-preview,#1f6f8b); }
.theme-swatch-custom .theme-preview b { background:color-mix(in srgb,var(--custom-preview,#1f6f8b) 20%,#fff); }
.theme-swatch-custom .theme-preview em { background:color-mix(in srgb,var(--custom-preview,#1f6f8b) 60%,#07121b); }
.custom-theme-field { margin-top:18px; }
.custom-color-control { display:grid; grid-template-columns:54px 1fr; gap:10px; }
.custom-color-control input[type="color"] { padding:4px; }
.theme-dark .info-callout,.theme-dark .schedule-help,.theme-dark .schedule-callout,
.theme-dark .access-summary,.theme-dark .payment-metrics > div { color:var(--ink); background:var(--surface-soft); border-color:var(--line); }
.theme-dark .payment-metrics .total { background:var(--blue-soft); }
.theme-dark .measurement-financial-summary .retention { background:#3a2e22; }
.theme-dark .measurement-financial-summary .retention strong { color:#ffc879; }
.theme-dark .summary-strip,.theme-dark .summary-strip.payments,
.theme-dark .measurement-financial-summary .grand,.theme-dark .production-total-box .grand {
  color:#fff; background:linear-gradient(125deg,#142a40,#24506a);
}
.theme-dark .summary-strip span,.theme-dark .measurement-financial-summary .grand span { color:#c7dce8; }
.theme-dark .pdf-preview-frame { background:#07111c; }
.theme-dark .row-cancelled td,.theme-dark .schedule-row.is-day-off { color:#96a8b8; background:#101d2b; }

@media (max-width:780px) {
  .measurement-retention-editor { min-height:0; }
  .measurement-retention-editor .field { grid-template-rows:auto 44px auto; }
}

/* v1.11.2 — tema institucional, anexos financeiros e contraste das faixas de resumo */

/* v1.13.1 — segurança, menu retrátil, cor personalizada e exportações validadas */
.notification-center{position:relative;margin-left:auto;margin-right:20px}.notification-center>summary{list-style:none;cursor:pointer}.notification-center>summary::-webkit-details-marker{display:none}
.topbar-alerts{position:relative;width:42px;height:42px;border:1px solid var(--border,#d5e1e7);border-radius:13px;display:grid;place-items:center;color:var(--text-muted,#587080);background:var(--surface,#fff);transition:.2s ease}
.topbar-alerts:hover,.topbar-alerts.has-alerts{color:var(--primary,#176d8b);border-color:color-mix(in srgb,var(--primary,#176d8b) 35%,#d5e1e7);background:color-mix(in srgb,var(--primary,#176d8b) 7%,#fff)}
.topbar-alerts svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.topbar-alerts b{position:absolute;right:-5px;top:-6px;min-width:20px;height:20px;padding:0 5px;border:2px solid var(--surface,#fff);border-radius:999px;display:grid;place-items:center;background:#c83b47;color:#fff;font-size:10px;line-height:1}
.notification-popover{position:absolute;z-index:80;right:0;top:calc(100% + 12px);width:min(430px,calc(100vw - 28px));overflow:hidden;border:1px solid var(--border,#d5e1e7);border-radius:18px;background:var(--surface,#fff);box-shadow:0 24px 70px rgba(16,42,67,.22)}
.notification-popover-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 18px;border-bottom:1px solid var(--border,#d5e1e7)}.notification-popover-header strong{display:block;margin-top:3px;color:var(--text,#183244);font-size:17px}.notification-popover-header>span{padding:6px 9px;border-radius:999px;background:color-mix(in srgb,var(--primary,#176d8b) 9%,var(--surface,#fff));color:var(--primary,#176d8b);font-size:10px;font-weight:800;white-space:nowrap}
.notification-list{max-height:430px;overflow:auto}.notification-item{display:grid;grid-template-columns:9px minmax(0,1fr) auto;gap:11px;align-items:center;padding:13px 17px;border-bottom:1px solid var(--border,#d5e1e7);color:inherit;text-decoration:none;transition:.18s ease}.notification-item:hover{background:color-mix(in srgb,var(--primary,#176d8b) 4%,transparent)}.notification-item i{width:8px;height:8px;border-radius:50%;background:#2f87a4}.notification-warning i{background:#d48a11}.notification-danger i{background:#c83b47}.notification-item span{display:grid;gap:3px;min-width:0}.notification-item strong{color:var(--text,#183244);font-size:12px}.notification-item small{overflow:hidden;color:var(--text-muted,#647b89);font-size:10px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.notification-item em{color:var(--primary,#176d8b);font-size:10px;font-style:normal;font-weight:800;white-space:nowrap}.notification-empty{display:flex;align-items:center;gap:12px;padding:22px}.notification-empty>span{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#e3f4ea;color:#187b48;font-weight:900}.notification-empty strong,.notification-empty small{display:block}.notification-empty small{margin-top:3px;color:var(--text-muted,#647b89);font-size:11px}.notification-footer{display:block;padding:12px 18px;background:color-mix(in srgb,var(--primary,#176d8b) 4%,var(--surface,#fff));color:var(--primary,#176d8b);font-size:11px;font-weight:800;text-align:center;text-decoration:none}
.dashboard-notification-summary{scroll-margin-top:90px;display:grid;grid-template-columns:minmax(245px,auto) minmax(0,1fr) auto;gap:18px;align-items:center;margin:-8px 0 20px;padding:13px 15px;border:1px solid color-mix(in srgb,#d48a11 34%,var(--border,#d5e1e7));border-left:4px solid #d48a11;border-radius:13px;background:color-mix(in srgb,#f5b942 7%,var(--surface,#fff));box-shadow:0 8px 22px rgba(16,42,67,.035)}.dashboard-notification-summary.is-clear{grid-template-columns:1fr;border-color:color-mix(in srgb,#2b9b62 28%,var(--border,#d5e1e7));border-left-color:#2b9b62;background:color-mix(in srgb,#2b9b62 5%,var(--surface,#fff))}.dashboard-notification-lead{display:flex;align-items:center;gap:11px;min-width:0}.dashboard-notification-symbol{flex:0 0 auto;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#fff1ce;color:#976200;font-weight:900}.is-clear .dashboard-notification-symbol{background:#e3f4ea;color:#187b48}.dashboard-notification-lead strong,.dashboard-notification-lead small{display:block}.dashboard-notification-lead strong{color:var(--text,#183244);font-size:12px}.dashboard-notification-lead small{margin-top:2px;color:var(--text-muted,#647b89);font-size:10px}.dashboard-notification-preview{display:flex;gap:8px;min-width:0}.dashboard-notification-preview a{min-width:0;display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--border,#d5e1e7);border-radius:9px;background:var(--surface,#fff);color:var(--text,#183244);font-size:10px;font-weight:700;text-decoration:none}.dashboard-notification-preview a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-notification-preview i{flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:#2f87a4}.dashboard-notification-preview .severity-warning{background:#d48a11}.dashboard-notification-preview .severity-danger{background:#c83b47}.dashboard-notification-open{border:0;background:transparent;color:var(--primary,#176d8b);font-size:11px;font-weight:850;white-space:nowrap;cursor:pointer}
.document-readiness{display:grid;grid-template-columns:42px minmax(0,1fr);gap:14px;margin-bottom:18px;padding:16px 18px;border:1px solid #e8c96d;border-radius:16px;background:#fff9e9;color:#5d4a13}
.document-readiness-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#f4d66f;color:#5d4600;font-weight:900}.document-readiness p{margin:6px 0;font-size:13px;line-height:1.45}.document-readiness a,.document-readiness small{display:inline-block;margin-top:5px;font-size:12px;font-weight:800;color:#735800}
.form-validation-alert{grid-column:1/-1;display:grid;gap:3px;margin-bottom:16px;padding:13px 15px;border:1px solid #e7a8ae;border-radius:13px;background:#fff0f1;color:#84212c}.form-validation-alert strong{font-size:13px}.form-validation-alert span{font-size:12px}.field.has-error>span{color:#b52635}.is-invalid{border-color:#c83b47!important;box-shadow:0 0 0 3px rgba(200,59,71,.12)!important}
.theme-dark .document-readiness{background:#3b321c;border-color:#806b2c;color:#fff0b8}.theme-dark .document-readiness a,.theme-dark .document-readiness small{color:#ffe69a}
.export-menu{position:relative;display:inline-block}.export-menu>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px}.export-menu>summary::-webkit-details-marker{display:none}.export-menu>summary svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.export-menu>summary>span{font-size:12px;margin-left:2px;transition:.18s}.export-menu[open]>summary>span{transform:rotate(180deg)}
.export-menu-popover{position:absolute;z-index:40;right:0;top:calc(100% + 8px);width:270px;padding:7px;border:1px solid var(--border,#d5e1e7);border-radius:15px;background:var(--surface,#fff);box-shadow:0 18px 42px rgba(16,42,67,.18)}
.export-option{display:grid;gap:2px;padding:11px 12px;border-radius:10px;color:var(--text,#183244);text-decoration:none}.export-option:hover{background:color-mix(in srgb,var(--primary,#176d8b) 7%,transparent)}.export-option b{font-size:13px}.export-option span{font-size:11px;color:var(--text-muted,#647b89)}.export-option-primary{background:color-mix(in srgb,var(--primary,#176d8b) 8%,transparent)}
.actions .export-menu>summary{width:46px;height:42px;padding:0;justify-content:center;font-size:0}.actions .export-menu>summary svg{width:18px}.actions .export-menu>summary>span{display:none}.actions .export-menu-popover{right:0;text-align:left}
.export-menu-compact{display:inline-block}.export-compact-trigger{width:58px;height:42px;padding:0 10px;border:1px solid var(--border,#d5e1e7);border-radius:12px;display:flex;align-items:center;justify-content:center;gap:5px;background:color-mix(in srgb,var(--primary,#176d8b) 6%,var(--surface,#fff));color:var(--primary,#176d8b);cursor:pointer}.export-compact-trigger:hover{border-color:color-mix(in srgb,var(--primary,#176d8b) 38%,#d5e1e7)}.export-compact-trigger svg{flex:0 0 auto;width:18px!important;height:18px!important;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.export-compact-trigger>span{display:block;font-size:11px;line-height:1;transition:.18s}.export-menu-compact[open] .export-compact-trigger>span{transform:rotate(180deg)}.export-menu-compact .export-menu-popover{right:0;text-align:left}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.download-notice{position:fixed;z-index:120;right:24px;bottom:24px;max-width:320px;padding:11px 14px;border:1px solid color-mix(in srgb,var(--primary,#176d8b) 28%,var(--border,#d5e1e7));border-radius:11px;background:var(--surface,#fff);color:var(--text,#183244);box-shadow:0 16px 42px rgba(16,42,67,.2);font-size:11px;font-weight:750;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s ease}.download-notice.show{opacity:1;transform:translateY(0)}
@media(max-width:1000px){.dashboard-notification-summary{grid-template-columns:1fr auto}.dashboard-notification-preview{grid-column:1/-1;grid-row:2}.notification-center{margin-left:auto}}
@media(max-width:720px){.notification-center{margin-left:auto;margin-right:8px}.notification-popover{position:fixed;top:66px;right:10px}.notification-item{grid-template-columns:8px 1fr}.notification-item em{grid-column:2}.dashboard-notification-summary{grid-template-columns:1fr}.dashboard-notification-preview{grid-column:auto;grid-row:auto;display:grid}.dashboard-notification-open{justify-self:start}.document-readiness{grid-template-columns:36px 1fr}}
.profile-layout-single { grid-template-columns:minmax(0,1fr); }
.profile-layout-single .profile-actions { grid-column:1; }
.financial-upload-field input[type="file"] { min-height:48px; padding:10px 12px; }
.financial-attachment-list { max-width:1100px; margin-top:18px; padding:22px 24px; }
.financial-table th,.financial-table td { vertical-align:middle; }
.attachment-status { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:5px 9px; border-radius:999px; font-size:11px; font-weight:700; white-space:nowrap; }
.attachment-status.has-file { color:var(--blue); background:var(--blue-soft); }
.attachment-status.has-file:hover { filter:brightness(.97); }
.attachment-status.has-file span { display:grid; place-items:center; width:18px; height:18px; border:1px solid currentColor; border-radius:50%; line-height:1; }
.attachment-status.no-file { color:var(--muted); background:var(--surface-soft); border:1px solid var(--line); }

.theme-blue { --hero-start:#102a43; --hero-end:#1d526d; --hero-muted:#c7dae5; --hero-border:#244d65; --hero-shadow:rgba(16,42,67,.18); }
.theme-emerald { --hero-start:#174d40; --hero-end:#2b745e; --hero-muted:#d1e8df; --hero-border:#266551; --hero-shadow:rgba(23,77,64,.18); }
.theme-violet { --hero-start:#443873; --hero-end:#6b58a7; --hero-muted:#e1d9f4; --hero-border:#5c4b91; --hero-shadow:rgba(68,56,115,.18); }
.theme-dark { --hero-start:#10253a; --hero-end:#24536d; --hero-muted:#d2e4ee; --hero-border:#35677f; --hero-shadow:rgba(0,0,0,.30); }
.theme-blue .summary-strip,.theme-emerald .summary-strip,.theme-violet .summary-strip,.theme-dark .summary-strip,
.theme-blue .summary-strip.payments,.theme-emerald .summary-strip.payments,.theme-violet .summary-strip.payments,.theme-dark .summary-strip.payments {
  color:#fff; background:linear-gradient(125deg,var(--hero-start),var(--hero-end));
  border:1px solid var(--hero-border); box-shadow:0 13px 31px var(--hero-shadow);
}
.theme-blue .summary-strip > div,.theme-emerald .summary-strip > div,.theme-violet .summary-strip > div,.theme-dark .summary-strip > div { border-color:rgba(255,255,255,.18); }
.theme-blue .summary-strip span,.theme-emerald .summary-strip span,.theme-violet .summary-strip span,.theme-dark .summary-strip span { color:var(--hero-muted); }
.theme-blue .summary-strip strong,.theme-emerald .summary-strip strong,.theme-violet .summary-strip strong,.theme-dark .summary-strip strong { color:#fff; }
.theme-dark .attachment-list { color:var(--ink); background:var(--surface); border-color:var(--line); }
.theme-dark .financial-upload-field input[type="file"] { color:var(--ink); background:var(--control); border-color:var(--line); }
.theme-dark .attachment-status.has-file { color:#9de3f5; background:#17394a; }
.theme-dark .attachment-status.no-file { color:#b4c3d1; background:var(--surface-soft); }

/* v1.14.0 — rastreabilidade e herança cromática integral das seções */
.section-update-stamp{width:max-content;max-width:100%;display:flex;align-items:center;gap:7px;margin:0 0 13px auto;padding:7px 10px;border:1px solid color-mix(in srgb,var(--blue) 22%,var(--line));border-radius:9px;background:color-mix(in srgb,var(--blue) 5%,var(--surface));color:var(--muted);font-size:10.5px;font-weight:700}.section-update-stamp span{color:var(--blue);font-size:13px}
.theme-custom .panel,.theme-custom .kpi-card,.theme-custom .payment-card,.theme-custom .company-card,.theme-custom .financial-summary-card,.theme-custom .filter-bar,.theme-custom .mini-kpi-grid,.theme-custom .measurement-financial-summary>div{color:var(--ink);background:var(--surface);border-color:var(--line)}
.theme-custom .field input,.theme-custom .field select,.theme-custom .field textarea,.theme-custom .budget-item input,.theme-custom .budget-item select,.theme-custom .measurement-item input,.theme-custom .measurement-item select,.theme-custom .production-item input,.theme-custom .production-item select,.theme-custom .epi-item input,.theme-custom .epi-item select{color:var(--ink);background:var(--control);border-color:var(--line)}
.theme-custom .production-items,.theme-custom .production-items-footer,.theme-custom .epi-items,.theme-custom .service-work-prices,.theme-custom .measurement-retention-editor,.theme-custom .pdf-toggle,.theme-custom .pdf-color-field{color:var(--ink);background:var(--surface-soft);border-color:var(--line)}
.theme-custom .budget-total-box>div,.theme-blue .budget-total-box>div,.theme-emerald .budget-total-box>div,.theme-violet .budget-total-box>div,.theme-dark .budget-total-box>div{background:color-mix(in srgb,var(--blue) 5%,var(--surface));border:1px solid color-mix(in srgb,var(--blue) 14%,var(--line))}
.theme-custom .budget-total-box .grand,.theme-blue .budget-total-box .grand,.theme-emerald .budget-total-box .grand,.theme-violet .budget-total-box .grand,.theme-dark .budget-total-box .grand{color:var(--theme-on-primary,#fff);background:linear-gradient(125deg,var(--hero-start),var(--hero-end));border-color:var(--hero-border)}
.theme-custom .budget-total-box .grand span,.theme-blue .budget-total-box .grand span,.theme-emerald .budget-total-box .grand span,.theme-violet .budget-total-box .grand span,.theme-dark .budget-total-box .grand span{color:var(--hero-muted)}
.theme-custom th,.theme-blue th,.theme-emerald th,.theme-violet th{color:color-mix(in srgb,var(--navy) 82%,var(--blue));background:color-mix(in srgb,var(--blue) 8%,var(--surface));border-color:var(--line)}
.theme-custom .badge-status,.theme-custom .production-section-number,.theme-custom .production-item-index,.theme-custom .production-line-summary{color:var(--blue);background:var(--blue-soft);border-color:color-mix(in srgb,var(--blue) 20%,var(--line))}
.pdf-settings-panel input[type="range"]{height:42px;padding:0 4px;accent-color:var(--blue)}
@media(max-width:720px){.section-update-stamp{width:100%;justify-content:flex-start;margin-bottom:12px}.production-items-footer{align-items:flex-start;flex-direction:column;gap:4px}.production-items-footer small{margin-top:0;padding-bottom:4px}}

/* v1.13.1 — tema integral, notificações expansíveis e menu compacto harmônico */
.dashboard-notification-all[hidden] { display:none!important; }
.dashboard-notification-all { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding-top:14px; border-top:1px solid var(--border,var(--line)); }
.dashboard-notification-detail { min-width:0; display:grid; grid-template-columns:9px minmax(0,1fr) auto; gap:11px; align-items:center; padding:12px 13px; border:1px solid var(--border,var(--line)); border-radius:11px; background:var(--surface,#fff); color:inherit; text-decoration:none; transition:.18s ease; }
.dashboard-notification-detail:hover { border-color:color-mix(in srgb,var(--primary,var(--blue)) 35%,var(--border,var(--line))); background:color-mix(in srgb,var(--primary,var(--blue)) 4%,var(--surface,#fff)); }
.dashboard-notification-detail i { width:8px; height:8px; border-radius:50%; background:var(--primary,var(--blue)); }
.dashboard-notification-detail.notification-warning i { background:#d48a11; }
.dashboard-notification-detail.notification-danger i { background:#c83b47; }
.dashboard-notification-detail span { display:grid; gap:3px; min-width:0; }
.dashboard-notification-detail strong { color:var(--text,var(--ink)); font-size:12px; }
.dashboard-notification-detail small { color:var(--text-muted,var(--muted)); font-size:10px; line-height:1.42; }
.dashboard-notification-detail em { color:var(--primary,var(--blue)); font-size:10px; font-style:normal; font-weight:800; white-space:nowrap; }
.dashboard-notification-open:focus-visible,.dashboard-notification-detail:focus-visible { outline:3px solid var(--focus-ring); outline-offset:2px; }

.theme-custom { color-scheme:light; background:var(--surface-soft); }
.theme-custom .topbar { background:color-mix(in srgb,var(--primary) 5%,#fff); border-color:var(--border); }
.theme-custom .sidebar { background:linear-gradient(180deg,var(--navy-2),var(--navy)); }
.theme-custom .brand-mark { color:var(--navy-2); background:linear-gradient(145deg,#fff,var(--blue-soft)); }
.theme-custom .brand span,.theme-custom .plan-card small,.theme-custom .nav-section { color:color-mix(in srgb,var(--hero-muted) 86%,#fff); }
.theme-custom .nav-item,.theme-custom .nav-subitem { color:color-mix(in srgb,var(--hero-muted) 88%,#fff); }
.theme-custom .nav-item > span.nav-icon { color:var(--hero-muted); }
.theme-custom .nav-item.active,.theme-custom .nav-subitem.active { color:#fff; background:color-mix(in srgb,var(--primary) 30%,transparent); box-shadow:inset 3px 0 var(--primary); }
.theme-custom .nav-item.active > span.nav-icon,.theme-custom .nav-item:hover > span.nav-icon { color:#fff; }
.theme-custom .panel,.theme-custom .kpi-card,.theme-custom .payment-card,.theme-custom .company-card,
.theme-custom .workflow-card,.theme-custom .form-panel,.theme-custom .production-card,
.theme-custom .production-summary-panel,.theme-custom .production-report-panel,
.theme-custom .financial-summary-card,.theme-custom .role-option,.theme-custom .theme-option,
.theme-custom .permission-option,.theme-custom .filter-bar,.theme-custom .mini-kpi-grid,
.theme-custom .measurement-financial-summary > div,.theme-custom .attachment-list { color:var(--ink); background:var(--surface); border-color:var(--line); }
.theme-custom .field input,.theme-custom .field select,.theme-custom .field textarea,
.theme-custom .filter-inline input,.theme-custom .filter-bar input,.theme-custom .filter-bar select,
.theme-custom .company-switcher select,.theme-custom .table-input,.theme-custom .table-select,
.theme-custom .budget-item input,.theme-custom .budget-item select,.theme-custom .measurement-item input,
.theme-custom .measurement-item select,.theme-custom .epi-item input,.theme-custom .epi-item select,
.theme-custom .service-work-price-row input,.theme-custom .service-work-price-row select {
  color:var(--ink); background:var(--control); border-color:var(--line);
}
.theme-custom input:focus,.theme-custom select:focus,.theme-custom textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--focus-ring); outline:none; }
.theme-custom th { color:var(--navy); background:color-mix(in srgb,var(--primary) 8%,#fff); border-color:var(--line); }
.theme-custom td { border-color:var(--line); }
.theme-custom tbody tr:hover { background:var(--row-hover); }
.theme-custom .topbar-company strong,.theme-custom .page-heading h1,.theme-custom .panel-header h2,
.theme-custom .form-section h2,.theme-custom .production-section-header h2,
.theme-custom .production-summary-header h2,.theme-custom .kpi-card > strong,
.theme-custom .mini-kpi-grid strong,.theme-custom .workflow-card > strong { color:var(--navy); }
.theme-custom .eyebrow,.theme-custom .back-link,.theme-custom .panel-header a,
.theme-custom .workflow-link,.theme-custom .attendance-rule-action a { color:var(--primary); }
.theme-custom .btn-primary { color:var(--theme-on-primary); background:var(--primary); box-shadow:0 7px 18px color-mix(in srgb,var(--primary) 26%,transparent); }
.theme-custom .btn-secondary { color:var(--ink); background:var(--surface); border-color:var(--line); }
.theme-custom .summary-strip,.theme-custom .summary-strip.payments,
.theme-custom .measurement-financial-summary .grand,.theme-custom .production-total-box .grand {
  color:#fff; background:linear-gradient(125deg,var(--hero-start),var(--hero-end)); border-color:var(--hero-border); box-shadow:0 13px 31px color-mix(in srgb,var(--hero-end) 28%,transparent);
}
.theme-custom .summary-strip > div { border-color:rgba(255,255,255,.18); }
.theme-custom .summary-strip span,.theme-custom .measurement-financial-summary .grand span { color:var(--hero-muted); }
.theme-custom .summary-strip strong,.theme-custom .measurement-financial-summary .grand strong { color:#fff; }
.theme-custom .dashboard-notification-summary { border-color:color-mix(in srgb,var(--primary) 34%,var(--border)); border-left-color:var(--primary); background:color-mix(in srgb,var(--primary) 6%,var(--surface)); }
.theme-custom .dashboard-notification-symbol { color:var(--theme-on-primary); background:var(--primary); }
.theme-custom .avatar,.theme-custom .icon-link,.theme-custom .payment-metrics .total,
.theme-custom .stock-current-card,.theme-custom .stock-heading-balance,.theme-custom .company-icon,
.theme-custom .current-label,.theme-custom .workflow-explanation > span { color:var(--primary); background:var(--blue-soft); border-color:var(--border); }
.theme-custom .progress span,.theme-custom .bar-fill.blue { background:linear-gradient(90deg,var(--primary),var(--accent)); }
.theme-custom .budget-total-box .grand,.theme-custom .measurement-total,
.theme-custom .production-total-box .grand { color:#fff; background:linear-gradient(125deg,var(--hero-start),var(--hero-end)); }
.theme-custom .budget-total-box .grand span,.theme-custom .measurement-total span,
.theme-custom .production-total-box .grand span { color:var(--hero-muted); }
.theme-custom .measurement-retention-editor,.theme-custom .epi-items,.theme-custom .production-items,
.theme-custom .service-work-prices,.theme-custom .pdf-toggle,.theme-custom .pdf-color-field,
.theme-custom .delivery-status-card,.theme-custom .calculation-preview,.theme-custom .info-callout,
.theme-custom .attendance-rule-strip { color:var(--ink); background:var(--surface-soft); border-color:var(--line); }
.theme-custom .delivery-center-header { background:linear-gradient(135deg,var(--surface) 58%,var(--surface-soft)); border-color:var(--line); }
.theme-custom .delivery-general-link,.theme-custom .delivery-history,.theme-custom .delivery-history-table {
  color:var(--ink); background:var(--surface); border-color:var(--line);
}
.theme-custom .schedule-row.is-day-off,.theme-custom .row-cancelled td { background:var(--surface-soft); }
.theme-custom .pdf-preview-frame { background:color-mix(in srgb,var(--primary) 9%,#eef3f6); }

@media(max-width:820px){.dashboard-notification-all{grid-template-columns:1fr}}

/* v1.15.0 — menus em camada, edição documental e identidade cromática contínua */
.export-menu-compact .export-menu-popover{
  z-index:1200;max-height:min(310px,calc(100vh - 24px));overflow-y:auto;overscroll-behavior:contain;
}
.export-menu-compact .export-menu-popover[data-placement="top"]{transform-origin:bottom right}
.export-menu-compact .export-menu-popover[data-placement="bottom"]{transform-origin:top right}
.section-update-stamp{display:none;margin:0}
.section-update-stamp-inline{display:flex;width:max-content;max-width:100%;margin-top:10px;padding:6px 9px;border-radius:999px;font-size:10px;font-weight:700;background:color-mix(in srgb,var(--blue) 6%,var(--surface));border-color:color-mix(in srgb,var(--blue) 18%,var(--line))}
.production-section-header-action{justify-content:flex-start}
.production-items-footer,.dynamic-items-footer{padding-top:13px;border-top:1px solid color-mix(in srgb,var(--blue) 12%,var(--line))}
.production-item-group small{margin-top:5px;line-height:1.35}
.pdf-formatting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.pdf-formatting-grid>*{min-width:0}
.pdf-alignment-preset-field{grid-column:1/-1}
.pdf-alignment-custom{grid-column:1/-1;padding:12px;border:1px solid color-mix(in srgb,var(--blue) 16%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--blue) 3%,var(--surface))}
.pdf-alignment-custom[hidden]{display:none}
.pdf-alignment-custom-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}.pdf-alignment-custom-heading strong{color:var(--navy);font-size:12px}.pdf-alignment-custom-heading small{color:var(--muted);font-size:10px}
.pdf-alignment-custom-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pdf-alignment-custom-grid>*{min-width:0}
body .production-total-box .grand,body .measurement-financial-summary .grand,body .budget-total-box .grand,body .measurement-total{color:var(--theme-on-primary,#fff);background:linear-gradient(125deg,var(--hero-start,var(--navy)),var(--hero-end,var(--blue)));border-color:var(--hero-border,var(--line))}
body .production-total-box .grand span,body .measurement-financial-summary .grand span,body .budget-total-box .grand span{color:var(--hero-muted,#dceaf0)}
body .production-section-number,body .production-item-index,body .production-line-summary,body .pdf-preview-status,body .current-label{color:var(--blue);background:var(--blue-soft);border-color:color-mix(in srgb,var(--blue) 22%,var(--line))}
body .production-items,body .production-items-footer,body .dynamic-items-footer,body .measurement-retention-editor,body .pdf-toggle,body .pdf-color-field,body .delivery-status-card,body .calculation-preview{background:color-mix(in srgb,var(--blue) 4%,var(--surface));border-color:color-mix(in srgb,var(--blue) 11%,var(--line))}
body .delivery-center-header,body .production-report-header,body .production-section-header{background:linear-gradient(135deg,var(--surface) 58%,color-mix(in srgb,var(--blue) 5%,var(--surface)));border-color:var(--line)}
body .form-section .eyebrow,body .production-section-header .eyebrow,body .production-summary-header .eyebrow,body .pdf-preview-header .eyebrow{color:var(--blue)}
@media(max-width:900px){.pdf-formatting-grid,.pdf-alignment-custom-grid{grid-template-columns:1fr}.pdf-alignment-custom-heading{align-items:flex-start;flex-direction:column}.dynamic-items-footer{align-items:flex-start;flex-direction:column}.section-update-stamp-inline{white-space:normal}}

/* v1.13.2 — grupo Suprimentos alinhado no menu recolhido */
@media (min-width:901px) {
  .sidebar-collapsed .nav-group { align-self:center; overflow:hidden; border-radius:12px; }
  .sidebar-collapsed .nav-group > summary { width:64px; min-width:64px; margin:0; padding:0; justify-content:center; gap:0; }
  .sidebar-collapsed .nav-group > summary .nav-chevron { display:none !important; width:0; height:0; margin:0; overflow:hidden; }
  .sidebar-collapsed .nav-group > summary::marker { content:""; }
}

/* v1.16.0 - revisão final de lançamento e consistência entre seções */
.actions .export-menu > summary,
.actions .export-compact-trigger {
  width:36px;
  min-width:36px;
  height:36px;
  min-height:36px;
  padding:0;
  border-radius:9px;
}
.actions .export-menu > summary svg { width:16px; height:16px; }
.actions.wide { min-width:126px; }
.table-panel th.numeric,.table-panel td.numeric { text-align:right; }
.budget-items,.measurement-items {
  padding:0 10px 16px 0;
  scrollbar-gutter:stable;
  overscroll-behavior-inline:contain;
}
.budget-item-head > span:nth-last-child(2),
.measurement-item-head > span:nth-last-child(2) { text-align:right; }
.budget-line-total,.measurement-line-total {
  height:var(--ui-control-height);
  min-height:var(--ui-control-height);
  padding-inline:8px;
  font-variant-numeric:tabular-nums;
}
.budget-item-head > span:nth-last-child(2),
.measurement-item-head > span:nth-last-child(2) { text-align:center; }
.budget-line-total,
.measurement-line-total {
  justify-content:center;
  text-align:center;
}
body .measurement-items-footer {
  display:inline-flex;
  width:auto;
  max-width:100%;
  padding:0;
  border:0;
  background:transparent;
}
.production-line-summary {
  height:var(--ui-control-height);
  min-height:var(--ui-control-height);
  padding:4px 11px;
  box-sizing:border-box;
}
.production-line-total { margin-top:1px; font-size:14px; }
.measurement-financial-summary > div { align-items:flex-start; }
.measurement-financial-summary strong { width:100%; text-align:left; font-variant-numeric:tabular-nums; }
.measurement-financial-summary .grand strong { text-align:left; }
.page-heading-action { align-self:center; margin-bottom:0!important; }
.work-status-cell { text-align:center; vertical-align:middle!important; }
.work-status-cell .badge { display:inline-flex; align-items:center; justify-content:center; min-width:96px; }
.work-unit-field { margin:0; padding:0; border:0; min-width:0; }
.work-unit-field legend { min-height:16px; margin-bottom:7px; color:#526a7d; font-size:11px; font-weight:750; line-height:1.35; }
.work-unit-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.work-unit-options label { position:relative; min-width:0; cursor:pointer; }
.work-unit-options input { position:absolute; opacity:0; pointer-events:none; }
.work-unit-options span { height:var(--ui-control-height); display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; color:var(--muted); background:var(--surface); font-weight:750; transition:.15s; }
.work-unit-options input:checked + span { color:var(--blue); border-color:color-mix(in srgb,var(--blue) 52%,var(--line)); background:var(--blue-soft); box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 12%,transparent); }
.work-unit-options input:focus-visible + span { outline:2px solid var(--blue); outline-offset:2px; }
.pdf-settings-panel .pdf-formatting-grid { align-items:start; }
@media(max-width:680px){.page-heading-action{align-self:stretch}.work-unit-options{grid-template-columns:1fr}}
