:root {
  color-scheme: light;
  --bg: #F4F5F7;
  --sidebar: #FFFFFF;
  --top: #FFFFFF;
  --card: #FFFFFF;
  --card-2: #F3F4F6;
  --input: #FFFFFF;
  --border: #E5E7EB;
  --text: #353534;
  --muted: #6B7280;
  --faint: #6B7280;
  --hover: #F3F4F6;
  --gold: #F5A623;
  --gold-deep: #E08F12;
  --gold-ink: #F5A623;
  --charcoal: #353534;
  --purple: #F5A623;
  --purple-2: #E08F12;
  --blue: #F5A623;
  --blue-2: #E08F12;
  --green: #5cb377;
  --red: #d26d69;
  --orange: #F5A623;
  --bubble-in: #ffffff;
  --bubble-out: #ffffff;
  --chat: #F3F4F6;
  --shadow: 0 16px 40px rgba(53, 53, 52, 0.08);
  --nav-active: #F3F4F6;
  --on-gold: #353534;
  --sidebar-w: 248px;
  --top-h: 56px;
}

html.dark {
  color-scheme: dark;
  --bg: #12110f;
  --sidebar: #1c1a17;
  --top: #1c1a17;
  --card: #26231f;
  --card-2: #2a2826;
  --input: #1a1816;
  --border: rgba(255, 255, 255, 0.12);
  --text: #f7f4ec;
  --muted: #c9c2b3;
  --faint: #9c9588;
  --hover: rgba(255, 255, 255, 0.06);
  --nav-active: #2a2826;
  --chat: #1a1816;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d9dce1; border-radius: 99px; }

.app { display: flex; height: 100%; min-height: 0; overflow: hidden; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.sidebar-scroll {
  overflow: auto; flex: 1; min-height: 0; padding: 6px 0 12px;
  scrollbar-width: none;
}
.sidebar-scroll::-webkit-scrollbar { width: 0; height: 0; }
.brand {
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.brand-logo { height: 28px; width: auto; display: block; }
.logo-for-dark { display: none; }
html.dark .logo-for-light { display: none; }
html.dark .logo-for-dark { display: block; }
.logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--gold);
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: -0.04em; color: var(--charcoal); font-size: 13px;
}
.brand-name { font-weight: 700; font-size: 14px; letter-spacing: -0.02em; }
.brand-sub { font-size: 10px; color: var(--faint); margin-top: -2px; }

.nav-label {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 16px 16px 4px;
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  color: var(--muted); text-transform: none;
}
.nav-sublabel {
  padding: 10px 16px 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--faint);
}
.nav-item, .nav-group {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 7px 16px; border-radius: 0;
  border-left: 3px solid transparent;
  color: var(--muted); background: transparent; border-top: 0; border-right: 0; border-bottom: 0;
  font-size: 12.5px;
}
.nav-item svg, .nav-group svg { width: 16px; height: 16px; flex: 0 0 16px; }
.nav-item:hover, .nav-group:hover { background: var(--hover); color: var(--text); border-radius: 0; }
.nav-item.active {
  background: var(--nav-active);
  color: var(--text);
  border-radius: 0;
  border-left-color: var(--gold);
  box-shadow: none;
}
.nav-item .grow { flex: 1; }
.nav-group .chev { margin-left: auto; width: 14px; height: 14px; opacity: 0.7; }
.badge-count {
  margin-left: auto; font-size: 10px; background: var(--card-2); color: var(--text);
  border-radius: 999px; padding: 1px 6px;
}
.nav-item.active .badge-count { background: var(--card); color: var(--text); }

.side-foot {
  border-top: 1px solid var(--border);
  padding: 10px;
}
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: white;
  background: var(--charcoal); flex: 0 0 32px;
}
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 10px; }
.avatar.lg { width: 72px; height: 72px; flex-basis: 72px; font-size: 26px; }

.main { flex: 1; min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.topbar {
  height: var(--top-h);
  flex: 0 0 var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--top);
  position: relative; z-index: 20;
}
.tenant-switch { position: relative; min-width: 0; }
.tenant-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; max-width: 240px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--card); color: var(--text);
  font-size: 13px; font-weight: 600;
}
.tenant-btn svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--muted); }
.tenant-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  min-width: 220px; padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow);
}
.tenant-menu[hidden] { display: none; }
.tenant-menu button {
  display: flex; width: 100%; text-align: left;
  border: 0; background: transparent; border-radius: 4px;
  padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--text);
}
.tenant-menu button:hover, .tenant-menu button[aria-selected="true"] { background: var(--hover); }
.search {
  flex: 1; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  height: 36px;
  background: var(--input); border: 1px solid var(--border);
  border-radius: 4px; padding: 0 10px; color: var(--faint);
}
.search input {
  flex: 1; background: transparent; border: 0; outline: none; color: var(--text);
}
.kbd {
  font-size: 10px; border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 6px; color: var(--faint);
}
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 4px; border: 0; background: transparent;
  color: var(--muted); display: inline-grid; place-items: center; position: relative;
  vertical-align: middle;
}
table.data .icon-btn { width: 28px; height: 28px; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark ::-webkit-scrollbar-thumb { background: #3f3a34; }
html.dark .avatar { background: #3a3632; color: #f7f4ec; }
.dot-green { width: 8px; height: 8px; border-radius: 99px; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.bell-badge {
  position: absolute; top: 2px; right: 0;
  background: #ef4444; color: white; border-radius: 99px;
  font-size: 10px; min-width: 16px; height: 16px; display: grid; place-items: center;
  padding: 0 4px; font-weight: 700;
}
.content { flex: 1; min-height: 0; overflow: auto; padding: 24px 24px 32px; }
.content.flush {
  padding: 0;
  display: flex;
  flex: 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1, .hero h1 { margin: 0; font-size: 22px; letter-spacing: -0.03em; font-weight: 600; }
.page-head p { margin: 4px 0 0; color: #6B7280; font-size: 13px; }
.h-icon { display: inline-flex; vertical-align: middle; margin-left: 6px; color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  height: 36px; border-radius: 4px; border: 1px solid var(--border);
  padding: 0 12px; font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--text);
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: #F3F4F6; }
.btn-primary { background: #F5A623; border-color: #F5A623; color: #353534; }
.btn-primary:hover { background: #E08F12; border-color: #E08F12; }
.btn-purple { background: #F5A623; border-color: #F5A623; color: #353534; }
.btn-danger { background: #8f3d3a; border-color: #8f3d3a; color: #fff; }
.btn.btn-danger:hover { background: #7a3330; border-color: #7a3330; color: #fff; }
.btn-danger-soft { background: var(--card); color: #8f3d3a; border-color: var(--border); }
.btn-ghost {
  background: var(--card-2);
  border-color: transparent;
  color: var(--text);
  font-weight: 500;
}
.btn.btn-ghost:hover { background: #E5E7EB; border-color: transparent; color: var(--text); }
html.dark .btn.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-sm { height: 36px; border-radius: 4px; padding: 0 12px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn-row.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 0;
}
.btn-row.pair .btn { width: 100%; min-width: 0; padding: 0 8px; font-size: 12px; gap: 6px; white-space: nowrap; }
.page-head .btn-row, .between .btn-row { margin-top: 0; }
.field-row { display: flex; align-items: center; gap: 8px; }
.field-row .field, .field-row .area { flex: 1; min-width: 0; width: auto; }
.field-row:has(.area) { align-items: flex-end; }
.toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.toolbar .field, .toolbar .select { flex: 1 1 180px; width: auto; min-width: 0; max-width: none; }
.toolbar .is-full { flex: 1 1 100%; }
.card > h2, .card h2 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.card h3 { margin: 24px 0 12px; font-size: 14px; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.home-hero {
  background: #353534; color: #fff; border: 0; border-radius: 8px;
  padding: 22px 24px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.home-hero h1 { margin: 0; color: #fff; font-size: 22px; font-weight: 600; }
.home-hero p { margin: 4px 0 12px; color: #d6d6d3; font-size: 13px; }
.home-hero .avatar { background: #F5A623; color: #353534; }
.home-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.home-chips span {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 12px;
}
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.home-card { display: block; text-align: center; padding: 28px 16px; }
.home-card h2 { margin: 0 0 4px; font-size: 16px; }
.home-card p { margin: 0; color: var(--muted); font-size: 13px; }
.home-ico {
  width: 44px; height: 44px; border-radius: 10px; margin: 0 auto 12px;
  display: grid; place-items: center;
}
.home-ico.green { background: #d9f2e3; color: #1b7a43; }
.home-ico.blue { background: #dbe7ff; color: #2f4fa3; }
.home-ico.amber { background: #ffe8c2; color: #8a5a00; }
.home-split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 12px; }
.home-list { list-style: none; margin: 8px 0 0; padding: 0; }
.home-list.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 2px;
}
.card:has(.home-list.cols) { container-type: inline-size; }
@container (min-width: 560px) {
  .home-list.cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.home-list li, .home-list a {
  display: flex; align-items: flex-start; gap: 10px; color: inherit;
}
.home-list li { padding: 6px 0; }
.home-list a { padding: 0; }
.home-list.cols li { padding: 4px 0; }
.home-list.cols a { min-width: 0; }
.home-list.cols svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.home-list strong { display: block; font-weight: 600; }
.home-list span { color: var(--muted); font-size: 12px; }
.stat .faint { font-size: 12px; }
.stat strong { display: block; margin-top: 6px; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.preview-label { margin: 0 0 8px; text-align: center; color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.card-pad { padding: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr .9fr; gap: 14px; }

.field, .select, .area {
  width: 100%; background: var(--input); border: 1px solid var(--border);
  border-radius: 4px; height: 36px; padding: 0 12px; outline: none;
}
.area { height: auto; min-height: 88px; padding: 8px 12px; resize: vertical; }
label.lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field:focus, .select:focus, .area:focus { border-color: #353534; outline: none; }
button:focus-visible, a:focus-visible, .nav-item:focus-visible, .tab:focus-visible, .status-tab:focus-visible {
  outline: 2px solid #353534; outline-offset: 2px;
}
html.dark button:focus-visible, html.dark a:focus-visible { outline-color: #f7f4ec; }
html.dark .field:focus, html.dark .select:focus, html.dark .area:focus { border-color: #f7f4ec; }

.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow: auto; }
.tab {
  background: transparent; border: 0; color: #6B7280;
  padding: 8px 12px; border-bottom: 2px solid transparent; border-radius: 0; white-space: nowrap;
}
.tab.tab-on { color: #353534; border-bottom-color: #F5A623; font-weight: 600; background: transparent; }

.chip {
  height: 36px; border: 1px solid #E5E7EB; background: #FFFFFF; color: #6B7280;
  border-radius: 4px; padding: 0 12px; font-size: 13px;
}
.chip.on { background: transparent; border-color: transparent; color: #353534; font-weight: 600; box-shadow: inset 0 -2px 0 #F5A623; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600;
}
.pill-green { background: #2fbe64; color: #fff; }
.atalho {
  display: inline-flex; align-items: center;
  background: #eceff3; color: #353534;
  border-radius: 4px; padding: 3px 8px;
  font-size: 12px; font-weight: 500; line-height: 1.2;
}
.pill-blue { background: #F3F4F6; color: #353534; }
.pill-purple { background: #F3F4F6; color: #353534; }
.pill-red { background: #f6e2e1; color: #8f3d3a; }
.pill-gray { background: #e6e8ec; color: #3f4654; }
.pill-orange { background: #F3F4F6; color: #353534; }

table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  text-align: left; font-weight: 600; color: #6B7280; background: #F3F4F6;
  height: 44px; padding: 0 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td {
  height: auto; padding: 7px 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle; white-space: nowrap; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis;
}
table.data td:last-child { max-width: none; overflow: visible; }
table.data.contacts { width: 100%; }
table.data.contacts th:last-child,
table.data.contacts td:last-child {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}
table.data.contacts td:last-child .row { justify-content: flex-end; margin-left: auto; }
table.data td.anexo { white-space: nowrap; max-width: none; color: #6b7280; }
table.data th svg { width: 12px; height: 12px; vertical-align: -1px; color: #9ca3af; }
.icon-btn.danger { color: #e11d48; }
.card-tools { display: flex; margin-left: auto; flex: 0 0 auto; }
.card-tools .icon-btn { width: 28px; height: 28px; color: var(--faint); }
.card-tools .icon-btn.danger { color: var(--faint); }
.card-tools .icon-btn.danger:hover { color: #e11d48; background: rgba(225, 29, 72, .08); }
.card .table-wrap { border: 0; border-radius: 0; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--hover); }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
html.dark table.data th { background: var(--card-2); color: var(--muted); }
table.data code { white-space: nowrap; }

.switch { position: relative; width: 36px; height: 20px; flex: 0 0 36px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: #d9dce1; border-radius: 99px; transition: .15s;
}
.switch span:before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px;
  background: white; border-radius: 99px; transition: .15s;
}
.switch input:checked + span { background: #353534; }
.switch input:checked + span:before { transform: translateX(16px); }

.toggle-line {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.toggle-line:not(:has(+ .toggle-line:not(.hidden))) { border-bottom: 0; }
.toggle-line strong { font-weight: 600; font-size: 12.5px; }
.toggle-line p { margin: 4px 0 0; color: #6B7280; font-size: 13px; }
.toggle-line .select, .toggle-line .field { width: 240px; flex: 0 0 240px; }
.toggle-line .area { width: 280px; flex: 0 0 280px; }
.toggle-line .btn { flex: 0 0 auto; }

.callout {
  border-radius: 6px; padding: 8px 10px; font-size: 12px; line-height: 1.35; display: flex; gap: 8px;
}
.callout svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 1px; }
.callout-yellow { background: #fff4d6; border: 1px solid #f0d48a; color: #7a5610; }
.callout-blue { background: #e7f0ff; border: 1px solid #c5d7f7; color: #243e73; }
.callout-dark { background: #e8eef0; border: 1px solid #c9d5da; color: #24343b; }
.callout-green { background: #e5f6ec; border: 1px solid #b7e4c7; color: #14663a; }
.chat-notices .callout { border: 0; margin: 0; padding: 6px 10px; font-size: 11.5px; }
.chat-notices .callout-green { background: #1b6b43; color: #d9f5e6; }
.chat-notices .callout-dark { background: #163028; color: #d5e4dc; }
.chat-notices .callout-window-open { background: #FFF1C9; color: #353534; border: 1px solid #F5D27A; }
.chat-notices [data-chat-window] { display: flex; align-items: center; gap: 6px; }
.chat-notices [data-chat-window][hidden] { display: none; }
.chat-notices [data-chat-window] svg { width: 14px; height: 14px; flex: 0 0 14px; }
.chat-notices .callout-window-closed { background: #f6e2e1; color: #8f3d3a; border: 1px solid #ecc9c7; }

.hero {
  background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; padding: 22px;
  display: flex; justify-content: space-between; align-items: center;
}
.shortcut {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 28px 16px;
}
.shortcut .ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: #F3F4F6; color: var(--charcoal);
}
.shortcut .ico.green { background: #def0e4; color: #254830; }
.shortcut .ico.blue { background: #F3F4F6; color: var(--charcoal); }
.shortcut h3 { margin: 0; font-size: 14px; }
.shortcut p { margin: 0; color: var(--muted); font-size: 12px; }

.inbox { display: grid; grid-template-columns: 420px minmax(0, 1fr); flex: 1; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.inbox.with-panel { grid-template-columns: 360px minmax(0, 1fr) 300px; }
.list-head { position: relative; z-index: 4; }
.col-list, .col-chat, .col-panel {
  min-width: 0; min-height: 0; height: 100%;
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.col-list > .list-head, .col-list > .pager { flex: 0 0 auto; }
.col-list > .ticket-scroll { flex: 1; min-height: 0; overflow: auto; }
.col-chat, .col-panel { overflow: hidden; }
.col-panel { border-right: 0; background: var(--card); }
.list-head, .chat-head { padding: 16px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.chat-head { background: #FFFFFF; color: #353534; }
.chat-head .icon-btn, .chat-head .meta, .chat-head strong { color: #353534; }
.ticket {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer;
  min-width: 0;
}
.ticket:hover, .ticket.on { background: var(--hover); }
.ticket[hidden] { display: none !important; }
.ticket > div { min-width: 0; }
.ticket .between { min-width: 0; }
.ticket .name {
  font-weight: 600; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.ticket .meta { flex: 0 0 auto; }
.ticket .preview { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { font-size: 11px; color: var(--faint); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; min-width: 0; max-width: 100%; }
.tag {
  font-size: 10px; border-radius: 999px; padding: 1px 6px;
  background: #d9f2e3; color: #1b7a43;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag.gray { background: #dbe7ff; color: #2f4fa3; }
.tag.blue { background: #ffe8c2; color: #8a5a00; }
.list-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inbox-tools { display: flex; align-items: center; gap: 6px; }
.inbox-tools strong { margin-right: auto; font-size: 14px; }
.inbox-tools .btn { height: 30px; padding: 0 8px; font-size: 12px; gap: 4px; }
.inbox-tools .icon-btn { width: 30px; height: 30px; border: 1px solid var(--border); background: #fff; border-radius: 6px; }
.btn-privados {
  width: 100%; height: 32px; margin-top: 8px; border: 0; border-radius: 6px;
  background: #3558c8; color: #fff; font-size: 13px; font-weight: 600;
}
.inbox-search { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.inbox-search .field { flex: 1; min-width: 0; height: 32px; }
.inbox-search .icon-btn {
  width: 32px; height: 32px; border: 1px solid var(--border); background: #fff; border-radius: 6px; flex: 0 0 32px;
}
.count-badge {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: #3b6fd8; color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
}
.count-badge.green { background: #3dce73; color: #14301f; }
.count-badge.blue { background: #3b6fd8; }
.count-badge.purple { background: #7c5cbf; }
.icon-btn.has-count { position: relative; }
.icon-btn.has-count .count-badge { position: absolute; top: -4px; right: -4px; }
.inbox-status { gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.inbox-status .status-tab {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid transparent; border-radius: 999px; padding: 3px 8px;
  font-size: 12px; color: #4b5563;
}
.inbox-status .status-tab svg { width: 13px; height: 13px; }
.inbox-status .status-tab.on { background: #fff; border-color: #e5e7eb; color: #353534; font-weight: 600; }
.avatar-wrap { position: relative; width: 36px; height: 36px; }
.avatar-wrap .avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: 11px; }
.avatar-wrap .unread {
  position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 99px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid #fff;
}
.who-line {
  display: flex; align-items: center; gap: 4px; margin-top: 2px;
  font-size: 11px; color: #6b7280; min-width: 0; white-space: nowrap; overflow: hidden;
}
.who-line .dot { width: 7px; height: 7px; border-radius: 99px; flex: 0 0 7px; }
.who-line .dot.yel { background: #f5c542; }
.who-line .dot.grn { background: #3dce73; }
.tag.gold { background: #f3e2a4; color: #6b5410; }
.ticket.fresh, .ticket.on { background: #e7f8ec; }
.ticket-scroll { box-shadow: inset 3px 0 0 #f0b429; background: #fff; }
.col-list { background: #fff; }
.list-head { background: #fff; }
.col-list, .ticket-scroll { overflow-x: hidden; }
.ticket-scroll { overflow-y: auto; }

#live-chat { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
#live-chat > .composer { flex: 0 0 auto; }
.chat-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background-color: #EFE7DE;
  background-image: url("wa-bg.svg");
  background-repeat: repeat;
}
.chat-stream {
  height: 100%;
  overflow: auto;
  padding: 16px 16px 92px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-notices {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bubble {
  max-width: 72%; padding: 8px 10px; border-radius: 12px; font-size: 12.5px; white-space: pre-wrap;
}
.bubble.in { background: #FFFFFF; color: #353534; border: 1px solid rgba(53,53,52,.12); border-top-left-radius: 4px; align-self: flex-start; }
.bubble.out { background: #D9FDD3; color: #353534; border: 1px solid #c6ebbf; border-top-right-radius: 4px; align-self: flex-end; }
.bubble .who { font-size: 11px; opacity: .75; margin-bottom: 4px; }
.composer {
  border-top: 1px solid var(--border); padding: 10px; display: flex; gap: 8px; align-items: center;
  background: #FFFFFF; color: #353534;
}
.composer .field { background: #FFFFFF; color: #353534; }
.empty-chat {
  flex: 1; display: grid; place-items: center; text-align: center; color: #6b7280; background: #f7f8fa;
}
.empty-chat h2 { color: #353534; font-size: 16px; font-weight: 600; }
.panel-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 8px; }
.panel-tabs button, .panel-tabs a {
  background: transparent; border: 0; color: var(--muted); padding: 10px 8px; font-size: 12px;
  border-bottom: 2px solid transparent;
}
.panel-tabs button.on, .panel-tabs a.on { color: #353534; border-bottom-color: #F5A623; font-weight: 600; background: transparent; }

.menu {
  position: absolute; z-index: 30; background: var(--card); border: 1px solid var(--border);
  border-radius: 4px; min-width: 260px; box-shadow: var(--shadow); padding: 6px;
}
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 0; color: var(--text); text-align: left;
  padding: 7px 10px; border-radius: 0; font-size: 12.5px;
}
.menu svg { width: 15px; height: 15px; flex: 0 0 15px; }
.menu a:hover, .menu button:hover { background: var(--hover); }
.col-picker { position: relative; flex: 0 0 auto; }
.col-picker .col-menu { top: calc(100% + 6px); right: 0; min-width: 200px; }
.col-picker .col-menu label {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; font-size: 13px; cursor: pointer;
}
.col-picker .col-menu label:hover { background: var(--hover); }
table.data.schedule th,
table.data.schedule td {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.data.schedule th:last-child,
table.data.schedule td:last-child { width: 1%; overflow: visible; }
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40;
  display: grid; place-items: center; padding: 24px;
}
.modal {
  width: min(560px, 100%); background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); padding: 18px;
}
.modal h2 { margin: 0; font-size: 18px; }
.modal .lbl { margin-top: 12px; }
.modal .btn-row { justify-content: flex-end; }
.hidden { display: none !important; }

.phone {
  width: 230px; height: 420px; border-radius: 28px; border: 8px solid #353534;
  background: #F4F5F7; overflow: hidden; margin: 0 auto;
}
.phone header { background: #FFFFFF; color: #353534; border-bottom: 1px solid #E5E7EB; padding: 16px 12px 10px; font-size: 13px; }
.phone .screen { padding: 12px; color: #353534; font-size: 12px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.media {
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.media .thumb { height: 120px; display: grid; place-items: center; background: #F3F4F6; color: #353534; font-weight: 700; }
.media .meta { padding: 8px 10px; font-size: 12px; }
.check { width: 15px; height: 15px; accent-color: #353534; }

.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; flex-wrap: wrap;
}
.pager-summary { color: var(--muted); font-size: 12.5px; }
.pager-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager-btn {
  min-width: 32px; height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 4px;
  background: #FFFFFF; color: var(--text);
  font-size: 12.5px; font-weight: 500;
}
.pager-btn:hover:not(:disabled):not(.is-current) { background: var(--hover); }
.pager-btn.is-current {
  background: #F5A623; color: #353534; font-weight: 600; border-color: #F5A623;
}
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.pager-ellipsis { color: var(--faint); padding: 0 2px; }
html.dark .pager-btn { background: var(--card); color: var(--text); }
html.dark .pager-btn.is-current { background: #F5A623; color: #353534; border-color: #F5A623; }
html.dark .switch input:checked + span { background: #c9c2b3; }
.col-list .pager {
  margin-top: 0; padding: 16px; border-top: 1px solid var(--border); background: var(--card);
}

.stat-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  display: inline-flex; align-items: center; height: 36px;
  background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 4px; padding: 0 12px; color: #353534; font-size: 13px;
}
.section-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 4px 16px; margin-bottom: 16px; }
.section-card h2 { font-size: 16px; margin: 12px 0 0; }
.section-card > p { margin: 4px 0 0; color: #6B7280; font-size: 13px; }
.settings-nav {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 0; align-self: start;
}
.settings-nav .nav-item { width: 100%; border-radius: 0; }
.settings-nav .nav-item.tab-on {
  background: var(--nav-active);
  color: var(--text);
  border-left-color: var(--gold);
}
.page-section-title h2 { margin: 0; font-size: 16px; }
.page-section-title p { margin: 4px 0 16px; color: #6B7280; font-size: 13px; }
.anchor-nav a { display: block; padding: 6px 8px; border-radius: 0; border-left: 3px solid transparent; color: var(--muted); font-size: 12.5px; }
.anchor-nav a.on, .anchor-nav a:hover { background: var(--hover); color: var(--text); border-left-color: var(--text); }
.settings-layout { display: grid; grid-template-columns: 230px 1fr; gap: 18px; }
.mini-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.mini-tabs a {
  padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 13px;
}
.mini-tabs a.on { background: var(--card); color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }

.index-wrap { max-width: 1100px; margin: 0 auto; padding: 36px 20px 64px; }
.index-group { margin-top: 28px; }
.index-group h2 { margin: 0 0 12px; font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.icard {
  display: block; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
}
.icard:hover { border-color: #D1D5DB; }
.icard strong { display: block; margin-bottom: 4px; }
.icard span { color: var(--faint); font-size: 12px; }
.note { font-size: 13px; color: var(--muted); }

.status-tabs { display: flex; gap: 8px; margin-top: 8px; }
.content > .status-tabs { margin: 0 0 24px; border-bottom: 1px solid var(--border); }
.status-tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: #6B7280; padding: 8px 10px; border-radius: 0; font-weight: 500;
  text-decoration: none;
}
.status-tab.on { background: transparent; color: #353534; border-bottom-color: #F5A623; font-weight: 600; }

.user-menu { position: relative; }
.avatar-btn { border: 0; padding: 0; }
.user-drop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  width: 240px; background: #FFFFFF; color: #353534;
  border: 1px solid #E5E7EB; border-radius: 4px;
  box-shadow: 0 8px 24px rgba(53, 53, 52, 0.12); padding: 6px;
}
.user-drop[hidden] { display: none; }
.user-drop-label { padding: 8px 10px 0; font-size: 11px; color: #747f94; font-weight: 600; }
.user-drop-card { padding: 6px 10px 10px; border-bottom: 1px solid #E5E7EB; margin-bottom: 6px; }
.user-drop-card strong { display: block; }
.user-drop a, .user-drop button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: 0; border-radius: 0; color: #353534;
  text-align: left; padding: 8px 10px; font-size: 13px;
}
.user-drop a:hover, .user-drop button:hover { background: #F3F4F6; }
html.dark .user-drop { background: #26231f; color: #f7f4ec; border-color: rgba(255,255,255,.12); }
html.dark .user-drop a, html.dark .user-drop button, html.dark .user-drop strong { color: #f7f4ec; }
html.dark .user-drop a:hover, html.dark .user-drop button:hover { background: rgba(255,255,255,.06); }
html.dark .user-drop-card { border-bottom-color: rgba(255,255,255,.12); }

svg.lucide,
table.data th svg.lucide,
.inbox-status .status-tab svg.lucide,
.callout svg.lucide,
.menu svg.lucide,
.tenant-btn svg.lucide,
.user-drop svg.lucide,
.btn svg.lucide,
.nav-item svg.lucide,
.icon-btn svg.lucide { width: 16px; height: 16px; }
.home-ico svg.lucide { width: 20px; height: 20px; }

@media (max-width: 1100px) {
  .inbox, .inbox.with-panel { grid-template-columns: 300px 1fr; }
  .col-panel { display: none; }
  .inbox.show-panel { grid-template-columns: 1fr; }
  .inbox.show-panel .col-list { display: none; }
  .inbox.show-panel .col-panel { display: flex; }
  .grid-3, .grid-2, .settings-layout, .stats, .home-grid, .home-split { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 16px; }
  .content.flush { padding: 0; overflow: hidden; }
}

.copilot { padding: 8px 10px 0; border-top: 1px solid var(--border); background: var(--card); }
.copilot .btn svg { width: 14px; height: 14px; }
.copilot-out { margin-top: 8px; padding: 8px 10px; border: 1px solid #F5D27A; background: #FFF8E6; border-radius: 8px; font-size: 13px; color: #353534; }
.copilot-out [data-copilot-text] { white-space: pre-wrap; margin-bottom: 6px; }
html.dark .copilot-out { background: #3a3324; border-color: #6b5a2e; color: #f7f4ec; }
.bot-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #e7f0ff; color: #243e73; font-size: 10.5px; line-height: 16px; }

.tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tpl-preview-wrap { position: sticky; top: 16px; }
.tpl-phone { background: #E9E2D6 url(wa-bg.svg); border-radius: 12px; padding: 16px; min-height: 200px; }
.tpl-bubble { background: #fff; color: #111; border-radius: 8px; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.tpl-bubble .tpl-head-text { font-weight: 700; margin-bottom: 4px; }
.tpl-bubble .tpl-media { background: #d9dde3; color: #4b5563; border-radius: 6px; height: 120px; display: grid; place-items: center; margin-bottom: 6px; font-size: 12px; }
.tpl-bubble .tpl-foot { color: #8a8f98; font-size: 11.5px; margin-top: 4px; }
.tpl-btn { background: #fff; color: #0a7cff; text-align: center; border-radius: 8px; padding: 8px; margin-top: 4px; font-size: 13px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.tpl-button-row { display: grid; grid-template-columns: 150px 1fr 1fr auto; gap: 6px; margin-top: 6px; align-items: center; }
@media (max-width: 900px) { .tpl-grid { grid-template-columns: 1fr; } .tpl-preview-wrap { position: static; } .tpl-button-row { grid-template-columns: 1fr; } }

[data-tpl-notice], [data-ia-notice], [data-settings-notice] { margin-bottom: 16px; }
.evo-sync { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
