:root {
  --ink: #12201e;
  --pine: #0f4c4a;
  --pine-d: #0a3735;
  --pine-l: #e3efed;
  --bg: #f2f4f3;
  --panel: #ffffff;
  --line: #dbe2df;
  --line-2: #c9d3cf;
  --muted: #5b6a67;
  --ochre: #d9a22b;
  --danger: #b3261e;
  --danger-l: #fbeceb;
  --ok: #1e7a4f;
  --ok-l: #e5f4ec;
  --side-w: 250px;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font-body);
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin: 0; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .75em; }
a { color: var(--pine); }
code { background: #e8eeec; padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small-note { font-size: .86rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  background: var(--ink); color: #d3dedb; padding: 20px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.25rem var(--font-head); color: #fff; text-decoration: none; padding: 4px 8px 18px; }
.brand-dark { color: var(--ink); padding: 0 0 12px; }
.brand-mark { width: 22px; height: 22px; border-radius: 5px 5px 5px 0; background: linear-gradient(135deg, var(--ochre) 0 50%, #fff 50% 100%); box-shadow: inset 0 0 0 2px var(--pine); }
.nav { flex: 1; }
.nav-group { margin-top: 18px; }
.nav-title { display: flex; justify-content: space-between; align-items: center; padding: 0 10px 6px; font-size: .8rem; color: #8aa09b; letter-spacing: .02em; }
.nav-add { color: #fff; text-decoration: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 1.1rem; line-height: 1; background: rgba(255,255,255,.08); }
.nav-add:hover { background: rgba(255,255,255,.18); }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; color: #d3dedb; text-decoration: none; font-size: .94rem; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,.07); }
.nav-item.on { background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--ochre); }
.nav-empty { padding: 4px 10px; color: #7d928d; font-size: .88rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, #888); flex: none; display: inline-block; }
.me { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 8px 0; margin-top: 14px; }
.me-name { color: #fff; font-weight: 600; }
.me-role { font-size: .82rem; color: #8aa09b; }
.me-out { display: inline-block; margin-top: 6px; color: #d3dedb; font-size: .9rem; }
.main { min-width: 0; }
.topbar { display: none; }
.content { padding: 28px 32px 48px; max-width: 1500px; }
.board-page .content { max-width: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sticky-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 12px 0; margin-top: -12px; border-bottom: 1px solid var(--line); }
.board-head h1 { padding-left: 14px; border-left: 5px solid var(--c); }
.inline-form { margin: 0; }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 .92rem var(--font-body); padding: 9px 16px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); text-decoration: none; line-height: 1.2;
}
.btn:hover { background: #f1f5f4; }
.btn.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn.primary:hover { background: var(--pine-d); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #8f1e18; }
.btn.small { padding: 6px 12px; font-size: .86rem; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 1px solid transparent; background: transparent; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 1.15rem; line-height: 1; color: var(--ink); }
.icon-btn:hover { background: rgba(0,0,0,.07); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link-btn { background: none; border: 0; padding: 2px 4px; color: var(--pine); font: inherit; font-size: .88rem; cursor: pointer; text-decoration: underline; }
.danger-text { color: var(--danger); }

input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--ink);
}
textarea { resize: vertical; min-height: 70px; }
input:disabled, select:disabled, textarea:disabled { background: #f0f3f2; color: #3c4a47; cursor: not-allowed; }
input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--pine); margin: 0; flex: none; }
.search { min-width: 220px; }
.field { margin-bottom: 14px; }
.field-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; }
.req { color: var(--danger); }
.counter { font-weight: 400; margin-left: 4px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); background: var(--danger-l); }
.field-error { color: var(--danger); font-size: .83rem; min-height: 0; margin-top: 4px; }
.field-error:empty { display: none; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.choices.col { flex-direction: column; align-items: flex-start; gap: 7px; }
.choice, .check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .94rem; }
.stack { display: flex; flex-direction: column; gap: 4px; }

.notice { padding: 10px 14px; border-radius: 7px; background: var(--pine-l); font-size: .92rem; }
.notice.err { background: var(--danger-l); color: var(--danger); }
.notice.ok { background: var(--ok-l); color: var(--ok); }
.empty { text-align: center; padding: 60px 20px; background: var(--panel); border: 1px dashed var(--line-2); border-radius: 12px; }
.empty.small { padding: 26px 20px; }
.empty p { max-width: 520px; margin: 0 auto 14px; color: var(--muted); }

/* ---------- início ---------- */
.block { margin-bottom: 34px; }
.block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 18px 16px; text-decoration: none; color: var(--ink); overflow: hidden; }
.tile:hover { border-color: var(--pine); }
.tile-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.tile strong { font: 700 1.08rem var(--font-head); }
.tile-desc { font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-count { font-size: .88rem; color: var(--muted); }
.phase-strip { display: flex; height: 6px; gap: 2px; margin-top: 4px; }
.phase-strip i { border-radius: 3px; display: block; }

/* ---------- kanban ---------- */
.board { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-bottom: 18px; min-height: 300px; }
.col { flex: 0 0 292px; background: #e8edeb; border-radius: 10px; border-top: 4px solid var(--c); display: flex; flex-direction: column; max-height: calc(100vh - 175px); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px 14px; }
.col-name { font: 700 .98rem var(--font-head); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-count { background: #fff; border-radius: 20px; padding: 0 9px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.col-body { overflow-y: auto; padding: 6px 8px 8px; min-height: 64px; flex: 1; border-radius: 0 0 8px 8px; }
.col-body.over { background: rgba(15, 76, 74, .08); }
.col-empty { text-align: center; color: #8a9995; font-size: .86rem; padding: 18px 0; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; }
.kcard:hover { border-color: var(--pine); box-shadow: 0 1px 4px rgba(10, 40, 38, .12); }
.kcard.dragging { opacity: .4; }
.kcard-title { font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.kcard-line { font-size: .84rem; color: #35433f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard-k { color: var(--muted); }
.kcard-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: .78rem; color: var(--muted); }
.clip { display: inline-flex; align-items: center; gap: 2px; }
.drop-line { height: 4px; border-radius: 2px; background: var(--pine); margin: 2px 0 8px; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(9, 24, 22, .6); display: flex; align-items: center; justify-content: center; padding: 18px; animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border-radius: 14px; max-height: 94vh; display: flex; flex-direction: column; width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); outline: none; overflow: hidden; }
.modal.card { max-width: 1120px; height: 90vh; }
.modal.form { max-width: 620px; }
.modal.small { max-width: 440px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-body { overflow-y: auto; flex: 1; min-height: 0; }
.modal-body.single { padding: 18px 22px; }
.modal-body.two { display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; }
.col-l, .col-r { overflow-y: auto; padding: 18px 22px 24px; min-height: 0; }
.col-l { border-right: 1px solid var(--line); }
.col-r { background: #f8faf9; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--line); background: #fafcfb; }
.push-left { margin-right: auto; }
.sec { margin-bottom: 26px; }
.sec > h3 { margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.dlg { padding: 22px; }
.dlg h3 { margin-bottom: 8px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.phase-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 6px; padding: 5px 12px; font-weight: 600; margin-bottom: 14px; }
.col-r > h3 { margin-bottom: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.move { margin-top: 8px; }
.danger-zone { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 24px; padding-top: 14px; border-top: 1px dashed var(--line-2); }

/* histórico */
.hist { border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line-2)); border-radius: 7px; margin-bottom: 8px; background: #fff; }
.hist.plain { border-left-color: var(--line-2); }
.hist > summary { cursor: pointer; padding: 9px 12px; display: flex; align-items: center; gap: 8px; list-style-position: inside; }
.hist-when { margin-left: auto; font-size: .8rem; }
.kv { margin: 0; padding: 4px 14px 12px; display: grid; grid-template-columns: minmax(110px, 36%) 1fr; gap: 6px 12px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.log { list-style: none; margin: 0; padding: 4px 14px 10px; font-size: .88rem; }
.log li { padding: 6px 0; border-bottom: 1px solid #eef2f0; }
.log li:last-child { border-bottom: 0; }

/* arquivos */
.dropzone { border: 2px dashed var(--line-2); border-radius: 9px; padding: 16px; text-align: center; cursor: pointer; background: #fafcfb; margin-bottom: 10px; }
.dropzone:hover, .dropzone.over { border-color: var(--pine); background: var(--pine-l); }
.files { list-style: none; margin: 0; padding: 0; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef2f0; }
.file .ext { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--pine-l); color: var(--pine); font-weight: 700; font-size: .72rem; text-transform: lowercase; }
.file-main { flex: 1; min-width: 0; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-meta { font-size: .8rem; }
.files-empty { color: var(--muted); font-size: .9rem; padding: 6px 0; }
.pipe-link { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 7px; background: #fff; color: var(--ink); text-decoration: none; margin-bottom: 8px; }
.pipe-link:hover { border-color: var(--pine); }
.pipe-link .muted { margin-left: auto; font-size: .85rem; }
.inline-row { display: flex; gap: 8px; }

/* ---------- tabela ---------- */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: .93rem; }
.grid th { text-align: left; padding: 11px 14px; font-weight: 600; background: #f6f8f7; border-bottom: 1px solid var(--line); white-space: nowrap; color: #34423f; }
.grid td { padding: 11px 14px; border-bottom: 1px solid #edf1ef; vertical-align: top; }
.grid tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; }
.grid .strong { font-weight: 600; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #f4f8f7; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 20px; font-size: .8rem; font-weight: 600; }
.pill.ok { background: var(--ok-l); color: var(--ok); }
.pill.off { background: #eceeed; color: #6b7774; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }

/* ---------- construtor ---------- */
.editor { max-width: 980px; }
.card-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 20px; }
.card-sec-head { margin-bottom: 14px; }
.card-sec-head p { margin: 4px 0 0; font-size: .92rem; max-width: 70ch; }
.danger-sec { border-color: #e8c3c0; }
.grid2 { display: grid; grid-template-columns: 1fr 200px; gap: 16px; }
.fe-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.fe-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #fbfcfc; }
.fe-main { display: grid; grid-template-columns: 1fr 230px; gap: 8px; }
.fe-flags { display: flex; gap: 14px; flex-wrap: wrap; grid-column: 1; }
.fe-actions { display: flex; align-items: center; gap: 2px; grid-column: 2; grid-row: 1 / span 2; }
.fe-opts-wrap { grid-column: 1; }
.fe-opts-wrap .mini { font-size: .8rem; color: var(--muted); display: block; margin-bottom: 3px; }
.ph-list { display: flex; flex-direction: column; }
.ph-item { border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 9px; margin-bottom: 10px; background: #fff; }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.ph-name { flex: 1; min-width: 160px; font-weight: 600; }
.ph-tag { font-size: .8rem; color: var(--muted); }
.ph-body { padding: 4px 16px 16px; border-top: 1px dashed var(--line); background: #fafcfb; border-radius: 0 0 9px 9px; }
.ph-add { margin: 2px 0 12px; }

/* ---------- permissões ---------- */
.perms { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.perm-group { margin: 12px 0; }
.perm-group h4 { margin-bottom: 6px; }
.perm-row { display: grid; grid-template-columns: 1fr 180px; gap: 12px; align-items: center; padding: 5px 0; }

/* ---------- login / instalação ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(160deg, #e6efed, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px; box-shadow: 0 10px 40px rgba(10, 40, 38, .1); }
.auth-card h1 { margin-bottom: 14px; }
.auth-card .btn { width: 100%; margin-top: 6px; }

/* ---------- toast ---------- */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: .92rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); max-width: 90vw; transition: opacity .35s; }
.toast.err { background: var(--danger); }
.toast.out { opacity: 0; }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .18s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 30; }
  .topbar-title { font: 700 1.05rem var(--font-head); }
  .burger { background: none; border: 0; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
  .burger span { width: 20px; height: 2px; background: #fff; display: block; }
  .content { padding: 18px 14px 40px; }
  .col { max-height: calc(100vh - 230px); flex-basis: 260px; }
  .modal.card { height: 96vh; }
  .modal-body.two { display: block; overflow-y: auto; }
  .col-l, .col-r { overflow: visible; }
  .col-l { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid2, .fe-main { grid-template-columns: 1fr; }
  .fe-row { grid-template-columns: 1fr; }
  .fe-actions { grid-column: 1; grid-row: auto; }
  .sticky-head { position: static; }
  .perm-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =========================================================
   Popup no estilo "ficha" (card e registro)
   ========================================================= */
.overlay { background: rgba(38, 50, 56, .5); }
.modal.v2 { --ink2: #1c2630; --blue: #1a6cf0; --soft: #eef3fb; --edge: #d9e0e8; position: relative; border-radius: 16px; font-family: var(--font-body); color: var(--ink2); }
.modal.v2 h1, .modal.v2 h2, .modal.v2 h3 { font-family: var(--font-body); letter-spacing: -.01em; }
.modal.v2 .band { position: absolute; left: 0; top: 0; bottom: 0; width: 22px; background: color-mix(in srgb, var(--c, #6b86b7) 14%, #eaf0fb); z-index: 1; }
.modal.v2 .modal-body.two { grid-template-columns: 1fr 1fr; padding-left: 22px; }
.modal.v2 .col-l { padding: 40px 36px 40px 36px; border-right: 1px solid var(--edge); }
.modal.v2 .col-r { background: #fff; padding: 72px 36px 40px; }
.modal-tools { position: absolute; top: 14px; right: 16px; display: flex; gap: 4px; z-index: 3; }
.tool-btn { width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: #475766; display: grid; place-items: center; }
.tool-btn:hover { background: #eef1f4; }

.rec-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 30px; }
.avatar { width: 84px; height: 84px; flex: none; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #e8590c) 13%, #fff); color: var(--c, #e8590c); }
.avatar svg { width: 44px; height: 44px; }
.rec-title { min-width: 0; padding-top: 4px; }
.rec-title h2 { font-size: 1.7rem; font-weight: 700; line-height: 1.15; margin-bottom: 12px; overflow-wrap: anywhere; padding-right: 70px; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: #eaf0f7; color: #26333f; border-radius: 20px; padding: 6px 12px; font: 500 .95rem var(--font-body); cursor: pointer; }
.pill-btn:hover:not(:disabled) { background: #dde7f2; }
.pill-btn:disabled { cursor: default; }
.pill-btn .dot { width: 14px; height: 14px; }
.info-head { margin-bottom: 20px; }
.info-head h3 { font-size: 1.3rem; font-weight: 700; }
.meta { margin: 4px 0 0; color: #5a6b7b; font-size: .95rem; }

/* campos "de leitura": valor como texto, caixa só ao passar o mouse/editar */
.form.flat .field { display: grid; grid-template-columns: 30px 1fr; gap: 0 14px; margin-bottom: 22px; }
.f-ic { color: #55636f; padding-top: 2px; }
.f-ic svg { display: block; }
.f-main { min-width: 0; }
.form.flat .field-label { font-weight: 500; font-size: 1.04rem; color: #1c2630; margin-bottom: 6px; }
.form.flat input[type=text], .form.flat input[type=date], .form.flat input[type=datetime-local], .form.flat select, .form.flat textarea {
  border: 1px solid transparent; background: transparent; padding: 7px 10px; margin-left: -10px; width: calc(100% + 10px); border-radius: 8px; font-size: 1.02rem; color: #2c3946;
}
.form.flat input::placeholder, .form.flat textarea::placeholder { color: #a3afba; }
.form.flat input:hover:not(:disabled), .form.flat select:hover:not(:disabled), .form.flat textarea:hover:not(:disabled) { background: #f4f7fa; border-color: #e3e9ef; }
.form.flat input:focus, .form.flat select:focus, .form.flat textarea:focus { background: #fff; border-color: var(--blue); outline: 2px solid rgba(26, 108, 240, .18); outline-offset: 0; }
.form.flat input:disabled, .form.flat select:disabled, .form.flat textarea:disabled { background: transparent; color: #2c3946; cursor: default; opacity: 1; }
.form.flat select { appearance: none; -webkit-appearance: none; }
.form.flat .field[data-type=email] input { color: var(--blue); }
.form.flat .field.has-error input, .form.flat .field.has-error select, .form.flat .field.has-error textarea { border-color: var(--danger); background: var(--danger-l); }
.form.flat .choices { margin-left: 0; }
.static-val { font-size: 1.02rem; color: #5a6b7b; }

/* arquivos */
.files-field .files-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.files-actions { display: flex; gap: 18px; flex: none; }
.act { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font: 500 .95rem var(--font-body); color: #55636f; cursor: pointer; text-decoration: none; }
.act:hover { color: var(--blue); }
.modal.v2 .files { display: flex; flex-direction: column; gap: 8px; }
.modal.v2 .file { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--soft); border-radius: 8px; border-bottom: 0; }
.file-tile { width: 34px; height: 34px; flex: none; border-radius: 6px; background: #2d3338; color: #fff; display: grid; place-items: center; text-decoration: none; }
.file-tile:hover { background: #000; }
.modal.v2 .file-name { flex: 1; min-width: 0; font-weight: 500; font-size: 1.02rem; color: #1c2630; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.file-act { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; background: transparent; border-radius: 6px; color: #55636f; cursor: pointer; text-decoration: none; }
.file-act:hover { background: rgba(0, 0, 0, .07); color: var(--ink); }
.file-act.danger:hover { color: var(--danger); }
.modal.v2 .dropzone { margin-bottom: 10px; background: #fff; }

/* coluna direita */
.big { font-size: 1.8rem; font-weight: 700; margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 12px; font-size: 1.28rem; font-weight: 700; margin-bottom: 18px; }
.badge { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 16px; background: #e4efff; color: var(--blue); font-size: 1rem; font-weight: 600; }
.conn { display: block; position: relative; border: 1px solid var(--edge); border-radius: 8px; padding: 18px 20px 18px 24px; margin-bottom: 14px; text-decoration: none; color: var(--ink2); background: #fff; overflow: hidden; }
.conn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, #b9c2cc); opacity: .55; }
.conn:hover { border-color: #b8c4d2; box-shadow: 0 2px 8px rgba(30, 50, 70, .08); }
.conn-title { font-weight: 600; font-size: 1.1rem; margin-bottom: 14px; padding-right: 20px; overflow-wrap: anywhere; }
.conn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.conn-k { color: #5a6b7b; font-size: .92rem; margin-bottom: 4px; }
.conn-v { font-size: 1rem; display: flex; align-items: center; gap: 4px; }
.conn-v .dot { width: 10px; height: 10px; }
.chip { display: inline-block; background: color-mix(in srgb, var(--c, #6b86b7) 14%, #fff); color: color-mix(in srgb, var(--c, #35506f) 78%, #000); font-weight: 600; padding: 3px 10px; border-radius: 6px; font-size: .95rem; }
.conn-add { margin-top: 24px; padding-top: 18px; border-top: 1px dashed #cfd8e0; }

.modal.v2 .modal-foot { padding-left: 36px; background: #fff; }
.dirty-note { margin-right: auto; color: #8a5a00; font-size: .9rem; }
.modal.v2 .hist-sec { margin-top: 30px; }
.modal.v2 .sec > h3 { border-bottom: 0; padding-bottom: 0; font-size: 1.15rem; }

/* menu suspenso */
.menu { position: fixed; z-index: 90; min-width: 230px; background: #fff; border: 1px solid var(--edge); border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(20, 35, 50, .2); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent; border-radius: 7px; font: 500 .95rem var(--font-body); color: #1c2630; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: #f0f4f8; outline: none; }
.menu-item.current { background: #eaf0f7; }
.menu-item.danger { color: var(--danger); }
.menu-item .dot { width: 11px; height: 11px; }

@media (max-width: 900px) {
  .modal.v2 .modal-body.two { padding-left: 14px; display: block; }
  .modal.v2 .band { width: 14px; }
  .modal.v2 .col-l { padding: 26px 18px; border-right: 0; border-bottom: 1px solid var(--edge); }
  .modal.v2 .col-r { padding: 26px 18px 30px; }
  .rec-head { gap: 14px; }
  .avatar { width: 60px; height: 60px; }
  .avatar svg { width: 32px; height: 32px; }
  .rec-title h2 { font-size: 1.35rem; padding-right: 60px; }
  .conn-grid { grid-template-columns: 1fr; }
  .modal.v2 .modal-foot { padding-left: 18px; flex-wrap: wrap; }
}
