:root {
  --bg: #0c0d11;
  --panel: #15161c;
  --panel-2: #1a1b22;
  --line: #292b35;
  --text: #f5f5f7;
  --muted: #9b9eaa;
  --accent: #7667ff;
  --accent-soft: #28234f;
  --good: #65d69b;
  --radius: 18px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 320px; }
button { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px; border-right: 1px solid var(--line); background: #101116; overflow-y: auto; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 20px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; font-weight: 800; background: linear-gradient(145deg, #8e83ff, #5f50e8); box-shadow: 0 8px 28px rgba(118, 103, 255, .25); }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 18px; letter-spacing: -.02em; }
.brand span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 4px; }
.nav-item { border: 0; background: transparent; color: #c6c8d0; padding: 10px 12px; border-radius: 10px; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: .18s ease; }
.nav-item span { width: 20px; text-align: center; color: #858896; }
.nav-item:hover { background: #181921; color: white; }
.nav-item.active { background: #20212a; color: white; }
.nav-item.accent.active { background: var(--accent-soft); }
.nav-item.accent.active span { color: #afa7ff; }
.nav-section { color: #646773; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 17px 12px 6px; }
.sidebar-footer { margin-top: auto; display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); padding: 18px 10px 4px; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer small { color: var(--muted); font-size: 10px; margin-top: 2px; line-height: 1.35; }
.env-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-top: 4px; box-shadow: 0 0 12px rgba(101,214,155,.5); }
.main { min-width: 0; }
.topbar { min-height: 88px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; background: rgba(12,13,17,.9); border-bottom: 1px solid rgba(41,43,53,.8); backdrop-filter: blur(16px); }
.topbar h1 { margin: 2px 0 0; font-size: 23px; letter-spacing: -.03em; }
.eyebrow, .kicker { color: #8d91a0; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { margin: 0; }
.top-actions, .toolbar-actions { display: flex; align-items: center; gap: 10px; }
.status-pill, .tag { border: 1px solid var(--line); background: #17181e; color: #c9cbd3; border-radius: 999px; padding: 7px 10px; font-size: 11px; white-space: nowrap; }
.status-pill { color: #86dfad; }
.status-pill.muted { color: #b2b4bd; }
.tag.purple { border-color: #443a86; background: #272146; color: #b9b2ff; }
.button { min-height: 38px; border-radius: 10px; border: 1px solid var(--line); padding: 0 14px; cursor: pointer; color: white; background: #1b1c23; }
.button.primary { background: var(--accent); border-color: var(--accent); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.ghost:hover { border-color: #444754; }
.icon-button { border: 1px solid var(--line); color: white; background: #181920; width: 40px; height: 40px; border-radius: 10px; }
.mobile-only { display: none; }
.content { padding: 28px; }
.hero { overflow: hidden; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 34px; min-height: 220px; border: 1px solid #34304f; border-radius: 24px; background: radial-gradient(circle at 83% 24%, rgba(118,103,255,.24), transparent 27%), linear-gradient(145deg, #191a21, #111218); }
.hero h2 { max-width: 750px; font-size: clamp(28px, 4vw, 47px); line-height: 1.05; letter-spacing: -.045em; margin: 8px 0 14px; }
.hero p { max-width: 760px; color: #aaadb8; line-height: 1.65; margin: 0; }
.hero-badge { flex: 0 0 150px; aspect-ratio: 1; border: 1px solid #4b438d; border-radius: 50%; display: grid; place-content: center; text-align: center; background: rgba(43,37,79,.65); }
.hero-badge strong { font-size: 22px; }
.hero-badge span { color: #ada7d3; font-size: 10px; margin-top: 4px; }
.grid { display: grid; gap: 16px; margin-top: 16px; }
.cards-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.split { grid-template-columns: minmax(0,1.45fr) minmax(310px,.75fr); }
.card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card { padding: 20px; }
.metric span, .metric small, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 21px; margin: 8px 0 6px; letter-spacing: -.025em; }
.metric small { color: #797c88; line-height: 1.4; }
.card-head, .toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.card h3, .toolbar h2 { margin: 5px 0; letter-spacing: -.025em; }
.toolbar { margin-bottom: 18px; }
.toolbar h2 { font-size: 28px; }
.toolbar p, .muted-text { margin: 5px 0 0; color: var(--muted); line-height: 1.55; }
.flow { display: flex; gap: 8px; align-items: center; margin-top: 22px; overflow-x: auto; padding-bottom: 4px; }
.flow div { min-width: 150px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.flow strong, .flow span { display: block; }
.flow strong { font-size: 12px; }
.flow span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.flow b { color: #5c5f6d; }
.stack-list { display: grid; margin-top: 14px; }
.stack-list > div { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.stack-list > div:first-child { border-top: 0; }
.stack-list > div > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #20212a; color: #9295a2; font-size: 10px; }
.stack-list p, .stack-list strong, .stack-list small { margin: 0; display: block; }
.stack-list strong { font-size: 12px; }
.stack-list small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.kanban { display: grid; grid-auto-columns: minmax(250px, 1fr); grid-auto-flow: column; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kanban-col { min-height: 450px; border: 1px solid var(--line); border-radius: 15px; background: #111218; padding: 12px; }
.kanban-col header { display: flex; justify-content: space-between; align-items: center; padding: 3px 3px 12px; font-size: 12px; }
.kanban-col header span { min-width: 24px; padding: 4px 7px; text-align: center; border-radius: 8px; background: #202129; color: #8f929e; }
.empty-card { border: 1px dashed #30323d; border-radius: 12px; min-height: 82px; display: grid; place-items: center; color: #5f626e; font-size: 11px; }
.inbox-layout { min-height: 620px; display: grid; grid-template-columns: 290px minmax(360px,1fr) 290px; gap: 12px; }
.panel { overflow: hidden; }
.panel-title { height: 52px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.empty-state, .conversation-empty { color: var(--muted); display: grid; place-items: center; text-align: center; padding: 35px 20px; gap: 7px; }
.empty-state small, .conversation-empty span { max-width: 260px; font-size: 11px; line-height: 1.5; color: #6f727e; }
.conversation-empty { height: calc(100% - 52px); align-content: center; }
.bubble-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: #20212a; font-size: 28px; color: #9188f7; margin-bottom: 5px; }
.contact-panel { padding-bottom: 14px; }
.field-skeleton { height: 44px; margin: 14px 14px 0; border-radius: 10px; background: linear-gradient(90deg,#1d1e25,#23242c,#1d1e25); }
.field-skeleton.short { width: 65%; }
.info-box { margin: 16px 14px; padding: 14px; border: 1px solid #373255; border-radius: 12px; background: #1d1a2d; }
.info-box strong, .info-box span { display: block; }
.info-box strong { font-size: 12px; }
.info-box span { color: #9892b7; font-size: 10px; line-height: 1.5; margin-top: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.chips span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: #a7a9b3; font-size: 10px; }
.score-list { margin-top: 12px; }
.score-list div { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); color: #b9bbc4; font-size: 12px; }
.module-placeholder { min-height: 500px; display: grid; align-content: center; justify-items: center; text-align: center; background: radial-gradient(circle at center, rgba(118,103,255,.08), transparent 35%), var(--panel); }
.module-placeholder h2 { font-size: 34px; margin: 7px 0; }
.module-placeholder p { max-width: 600px; color: var(--muted); line-height: 1.6; }
.placeholder-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--accent-soft); color: #aea7ff; font-size: 25px; margin-bottom: 14px; }
@media (max-width: 1180px) {
  .cards-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split { grid-template-columns: 1fr; }
  .inbox-layout { grid-template-columns: 250px minmax(340px, 1fr); }
  .contact-panel { display: none; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -290px; width: 275px; box-shadow: 25px 0 60px rgba(0,0,0,.35); transition: left .2s ease; }
  .sidebar.open { left: 0; }
  .mobile-only { display: inline-grid; place-items: center; }
  .topbar { padding: 13px 16px; min-height: 74px; }
  .topbar > div:nth-child(2) { margin-right: auto; }
  .top-actions .status-pill { display: none; }
  .content { padding: 16px; }
  .hero { padding: 24px; min-height: 0; }
  .hero-badge { display: none; }
  .cards-4 { grid-template-columns: 1fr 1fr; }
  .inbox-layout { grid-template-columns: 1fr; min-height: 500px; }
  .inbox-list { display: none; }
}
@media (max-width: 520px) {
  .top-actions .button { display: none; }
  .cards-4 { grid-template-columns: 1fr; }
  .hero h2 { font-size: 29px; }
  .toolbar { display: grid; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .button { flex: 1; }
  .content { padding: 12px; }
  .card { padding: 16px; }
  .module-placeholder { min-height: 420px; }
}

/* 1.9.60.13 — autenticação e cadastros reais */
.app-hidden { display: none !important; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 70% 20%, rgba(109,93,252,.18), transparent 30%), #0c0d11; }
.login-card { width: min(440px, 100%); padding: 30px; border: 1px solid #34304f; border-radius: 24px; background: rgba(19,20,26,.96); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-brand strong, .login-brand span { display: block; }
.login-brand span { color: var(--muted); font-size: 11px; margin-top: 2px; }
.login-copy h1 { font-size: 32px; margin: 7px 0 10px; letter-spacing: -.04em; }
.login-copy p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 22px; }
.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 7px; color: #bbbcc5; font-size: 11px; font-weight: 700; }
.login-form input, .search-form input, .company-select { border: 1px solid var(--line); background: #101116; color: white; border-radius: 10px; min-height: 42px; padding: 0 12px; outline: none; }
.login-form input:focus, .search-form input:focus, .company-select:focus { border-color: #6559d7; box-shadow: 0 0 0 3px rgba(109,93,252,.12); }
.login-button { min-height: 44px; margin-top: 3px; }
.login-message { min-height: 18px; color: #aaa4d4; font-size: 11px; line-height: 1.45; }
.login-security { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: #6f727e; font-size: 9px; text-align: center; }
.status-pill.warning { color: #e0b66f; }
.company-select { max-width: 220px; min-height: 38px; font-size: 11px; }
.user-chip { min-width: 120px; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 11px; }
.user-chip small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.search-form { display: flex; gap: 8px; }
.search-form input { width: min(330px, 55vw); }
.data-card { padding: 0; overflow: hidden; }
.loading-state, .error-state { min-height: 220px; display: grid; place-items: center; color: var(--muted); }
.error-state { color: #e19b9b; }
.data-empty { min-height: 220px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 11px; }
th { position: sticky; top: 0; background: #17181e; color: #868995; text-transform: uppercase; letter-spacing: .06em; font-size: 9px; }
td { color: #aeb0ba; }
td strong { color: #f1f1f4; }
@media (max-width: 980px) {
  .company-select, .user-chip { display: none; }
  #logout-button { display: none; }
}
@media (max-width: 520px) {
  .login-card { padding: 22px; border-radius: 18px; }
  .login-copy h1 { font-size: 28px; }
  .search-form { width: 100%; }
  .search-form input { width: 100%; }
}
