:root {
  --bg: #0c1120;
  --bg2: #111830;
  --panel: #151d36;
  --panel2: #1b2544;
  --line: #26325a;
  --line2: #33406d;
  --text: #e8ecf7;
  --muted: #8f9bbd;
  --dim: #5f6b8f;
  --green: #2bd67b;
  --green-d: #1fa860;
  --yellow: #f5c542;
  --red: #ef5b5b;
  --blue: #5b8def;
  --radius: 12px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--green); }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); border-color: var(--green); color: #06210f; font-weight: 600; }
.btn.primary:hover { background: #3de58a; }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel2); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 9px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--muted); }
.field small { color: var(--dim); font-size: 12px; }
.input, textarea.input, select.input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--green); }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.5; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 58px 1fr; height: 100vh; height: 100dvh; }
.topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 18px;
  border-bottom: 1px solid var(--line); background: var(--bg2);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--green); color: #06210f;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.brand small { display: block; font-family: var(--mono); font-weight: 400; font-size: 9.5px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.pill.ok .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(43, 214, 123, .18); }
.pill.warn { color: var(--yellow); border-color: rgba(245, 197, 66, .35); cursor: pointer; }
.pill.warn .dot { background: var(--yellow); }
.me { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.me-name { font-size: 13px; text-align: right; line-height: 1.2; }
.me-name small { display: block; color: var(--muted); font-size: 11px; }

.sidenav { border-right: 1px solid var(--line); background: var(--bg2); padding: 14px 10px; display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; cursor: pointer;
  color: var(--muted); border: none; background: none; text-align: left; font-weight: 500; position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { background: var(--panel2); color: var(--text); }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--green); }
.nav-badge { margin-left: auto; background: var(--green); color: #06210f; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; min-width: 20px; text-align: center; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 4px; }
.nav-foot { margin-top: auto; font-size: 11px; color: var(--dim); padding: 8px 12px; font-family: var(--mono); }

.main { overflow: auto; position: relative; min-width: 0; }
.view { padding: 22px 24px 40px; max-width: 1500px; margin: 0 auto; }
.view-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.view-head h1 { font-family: var(--head); font-size: 26px; margin: 2px 0 0; letter-spacing: -.02em; font-weight: 700; }
.view-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- avatar ---------- */
.av {
  --c: var(--blue);
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 22%, var(--panel)); color: var(--c); font-weight: 700; font-size: 13px;
  border: 2px solid var(--c); position: relative; overflow: visible; font-family: var(--head);
}
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av.sm { width: 26px; height: 26px; font-size: 11px; border-width: 1.5px; }
.av.lg { width: 44px; height: 44px; font-size: 16px; }
.av .ia { position: absolute; right: -5px; bottom: -4px; font: 700 8px/1 var(--mono); background: var(--c); color: #0b1020; padding: 2px 3px; border-radius: 4px; }
.av .on { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--dim); border: 2px solid var(--panel); }
.av .on.yes { background: var(--green); }

/* ---------- mapa do escritório ---------- */
.office-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.map-wrap { overflow-x: auto; overflow-y: hidden; border-radius: 16px; border: 1px solid var(--line); background: #0a0f1d; }
.stage { width: 1200px; height: 760px; position: relative; transform-origin: 0 0; }
.floor {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 40px 40px,
    #0d1426;
}
.room {
  position: absolute; border: 2px solid var(--line2); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)), #121a31;
}
.room::after { /* porta */
  content: ''; position: absolute; bottom: -2px; left: 50%; width: 56px; height: 4px; margin-left: -28px; background: #0d1426;
}
.room.top::after { bottom: -2px; }
.room-label { position: absolute; left: 14px; top: 10px; font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.room-label b { color: var(--rc, var(--green)); }
.room.meeting { cursor: pointer; }
.room.meeting:hover { border-color: var(--green); }
.room.team { border-style: dashed; }
.rug { position: absolute; border-radius: 10px; opacity: .5; }
.table-big {
  position: absolute; left: 50%; top: 56%; width: 270px; height: 96px; transform: translate(-50%, -50%);
  background: #3a2c22; border: 2px solid #56412f; border-radius: 48px; box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .15);
  display: grid; place-items: center; font: 600 11px var(--mono); color: #d7b995; letter-spacing: .1em; text-transform: uppercase;
}
.chair { position: absolute; width: 22px; height: 22px; border-radius: 6px; background: #2a3558; border: 1px solid #3a4775; }
.plant { position: absolute; font-size: 22px; filter: saturate(.9); pointer-events: none; }
.deco { position: absolute; pointer-events: none; }

.desk { position: absolute; width: 96px; height: 50px; transform: translate(-50%, 0); pointer-events: none; }
.desk .top { position: absolute; inset: 0; background: #3a2c22; border: 2px solid #56412f; border-radius: 7px; }
.desk .monitor { position: absolute; left: 50%; top: 7px; width: 42px; height: 22px; margin-left: -21px; background: #0b1020; border: 2px solid #2d3a64; border-radius: 3px; }
.desk .monitor::after { content: ''; position: absolute; inset: 3px; border-radius: 1px; background: linear-gradient(90deg, var(--mc, #24345f) 40%, transparent 40%) 0 2px / 100% 4px repeat-y; opacity: .5; }
.desk.working .monitor::after { opacity: 1; animation: scan 1.2s steps(4) infinite; }
@keyframes scan { 50% { opacity: .5; } }
.desk .kb { position: absolute; left: 50%; bottom: 7px; width: 34px; height: 8px; margin-left: -17px; background: #1c2440; border-radius: 2px; }

.person {
  position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center;
  cursor: pointer; z-index: 3; transition: filter .15s;
}
.person:hover { filter: brightness(1.15); }
.person .body {
  --c: var(--blue);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #fff 0%), color-mix(in srgb, var(--c) 35%, #0b1020));
  border: 3px solid var(--c); color: #fff; font: 700 17px var(--head); box-shadow: 0 6px 14px rgba(0, 0, 0, .45);
}
.person .body img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.person.offline .body { filter: grayscale(.85) brightness(.7); }
.person .tag {
  margin-top: 6px; background: rgba(8, 12, 24, .85); border: 1px solid var(--line2); border-radius: 7px; padding: 2px 8px;
  font-size: 12px; font-weight: 600; white-space: nowrap; text-align: center; line-height: 1.3;
}
.person .tag small { display: block; font: 400 9.5px var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.person .badge-ia { position: absolute; right: -8px; bottom: -3px; font: 700 9px/1 var(--mono); background: var(--c); color: #0b1020; padding: 3px 4px; border-radius: 5px; }
.person .dot-on { position: absolute; right: -1px; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--dim); border: 2px solid #0d1426; }
.person .dot-on.yes { background: var(--green); }
.person.busy .body::before {
  content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--c); opacity: .6; animation: ring 1.4s ease-out infinite;
}
@keyframes ring { from { transform: scale(.85); opacity: .8; } to { transform: scale(1.25); opacity: 0; } }
.bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); max-width: 190px;
  background: #f4f6fb; color: #111829; border-radius: 10px; padding: 5px 10px; font-size: 11.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); pointer-events: none;
}
.bubble::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: #f4f6fb; }
.bubble .dots span { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #111829; margin: 0 1px; animation: blink 1s infinite; }
.bubble .dots span:nth-child(2) { animation-delay: .15s; } .bubble .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.flyer {
  position: absolute; z-index: 5; width: 26px; height: 32px; margin: -16px 0 0 -13px; background: #fff; border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5); transition: left 1.1s cubic-bezier(.5, 0, .3, 1), top 1.1s cubic-bezier(.5, 0, .3, 1), opacity .3s;
  background-image: repeating-linear-gradient(#fff 0 5px, #c9d1e6 5px 6px); background-clip: content-box; padding: 5px;
}
.empty-seat { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; border: 2px dashed var(--line2); display: grid; place-items: center; color: var(--dim); font-size: 18px; z-index: 2; }

.side-feed { padding: 16px; max-height: 760px; overflow: auto; }
.side-feed h3 { margin: 0 0 12px; font-family: var(--head); font-size: 15px; }
.feed-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.feed-item:first-of-type { border-top: none; }
.feed-item .t { font-size: 13px; line-height: 1.35; }
.feed-item .t small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.who-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.who { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.who:hover { background: var(--panel2); }
.who .n { font-size: 13px; font-weight: 600; line-height: 1.2; }
.who .n small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.hint { font-size: 12.5px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.hint b { color: var(--text); }

/* ---------- chat ---------- */
.drawer { position: fixed; top: 58px; right: 0; bottom: 0; width: min(520px, 100vw); z-index: 40; background: var(--bg2); border-left: 1px solid var(--line); box-shadow: var(--shadow); transform: translateX(100%); transition: transform .22s ease; display: flex; }
.drawer.open { transform: none; }
.chat { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-head .n { font-weight: 700; font-family: var(--head); font-size: 16px; line-height: 1.2; }
.chat-head .n small { display: block; font: 400 12px 'Inter', sans-serif; color: var(--muted); }
.chat-head .tools { margin-left: auto; display: flex; gap: 4px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.msg { display: flex; gap: 10px; max-width: 100%; }
.msg .content { min-width: 0; flex: 1; }
.msg .meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.msg .meta b { color: var(--text); font-weight: 600; }
.msg .text { background: var(--panel); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 9px 12px; overflow-wrap: anywhere; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .meta { justify-content: flex-end; }
.msg.mine .text { background: color-mix(in srgb, var(--green) 14%, var(--panel)); border-color: color-mix(in srgb, var(--green) 35%, var(--line)); border-radius: 12px 4px 12px 12px; }
.msg.system { justify-content: center; }
.msg.system .text { background: transparent; border: 1px dashed var(--line2); color: var(--muted); font-size: 12.5px; text-align: center; border-radius: 10px; }
.msg.system.err .text { color: #ff9b9b; border-color: rgba(239, 91, 91, .45); }
.msg .fold { font-size: 12.5px; color: var(--muted); }
.msg .fold button { background: none; border: none; color: var(--green); cursor: pointer; padding: 0 4px; font-size: 12.5px; }
.msg .acts { display: flex; gap: 2px; margin-top: 4px; opacity: 0; transition: opacity .15s; }
.msg:hover .acts, .msg:focus-within .acts { opacity: 1; }
.msg .acts button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 6px; }
.msg .acts button:hover { color: var(--text); background: var(--panel2); }
.typing { font-size: 12.5px; color: var(--muted); padding: 0 16px 6px; min-height: 22px; }
.composer { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 180px; resize: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none; line-height: 1.4; }
.composer textarea:focus { border-color: var(--green); }
.mic.rec { background: var(--red); border-color: var(--red); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(239, 91, 91, .25); } }
.voice-on { color: var(--green) !important; }
.chip-task { display: inline-flex; align-items: center; gap: 4px; background: var(--panel2); border: 1px solid var(--line2); color: var(--green); border-radius: 6px; padding: 0 6px; font: 600 12px var(--mono); cursor: pointer; }
.empty-chat { margin: auto; text-align: center; color: var(--muted); max-width: 320px; padding: 20px; }
.empty-chat .av { margin: 0 auto 12px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.suggest button { background: var(--panel); border: 1px solid var(--line2); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; color: var(--text); }
.suggest button:hover { border-color: var(--green); }

/* markdown */
.md p { margin: 0 0 8px; } .md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--head); margin: 12px 0 6px; line-height: 1.25; }
.md h1 { font-size: 18px; } .md h2 { font-size: 16px; } .md h3, .md h4 { font-size: 14.5px; }
.md ul, .md ol { margin: 4px 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--bg2); padding: 1px 5px; border-radius: 5px; }
.md pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow: auto; }
.md pre code { background: none; padding: 0; }
.md .tw { overflow-x: auto; margin: 6px 0 10px; }
.md table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.md th, .md td { border: 1px solid var(--line2); padding: 5px 8px; text-align: left; vertical-align: top; }
.md th { background: var(--panel2); }
.md hr { border: none; border-top: 1px solid var(--line); margin: 10px 0; }
.md blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line2); color: var(--muted); }

/* ---------- conversas ---------- */
.convo-layout { display: grid; grid-template-columns: 300px 1fr; height: calc(100dvh - 58px); }
.convo-list { border-right: 1px solid var(--line); overflow: auto; padding: 14px 10px; background: var(--bg2); }
.convo-list .label { padding: 10px 8px 6px; }
.convo { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.convo:hover { background: var(--panel); }
.convo.active { background: var(--panel2); }
.convo .i { min-width: 0; flex: 1; }
.convo .i b { font-size: 13.5px; display: block; font-weight: 600; }
.convo .i small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread { background: var(--green); color: #06210f; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; }
.convo-pane { min-width: 0; display: flex; }
.room-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line2); flex: none; font-size: 16px; }

/* ---------- quadro ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 300px; }
.col.drop { border-color: var(--green); background: color-mix(in srgb, var(--green) 6%, var(--bg2)); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; }
.col-head .cnt { margin-left: auto; font: 600 12px var(--mono); color: var(--muted); }
.col-head i { width: 8px; height: 8px; border-radius: 50%; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 11px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, transform .1s; }
.tcard:hover { border-color: var(--line2); transform: translateY(-1px); }
.tcard .tt { font-weight: 600; font-size: 13.5px; line-height: 1.35; margin-bottom: 8px; }
.tcard .tt small { font: 500 11px var(--mono); color: var(--dim); margin-right: 4px; }
.tcard .tf { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.tcard .due { margin-left: auto; font-family: var(--mono); font-size: 11px; }
.tcard .due.late { color: var(--red); }
.tcard.working { border-color: color-mix(in srgb, var(--yellow) 50%, var(--line)); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: none; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-size: 13px; }
.seg button.on { background: var(--panel2); color: var(--text); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(4, 7, 15, .7); z-index: 60; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { width: min(760px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); }
.modal.sm { width: min(480px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: var(--head); font-size: 19px; line-height: 1.3; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line2); }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; }
.result-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }
.task-thread { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; height: 380px; display: flex; overflow: hidden; }

/* ---------- equipe e config ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.section { padding: 18px; }
.section h2 { font-family: var(--head); font-size: 17px; margin: 0 0 4px; }
.section > p { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.list-row:first-of-type { border-top: none; }
.list-row .i { flex: 1; min-width: 0; }
.list-row .i b { display: block; font-size: 14px; }
.list-row .i small { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-sm { font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line2); }
.tag-sm.g { color: var(--green); border-color: rgba(43, 214, 123, .35); }
.tag-sm.y { color: var(--yellow); border-color: rgba(245, 197, 66, .35); }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.preset { border: 1px solid var(--line2); background: var(--bg2); border-radius: 10px; padding: 10px; cursor: pointer; text-align: left; }
.preset b { display: block; font-size: 13.5px; }
.preset small { color: var(--muted); font-size: 11.5px; }
.preset.on { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, var(--bg2)); }
.test-out { font-size: 13px; margin-top: 8px; }
.test-out.ok { color: var(--green); } .test-out.err { color: #ff9b9b; }
table.usage { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.usage td, table.usage th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.usage th { color: var(--muted); font-weight: 500; }

/* ---------- salas por setor ---------- */
.room-head { position: absolute; left: 0; right: 0; top: 0; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
.room-head .room-label { position: static; font-size: 11.5px; }
.room-n { color: var(--text); background: color-mix(in srgb, var(--rc) 25%, transparent); border-radius: 5px; padding: 2px 6px; margin-left: 6px; letter-spacing: .04em; }
.room-btn { font: 600 12px 'Inter', sans-serif; color: #0b1020; background: var(--rc); border: none; border-radius: 7px; padding: 5px 10px; cursor: pointer; margin-left: 6px; }
.room.enterable { cursor: pointer; border-color: color-mix(in srgb, var(--rc) 45%, var(--line2)); }
.room.enterable:hover { border-color: var(--rc); }
.room { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 7%, transparent), transparent 120px), #121a31; }
.sec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 14px 16px; }
.kpi b { display: block; font: 700 28px var(--head); line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 13px; }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sec-card { padding: 14px; border-top: 3px solid var(--c); display: flex; flex-direction: column; gap: 10px; }
.sec-top { display: flex; align-items: center; justify-content: space-between; }
.sec-name { font: 700 16px var(--head); }
.sec-lead { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sec-mem { display: flex; gap: 4px; flex-wrap: wrap; min-height: 26px; align-items: center; }
.sec-nums { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.sec-nums b { color: var(--text); font-size: 15px; margin-right: 2px; }
.sec-nums .bad b { color: var(--red); }
.sec-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
.chk-grid label { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- sistemas ---------- */
.quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; }
.quick .label { margin-right: 4px; }
.qa { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 5px 11px 5px 6px; cursor: pointer; font-size: 13px; font-weight: 500; transition: border-color .15s; }
.qa:hover { border-color: var(--green); }
.qa.more { color: var(--muted); padding-left: 11px; }
.li-ico { position: relative; flex: none; border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: color-mix(in srgb, var(--c) 18%, var(--panel2)); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); }
.li-ico img { width: 62%; height: 62%; object-fit: contain; }
.li-fb { font: 700 13px var(--head); color: var(--c); }
.qa .li-ico { border-radius: 6px; }
.qa .li-fb { font-size: 9px; }
.lcat { margin-bottom: 22px; }
.lcat > .label { margin-bottom: 10px; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ltile { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transition: border-color .15s, transform .1s; outline: none; min-width: 0; }
.ltile:hover, .ltile:focus-visible { border-color: var(--green); transform: translateY(-1px); }
.lt-i { flex: 1; min-width: 0; line-height: 1.3; }
.lt-i b { display: block; font-size: 14px; }
.lt-i small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-host { display: block; font: 11px var(--mono); color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-acts { display: flex; flex-direction: column; gap: 2px; }
.lt-btn { background: none; border: none; color: var(--dim); cursor: pointer; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: 14px; }
.lt-btn:hover { color: var(--text); background: var(--panel2); }
.lt-btn.on { color: var(--yellow); }
.lt-btn.on svg { fill: currentColor; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; top: 70px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--green); border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow); font-size: 13px; cursor: pointer; animation: tin .2s ease; }
.toast.err { border-left-color: var(--red); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ---------- responsivo ---------- */
.bottomnav { display: none; }
@media (max-width: 1100px) {
  .office-layout { grid-template-columns: 1fr; }
  .side-feed { max-height: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 54px 1fr 60px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .me-name, .brand small, #aiPill .txt { display: none; }
  .sidenav { display: none; }
  .bottomnav { display: flex; grid-row: 3; border-top: 1px solid var(--line); background: var(--bg2); justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav .nav-item { flex-direction: column; gap: 2px; font-size: 10.5px; padding: 8px 6px; flex: 1; align-items: center; }
  .bottomnav .nav-item.active::before { display: none; }
  .bottomnav .nav-item.active { color: var(--green); background: none; }
  .bottomnav .nav-badge { position: absolute; top: 4px; right: 50%; margin-right: -22px; font-size: 10px; }
  .view { padding: 16px 16px 30px; }
  .view-head h1 { font-size: 22px; }
  .drawer { top: 54px; bottom: 60px; width: 100vw; }
  .convo-layout { grid-template-columns: 1fr; height: calc(100dvh - 114px); }
  .convo-layout.in-chat .convo-list { display: none; }
  .convo-layout:not(.in-chat) .convo-pane { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .msg .acts { opacity: 1; }
}
@media (max-width: 860px) { .quick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .qa { flex: none; } }

/* ---------- áudio ---------- */
.audio-msg { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; }
.audio-msg audio { width: 260px; max-width: 100%; height: 38px; color-scheme: dark; }
.msg.mine .audio-msg audio { margin-left: auto; }
.audio-tr { font-size: 12.5px; color: var(--muted); }
.rec-bar { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 10px 12px 12px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.2s infinite; flex: none; }
.rec-time { font: 600 14px var(--mono); flex: none; min-width: 42px; }
.rec-tr { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- histórico e linha do tempo ---------- */
.tcli { font-size: 12px; color: var(--muted); margin: -4px 0 8px; }
.timeline { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; border-left: 2px solid var(--line2); padding-left: 12px; }
.tl-item { display: flex; gap: 10px; font-size: 13.5px; padding: 5px 0; }
.tl-ic { flex: none; width: 20px; text-align: center; }
.tl-item small { display: block; color: var(--dim); font-size: 11.5px; font-family: var(--mono); }
.tl-d { color: var(--muted); }
.hist-layout { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.hist-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-bottom: 14px; align-items: center; }
.hist-filters select.input { width: auto; max-width: 200px; }
.cli-head { padding: 14px 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 3px solid var(--green); }
.cli-head h2 { margin: 2px 0; font-family: var(--head); font-size: 20px; }
.cli-head small { color: var(--muted); }
.h-count { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.h-day { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.h-item { display: flex; gap: 12px; padding: 11px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 6px; cursor: pointer; }
.h-item:hover { border-color: var(--line2); }
.h-ic { width: 26px; text-align: center; flex: none; }
.h-b { min-width: 0; flex: 1; }
.h-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.h-b small { color: var(--muted); font-size: 12px; }
.h-snip { font-size: 13px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
mark { background: rgba(245, 197, 66, .35); color: var(--text); border-radius: 3px; padding: 0 2px; }
@media (max-width: 1100px) { .hist-layout { grid-template-columns: 1fr; } }

/* ---------- presença e ponto ---------- */
.av .on.away, .person .dot-on.away { background: var(--yellow); }
.pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-right: 6px; }
.pdot.yes { background: var(--green); } .pdot.away { background: var(--yellow); }
.ponto-wrap { position: relative; }
.ponto-btn small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.ponto-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; z-index: 50; min-width: 200px; }
.ponto-menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.ponto-menu button:hover { background: var(--panel); }
.p-list { display: flex; flex-direction: column; gap: 10px; }
.p-row { padding: 14px 16px; display: grid; grid-template-columns: 220px 1fr; gap: 10px 20px; align-items: center; }
.p-who { display: flex; align-items: center; gap: 10px; }
.p-who b { display: block; }
.p-state { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.p-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.p-state.yes::before { background: var(--green); } .p-state.away::before { background: var(--yellow); }
.p-nums { display: flex; gap: 22px; flex-wrap: wrap; }
.p-nums small { display: block; color: var(--muted); font-size: 11.5px; }
.p-nums b { font: 700 17px var(--head); }
.p-bar { grid-column: 1 / -1; }
.p-track { position: relative; height: 22px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; }
.p-seg { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: rgba(43, 214, 123, var(--a)); }
.p-mark { position: absolute; top: -9px; transform: translateX(-50%); font-size: 11px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 5px; padding: 0 3px; line-height: 16px; }
.p-now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--red); }
.p-hours { position: relative; height: 16px; font: 10.5px var(--mono); color: var(--dim); }
.p-hours span { position: absolute; transform: translateX(-50%); top: 2px; }
.p-mlist { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.p-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.p-table td small { color: var(--dim); }
.p-marks { color: var(--muted); font-size: 12px; }
.p-note { color: var(--dim); font-size: 12.5px; margin-top: 18px; }
.now-grid { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.now-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; min-width: 180px; }
.now-card b { display: block; font-size: 14px; }
.now-card small { color: var(--muted); font-size: 12px; }
@media (max-width: 860px) {
  .p-row { grid-template-columns: 1fr; }
  .ponto-btn small { display: none; }
  .ponto-wrap .ponto-btn { padding: 5px 8px; font-size: 12px; }
}
