/* Fimak Control — interface
   Identidade: escudo Fimak (ouro + azul) sobre navy. Montserrat (marca) + Lato (texto). */
@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/lato-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/lato-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/montserrat-latin-800-normal.woff2) format("woff2"); }
:root {
  --ink: #0E1B2C;        /* sidebar */
  --navy: #122E4F;       /* navy Fimak (theme-color do site) */
  --gold: #C9A227;       /* metade dourada do escudo */
  --gold-soft: #F5ECCF;
  --blue: #2F6FEB;       /* metade azul do escudo */
  --blue-soft: #E5EDFD;
  --paper: #F2F4F7;
  --surface: #FFFFFF;
  --line: #DFE4EA;
  --line-strong: #C9D1DB;
  --text: #17212F;
  --muted: #5B6778;
  --faint: #8A95A5;
  --red: #C93A3A; --red-soft: #FBE9E9;
  --amber: #A86B0C; --amber-soft: #FBF1DC;
  --green: #1F8A5B; --green-soft: #E3F4EC;
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --shadow: 0 1px 2px rgba(14,27,44,.06), 0 4px 14px rgba(14,27,44,.05);
  --f-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-body: "Lato", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--f-body); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #C8D2DF; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand svg { width: 34px; height: 38px; flex: none; }
.brand b { display: block; font-family: var(--f-display); font-weight: 800; letter-spacing: .16em; color: #fff; font-size: 15px; }
.brand span { font-size: 12px; color: #8EA0B6; }
.nav { padding: 10px 10px; overflow-y: auto; flex: 1; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: #C8D2DF; font-weight: 600; font-size: 14px; position: relative; text-decoration: none; }
.nav a svg { width: 18px; height: 18px; opacity: .75; flex: none; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.on { background: rgba(255,255,255,.08); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 3px 3px 0;
  background: linear-gradient(var(--gold) 0 50%, var(--blue) 50% 100%); }
.nav a.on svg { opacity: 1; }
.nav .badge { margin-left: auto; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.nav .group { margin: 16px 12px 6px; font-size: 12px; color: #6F829A; font-weight: 600; }
.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 13px; }
.side-foot .who { color: #fff; font-weight: 700; }
.side-foot button { background: none; border: 0; color: #8EA0B6; padding: 0; cursor: pointer; font-size: 13px; }
.side-foot button:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .menu-btn { display: none; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.search input:focus { background: #fff; border-color: var(--blue); outline: none; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px var(--f-body); color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: #fff; }
.search-res { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); max-height: 380px; overflow: auto; z-index: 50; }
.search-res a { display: flex; gap: 10px; padding: 9px 12px; color: var(--text); border-bottom: 1px solid var(--paper); }
.search-res a:hover, .search-res a.sel { background: var(--blue-soft); text-decoration: none; }
.search-res .t { font-size: 12px; color: var(--muted); width: 70px; flex: none; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }

/* ---------- Page header ---------- */
.ph { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph .sub { color: var(--muted); margin-top: 4px; }
.ph .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumb a { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--text); text-decoration: none; }
.btn:hover { border-color: var(--navy); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.pri { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.pri:hover { background: #0B2340; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--paper); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.iconbtn { border: 0; background: transparent; padding: 6px; border-radius: 6px; cursor: pointer; color: var(--muted); display: inline-flex; }
.iconbtn:hover { background: var(--paper); color: var(--text); }
.iconbtn svg { width: 16px; height: 16px; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel > header .acts { margin-left: auto; display: flex; gap: 6px; }
.panel .body { padding: 16px 18px; }
.panel .body.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); }
.g-side { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
.stack > * + * { margin-top: 18px; }

/* ---------- Dashboard ---------- */
.focus-hero { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 22px 24px 8px; position: relative; overflow: hidden; }
.focus-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: conic-gradient(from 200deg, rgba(201,162,39,.28), rgba(47,111,235,.28), rgba(201,162,39,.28)); filter: blur(2px); opacity: .55; }
.focus-hero h1 { color: #fff; font-size: 26px; position: relative; }
.focus-hero .lead-in { color: #B9C7DA; margin: 6px 0 14px; position: relative; max-width: 60ch; }
.focus-list { list-style: none; margin: 0; padding: 0; position: relative; }
.focus-list li a { display: flex; align-items: flex-start; gap: 12px; padding: 11px 4px; border-top: 1px solid rgba(255,255,255,.09); color: #EAF0F7; text-decoration: none; }
.focus-list li a:hover { color: #fff; background: rgba(255,255,255,.04); }
.focus-list .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; }
.focus-list .dot.red { background: #FF7A7A; box-shadow: 0 0 0 3px rgba(255,122,122,.18); }
.focus-list .dot.amber { background: #F2C14E; }
.focus-list .dot.blue { background: #7FA8F7; }
.focus-empty { padding: 18px 4px 20px; color: #B9C7DA; border-top: 1px solid rgba(255,255,255,.09); position: relative; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi { background: #fff; padding: 14px 16px; }
.kpi .v { font-family: var(--f-display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi .meter { height: 5px; background: var(--paper); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.kpi .meter i { display: block; height: 100%; background: var(--gold); }
.kpi .meter i.blue { background: var(--blue); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { width: 100%; max-width: 46px; background: var(--navy); border-radius: 5px 5px 0 0; min-height: 2px; }
.bars .b:last-child i { background: var(--gold); }
.bars .b span { font-size: 12px; color: var(--muted); }
.bars .b em { font-style: normal; font-size: 12px; font-weight: 700; }
.stagebar { display: flex; flex-direction: column; gap: 10px; }
.stagebar .row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(80px, 1.3fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.stagebar .track { background: var(--paper); border-radius: 4px; height: 10px; overflow: hidden; }
.stagebar .track i { display: block; height: 100%; border-radius: 4px; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 700; color: var(--muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFC; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--paper); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #F7F9FC; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl .strong { font-weight: 700; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-family: var(--f-display); margin-bottom: 4px; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--navy); color: #fff; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--paper); color: var(--muted); white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.gold { background: var(--gold-soft); color: #7A5F0B; }
.pill.navy { background: var(--navy); color: #fff; }
.hdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.hdot.green { background: var(--green); } .hdot.amber { background: #E0A126; } .hdot.red { background: var(--red); }
.score { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 26px; border-radius: 6px; font-weight: 800; font-size: 13px; font-family: var(--f-display); }
.score.quente { background: #FDE7DC; color: #B4410F; } .score.morno { background: var(--gold-soft); color: #7A5F0B; } .score.frio { background: #E8EEF5; color: #4C6077; }

/* ---------- Kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: #E9EDF2; border-radius: var(--r-lg); padding: 10px; min-height: 200px; }
.col.over { background: var(--blue-soft); outline: 2px dashed var(--blue); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; }
.col-h .sw { width: 10px; height: 10px; border-radius: 3px; }
.col-h b { font-family: var(--f-display); font-size: 14px; }
.col-h .n { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; line-height: 1.25; }
.card { background: #fff; border-radius: var(--r); padding: 11px 12px; margin-bottom: 8px; border: 1px solid var(--line); cursor: grab; border-left: 3px solid transparent; }
.card:hover { border-color: var(--line-strong); }
.card.rot { border-left-color: var(--red); }
.card.dragging { opacity: .45; }
.card .t { font-weight: 700; font-size: 14px; line-height: 1.3; }
.card .c { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card .m { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; flex-wrap: wrap; }
.card .val { font-weight: 800; font-family: var(--f-display); font-size: 13px; }
.dropbar { display: flex; gap: 12px; margin-top: 14px; }
.drop { flex: 1; border: 2px dashed var(--line-strong); border-radius: var(--r); padding: 16px; text-align: center; font-weight: 700; color: var(--muted); }
.drop.won.over { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.drop.lost.over { border-color: var(--red); background: var(--red-soft); color: var(--red); }

/* ---------- Detail pages ---------- */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.stepper { display: flex; gap: 4px; flex-wrap: wrap; }
.stepper button { flex: 1; min-width: 110px; border: 0; padding: 9px 10px; font-weight: 700; font-size: 13px; cursor: pointer; background: #E9EDF2; color: var(--muted);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.stepper button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.stepper button.done { background: #C9D6E6; color: var(--navy); }
.stepper button.cur { background: var(--navy); color: #fff; }
.tips { list-style: none; padding: 0; margin: 0; }
.tips li { padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; display: flex; gap: 10px; }
.tips li.red { background: var(--red-soft); } .tips li.amber { background: var(--amber-soft); } .tips li.blue { background: var(--blue-soft); }
.tips li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.tips li.red::before { background: var(--red); } .tips li.amber::before { background: #E0A126; } .tips li.blue::before { background: var(--blue); }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 14px 22px; font-size: 14px; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.tl li::after { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl .when { color: var(--faint); font-size: 12px; }
.tl .note { white-space: pre-wrap; color: var(--muted); margin-top: 2px; }
.acts-list { list-style: none; margin: 0; padding: 0; }
.acts-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--paper); }
.acts-list li:last-child { border-bottom: 0; }
.chk { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-strong); background: #fff; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.chk:hover { border-color: var(--green); }
.chk.on { background: var(--green); border-color: var(--green); }
.chk.on::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.late { color: var(--red); font-weight: 700; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--navy); border-bottom-color: var(--gold); }
.note-box { display: flex; gap: 8px; margin-bottom: 14px; }
.note-box textarea { flex: 1; min-height: 42px; resize: vertical; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; }
.progress { height: 8px; background: var(--paper); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); }
.progress i.over { background: var(--red); }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; font-size: 14px; }
.checklist input { margin-top: 3px; accent-color: var(--green); width: 16px; height: 16px; }
.checklist .done span { color: var(--faint); text-decoration: line-through; }
.callout { border-radius: var(--r); padding: 12px 14px; font-size: 14px; }
.callout.gold { background: var(--gold-soft); color: #5E4808; }
.callout.blue { background: var(--blue-soft); color: #1C3F8F; }
.callout.red { background: var(--red-soft); color: #8E2424; }

/* ---------- Forms / modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(14,27,44,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 100; overflow-y: auto; }
.modal { background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(14,27,44,.3); }
.modal.wide { max-width: 860px; }
.modal > header { padding: 18px 22px 0; display: flex; align-items: center; }
.modal > header .iconbtn { margin-left: auto; }
.modal .mbody { padding: 16px 22px; }
.modal > footer { padding: 14px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--paper); }
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.fld label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.fld input, .fld select, .fld textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.fld textarea { min-height: 84px; resize: vertical; }
.fld .hint { font-size: 12px; color: var(--faint); margin-top: 3px; }
.fld.check label { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 600; margin-top: 22px; }
.fld.check input { width: auto; }
.req::after { content: " *"; color: var(--red); }

/* ---------- Proposal editor ---------- */
.items { width: 100%; border-collapse: collapse; }
.items th { font-size: 12px; color: var(--muted); text-align: left; padding: 6px; }
.items td { padding: 4px 6px; vertical-align: top; }
.items input, .items textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.items textarea { min-height: 38px; font-size: 13px; color: var(--muted); }
.items .n { width: 90px; } .items .q { width: 60px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; font-size: 15px; max-width: 360px; margin-left: auto; }
.totals .big { font-family: var(--f-display); font-weight: 800; font-size: 20px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; max-width: 380px; border-left: 4px solid var(--gold); }
.toast.err { border-left-color: #FF7A7A; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: conic-gradient(from 210deg, rgba(201,162,39,.35), rgba(47,111,235,.35), rgba(201,162,39,.35)); filter: blur(30px); }
.auth-art h1 { color: #fff; font-size: 34px; line-height: 1.15; max-width: 14ch; position: relative; z-index: 1; }
.auth-art p { color: #AFC0D6; max-width: 42ch; position: relative; z-index: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px; background: #fff; }
.auth-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.auth-form .err { color: var(--red); font-size: 14px; min-height: 20px; }

.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) { .g-main, .g-side, .g3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .top { padding: 10px 16px; }
  .top .menu-btn { display: inline-flex; }
  .search kbd { display: none; }
  .content { padding: 18px 16px 60px; }
  .g2, .form { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px; min-height: 220px; }
  .kv { grid-template-columns: 110px 1fr; }
  .top-actions .btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .side, .top, .no-print { display: none !important; } .app { display: block; } }

/* ---------- IA (Fase 4) ---------- */
.ai-wait { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 16px 0; }
.ai-wait i { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: ai-spin .8s linear infinite; flex: none; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-out { margin-top: 14px; }
.ai-out h4 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ai-out ul { margin: 0; padding-left: 18px; } .ai-out li { margin-bottom: 4px; }
.ai-out textarea { width: 100%; min-height: 220px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; line-height: 1.55; }
.ai-out input[type=text], .ai-out input:not([type]) { width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; }
.ai-items { width: 100%; border-collapse: collapse; font-size: 14px; }
.ai-items td, .ai-items th { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ai-items th { font-size: 12px; color: var(--muted); font-weight: 700; }
.ai-items .n { text-align: right; white-space: nowrap; }
.ai-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.ai-health { display: inline-block; font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .ai-wait i { animation: none; } }
