:root {
  --bg: #f3eee8;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: rgba(249, 244, 238, 0.88);
  --line: rgba(159, 121, 87, 0.28);
  --text: #181412;
  --muted: #7a7068;
  --brand: #b27642;
  --brand-dark: #7c461f;
  --sidebar: #30353d;
  --brand-logo-image: none;
  --site-bg-image: none;
  --waiting-bg-image: none;
  --purple: #8218f4;
  --accent: #d8a06f;
  --danger: #9d392f;
  --shadow: 0 22px 60px rgba(72, 48, 33, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  position: relative;
}

.page-backdrop {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.74) 48%, rgba(255, 255, 255, 0.9)),
    var(--site-bg-image) center / cover no-repeat;
  inset: 0;
  opacity: 0.95;
  position: fixed;
  z-index: -2;
}

.page-backdrop::after {
  background: rgba(244, 238, 231, 0.48);
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 36px;
  padding: 0 12px;
}

button:hover {
  background: var(--brand-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--danger);
  border: 1px solid var(--line);
}

button.danger {
  background: rgba(157, 57, 47, 0.1);
  border: 1px solid rgba(157, 57, 47, 0.28);
  color: var(--danger);
}

button.support-button {
  background: #9a5b2a;
}

button.support-button:hover {
  background: var(--brand-dark);
}

.topbar {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  left: 252px;
  margin-left: 252px;
  min-height: 60px;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 7;
  padding: 0 28px;
}

.top-search {
  align-items: center;
  display: flex;
  gap: 8px;
  max-width: 600px;
  width: 48vw;
}

.top-search span {
  color: #2c4672;
  font-size: 20px;
}

.top-search input {
  background: rgba(250, 252, 255, 0.94);
  border: 1px solid rgba(52, 93, 154, 0.44);
  border-radius: 8px;
  min-height: 32px;
}

.app-sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, color-mix(in srgb, var(--sidebar), #000 16%) 100%);
  bottom: 0;
  color: #fff;
  left: 0;
  padding: 8px 12px;
  position: fixed;
  top: 0;
  width: 252px;
  z-index: 8;
}

.sidebar-logo {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  border: 0;
  display: flex;
  gap: 8px;
  height: 52px;
  justify-content: center;
  margin-bottom: 12px;
  min-height: 52px;
  padding: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  width: 100%;
}

.sidebar-logo:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-logo strong {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18), 0 3px 12px rgba(0, 0, 0, 0.34);
}

.sidebar-action {
  position: relative;
}

.sidebar-action > button {
  align-items: center;
  background: var(--purple);
  display: flex;
  justify-content: space-between;
  min-height: 40px;
  width: 100%;
}

.new-case-dropdown {
  background: #fff;
  border: 1px solid #d7dce6;
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(20, 25, 33, 0.22);
  display: grid;
  gap: 4px;
  left: 100%;
  min-width: 156px;
  padding: 8px;
  position: absolute;
  top: 0;
  z-index: 26;
}

.new-case-dropdown button {
  background: transparent;
  color: #536486;
  font-weight: 500;
  justify-content: flex-start;
  min-height: 32px;
}

.new-case-dropdown button:hover {
  background: #f2f4f8;
  color: #24314a;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.sidebar-nav button {
  align-items: center;
  background: transparent;
  border-radius: 6px;
  color: #fff;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 12px;
  text-align: left;
}

.sidebar-nav > button::before,
.sidebar-group-toggle::before {
  align-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.92);
  content: "";
  display: inline-flex;
  flex: 0 0 16px;
  font-size: 12px;
  height: 16px;
  justify-content: center;
  line-height: 1;
  width: 16px;
}

.sidebar-nav > button[data-sidebar-view="dashboard"]::before {
  border-radius: 3px 3px 5px 5px;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.25);
}

.sidebar-nav > button[data-sidebar-view="clients"]::before {
  border-radius: 50%;
  box-shadow: 8px 0 0 -4px rgba(255, 255, 255, 0.88);
}

.sidebar-nav > button[data-sidebar-view="settings"]::before {
  border-radius: 50%;
}

.sidebar-nav > button[data-sidebar-view="knowledge"]::before,
.sidebar-nav > button[data-sidebar-view="downloads"]::before,
.sidebar-nav > button[data-sidebar-view="support"]::before {
  border-radius: 2px;
}

.sidebar-nav button.active,
.sidebar-nav button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-group {
  display: grid;
  gap: 4px;
}

.sidebar-group-toggle {
  align-items: center;
  display: flex;
  justify-content: flex-start;
}

.sidebar-chevron {
  border-bottom: 2px solid rgba(255, 255, 255, 0.86);
  border-right: 2px solid rgba(255, 255, 255, 0.86);
  height: 7px;
  margin-left: auto;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
  width: 7px;
}

.sidebar-group.open .sidebar-chevron {
  transform: rotate(225deg);
}

.sidebar-submenu {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  display: none;
  gap: 2px;
  padding: 0 0 8px 18px;
}

.sidebar-group.open .sidebar-submenu {
  display: grid;
}

.sidebar-submenu button {
  font-size: 12px;
  min-height: 34px;
  padding-left: 10px;
}

.sidebar-submenu button.active,
.sidebar-submenu button:hover {
  background: rgba(255, 255, 255, 0.16);
}

#mainMenuButton {
  display: none;
}

.brand {
  align-items: center;
  display: flex;
  gap: 14px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  margin-top: 2px;
  text-transform: uppercase;
}

.brand-mark {
  background: linear-gradient(135deg, #d9a06b, #9a5b2a);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.82), 0 0 22px rgba(255, 255, 255, 0.92), 0 8px 22px rgba(0, 0, 0, 0.22);
  display: inline-block;
  height: 48px;
  position: relative;
  width: 48px;
}

.brand-mark::after {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  content: "";
  height: 24px;
  left: 12px;
  position: absolute;
  top: 12px;
  width: 24px;
}

.brand-mark::before {
  background: rgba(255, 255, 255, 0.96);
  content: "";
  height: 18px;
  left: 23px;
  position: absolute;
  top: 30px;
  width: 6px;
  z-index: 1;
}

body.has-custom-logo .brand-mark {
  background: var(--brand-logo-image) center / contain no-repeat;
  border-radius: 0;
}

body.has-custom-logo .site-logo .brand-mark {
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.28));
  height: 54px;
  width: 160px;
}

body.has-custom-logo .login-box .brand-mark.large {
  height: 70px;
  width: 190px;
}

body.has-custom-logo .sidebar-logo .brand-mark {
  height: 32px;
  width: 42px;
}

body.has-custom-logo .brand-mark::before,
body.has-custom-logo .brand-mark::after {
  display: none;
}

.brand-mark.large {
  height: 72px;
  margin: 0 auto;
  width: 72px;
}

.brand-mark.large::after {
  height: 36px;
  left: 18px;
  top: 18px;
  width: 36px;
}

.brand-mark.large::before {
  height: 26px;
  left: 34px;
  top: 46px;
  width: 8px;
}

.brand-mark.mini {
  flex: 0 0 auto;
  height: 30px;
  width: 30px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 16px rgba(255, 255, 255, 0.88), 0 5px 14px rgba(0, 0, 0, 0.34);
}

.brand-mark.mini::after {
  height: 15px;
  left: 7.5px;
  top: 7.5px;
  width: 15px;
}

.brand-mark.mini::before {
  height: 11px;
  left: 14px;
  top: 19px;
  width: 4px;
}

.login-screen {
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)),
    var(--site-bg-image) center / cover no-repeat;
  display: block;
  inset: 0;
  overflow: auto;
  padding: 0 0 28px;
  position: fixed;
  z-index: 10;
}

body.is-infomac-brand .login-screen {
  background:
    radial-gradient(circle at 76% 16%, rgba(46, 93, 255, 0.26), transparent 28%),
    linear-gradient(100deg, rgba(7, 15, 44, 0.98) 0%, rgba(7, 15, 44, 0.93) 48%, rgba(7, 15, 44, 0.62) 100%),
    var(--site-bg-image) center right / cover no-repeat;
}

body.is-infomac-brand .login-screen::after {
  background:
    linear-gradient(180deg, rgba(7, 15, 44, 0.05), rgba(7, 15, 44, 0.72)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 80px);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}

.site-contactbar {
  align-items: center;
  background: #17191c;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 26px;
  justify-content: center;
  min-height: 38px;
  padding: 8px 24px;
}

.site-contactbar strong {
  color: #fff;
}

.site-navbar {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 86px;
  padding: 18px clamp(24px, 6vw, 92px);
}

body.is-infomac-brand .site-navbar {
  background: rgba(7, 15, 44, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-logo {
  align-items: center;
  display: flex;
  gap: 14px;
}

.site-logo strong,
.site-logo small {
  display: block;
}

.site-logo strong {
  color: #111;
  font-size: 24px;
  letter-spacing: 1px;
}

body.is-infomac-brand .site-logo strong {
  color: #fff;
  font-size: 16px;
  letter-spacing: 0;
}

.site-logo small {
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

body.is-infomac-brand .site-logo small {
  color: rgba(255, 255, 255, 0.76);
  letter-spacing: 1px;
}

body.is-infomac-brand .site-links a,
body.is-infomac-brand .top-strip span {
  color: rgba(255, 255, 255, 0.88);
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}

.site-links a {
  color: #15171b;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.site-cta {
  min-width: 150px;
  text-transform: uppercase;
}

.site-hero {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 340px);
  min-height: 430px;
  padding: 34px clamp(24px, 6vw, 92px) 28px;
}

.site-hero-copy {
  max-width: 640px;
}

.site-hero-copy h1 {
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.98;
  text-transform: uppercase;
}

body.is-infomac-brand .site-hero-copy h1 {
  color: #fff;
  font-size: clamp(44px, 5.4vw, 78px);
  letter-spacing: 0;
  max-width: 780px;
  text-transform: none;
}

.site-hero-copy h1 span {
  color: var(--brand);
}

body.is-infomac-brand .site-hero-copy h1 span {
  color: #fff;
}

.site-hero-copy p {
  color: #484d55;
  font-size: 17px;
  max-width: 570px;
  margin-top: 24px;
}

body.is-infomac-brand .site-hero-copy p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.55;
}

.site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.site-actions button {
  min-width: 210px;
  text-transform: uppercase;
}

.site-actions .site-download-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--danger);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  min-width: 210px;
  padding: 0 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.site-feature-list {
  display: grid;
  gap: 8px;
}

.site-feature-list article {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(70, 55, 42, 0.12);
  display: grid;
  gap: 7px;
  padding: 18px 22px;
}

body.is-infomac-brand .site-feature-list article {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.site-feature-list strong {
  text-transform: uppercase;
}

.site-feature-list span {
  color: #4c4f55;
  font-size: 13px;
  line-height: 1.5;
}

body.is-infomac-brand .site-feature-list span {
  color: rgba(255, 255, 255, 0.72);
}

.site-product-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, 1fr);
  padding: 0 clamp(24px, 6vw, 92px) 22px;
}

.site-product-grid article {
  background: rgba(20, 22, 25, 0.94);
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 12px;
  min-height: 150px;
  padding: 24px 18px;
  text-align: center;
}

body.is-infomac-brand .site-product-grid article {
  background: rgba(7, 15, 44, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.site-product-grid strong {
  font-size: 14px;
  text-transform: uppercase;
}

.site-product-grid span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.site-bottom-banner {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto;
  margin: 0 clamp(24px, 6vw, 92px);
  padding: 22px 28px;
}

body.is-infomac-brand .site-bottom-banner {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.site-bottom-banner strong {
  font-size: 22px;
  text-transform: uppercase;
}

.site-bottom-banner span {
  color: #555b63;
}

.site-login {
  bottom: 24px;
  max-width: 360px;
  position: fixed;
  right: 24px;
  text-align: left;
}

body.is-infomac-brand .site-login {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.login-minimize {
  justify-self: end;
  min-height: 30px;
  padding: 0 10px;
}

.site-login.is-minimized {
  align-items: center;
  display: flex;
  gap: 10px;
  padding: 12px;
  width: auto;
}

.site-login.is-minimized > *:not(.login-minimize):not(div) {
  display: none;
}

.site-login.is-minimized div p {
  display: none;
}

.site-login.is-minimized div h2 {
  font-size: 14px;
  margin: 0;
}

.site-login .brand-mark {
  display: none;
}

.floating-whatsapp {
  background: #20c767;
  border-radius: 999px;
  bottom: 18px;
  box-shadow: 0 12px 28px rgba(19, 138, 71, 0.28);
  min-height: 48px;
  position: fixed;
  right: 410px;
  z-index: 12;
}

.client-portal {
  align-items: flex-start;
  background: rgba(24, 20, 18, 0.38);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow: auto;
  padding: 12px;
  position: fixed;
  z-index: 20;
}

.client-portal-box {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 24px);
  max-width: 640px;
  min-width: 0;
  overflow: auto;
  padding: 16px 20px;
  width: 100%;
}

.client-live {
  max-width: 680px;
  min-height: min(640px, calc(100vh - 24px));
  min-width: 0;
  width: min(680px, calc(100vw - 24px));
}

.client-live .modal-head {
  align-items: center;
}

.client-live .modal-head h2 {
  font-size: 20px;
}

.client-live .modal-head p,
.client-live .protocol {
  font-size: 12px;
}

.client-status-card {
  background: rgba(248, 230, 210, 0.72);
  border: 1px solid rgba(216, 160, 111, 0.72);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.client-status-card strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.client-status-card span {
  color: var(--muted);
  font-size: 12px;
}

.client-account-summary {
  color: var(--text);
  display: grid;
  gap: 4px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.client-account-summary strong {
  font-size: 15px;
}

.client-account-summary span {
  color: var(--muted);
  font-size: 13px;
}

.client-account-bar {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 92px;
}

.client-account-bar.hidden {
  display: none;
}

.client-account-bar .client-account-summary {
  min-width: 0;
}

.client-account-bar button {
  min-height: 100%;
}

.client-live-messages {
  border: 1px solid rgba(159, 121, 87, 0.18);
  border-radius: 8px;
  height: min(40vh, 280px);
  min-width: 0;
  overflow-x: hidden;
}

.client-reply-box {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 122px 96px 110px;
  min-width: 0;
}

.client-reply-box textarea {
  grid-column: 1 / -1;
  min-height: 96px;
}

.client-reply-box .compact-check {
  font-size: 11px;
  padding: 6px 8px;
}

.client-reply-box .file-field {
  grid-column: 1 / 2;
  min-width: 0;
  overflow: hidden;
}

.client-reply-box button {
  font-size: 12px;
  min-height: 42px;
  padding: 0 10px;
}

.client-reply-box #clientCloseTicket {
  font-size: 11px;
  line-height: 1.15;
  min-height: 42px;
  padding-inline: 8px;
}

.modal-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.login-box {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  max-width: 420px;
  padding: 28px;
  text-align: center;
  width: 100%;
}

.login-box h1 {
  font-size: 24px;
  letter-spacing: 1px;
}

.login-box label {
  text-align: left;
}

.login-error {
  color: var(--danger);
  font-weight: 700;
  min-height: 20px;
  text-align: center;
}

.whatsapp-number {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

body.is-locked .topbar,
body.is-locked .shell,
body.is-locked .app-sidebar {
  filter: blur(3px);
  pointer-events: none;
}

.session-pill {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--brand-dark);
  display: flex;
  font-size: 14px;
  gap: 8px;
  padding: 9px 13px;
}

.session-pill #sessionName {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.session-pill #sessionName::after {
  background:
    radial-gradient(circle at 50% 38%, #fff 0 4px, transparent 4.5px),
    radial-gradient(circle at 50% 78%, #fff 0 7px, transparent 7.5px),
    #cbd4e2;
  border: 2px solid #8bbd5a;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(33, 56, 94, 0.18);
  content: "";
  display: inline-block;
  height: 28px;
  margin-left: 6px;
  width: 28px;
}

.icon-top-button {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  color: #50627f;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0;
  position: relative;
}

.icon-top-button:hover {
  background: rgba(33, 56, 94, 0.08);
}

.icon-top-button.has-alert {
  color: #ff4a5c;
}

.top-icon {
  display: inline-block;
  height: 20px;
  position: relative;
  width: 20px;
}

.top-icon-bell::before {
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 4px 4px;
  content: "";
  height: 13px;
  left: 4px;
  position: absolute;
  top: 3px;
  width: 12px;
}

.top-icon-bell::after {
  border-bottom: 1.8px solid currentColor;
  border-radius: 999px;
  box-shadow: 4px 3px 0 -2px currentColor;
  content: "";
  height: 5px;
  left: 3px;
  position: absolute;
  top: 13px;
  width: 14px;
}

.top-icon-chat::before {
  border: 1.8px solid currentColor;
  border-radius: 9px;
  content: "";
  height: 13px;
  left: 2px;
  position: absolute;
  top: 3px;
  width: 16px;
}

.top-icon-chat::after {
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 2px) 0 0 / 6px 6px repeat-x;
  content: "";
  height: 5px;
  left: 6px;
  position: absolute;
  top: 8px;
  width: 10px;
}

.notification-badge {
  align-items: center;
  background: #ff4a5c;
  border-radius: 5px;
  color: #fff;
  display: flex;
  font-size: 11px;
  height: 20px;
  justify-content: center;
  min-width: 18px;
  position: absolute;
  right: -2px;
  top: -5px;
}

.notification-hub {
  background: #fff;
  border: 1px solid #c7ced9;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(20, 25, 33, 0.18);
  max-height: min(360px, calc(100vh - 78px));
  overflow: visible;
  position: fixed;
  right: 74px;
  top: 62px;
  width: 276px;
  z-index: 25;
}

.notification-hub::before,
.notification-hub::after {
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  content: "";
  position: absolute;
  right: 38px;
}

.notification-hub::before {
  border-bottom: 8px solid #c7ced9;
  top: -8px;
}

.notification-hub::after {
  border-bottom: 8px solid #f0f2f6;
  top: -7px;
}

.notification-title {
  background: #f0f2f6;
  border-bottom: 1px solid #cfd6e0;
  color: #2e3a4c;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
}

.notification-list {
  display: grid;
  max-height: min(318px, calc(100vh - 118px));
  overflow-y: auto;
  scrollbar-color: #7c8490 #edf0f5;
  scrollbar-width: thin;
}

.notification-list::-webkit-scrollbar {
  width: 10px;
}

.notification-list::-webkit-scrollbar-track {
  background: #edf0f5;
}

.notification-list::-webkit-scrollbar-thumb {
  background: #7c8490;
  border: 2px solid #edf0f5;
  border-radius: 999px;
}

.notification-summary {
  background: #fff;
  border-bottom: 1px solid #e6e9ef;
  display: grid;
}

.notification-summary-row {
  align-items: center;
  color: #4e679c;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 16px;
}

.notification-summary-row + .notification-summary-row {
  border-top: 1px solid #e6e9ef;
}

.notification-summary-row strong {
  align-items: center;
  background: #ff4a5c;
  border-radius: 3px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  height: 20px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
}

.notification-summary-row strong:empty {
  display: none;
}

.notification-item {
  background: #fff;
  border-bottom: 1px solid #e6e9ef;
  border-radius: 0;
  color: #4e679c;
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  min-height: 46px;
  padding: 10px 16px;
  text-align: left;
  white-space: normal;
  width: 100%;
}

.notification-item strong {
  color: #365892;
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.notification-item span {
  display: block;
}

.notification-item:hover {
  background: #f7f9fc;
}

.session-pill .small-button {
  min-height: 28px;
}

.status-dot {
  background: #35a66a;
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.shell {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: calc(100vh - 60px);
  min-height: 0;
  margin-left: 252px;
  overflow: hidden;
  padding: 10px;
}

body.attendance-view .shell {
  grid-template-columns: minmax(0, 1fr) 262px;
}

body.attendance-view .queue-panel {
  display: none;
}

body.attendance-view .chat-panel {
  grid-column: 1;
}

body.attendance-view .activity-panel {
  display: grid;
  grid-column: 2;
}

body.cases-view .shell {
  grid-template-columns: minmax(0, 1fr);
}

body.cases-view .queue-panel {
  grid-column: 1;
}

body.case-detail-view .shell {
  grid-template-columns: minmax(0, 1fr);
}

body.case-detail-view .chat-panel {
  grid-column: 1;
}

.dashboard-panel {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-column: 1 / -1;
  overflow: hidden;
}

/* A tela tecnica pode ultrapassar a altura da viewport por causa do
 * acompanhamento de backups. A rolagem deve pertencer ao painel, pois a shell
 * usa altura fixa para manter a barra superior e o menu lateral estaveis. */
#technicalPanel {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 12px;
  scrollbar-gutter: stable;
}

#settingsPanel,
#knowledgePanel,
#downloadsPanel,
#supportPanel,
#clientsPanel,
#databaseMonitorPanel {
  overflow: auto;
}

.database-monitor-content {
  display: grid;
  gap: 14px;
  padding: 16px 18px 24px;
}

.database-monitor-alert {
  background: #fff4d8;
  border: 1px solid #e3b74b;
  border-left: 5px solid #c78b09;
  border-radius: 7px;
  color: #694600;
  font-weight: 700;
  padding: 12px 14px;
}

.database-monitor-alert.critical {
  background: #fff0ee;
  border-color: #e4a39b;
  border-left-color: #c94132;
  color: #7d2118;
}

.database-monitor-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.database-monitor-kpi {
  background: #fff;
  border: 1px solid #dfe3e8;
  border-left: 5px solid #2d9b69;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 12px 14px;
}

.database-monitor-kpi.warning { border-left-color: #d89a17; }
.database-monitor-kpi.critical { border-left-color: #c94132; }
.database-monitor-kpi span,
.database-monitor-kpi small { color: #6d7480; }
.database-monitor-kpi strong { color: #222b36; font-size: 21px; }

.database-usage-bar {
  background: #e7ebef;
  border-radius: 99px;
  height: 7px;
  margin-top: 3px;
  overflow: hidden;
}

.database-usage-bar i {
  background: var(--brand);
  display: block;
  height: 100%;
}

.database-monitor-section {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 14px;
}

.database-monitor-section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.database-monitor-section h2 { color: #273240; font-size: 18px; margin: 0; }
.database-monitor-section p { color: #6d7480; margin: 4px 0 0; }
.database-monitor-empty { color: #6d7480; grid-column: 1 / -1; padding: 16px; text-align: center; }

.database-monitor-chart {
  background: linear-gradient(180deg, #fbfcfd, #f1f5f7);
  border-radius: 7px;
  min-height: 190px;
  padding: 12px;
}

.database-monitor-chart svg { height: 145px; overflow: visible; width: 100%; }
.database-monitor-chart polyline { fill: none; stroke: var(--brand); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.database-chart-caption { align-items: center; color: #6d7480; display: flex; font-size: 12px; justify-content: space-between; }
.database-chart-caption strong { color: #273240; font-size: 14px; }

.database-monitor-table { border: 1px solid #e2e6ea; border-radius: 7px; overflow: hidden; }
.database-table-row { align-items: center; background: #fff; border-bottom: 1px solid #e7eaed; display: grid; gap: 12px; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(95px, 1fr)); padding: 10px 12px; }
.database-table-row:last-child { border-bottom: 0; }
.database-table-head { background: #f2f5f7; color: #616a75; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.database-table-warning { color: #b33b2f; font-weight: 800; }
.database-maintenance-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.database-maintenance-result { font-size: 13px; }

@media (max-width: 1200px) {
  .database-monitor-metrics { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 720px) {
  .database-monitor-metrics { grid-template-columns: 1fr; }
  .database-monitor-section-head { align-items: flex-start; flex-direction: column; }
  .database-table-row { grid-template-columns: minmax(140px, 1.5fr) repeat(3, minmax(80px, 1fr)); min-width: 600px; }
  .database-monitor-table { overflow-x: auto; }
}

.dashboard-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  padding: 14px 18px 18px;
}

.dashboard-chart {
  border-top: 1px solid rgba(159, 121, 87, 0.18);
  display: grid;
  gap: 12px;
  padding: 16px 18px 20px;
}

.dashboard-case-board {
  border-top: 1px solid rgba(159, 121, 87, 0.18);
  display: grid;
  gap: 12px;
  padding: 16px 18px 20px;
}

.dashboard-board-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.dashboard-board-head h2 {
  color: #26313f;
  font-size: 20px;
}

.dashboard-tabs {
  border-bottom: 1px solid #d7dce5;
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.dashboard-tabs button {
  background: #fff;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  color: #26313f;
  font-weight: 500;
  min-width: max-content;
  padding: 0 16px;
}

.dashboard-tabs button.active {
  border-color: #d7dce5;
  color: #000;
}

.dashboard-tabs span {
  background: #ff4a5c;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  margin-left: 4px;
  padding: 3px 6px;
}

.dashboard-board-table {
  max-width: 100%;
}

.dashboard-empty-row {
  background: #fff;
  padding: 18px;
}

.chart-bars {
  display: grid;
  gap: 10px;
}

.chart-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 220px) 1fr 44px;
}

.chart-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-track {
  background: #eceff3;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.chart-track i {
  background: linear-gradient(90deg, var(--brand), var(--purple));
  display: block;
  height: 100%;
}

.chart-row strong {
  font-size: 13px;
}

.dashboard-card {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(159, 121, 87, 0.18);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
  text-align: left;
}

.dashboard-card strong {
  font-size: 24px;
}

.dashboard-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.client-admin-form,
.knowledge-form,
.support-form,
.client-list,
.knowledge-list,
.settings-content {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
  min-height: 0;
}

.client-admin-form,
.knowledge-form {
  background: rgba(255, 255, 255, 0.68);
  border-bottom: 1px solid rgba(159, 121, 87, 0.18);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knowledge-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.support-form {
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(159, 121, 87, 0.18);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knowledge-form label:nth-child(3),
.knowledge-form .file-field {
  grid-column: 1 / -1;
}

.support-description-field,
.support-form button {
  grid-column: 1 / -1;
}

.support-hero {
  background:
    linear-gradient(135deg, rgba(54, 61, 72, 0.96), rgba(38, 43, 50, 0.92)),
    radial-gradient(circle at right, rgba(178, 118, 66, 0.32), transparent 38%);
}

.support-hero h1,
.support-hero p {
  color: #fff;
}

.support-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 16px 18px 18px;
}

.support-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(250, 246, 241, 0.86));
  border: 1px solid rgba(159, 121, 87, 0.2);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(46, 37, 31, 0.08);
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  padding: 14px;
}

.support-card-icon {
  align-items: center;
  background: #30353d;
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.support-card-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.support-card-body > span {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.support-card-body strong {
  color: #20252d;
  font-size: 17px;
}

.support-card-body p,
.support-card-body small {
  color: var(--muted);
  font-size: 12px;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.support-links a {
  background: rgba(178, 118, 66, 0.1);
  border: 1px solid rgba(178, 118, 66, 0.2);
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
  text-decoration: none;
}

.settings-form {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(159, 121, 87, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.branding-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.branding-form h2,
.branding-form p,
.branding-form button,
.branding-key-hint {
  grid-column: 1 / -1;
}

.branding-form .file-field {
  min-height: 72px;
}

.branding-key-hint {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.backup-tools {
  background: rgba(255, 255, 255, 0.68);
  border: 2px solid rgba(178, 118, 66, 0.28);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.backup-tools h2 {
  color: var(--brand-dark);
  font-size: 16px;
}

.settings-form h2 {
  font-size: 15px;
}

.settings-wide-field {
  grid-column: 1 / -1;
}

#settingsSupportTags {
  font-family: Consolas, "Courier New", monospace;
  min-height: 180px;
}

.client-row {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(159, 121, 87, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  padding: 12px;
}

.knowledge-row {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(159, 121, 87, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.knowledge-row summary {
  cursor: pointer;
  display: grid;
  gap: 4px;
  list-style: none;
}

.knowledge-row summary::-webkit-details-marker {
  display: none;
}

.knowledge-row summary::after {
  color: var(--brand-dark);
  content: "Abrir";
  font-size: 12px;
  font-weight: 800;
  justify-self: end;
}

.knowledge-row[open] summary::after {
  content: "Fechar";
}

.knowledge-row p {
  color: var(--text);
  font-size: 13px;
  white-space: pre-wrap;
}

.client-row strong,
.client-row small,
.client-row .user-actions {
  grid-column: 1 / -1;
}

.client-row span,
.client-row small {
  color: var(--muted);
  font-size: 12px;
}

.queue-panel,
.chat-panel,
.activity-panel {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 0;
  overflow: hidden;
}

.queue-panel {
  display: flex;
  flex-direction: column;
}

.activity-panel {
  display: none;
  gap: 12px;
  grid-template-rows: 1fr 1fr;
  padding: 0;
}

.activity-panel section {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.activity-panel h3 {
  align-items: center;
  background: #363d48;
  color: #fff;
  display: flex;
  font-size: 16px;
  font-weight: 700;
  min-height: 60px;
  padding: 0 16px;
}

.activity-title-row {
  align-items: center;
  background: #363d48;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 12px 0 16px;
}

.activity-title-row h3 {
  background: transparent;
  min-height: 0;
  padding: 0;
}

.activity-refresh {
  background: rgba(255, 255, 255, 0.94);
  border: 0;
  color: var(--brand-dark);
  font-size: 11px;
  min-height: 30px;
  padding: 0 10px;
}

.activity-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow: auto;
}

.mobile-attendance-tabs,
.mobile-account-panel {
  display: none;
}

.activity-item {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e3e7ef;
  border-radius: 0;
  color: var(--text);
  display: flex;
  gap: 10px;
  min-height: 68px;
  padding: 12px 14px;
  text-align: left;
}

.activity-item:hover,
.activity-item.active {
  background: #eef3ff;
  border-left: 3px solid var(--brand);
}

.activity-avatar {
  align-items: center;
  background: #3259c8;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.activity-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.activity-copy strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-action {
  background: #7f1fff;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  margin-left: auto;
  padding: 9px 16px;
}

.activity-item small,
.activity-list p {
  color: var(--muted);
  font-size: 11px;
}

.main-menu {
  align-items: flex-start;
  background: rgba(24, 20, 18, 0.28);
  display: flex;
  height: 100dvh;
  inset: 0;
  justify-content: flex-end;
  overflow: auto;
  padding: 16px 24px;
  position: fixed;
  z-index: 18;
}

.menu-panel {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: calc(100vh - 32px);
  max-width: 760px;
  overflow: auto;
  padding: 16px 18px;
  width: min(760px, 100%);
}

.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-tab {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  color: var(--brand-dark);
  min-height: 36px;
}

.menu-tab.active {
  background: var(--brand);
  color: #fff;
}

.menu-content {
  max-height: calc(100dvh - 150px);
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.menu-section {
  display: none;
  gap: 14px;
}

.menu-section.active {
  display: grid;
}

#menuAdmin.active {
  min-height: 0;
  overflow: visible;
}

.menu-section .new-ticket,
.menu-section .whatsapp-form {
  padding: 0;
}

.menu-section#menuAdmin > div {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.panel-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 10px 12px;
}

.chat-header {
  align-items: center;
  background: #363d48;
  color: #fff;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 1fr) auto;
  min-height: 60px;
  padding: 10px 14px;
}

.chat-panel-title {
  background: #fff;
  border-bottom: 1px solid #e1e5eb;
  color: #26313f;
  font-size: 18px;
  padding: 14px 12px;
}

.chat-header h2 {
  color: #fff;
  font-size: 16px;
}

.chat-header p {
  color: #fff;
  font-size: 13px;
  margin-top: 3px;
}

.chat-header .protocol {
  color: #fff;
}

.queue-panel .panel-head p {
  display: none;
}

.panel-head.compact {
  display: block;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
}

h2 {
  font-size: 16px;
}

p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
}

.icon-button {
  align-items: center;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.icon-button svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 10px 0;
}

.filters-bar {
  align-items: end;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  padding: 8px 0 0;
}

.filters-bar label {
  font-size: 12px;
}

.filters-panel {
  border-bottom: 1px solid rgba(159, 121, 87, 0.16);
  padding: 8px 12px;
}

.filters-panel summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.filters-panel summary::-webkit-details-marker {
  display: none;
}

.filters-panel summary::after {
  content: "+";
  float: right;
}

.filters-panel[open] summary::after {
  content: "-";
}

.queue-tabs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 10px 0;
}

.queue-tab {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  color: var(--brand-dark);
  min-height: 34px;
}

.queue-tab.active {
  background: var(--brand);
  color: #fff;
}

.metric {
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(159, 121, 87, 0.18);
  border-radius: 8px;
  padding: 8px;
}

.metric strong {
  display: block;
  font-size: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
}

.ticket-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding: 8px 10px;
}

.empty-filter-state {
  align-content: center;
  background: #fff;
  border: 1px dashed #d7dce5;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 180px;
  padding: 24px;
  text-align: center;
}

.empty-filter-state h2 {
  color: var(--text);
}

.ticket-card {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.ticket-card:hover,
.ticket-card.active {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.cases-table {
  border: 1px solid #e4e8ef;
  border-radius: 4px;
  overflow: auto;
}

.cases-table-head,
.cases-table-row,
.attendance-table-head,
.attendance-table-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 82px minmax(130px, 1fr) minmax(88px, 0.8fr) 92px 108px;
  min-width: 0;
}

.cases-table-head,
.cases-table-row {
  grid-template-columns: 74px minmax(190px, 1.4fr) 96px 112px 132px 100px 104px 112px 132px 76px 90px 110px;
  min-width: 1080px;
}

.attendance-table-head,
.attendance-table-row {
  grid-template-columns: 82px minmax(130px, 1fr) minmax(88px, 0.8fr) 92px 108px;
  min-width: 0;
}

.cases-table-head,
.attendance-table-head {
  background: #f5f6f9;
  color: #31466d;
  font-size: 12px;
  font-weight: 800;
  padding: 12px 10px;
}

.cases-table-row,
.attendance-table-row {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e4e8ef;
  border-radius: 0;
  box-shadow: none;
  color: #26313f;
  font-size: 12px;
  font-weight: 400;
  min-height: 58px;
  padding: 9px;
}

.cases-table-row strong {
  display: grid;
  gap: 3px;
  font-size: 12px;
}

.cases-table-row strong small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.cases-table-row:hover,
.cases-table-row.active {
  background: #fbfcfe;
  border-color: #d6dce7;
  box-shadow: none;
}

.ticket-card header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ticket-card strong {
  font-size: 13px;
}

.queue-number {
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

.badge {
  border-radius: 999px;
  color: var(--brand-dark);
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
}

.badge.waiting {
  background: #f8e6d2;
  color: #7c461f;
}

.badge.active {
  background: #ead0ba;
}

.badge.closed {
  background: #eceff1;
  color: #59635f;
}

.badge.open {
  background: #f8e6d2;
  color: #7c461f;
}

.badge.in_progress {
  background: #ead0ba;
}

.badge.pending_customer {
  background: #fff1c9;
  color: #795300;
}

.badge.pending_company {
  background: #f6dcd9;
  color: #8b3128;
}

.badge.done {
  background: #dceee4;
  color: #2e6b48;
}

.ticket-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 6px;
  margin-top: 8px;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
}

.chat-empty {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.66)),
    var(--waiting-bg-image) center / cover no-repeat;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.chat-empty img {
  display: none;
}

.chat-empty h2,
.chat-empty p {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.68);
  margin: 0;
  max-width: min(440px, 90%);
  padding-inline: 18px;
}

.chat-empty h2 {
  border-radius: 8px 8px 0 0;
  color: #181412;
  padding-top: 14px;
}

.chat-empty p {
  border-radius: 0 0 8px 8px;
  padding-bottom: 14px;
}

.chat-workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.chat-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.chat-workspace.has-ticket-info .chat-body-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.chat-main-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.ticket-info-panel {
  background: #fff;
  border-left: 1px solid #d7dce5;
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 12px;
}

.ticket-info-card {
  border: 1px solid #d7dce5;
  border-radius: 8px;
  overflow: hidden;
}

.ticket-info-card h3 {
  background: #f5f6f9;
  border-bottom: 1px solid #d7dce5;
  color: #31466d;
  font-size: 13px;
  padding: 10px 12px;
}

.ticket-info-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
}

.ticket-info-card div {
  display: grid;
  gap: 4px;
  grid-template-columns: 92px minmax(0, 1fr);
}

.ticket-info-card dt {
  color: var(--muted);
  font-size: 12px;
}

.ticket-info-card dd {
  color: #26313f;
  font-size: 12px;
  margin: 0;
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

.protocol {
  color: var(--brand);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.actions {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-auto-flow: column;
  justify-content: flex-end;
}

.actions input {
  display: none;
}

.actions select {
  max-width: 140px;
}

.actions button {
  border-radius: 4px;
  min-height: 32px;
}

.actions #closeButton {
  background: #e64d52;
  color: #fff;
}

.case-tools {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e1e5eb;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(120px, 1fr) 104px repeat(2, minmax(108px, auto));
  min-width: 0;
  overflow-x: auto;
  padding: 9px 12px;
}

.channel-chip {
  background: #eef3ff;
  border: 1px solid #d6e0f5;
  border-radius: 999px;
  color: #31466d;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  white-space: nowrap;
}

.channel-chip.whatsapp {
  background: #e7f8ef;
  border-color: #bfe9d0;
  color: #237a4d;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  min-height: 34px;
  padding: 7px 9px;
  width: 100%;
}

textarea {
  line-height: 1.4;
  resize: vertical;
}

.messages {
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  padding: 10px 14px;
}

.refresh-messages-button {
  min-height: 36px;
}

.chat-header .refresh-messages-button {
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  min-height: 36px;
  padding-inline: 14px;
}

.technician-refresh {
  justify-self: start;
}

.message {
  border-radius: 4px;
  max-width: 72%;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 9px 12px;
  word-break: break-word;
}

.client-live .message {
  max-width: 88%;
  padding: 10px 12px;
}

.client-live .message header {
  font-size: 11px;
}

.client-live .message p {
  font-size: 13px;
}

.message.customer {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e1e5eb;
}

.message.agent {
  align-self: flex-end;
  background: #f7f7f7;
  border: 1px solid #eceff3;
  color: #26313f;
}

.message.system {
  align-self: center;
  background: #f8e6d2;
  border: 1px solid #d8a06f;
  color: #7c461f;
  max-width: 88%;
}

.message header {
  display: flex;
  font-size: 11px;
  font-weight: 700;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 6px;
  min-width: 0;
}

.message p {
  color: inherit;
  font-size: 12px;
  margin: 0;
  overflow-wrap: anywhere;
}

.reply-box {
  background: #f8f9fb;
  border-top: 1px solid #d7dce5;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) minmax(92px, 112px) minmax(88px, 112px) minmax(64px, 76px);
  max-width: 100%;
  min-width: 0;
  padding: 10px;
  z-index: 3;
}

.reply-box #replyAuthor {
  display: none;
}

.reply-box textarea {
  border-radius: 0;
  min-height: 64px;
  min-width: 0;
}

.reply-box .file-field,
.reply-box .compact-check,
.reply-box button {
  min-width: 0;
  overflow: hidden;
}

.compact-check {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-dark);
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  padding: 6px 8px;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}

.compact-check input {
  min-height: 0;
  padding: 0;
  width: auto;
}

.file-field {
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--brand-dark);
  gap: 5px;
  justify-content: center;
  min-height: 38px;
  padding: 6px 8px;
}

.file-field input {
  border: 0;
  font-size: 12px;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  padding: 0;
}

.attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.attachment {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(24, 40, 37, 0.12);
  border-radius: 8px;
  color: inherit;
  display: grid;
  gap: 6px;
  grid-template-columns: auto 1fr auto;
  max-width: 360px;
  padding: 8px;
  text-decoration: none;
}

.attachment img {
  border-radius: 6px;
  height: 56px;
  object-fit: cover;
  width: 74px;
}

.attachment span {
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.attachment small {
  color: inherit;
  font-size: 11px;
  opacity: 0.78;
}

.new-ticket,
.whatsapp-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.new-ticket {
  flex: 1;
  overflow: auto;
  padding: 18px;
}

.menu-section .new-ticket {
  padding: 0;
}

.side-section {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

h3 {
  font-size: 15px;
  margin: 0;
}

.technician-list {
  display: grid;
  gap: 8px;
}

.company-config-badge {
  display: grid;
  gap: 3px;
  margin: 8px 0;
  padding: 9px 11px;
  border: 1px solid #e0a7a2;
  border-radius: 9px;
  background: #fff1f0;
  color: #8c2520;
}

.company-config-badge.recovered {
  border-color: #dfbd78;
  background: #fff8e8;
  color: #76520b;
}

.company-config-badge small {
  color: inherit;
  opacity: .82;
}

.workflow-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.workflow-dialog::backdrop { background: rgba(20, 25, 31, .68); }
.workflow-dialog form { display: grid; gap: 16px; padding: 24px; }
.workflow-dialog fieldset { display: flex; flex-wrap: wrap; gap: 16px; border: 1px solid #d8dce1; border-radius: 10px; padding: 12px; }
.workflow-dialog label { display: grid; gap: 7px; }
.workflow-dialog fieldset label { display: flex; align-items: center; gap: 7px; }
.workflow-dialog select, .workflow-dialog textarea { width: 100%; }

.chat-workspace.hidden {
  display: none;
}

.sidebar-submenu-heading {
  color: rgba(255, 255, 255, 0.58);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 10px 14px 4px 42px;
  text-transform: uppercase;
}

.attachment.audio-attachment,
.attachment.video-attachment {
  grid-template-columns: 1fr auto;
}

.attachment audio,
.attachment video {
  grid-column: 1 / -1;
  max-width: 100%;
  width: 340px;
}

.attachment video {
  border-radius: 6px;
  max-height: 260px;
}

.attachment-open {
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.technician-page-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.technician-page-row {
  border: 1px solid var(--line);
  min-height: 76px;
}

@media (max-width: 760px) {
  .technician-page-list {
    padding: 10px;
  }

  .technician-page-row {
    align-items: stretch;
    flex-direction: column;
  }

  .technician-page-row .user-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.case-list {
  display: grid;
  gap: 8px;
}

.case-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(159, 121, 87, 0.18);
  color: var(--text);
  display: flex;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
}

.case-row:hover {
  border-color: var(--brand);
}

.case-row strong,
.case-row span {
  display: block;
}

.case-row div span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.technician-row,
.user-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.technician-row strong,
.technician-row span,
.user-row strong,
.user-row span {
  display: block;
}

.technician-row span,
.user-row span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.technician-row span.online {
  color: var(--brand);
}

.technician-row span.offline {
  color: var(--muted);
}

.small-button {
  font-size: 12px;
  min-height: 32px;
  padding: 0 10px;
}

.toast-stack {
  bottom: 18px;
  display: grid;
  gap: 10px;
  max-width: min(360px, calc(100vw - 24px));
  position: fixed;
  right: 18px;
  z-index: 30;
}

.toast {
  animation: toast-in 180ms ease-out;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.toast[role="button"] {
  cursor: pointer;
}

.toast strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.toast span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.has-alert {
  animation: alert-pulse 820ms ease-in-out infinite;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes alert-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(178, 118, 66, 0.42);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(178, 118, 66, 0);
  }
}

.admin-user-form,
.user-list {
  display: grid;
  gap: 8px;
}

.admin-user-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-user-form > input[type="hidden"],
.admin-user-form .permission-box,
.admin-user-form .admin-form-actions {
  grid-column: 1 / -1;
}

.permission-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 10px;
}

.permission-box legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 0 5px;
}

.admin-form-actions,
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

@media (max-width: 1180px) {
  .site-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-login {
    position: static;
    margin: 18px auto 0;
  }

  .floating-whatsapp {
    right: 24px;
  }

  .app-sidebar {
    width: 220px;
  }

  .topbar,
  .shell {
    left: 220px;
    margin-left: 220px;
  }

  .shell {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 220px;
    height: calc(100vh - 60px);
  }

  /* A segunda linha e necessaria somente nas telas de trabalho que exibem a
   * fila inferior. Nos modulos administrativos ela reduz a area util. */
  body:not(.work-view) .shell {
    grid-template-rows: minmax(0, 1fr);
  }

  .activity-panel {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
}

@media (max-width: 1280px) {
  .reply-box {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 130px) minmax(72px, 96px);
  }

  .reply-box textarea {
    grid-column: 1 / -1;
  }

  .reply-box button[type="submit"] {
    min-height: 54px;
  }

  .case-tools {
    grid-template-columns: auto minmax(180px, 1fr) 104px;
  }

  .case-tools button {
    min-width: 0;
  }
}

@media (max-width: 780px) {
  .site-navbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-links {
    justify-content: flex-start;
  }

  .site-hero {
    grid-template-columns: 1fr;
  }

  .site-product-grid {
    grid-template-columns: 1fr;
  }

  .site-bottom-banner {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    width: 100%;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    left: 0;
    margin-left: 0;
    padding: 16px;
  }

  .top-search {
    width: 100%;
  }

  .shell {
    grid-template-columns: 1fr;
    height: auto;
    margin-left: 0;
    padding: 12px;
  }

  .queue-panel,
  .chat-panel,
  .activity-panel {
    min-height: 420px;
  }

  .main-menu {
    padding: 8px;
  }

  .menu-panel {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 14px;
  }

  .menu-content {
    max-height: calc(100dvh - 132px);
  }

  .chat-header,
  .reply-box,
  .case-tools {
    grid-template-columns: 1fr;
  }

  .client-reply-box {
    grid-template-columns: 1fr 1fr;
  }

  .client-reply-box textarea,
  .client-reply-box .file-field,
  .client-reply-box button[type="submit"] {
    grid-column: 1 / -1;
  }

  .chat-workspace.has-ticket-info .chat-body-grid {
    grid-template-columns: 1fr;
  }

  .ticket-info-panel {
    border-left: 0;
    border-top: 1px solid #d7dce5;
    max-height: 260px;
  }

  .ticket-info-card div {
    grid-template-columns: 1fr;
  }

  .cases-table-head,
  .cases-table-row {
    min-width: 980px;
  }

  .activity-panel {
    grid-column: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .permission-box {
    grid-template-columns: 1fr;
  }

  .admin-user-form {
    grid-template-columns: 1fr;
  }

  .client-admin-form {
    grid-template-columns: 1fr;
  }

  .knowledge-form {
    grid-template-columns: 1fr;
  }

  .branding-form {
    grid-template-columns: 1fr;
  }

  .support-form {
    grid-template-columns: 1fr;
  }

  .support-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .support-card > .small-button {
    grid-column: 1 / -1;
  }

  .client-portal {
    align-items: stretch;
    padding: 0;
  }

  .client-portal-box {
    border-radius: 0;
    box-shadow: none;
    gap: 8px;
    max-height: none;
    max-width: 100vw;
    min-height: 100dvh;
    overflow-x: hidden;
    padding: 12px;
    width: 100%;
  }

  .client-portal-box .modal-head {
    gap: 8px;
  }

  .client-portal-box .modal-head h2 {
    font-size: 18px;
  }

  .client-portal-box .modal-head p {
    font-size: 13px;
    line-height: 1.35;
  }

  .client-portal-box label {
    font-size: 12px;
    gap: 6px;
  }

  .client-portal-box input,
  .client-portal-box textarea,
  .client-portal-box select {
    font-size: 14px;
    min-height: 42px;
    padding: 9px 10px;
  }

  .client-account-summary {
    font-size: 13px;
  }

  .client-account-summary strong {
    font-size: 15px;
  }

  .client-account-bar {
    grid-template-columns: 1fr;
  }

  .client-account-bar button {
    min-height: 42px;
  }

  #clientSubject {
    font-size: 14px;
    font-weight: 700;
  }

  #clientMessage {
    min-height: 140px;
  }

  #clientPortalSubmit {
    font-size: 15px;
    min-height: 52px;
    padding: 0 12px;
  }

  .client-live {
    min-height: 100dvh;
    width: 100%;
  }

  .client-live-messages {
    height: auto;
    min-height: 260px;
    overflow-x: hidden;
    padding: 8px;
    width: 100%;
  }

  .client-live .message,
  .client-live .message.system {
    max-width: calc(100vw - 38px);
  }

  .client-live .message.agent,
  .client-live .message.customer {
    max-width: calc(100vw - 38px);
  }

  .client-live .refresh-messages-button {
    margin: 6px 0;
    width: 100%;
  }

  .client-reply-box {
    gap: 8px;
  }

  .client-reply-box textarea {
    min-height: 96px;
  }

  .client-reply-box .file-field,
  .client-reply-box .compact-check,
  .client-reply-box button {
    width: 100%;
  }

  .client-reply-box .compact-check,
  .client-reply-box #clientCloseTicket {
    font-size: 11px;
    min-height: 44px;
  }

  .client-reply-box button[type="submit"] {
    min-height: 54px;
  }

  .file-field {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 82px;
    overflow: hidden;
    padding: 10px;
    text-align: center;
  }

  .file-field input {
    font-size: 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .file-field input::file-selector-button {
    max-width: 150px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .client-row {
    grid-template-columns: 1fr;
  }

  .filters-bar {
    grid-template-columns: 1fr;
  }

  .chat-header {
    display: grid;
  }

  .message {
    max-width: 92%;
  }
}

@media (max-width: 780px) {
  body.attendance-view {
    background: #fff;
  }

  body.attendance-view .app-sidebar,
  body.attendance-view .topbar {
    display: none;
  }

  body.attendance-view .shell {
    gap: 0;
    min-height: 100dvh;
    padding: 0 0 74px;
  }

  body.attendance-view .mobile-attendance-tabs {
    background: var(--brand);
    bottom: 0;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 74px;
    left: 0;
    position: fixed;
    right: 0;
    z-index: 40;
  }

  .mobile-attendance-tabs button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: rgba(45, 63, 69, 0.82);
    display: grid;
    font-size: 13px;
    font-weight: 500;
    gap: 3px;
    justify-items: center;
    min-height: 74px;
    padding: 6px 4px;
  }

  .mobile-attendance-tabs button span {
    font-size: 24px;
    line-height: 1;
  }

  .mobile-attendance-tabs button.active {
    color: #fff;
  }

  body.attendance-view.mobile-tab-queue .chat-panel,
  body.attendance-view.mobile-tab-queue .mobile-account-panel,
  body.attendance-view.mobile-tab-account .chat-panel,
  body.attendance-view.mobile-tab-account .activity-panel,
  body.attendance-view.mobile-tab-chat .activity-panel,
  body.attendance-view.mobile-tab-chat .mobile-account-panel {
    display: none !important;
  }

  body.attendance-view.mobile-tab-queue .activity-panel {
    border: 0;
    border-radius: 0;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    min-height: calc(100dvh - 74px);
  }

  body.attendance-view.mobile-tab-account .mobile-account-panel {
    background: #fff;
    display: block;
    min-height: calc(100dvh - 74px);
  }

  .mobile-section-title,
  body.attendance-view .activity-panel h3,
  body.attendance-view .chat-panel-title {
    align-items: center;
    background: var(--brand);
    color: #fff;
    display: flex;
    font-size: 20px;
    font-weight: 500;
    justify-content: center;
    min-height: 76px;
    padding: 0 14px;
    text-align: center;
  }

  body.attendance-view .activity-panel section {
    min-height: 0;
  }

  body.attendance-view .activity-list {
    background: #fff;
    max-height: none;
  }

  body.attendance-view .activity-list > p {
    border-bottom: 1px solid #d9d9d9;
    color: #454545;
    font-size: 18px;
    margin: 0;
    padding: 28px 16px;
    text-align: center;
  }

  body.attendance-view .activity-item {
    min-height: 72px;
  }

  body.attendance-view.mobile-tab-chat .chat-panel {
    border: 0;
    border-radius: 0;
    display: grid !important;
    min-height: calc(100dvh - 74px);
  }

  body.attendance-view .chat-empty {
    background: #fff;
    min-height: calc(100dvh - 150px);
    padding: 24px;
  }

  body.attendance-view .chat-empty h2,
  body.attendance-view .chat-empty p {
    backdrop-filter: none;
    background: transparent;
    max-width: 100%;
    padding-inline: 0;
  }

  body.attendance-view .chat-workspace {
    min-height: 0;
  }

  body.attendance-view .chat-header {
    border-radius: 0;
    grid-template-columns: 1fr;
  }

  body.attendance-view .chat-body-grid {
    min-height: 0;
  }

  body.attendance-view .chat-main-column {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body.attendance-view .messages {
    max-height: none;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px;
    width: 100%;
  }

  body.attendance-view .message,
  body.attendance-view .message.system,
  body.attendance-view .message.agent,
  body.attendance-view .message.customer {
    max-width: calc(100vw - 34px);
  }

  body.attendance-view .message.agent {
    align-self: flex-end;
  }

  body.attendance-view .message header {
    gap: 6px;
    justify-content: flex-start;
  }

  body.attendance-view .refresh-messages-button {
    margin: 8px;
    width: calc(100% - 16px);
  }

  body.attendance-view .reply-box {
    background: #fff;
    border-top: 1px solid #d7dce5;
    grid-template-columns: minmax(0, 1fr) 62px;
    padding: 8px;
  }

  body.attendance-view .reply-box textarea {
    grid-column: 1 / -1;
    min-height: 72px;
  }

  body.attendance-view .reply-box .file-field,
  body.attendance-view .reply-box .compact-check {
    min-height: 42px;
  }

  body.attendance-view .reply-box button[type="submit"] {
    grid-column: 1 / -1;
  }

  .mobile-account-card {
    align-items: center;
    display: grid;
    gap: 18px;
    justify-items: center;
    padding: 34px 16px;
  }

  .mobile-account-avatar {
    background:
      radial-gradient(circle at 50% 42%, #fff 0 21%, transparent 22%),
      radial-gradient(circle at 50% 74%, #fff 0 28%, transparent 29%),
      #c9c9c9;
    border-radius: 50%;
    height: 116px;
    width: 116px;
  }

  .mobile-account-card strong {
    color: #111;
    font-size: 22px;
    font-weight: 500;
    text-align: center;
  }

  .mobile-account-row {
    align-items: center;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #d9d9d9;
    border-radius: 0;
    color: #444;
    display: flex;
    font-size: 20px;
    font-weight: 400;
    justify-content: space-between;
    min-height: 74px;
    padding: 0 18px;
    text-align: left;
    width: 100%;
  }

  .mobile-switch {
    background: #c7c7c7;
    border-radius: 999px;
    display: block;
    height: 42px;
    position: relative;
    width: 76px;
  }

  .mobile-switch::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    content: "";
    height: 36px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform 0.18s ease;
    width: 36px;
  }

  .mobile-switch.is-on {
    background: #43d763;
  }

  .mobile-switch.is-on::after {
    transform: translateX(34px);
  }
}

@media (max-width: 780px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-sidebar {
    border-radius: 0;
    max-height: none;
    overflow: visible;
    padding: 8px;
  }

  .sidebar-logo {
    height: 42px;
    justify-content: flex-start;
    margin-bottom: 6px;
    min-height: 42px;
    padding: 0 8px;
  }

  .sidebar-logo strong {
    font-size: 12px;
  }

  .sidebar-action > button {
    min-height: 36px;
  }

  .sidebar-nav {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .sidebar-nav > button,
  .sidebar-group {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .sidebar-nav button {
    font-size: 12px;
    min-height: 34px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .sidebar-group.open .sidebar-submenu {
    background: color-mix(in srgb, var(--sidebar), #000 10%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(14, 18, 24, 0.28);
    display: grid;
    left: 8px;
    max-height: 52dvh;
    min-width: min(280px, calc(100vw - 16px));
    overflow: auto;
    padding: 8px;
    position: absolute;
    right: 8px;
    z-index: 30;
  }

  .topbar {
    gap: 8px;
    min-height: 0;
    padding: 8px 10px;
  }

  .top-search input {
    min-height: 36px;
  }

  .session-pill {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .session-pill .small-button,
  .session-pill button {
    min-height: 32px;
    padding-inline: 10px;
  }

  body.attendance-view .app-sidebar {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(132px, auto) minmax(0, 1fr);
    min-height: 52px;
    padding: 6px 8px;
  }

  body.attendance-view .sidebar-logo {
    height: 40px;
    margin: 0;
    min-height: 40px;
  }

  body.attendance-view .sidebar-action {
    display: none;
  }

  body.attendance-view .sidebar-nav {
    margin: 0;
    min-width: 0;
  }

  body.attendance-view .topbar {
    align-items: center;
    flex-direction: row;
    min-height: 48px;
    padding: 6px 8px;
  }

  body.attendance-view .top-search {
    display: none;
  }

  body.attendance-view .session-pill {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    width: auto;
  }

  body.attendance-view #sessionName {
    flex: 0 0 auto;
    font-size: 12px;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.attendance-view .session-pill .small-button,
  body.attendance-view .session-pill .icon-top-button {
    flex: 0 0 auto;
    font-size: 11px;
  }

  .shell,
  body.attendance-view .shell,
  body.case-detail-view .shell,
  body.cases-view .shell {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    margin-left: 0;
    min-height: calc(100dvh - 132px);
    overflow: visible;
    padding: 8px;
  }

  body.attendance-view .queue-panel {
    display: none;
  }

  .queue-panel,
  .chat-panel,
  .activity-panel {
    min-height: 0;
    width: 100%;
  }

  body.attendance-view .chat-panel,
  body.case-detail-view .chat-panel {
    grid-column: 1;
    min-height: calc(100dvh - 116px);
  }

  body.attendance-view .activity-panel {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
  }

  .activity-panel {
    gap: 8px;
  }

  .activity-panel section {
    min-height: 170px;
  }

  .activity-list {
    max-height: 240px;
    overflow: auto;
  }

  .chat-panel-title {
    font-size: 16px;
    padding: 10px 12px;
  }

  .chat-empty {
    min-height: calc(100dvh - 220px);
    padding: 18px;
  }

  .chat-empty h2 {
    font-size: 18px;
  }

  .chat-empty p {
    font-size: 12px;
  }

  .chat-workspace {
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: calc(100dvh - 116px);
  }

  .chat-header {
    gap: 8px;
    padding: 10px 12px;
  }

  .chat-header h2 {
    font-size: 17px;
    line-height: 1.2;
  }

  .chat-header p,
  .protocol {
    font-size: 11px;
    line-height: 1.35;
  }

  .actions {
    display: grid;
    gap: 6px;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  .actions select,
  .actions button {
    max-width: none;
    min-height: 38px;
    width: 100%;
  }

  .case-tools {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    padding: 8px 10px;
  }

  .channel-chip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
  }

  .chat-main-column {
    min-height: 0;
  }

  .messages {
    max-height: 48dvh;
    min-height: 260px;
    padding: 10px;
  }

  .message,
  .message.system,
  .message.agent,
  .message.customer {
    max-width: 100%;
  }

  .message header {
    flex-wrap: wrap;
  }

  .reply-box {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  .reply-box textarea {
    grid-column: auto;
    min-height: 104px;
  }

  .reply-box .file-field,
  .reply-box .compact-check,
  .reply-box button {
    min-height: 46px;
    width: 100%;
  }

  .reply-box button[type="submit"] {
    font-size: 14px;
    min-height: 52px;
  }

  .compact-check {
    font-size: 10px;
  }

  .ticket-info-panel {
    max-height: none;
  }

  .cases-table {
    overflow-x: auto;
  }

  .attendance-table-head,
  .attendance-table-row {
    min-width: 620px;
  }

  .cases-table-head,
  .cases-table-row {
    min-width: 980px;
  }
}

@media (max-width: 780px) {
  body.attendance-view .app-sidebar,
  body.attendance-view .topbar {
    display: none !important;
  }

  body.attendance-view .shell {
    gap: 0;
    min-height: 100dvh;
    padding: 0 0 74px;
  }

  body.attendance-view .chat-panel,
  body.attendance-view .activity-panel {
    border-radius: 0;
  }

  body.attendance-view .chat-empty {
    background: #fff;
  }

  body.attendance-view .messages {
    max-height: none;
  }
}

.client-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.client-admin-tabs button {
  border: 1px solid #d9cab9;
  background: #fffaf5;
  color: #4b3827;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.client-admin-tabs button.active {
  background: #2d6a4f;
  border-color: #2d6a4f;
  color: #fff;
}

.accounting-section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.accounting-section-title h2,
.accounting-section-title p {
  margin: 0;
}

.accounting-section-title p {
  color: #76695f;
  margin-top: 4px;
}

.accounting-company-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.accounting-status-dashboard {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.accounting-kpi {
  background: #fffef9;
  border: 1px solid #dfe8d9;
  border-left: 4px solid #b77a3f;
  border-radius: 8px;
  padding: 12px 14px;
}

.accounting-kpi strong,
.accounting-kpi span {
  display: block;
}

.accounting-kpi strong {
  color: #14221b;
  font-size: 24px;
  line-height: 1;
}

.accounting-kpi span {
  margin-top: 6px;
  color: #62584f;
  font-weight: 700;
}

.accounting-kpi.success { border-left-color: #28a35d; }
.accounting-kpi.danger { border-left-color: #c94132; }
.accounting-kpi.accent { border-left-color: #355d91; }

.accounting-company-card {
  align-items: flex-start;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #eadfce;
  border-radius: 10px;
  border-top: 4px solid #c94132;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 150px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.accounting-company-card.is-online {
  border-top-color: #28a35d;
}

.accounting-company-card.is-pending {
  border-top-color: #d99a24;
}

.accounting-company-card:hover,
.accounting-company-card:focus-visible,
.accounting-company-card.is-selected {
  box-shadow: 0 10px 24px rgba(66, 47, 30, .12);
  outline: none;
  transform: translateY(-2px);
}

.accounting-company-card.is-selected {
  border-color: #b77a3f;
}

.accounting-company-card strong,
.accounting-company-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.accounting-company-card strong {
  color: #111827;
  font-size: 17px;
}

.accounting-company-card small {
  color: #6f6258;
  margin-top: 4px;
}

.accounting-company-card .small-button {
  grid-column: 2;
  justify-self: start;
  margin-top: auto;
}

.accounting-company-detail {
  background: #fffef9;
  border: 1px solid #e7d8c7;
  border-left: 4px solid #b77a3f;
  border-radius: 8px;
  padding: 14px 16px;
}

.accounting-company-detail .accounting-section-title {
  align-items: center;
}

.company-store-status {
  background-color: #c94132;
  flex: 0 0 34px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .14));
  height: 34px;
  -webkit-mask: url("/store-status-icon.png") center / contain no-repeat;
  mask: url("/store-status-icon.png") center / contain no-repeat;
  width: 34px;
}

.company-store-status.online {
  background-color: #28a35d;
}

.company-store-status.pending {
  background-color: #d99a24;
}

.company-store-status.offline {
  background-color: #c94132;
}

.client-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.accounting-admin-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.accounting-account-form,
.accounting-request-admin-form {
  border: 1px solid #eadfce;
  border-radius: 8px;
  margin: 0;
}

.accounting-account-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accounting-request-admin-form {
  grid-template-columns: 1.2fr 1.2fr 0.9fr minmax(220px, 1fr) 180px;
  align-items: end;
}

.accounting-form-heading,
.accounting-company-picker {
  grid-column: 1 / -1;
}

.accounting-form-heading {
  display: grid;
  gap: 4px;
}

.accounting-form-heading p,
.accounting-company-picker span {
  color: #766d64;
  font-size: 13px;
  margin: 0;
}

.accounting-company-picker {
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed #ddcbb7;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.accounting-company-picker h3 {
  color: #3b2c20;
  font-size: 15px;
  margin: 0;
}

.accounting-company-picker-heading,
.accounting-company-picker-refresh,
.accounting-request-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accounting-company-picker-heading {
  justify-content: space-between;
}

.accounting-company-picker-refresh {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.accounting-request-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.accounting-company-checklist {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}

.accounting-company-option {
  align-items: center;
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 58px;
  padding: 10px;
}

.accounting-company-option input {
  height: 16px;
  width: 16px;
}

.accounting-company-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.accounting-company-option strong,
.accounting-company-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-company-option small {
  color: #7c7268;
  font-weight: 700;
}

.client-admin-card,
.techbackup-token-box,
.backup-company-card {
  background: #fffdf9;
  border: 1px solid #eadfce;
  border-radius: 8px;
  padding: 14px;
}

.client-admin-card h2,
.client-admin-form h2 {
  margin: 0 0 12px;
  color: #2d261f;
  font-size: 18px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 700;
}

.inline-check input {
  width: 16px;
  height: 16px;
}

.client-tags,
.command-list,
.backup-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-tags span,
.command-list span,
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef5f0;
  color: #2d6a4f;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.offline,
.status-badge.pendente,
.status-badge.processando {
  background: #fff4dc;
  color: #8a5a00;
}

.status-badge.erro {
  background: #fde7e7;
  color: #a52424;
}

.status-badge.cancelado {
  background: #ece9e6;
  color: #6d6259;
}

.status-badge.online,
.status-badge.enviado {
  background: #e7f6ed;
  color: #1b7f45;
}

.period-filter {
  margin-bottom: 10px;
}

.techbackup-token-box {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.techbackup-token-box code {
  display: block;
  overflow-wrap: anywhere;
  background: #1f2937;
  color: #f8fafc;
  border-radius: 6px;
  padding: 10px;
}

.backup-company-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.backup-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.backup-kpi {
  min-height: 88px;
  padding: 14px;
  background: #fffdf9;
  border: 1px solid #eadfce;
  border-left: 4px solid #9e642d;
  border-radius: 7px;
}

.backup-kpi strong {
  display: block;
  color: #17120f;
  font-size: 28px;
  line-height: 1;
}

.backup-kpi span {
  display: block;
  margin-top: 8px;
  color: #6b5d50;
  font-weight: 700;
}

.backup-kpi.success { border-left-color: #2d8a57; }
.backup-kpi.warning { border-left-color: #d49426; }
.backup-kpi.danger { border-left-color: #c43c3c; }
.backup-kpi.accent { border-left-color: #355d91; }

.backup-activity-panel {
  background: #fffdf9;
  border: 1px solid #eadfce;
  border-radius: 7px;
  margin-bottom: 14px;
  overflow: hidden;
}

.backup-activity-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid #eadfce;
}

.backup-activity-panel h2 {
  margin: 0;
  font-size: 17px;
}

.backup-activity-panel p,
.backup-activity-panel header span {
  margin: 3px 0 0;
  color: #6b5d50;
  font-size: 12px;
}

.backup-activity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.backup-activity {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid #f0e8dc;
}

.backup-activity:nth-child(odd) {
  border-right: 1px solid #f0e8dc;
}

.activity-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2d8a57;
}

.backup-activity.xml .activity-mark { background: #355d91; }
.backup-activity.error .activity-mark { background: #c43c3c; }
.backup-activity strong,
.backup-activity small {
  display: block;
}
.backup-activity small,
.backup-activity time {
  color: #74675c;
  font-size: 11px;
}

.backup-company-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(100px, .65fr)) minmax(245px, auto);
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  background: #fffdf9;
  border: 1px solid #eadfce;
  border-left: 4px solid #aab2ad;
  border-radius: 6px;
}

.backup-company-row.is-online { border-left-color: #2d8a57; }
.backup-company-row.has-error { box-shadow: inset 0 0 0 1px #e3a4a4; }

.backup-company-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.company-led {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: #9aa19d;
  box-shadow: 0 0 0 4px rgba(154, 161, 157, .13);
}

.company-led.online {
  background: #27a45f;
  box-shadow: 0 0 0 4px rgba(39, 164, 95, .14);
}

.backup-company-identity strong,
.backup-company-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-company-identity strong { color: #211a15; }
.backup-company-identity small { color: #74675c; margin-top: 3px; }

.backup-company-stat span,
.backup-company-stat strong,
.backup-company-stat small {
  display: block;
}

.backup-company-stat span {
  color: #74675c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.backup-company-stat strong {
  margin-top: 3px;
  color: #2d261f;
  font-size: 16px;
}

.backup-company-stat small {
  max-width: 160px;
  overflow: hidden;
  color: #807267;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-company-stat.danger strong,
.backup-company-stat.danger small {
  color: #a52424;
}

.backup-company-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.backup-command-status {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  color: #72542f;
  font-size: 11px;
}

.backup-advanced-settings {
  margin-top: 16px;
  border: 1px solid #ded2c2;
  border-radius: 7px;
  background: #fffdf9;
}

.backup-monitor-launch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid #ead9ca;
  border-radius: 8px;
  background: #fff;
}

.backup-monitor-launch h2,
.backup-monitor-launch p {
  margin: 0;
}

.backup-monitor-launch p {
  margin-top: 6px;
  color: #756b63;
}

.backup-advanced-settings summary {
  padding: 13px 15px;
  cursor: pointer;
  color: #5a4635;
  font-weight: 700;
}

.backup-advanced-settings > div,
.backup-advanced-settings > form {
  margin: 0 14px 14px;
}

@media (max-width: 820px) {
  .client-admin-grid {
    grid-template-columns: 1fr;
  }
  .accounting-account-form,
  .accounting-request-admin-form {
    grid-template-columns: 1fr;
  }
  .backup-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .backup-activity-list {
    grid-template-columns: 1fr;
  }
  .backup-activity:nth-child(odd) {
    border-right: 0;
  }
  .backup-company-row {
    grid-template-columns: 1fr 1fr;
  }
  .backup-company-identity,
  .backup-company-actions,
  .backup-command-status {
    grid-column: 1 / -1;
  }
  .backup-company-actions {
    justify-content: flex-start;
  }
}

.command-list span:has(+ span) {
  margin-right: 0;
}

.command-list span {
  background: #eef2ff;
  color: #344083;
}

.accounting-page {
  min-height: 100vh;
  background: #f5f7f1;
  color: #243126;
}

.accounting-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0;
}

.accounting-login {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  gap: 18px;
}

.accounting-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #1f3328;
}

.accounting-brand strong {
  display: block;
  font-size: 28px;
}

.accounting-brand span:last-child {
  color: #637064;
}

.accounting-dashboard {
  display: grid;
  gap: 16px;
}

.accounting-header,
.accounting-toolbar,
.accounting-card {
  background: #fffef9;
  border: 1px solid #dfe8d9;
  border-radius: 8px;
  padding: 16px;
}

.accounting-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.accounting-header span {
  color: #2d6a4f;
  font-weight: 800;
}

.accounting-header h1,
.accounting-card h2 {
  margin: 0;
  color: #1f3328;
}

.accounting-header p {
  margin: 6px 0 0;
  color: #637064;
}

.accounting-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.accounting-password-dialog {
  width: min(440px, calc(100vw - 32px));
  border: 1px solid #e4d5c8;
  border-radius: 8px;
  padding: 20px;
}

.accounting-password-dialog::backdrop {
  background: rgba(24, 28, 34, 0.58);
}

.accounting-toolbar,
.accounting-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.accounting-grid {
  grid-template-columns: 1.2fr .8fr;
  align-items: start;
}

.accounting-request-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.accounting-toolbar label,
.accounting-request-form label {
  display: grid;
  gap: 6px;
  color: #4b5b4d;
  font-weight: 700;
}

.accounting-toolbar input,
.accounting-toolbar select,
.accounting-request-form input,
.accounting-request-form select,
.accounting-request-form textarea {
  border: 1px solid #cbd8c8;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
}

@media (max-width: 840px) {
  .accounting-header,
  .accounting-toolbar,
  .accounting-grid,
  .accounting-status-dashboard {
    grid-template-columns: 1fr;
  }

  .accounting-header {
    align-items: stretch;
  }
}
.technical-module-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 18px;
}

.technical-module-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  padding: 20px;
  text-align: left;
}

.technical-module-card:hover {
  background: var(--surface-2);
}

.technical-module-card strong {
  font-size: 22px;
}

.technical-module-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.technical-backup-followup {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin: 0 18px 22px;
  padding-top: 18px;
}

.technical-backup-followup .dashboard-board-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.technical-backup-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.technical-backup-total {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #89939f;
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 58px;
  padding: 10px 12px;
}

.technical-backup-total strong { font-size: 22px; }
.technical-backup-total span { color: var(--muted); font-size: 12px; }
.technical-backup-total.danger { border-left-color: #d64545; }
.technical-backup-total.warning { border-left-color: #d79a21; }
.technical-backup-total.success { border-left-color: #259765; }
.technical-backup-total.active { background: #f2ede8; box-shadow: 0 0 0 2px rgba(178, 118, 66, 0.18); }

.technical-backup-filters {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
}

.technical-backup-filters label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

.technical-backup-filters input,
.technical-backup-filters select {
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  padding: 10px;
}

.technical-backup-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 430px;
  overflow: auto;
}

.technical-backup-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(190px, 1.4fr) 110px minmax(130px, .9fr) minmax(135px, .9fr) minmax(220px, 1.5fr) 82px;
  min-width: 960px;
  padding: 10px 12px;
}

.technical-backup-row:last-child { border-bottom: 0; }
.technical-backup-row > span { font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.technical-backup-row strong,
.technical-backup-row small { display: block; }
.technical-backup-row small { color: var(--muted); margin-top: 3px; }
.technical-backup-head { background: #f5f6f8; color: var(--muted); font-weight: 800; position: sticky; top: 0; z-index: 1; }
.technical-backup-status { border-radius: 999px; display: inline-block; font-style: normal; font-weight: 800; padding: 5px 8px; }
.technical-backup-status.erro { background: #fde7e7; color: #a52d2d; }
.technical-backup-status.atrasado { background: #fff1cf; color: #8b5b00; }
.technical-backup-status.em_dia { background: #dff5e9; color: #16734a; }
.technical-backup-status.nao_configurado { background: #edf0f3; color: #586270; }

@media (max-width: 900px) {
  .technical-backup-summary { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .technical-backup-filters { grid-template-columns: 1fr; }
}

.techbackup-alert {
  background: #fff4d7;
  border: 1px solid #d8a84e;
  border-radius: 8px;
  color: #6f4a08;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.backup-search-row {
  margin: 14px 0;
}

.backup-search-row label {
  display: grid;
  gap: 6px;
}

.accounting-dashboard.hidden,
.accounting-login.hidden {
  display: none !important;
}

.technical-panel-host .site-contactbar,
.technical-panel-host .site-navbar,
.technical-panel-host .site-hero,
.technical-panel-host .site-product-grid,
.technical-panel-host .site-bottom-banner,
.technical-panel-host .floating-whatsapp {
  display: none;
}

.technical-panel-host .login-screen.site-home {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--surface, #f7f6f3);
}

.technical-panel-host .login-screen.site-home.hidden {
  display: none;
}

.technical-panel-host .site-login {
  position: static;
  width: min(460px, 100%);
  margin: 0;
}

.technical-panel-host .site-login .login-minimize {
  display: none;
}

.finance-settings-form,
.finance-company-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  min-width: 0;
}

.finance-settings-form label,
.finance-company-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.finance-company-form input,
.finance-company-form select,
.finance-company-form textarea,
.finance-invoice-form input,
.finance-invoice-form select,
.finance-invoice-form textarea {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.finance-settings-form .inline-check {
  align-items: center;
  display: flex;
  min-height: 44px;
}

.finance-settings-form .inline-check input {
  width: auto;
}

.finance-settings-form .finance-template-field {
  grid-column: span 2;
}

.finance-template-field textarea {
  min-height: 96px;
  resize: vertical;
}

.finance-template-field small {
  color: var(--muted);
  font-size: 0.76rem;
}

.finance-company-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.finance-company-toolbar label {
  display: grid;
  gap: 5px;
  min-width: min(280px, 70vw);
}

.finance-company-toolbar select {
  min-width: min(380px, 78vw);
}

.finance-company-list {
  display: grid;
  gap: 12px;
}

.finance-company-card {
  align-items: stretch;
  display: grid;
  gap: 10px;
}

.finance-company-card .status-badge.pago {
  background: #def4e8;
  color: #176d42;
}

.finance-company-card .status-badge.vencido {
  background: #fde4e2;
  color: #a72b24;
}

.finance-company-card .status-badge.a_vencer {
  background: #fff1cf;
  color: #815600;
}

.finance-company-card .status-badge.nao_configurado {
  background: #eceff2;
  color: #58616a;
}

@media (max-width: 720px) {
  .finance-settings-form,
  .finance-company-form {
    grid-template-columns: 1fr;
  }

  .finance-settings-form .finance-template-field {
    grid-column: auto;
  }
}

.finance-dashboard-card {
  display: grid;
  gap: 18px;
}

.finance-dashboard-heading,
.finance-section-heading {
  align-items: flex-end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.finance-dashboard-heading h2,
.finance-section-heading h3 {
  margin: 0 0 4px;
}

.finance-dashboard-heading span,
.finance-section-heading span {
  color: var(--muted);
  font-size: 0.88rem;
}

.finance-dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.finance-dashboard-filters label {
  color: var(--muted);
  display: grid;
  font-size: 0.76rem;
  font-weight: 700;
  gap: 5px;
}

.finance-dashboard-filters input,
.finance-dashboard-filters select {
  min-width: 150px;
}

.finance-dashboard-filters .finance-filter-apply,
.finance-dashboard-filters .finance-filter-clear {
  align-self: end;
  min-height: 38px;
}

.finance-dashboard-filters input[type="search"] {
  min-width: 210px;
}

.finance-results-summary {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 12px 0 4px;
}

.finance-dashboard-totals {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(135px, 1fr));
}

.finance-total-card {
  background: linear-gradient(145deg, #fff, #faf7f3);
  border: 1px solid #ead9ca;
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
}

.finance-total-card.received { border-left-color: #229864; }
.finance-total-card.pending { border-left-color: #d8992d; }
.finance-total-card.overdue { border-left-color: #cf4138; }
.finance-total-card.rate { border-left-color: #346fa5; }
.finance-total-card.projection { border-left-color: #7955a5; }

.finance-total-card span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.finance-total-card strong {
  color: var(--ink);
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
}

.finance-total-card small {
  color: var(--muted);
}

.finance-dashboard-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
}

.finance-dashboard-panel {
  background: #fff;
  border: 1px solid #eadfd5;
  border-radius: 12px;
  padding: 16px;
}

.finance-trend-chart {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(54px, 1fr));
  min-height: 220px;
  padding-top: 18px;
}

.finance-trend-column {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-rows: 150px auto auto;
  min-width: 0;
}

.finance-trend-bars {
  align-items: end;
  display: flex;
  gap: 4px;
  height: 150px;
  justify-content: center;
  width: 100%;
}

.finance-trend-bar {
  border-radius: 5px 5px 2px 2px;
  min-height: 3px;
  width: min(24px, 38%);
}

.finance-trend-bar.expected { background: #dbc5b2; }
.finance-trend-bar.received { background: #229864; }

.finance-trend-column strong {
  font-size: 0.76rem;
  white-space: nowrap;
}

.finance-trend-column small {
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.finance-chart-legend {
  color: var(--muted);
  display: flex;
  font-size: 0.72rem;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 8px;
}

.finance-trend-chart > .finance-chart-legend {
  grid-column: 1 / -1;
}

.finance-chart-legend i {
  border-radius: 3px;
  display: inline-block;
  height: 9px;
  margin-right: 4px;
  width: 9px;
}

.finance-compact-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 225px;
  overflow: auto;
}

.finance-due-row {
  align-items: center;
  border-bottom: 1px solid #eee4db;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px 2px;
}

.finance-due-row:last-child { border-bottom: 0; }
.finance-due-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-due-row small { color: var(--muted); }
.finance-due-row div { display: grid; gap: 3px; min-width: 0; }

.finance-payments-panel { min-width: 0; }

.finance-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.finance-table {
  border-collapse: collapse;
  min-width: 680px;
  width: 100%;
}

.finance-table th,
.finance-table td {
  border-bottom: 1px solid #eee4db;
  padding: 10px 8px;
  text-align: left;
}

.finance-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.finance-table td:last-child,
.finance-table th:last-child {
  text-align: right;
}

.finance-settings-details > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
}

.finance-settings-details > summary::-webkit-details-marker { display: none; }

.finance-settings-details > summary::after {
  color: var(--brand);
  content: "+";
  font-size: 1.5rem;
  font-weight: 700;
}

.finance-settings-details[open] > summary::after { content: "−"; }

.finance-settings-details > summary span {
  display: grid;
  gap: 4px;
}

.finance-settings-details > summary small {
  color: var(--muted);
  font-weight: 400;
}

.finance-settings-details .finance-settings-form {
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .finance-dashboard-totals { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 820px) {
  .finance-dashboard-heading,
  .finance-section-heading { align-items: stretch; flex-direction: column; }
  .finance-dashboard-grid { grid-template-columns: 1fr; }
  .finance-dashboard-totals { grid-template-columns: repeat(2, minmax(135px, 1fr)); }
  .finance-trend-chart { overflow-x: auto; }
}

@media (max-width: 520px) {
  .finance-dashboard-totals { grid-template-columns: 1fr; }
  .finance-dashboard-filters { display: grid; grid-template-columns: 1fr; }
  .finance-dashboard-filters input,
  .finance-dashboard-filters select { width: 100%; }
}


/* Financeiro por titulos: lista compacta e detalhes sob demanda */
.finance-company-card {
  background: #fff;
  border: 1px solid #eadfd5;
  border-radius: 12px;
  display: block;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.finance-company-card > summary {
  list-style: none;
}

.finance-company-card > summary::-webkit-details-marker {
  display: none;
}

.finance-company-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) minmax(120px, auto) auto auto;
  min-height: 74px;
  padding: 14px 16px;
}

.finance-company-summary:hover {
  background: #fffaf5;
}

.finance-company-identity,
.finance-company-balance {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finance-company-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-company-identity small,
.finance-company-balance small {
  color: var(--muted);
}

.finance-company-balance {
  text-align: right;
}

.finance-details-label {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
}

.finance-details-label::after {
  content: " +";
}

.finance-company-card[open] .finance-details-label::after {
  content: " −";
}

.finance-company-details {
  background: #fcfaf8;
  border-top: 1px solid #eadfd5;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  padding: 16px;
}

.finance-detail-panel {
  background: #fff;
  border: 1px solid #eadfd5;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.finance-detail-panel h3 {
  margin: 0;
}

.finance-invoice-history {
  grid-column: 1 / -1;
}

.finance-invoice-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.45fr) minmax(150px, 0.55fr) auto;
  min-width: 0;
}

.finance-invoice-form label {
  display: grid;
  gap: 6px;
}

.finance-detail-heading,
.finance-invoice-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.finance-invoice-actions .small-button {
  min-height: 32px;
}

.finance-invoice-list {
  display: grid;
  gap: 8px;
}

.finance-invoice-row {
  align-items: center;
  border: 1px solid #eee4db;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto auto minmax(230px, auto);
  padding: 10px 12px;
}

.finance-invoice-row > span:first-child {
  display: grid;
  gap: 3px;
}

.finance-invoice-row small,
.finance-canceled-note {
  color: var(--muted);
}

.status-badge.pago {
  background: #def4e8;
  color: #176d42;
}

.status-badge.vencido {
  background: #fde4e2;
  color: #a72b24;
}

.status-badge.pendente {
  background: #fff1cf;
  color: #815600;
}

@media (max-width: 1180px) {
  .finance-invoice-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-invoice-form > button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .finance-company-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .finance-company-balance {
    text-align: left;
  }
  .finance-company-details {
    grid-template-columns: 1fr;
  }
  .finance-invoice-history {
    grid-column: auto;
  }
  .finance-invoice-form,
  .finance-invoice-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .finance-company-details {
    padding: 10px;
  }

  .finance-detail-panel {
    padding: 12px;
  }

  .finance-invoice-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Modo enxuto usado pelo Console Administrativo nativo do Windows. */
body.desktop-console .desktop-console-hidden {
  display: none !important;
}

body.desktop-console .client-admin-tabs {
  display: none !important;
}

body.desktop-console .client-admin-view {
  border-top: 0;
}

html.desktop-console-booting body {
  visibility: hidden;
}

body.desktop-console #clientsPanel {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 72px;
  scrollbar-gutter: stable;
}

body.desktop-console .client-admin-view[data-client-admin-view="financeiro"] {
  min-height: max-content;
  padding-bottom: 48px;
}

body.desktop-console .client-admin-view[data-client-admin-view="financeiro"] > .client-admin-card:last-child {
  margin-bottom: 48px;
}

/* Mantem as duas filas empilhadas no painel estreito do Console. */
body.desktop-console.attendance-view .activity-panel {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 100%;
  min-width: 0;
}

body.desktop-console.attendance-view .activity-panel section,
body.desktop-console.attendance-view .activity-title-row,
body.desktop-console.attendance-view .activity-list {
  min-width: 0;
}

/* O breakpoint geral de 1180px reserva uma segunda linha para a fila.
 * No Console a fila permanece na coluna direita, portanto essa linha vazia
 * reduzia a conversa e escondia a base do formulario de resposta. */
@media (min-width: 781px) {
  body.desktop-console.attendance-view .shell {
    grid-template-rows: minmax(0, 1fr);
    height: calc(100dvh - 60px);
  }

  body.desktop-console.attendance-view .chat-panel,
  body.desktop-console.attendance-view .activity-panel {
    grid-row: 1;
    height: 100%;
    max-height: 100%;
  }

  body.desktop-console.attendance-view .chat-workspace,
  body.desktop-console.attendance-view .chat-body-grid,
  body.desktop-console.attendance-view .chat-main-column,
  body.desktop-console.attendance-view .messages {
    min-height: 0;
  }
}

body.desktop-console .app-sidebar {
  display: none !important;
}

body.desktop-console .topbar,
body.desktop-console .shell {
  left: 0;
  margin-left: 0;
}

/* No Console, os modulos administrativos ocupam uma unica linha. A regra
 * responsiva geral reserva 220px para a fila de atendimento abaixo de 1180px;
 * sem a fila visivel, essa reserva comprimia Financeiro/Contador/INFOBackup. */
body.desktop-console .shell {
  grid-template-rows: minmax(0, 1fr);
  height: calc(100dvh - 60px);
}

body.desktop-console .dashboard-panel {
  grid-row: 1;
  height: 100%;
  min-height: 0;
}

body.desktop-console .sidebar-logo {
  cursor: default;
}

body.desktop-console .login-screen.site-home .site-navbar,
body.desktop-console .login-screen.site-home .site-hero,
body.desktop-console .login-screen.site-home .site-products,
body.desktop-console .login-screen.site-home .site-bottom-banner,
body.desktop-console .login-screen.site-home .floating-whatsapp {
  display: none !important;
}

body.desktop-console .login-screen.site-home {
  align-items: center;
  background: radial-gradient(circle at top, #4d5965 0%, #22282f 68%);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

body.desktop-console .login-box {
  position: static;
}
.field-help {
  display: block;
  margin-top: 5px;
  color: #6f6a66;
  font-size: 0.78rem;
  line-height: 1.35;
}

.monitoring-client-access {
  display: grid;
  gap: 16px;
  margin: 16px;
}

.monitoring-client-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.monitoring-client-heading h2,
.monitoring-client-heading p {
  margin: 0;
}

.monitoring-client-heading p {
  color: var(--muted);
  margin-top: 5px;
}

.monitoring-client-heading label {
  min-width: min(320px, 100%);
}

.monitoring-client-heading input,
.monitoring-client-form input,
.monitoring-client-form select {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 38px;
  padding: 8px 10px;
}

.monitoring-client-form {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.monitoring-company-access-list {
  display: grid;
  gap: 10px;
}

.monitoring-company-access-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.2fr) auto minmax(240px, 1fr) auto;
  padding: 12px 14px;
}

.monitoring-company-identity,
.monitoring-client-accounts,
.monitoring-client-accounts > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.monitoring-company-identity span,
.monitoring-client-accounts small,
.monitoring-without-access {
  color: var(--muted);
  font-size: 12px;
}

.monitoring-client-accounts {
  gap: 7px;
}

@media (max-width: 900px) {
  .monitoring-client-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .monitoring-company-access-row {
    grid-template-columns: 1fr;
  }
}
body.authenticated::before,
body.technical-panel-host::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(110deg, rgba(247, 250, 253, .96), rgba(247, 250, 253, .82)), url("/infomac-gestao.webp") center/cover no-repeat;
}

body.authenticated .app-sidebar {
  background: linear-gradient(180deg, rgba(7, 29, 51, .98), rgba(10, 47, 78, .97));
  box-shadow: 12px 0 34px rgba(4, 22, 39, .18);
}

body.authenticated .sidebar-nav button.active {
  background: linear-gradient(100deg, rgba(9, 135, 210, .94), rgba(8, 91, 158, .94));
  box-shadow: 0 8px 22px rgba(3, 54, 94, .25);
}

.sidebar-nav > button[data-nav-icon]::before,
.sidebar-group-toggle[data-nav-icon]::before {
  content: attr(data-nav-icon);
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .12);
  font-size: 14px;
  font-weight: 700;
  height: 24px;
  width: 24px;
}

body.authenticated .topbar,
body.authenticated .main-panel,
body.authenticated .client-admin-card,
body.authenticated .technical-card {
  backdrop-filter: blur(10px);
}

.techbackup-work-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
}

.techbackup-work-tabs button {
  flex: 1;
  min-height: 42px;
  border-radius: 10px;
  background: transparent;
  color: #18314f;
}

.techbackup-work-tabs button.active {
  background: #0d6fba;
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 111, 186, .22);
}

/* 2026-09-05: identidade separada do site publico e refinamento do painel. */
body.public-site-host .login-screen.site-home {
  background:
    linear-gradient(100deg, rgba(4, 17, 31, .68) 0%, rgba(4, 17, 31, .26) 54%, rgba(4, 17, 31, .52) 100%),
    url("/infomac-hero.jpeg") center / cover no-repeat;
}

body.public-site-host .site-contactbar {
  background: rgba(4, 15, 28, .9);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

body.public-site-host .site-navbar {
  background: rgba(6, 21, 37, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(14px);
}

body.public-site-host .site-logo strong,
body.public-site-host .site-links a { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
body.public-site-host .site-logo small { color: #f0b276; }

body.public-site-host .site-hero-copy {
  background: linear-gradient(135deg, rgba(5, 20, 35, .88), rgba(5, 20, 35, .68));
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(0,0,0,.34);
  padding: clamp(24px, 3.2vw, 42px);
  backdrop-filter: blur(12px);
}

body.public-site-host .site-hero-copy h1 { color:#fff; font-size:clamp(38px,4.4vw,62px); letter-spacing:-.035em; }
body.public-site-host .site-hero-copy h1 span { color:#f0a65f; }
body.public-site-host .site-hero-copy p { color:rgba(255,255,255,.88); }
body.public-site-host .site-feature-list article { background:rgba(8,25,42,.82); border:1px solid rgba(255,255,255,.17); color:#fff; }
body.public-site-host .site-feature-list span { color:rgba(255,255,255,.78); }
body.public-site-host .site-product-grid article { background:rgba(5,20,35,.92); border:1px solid rgba(255,255,255,.12); border-radius:14px; }
body.public-site-host .site-bottom-banner { background:rgba(255,255,255,.94); border-radius:16px; box-shadow:0 20px 50px rgba(0,0,0,.2); }
.anchor-target { display:block; scroll-margin-top:130px; }

body.authenticated .app-sidebar {
  border-right: 1px solid rgba(116, 190, 235, .18);
  padding: 12px 10px;
}

body.authenticated .sidebar-nav { gap: 5px; }
body.authenticated .sidebar-nav > button,
body.authenticated .sidebar-group-toggle { border: 1px solid transparent; border-radius: 10px; min-height: 42px; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
body.authenticated .sidebar-nav button:hover { background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.11); transform:translateX(2px); }
body.authenticated .sidebar-nav button.active { border-color:rgba(151,220,255,.35); }
body.authenticated .sidebar-submenu { border-left:1px solid rgba(129,199,238,.32); border-bottom:0; margin-left:12px; padding:4px 0 8px 10px; }
body.authenticated .sidebar-submenu button { color:rgba(255,255,255,.86); border-radius:8px; min-height:32px; }
body.authenticated .sidebar-submenu-heading { color:rgba(170,218,245,.76); font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
.sidebar-nav { scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.25) transparent; }

.empty-filter-result { background:#f5f8fc; border:1px dashed #b9c9d9; border-radius:12px; color:#536579; margin:14px; padding:18px; }
.finance-dashboard-filters .finance-filter-apply { background:#0d6fba; box-shadow:0 7px 18px rgba(13,111,186,.22); min-width:152px; }

.chat-header { min-height:54px; padding:8px 12px; }
.chat-header h2 { font-size:14px; line-height:1.25; }
.chat-header p, .chat-header .protocol { font-size:11px; line-height:1.3; }
.case-tools { gap:6px; padding:6px 10px; }
.case-tools input, .case-tools select, .case-tools button { font-size:11.5px; min-height:30px; padding:4px 7px; }
.channel-chip { font-size:10.5px; padding:6px 8px; }

@media (max-width: 760px) {
  body.public-site-host .login-screen.site-home { background-position:58% center; }
  body.public-site-host .site-hero-copy { padding:22px; }
  body.public-site-host .site-hero-copy h1 { font-size:36px; }
}

.company-token-manager,
.terminal-management-card {
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(23, 49, 79, .08);
}

.company-token-manager {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(200px, 1fr) minmax(260px, 1.3fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 14px;
}

.company-token-manager h2,
.terminal-management-card h2,
.terminal-management-card h3 { margin: 0 0 5px; }
.company-token-manager p,
.terminal-management-card p { margin: 0; color: #617087; }
.company-token-manager label,
.terminal-company-picker label { display: grid; gap: 6px; font-weight: 700; color: #33465d; }
.company-token-manager input,
.company-token-manager select,
.terminal-company-picker input,
.terminal-company-picker select { min-height: 42px; border: 1px solid #cdd9e7; border-radius: 9px; padding: 8px 10px; background: #fff; }

.terminal-management-card { padding: 18px; }
.terminal-management-card > header,
.terminal-inventory-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.terminal-company-picker { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr) auto; gap: 12px; align-items: end; margin: 18px 0 12px; }
.terminal-command-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 16px; border-bottom: 1px solid #e5ebf2; }
.terminal-inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.terminal-inventory-grid > section { min-width: 0; border: 1px solid #dfe7f1; border-radius: 13px; padding: 13px; background: #f9fbfd; }
.terminal-inventory-heading { align-items: flex-start; margin-bottom: 10px; }
.terminal-inventory-heading span { color: #68778b; font-size: 12px; text-align: right; }
.terminal-inventory-list { display: grid; gap: 8px; max-height: 500px; overflow: auto; }
.terminal-inventory-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.terminal-inventory-row strong,
.terminal-inventory-row small { display: block; overflow: hidden; text-overflow: ellipsis; }
.terminal-inventory-row small { color: #6c7888; margin-top: 3px; }
.terminal-inventory-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.terminal-inventory-actions button { min-height: 30px; padding: 5px 8px; font-size: 12px; }
.terminal-saved { border-color: #35a774; box-shadow: inset 3px 0 #35a774; }

@media (max-width: 980px) {
  .company-token-manager,
  .terminal-company-picker,
  .terminal-inventory-grid { grid-template-columns: 1fr; }
  .terminal-inventory-heading span { text-align: left; }
}
.operator-call-dialog{width:min(780px,calc(100% - 24px));border:0;border-radius:18px;padding:0;background:#10151c;color:#fff;box-shadow:0 28px 90px #0009}.operator-call-dialog::backdrop{background:#10151ccc;backdrop-filter:blur(4px)}.operator-call-dialog>section{padding:16px}.operator-call-dialog header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:12px}.operator-call-dialog header div{display:grid;gap:4px}.operator-call-dialog header small{color:#cbd5e1}.operator-call-dialog header button{background:#b53a3a}.operator-call-videos{position:relative;min-height:260px;background:#05080c;border-radius:13px;overflow:hidden}.operator-call-videos video:first-child{width:100%;height:min(62vh,480px);object-fit:contain}.operator-call-videos video:last-child{position:absolute;right:12px;bottom:12px;width:min(28%,170px);height:120px;object-fit:cover;border:2px solid #fff;border-radius:10px;background:#222}.operator-call-dialog.voice-only .operator-call-videos{min-height:110px;background:linear-gradient(135deg,#152333,#28445d)}.operator-call-dialog.voice-only video{opacity:0;height:110px!important}#operatorAcceptCallButton{width:100%;margin-top:12px}
