/* ===========================================================
   iLiberty Support Center — design system
   Tokens espelhados do UniConecta (marca iLiberty)
   =========================================================== */
:root {
  --brand-dark: #002b49;
  --brand-light: #00b6d6;
  --brand-primary: #00bf9a;
  --primary-hover: #059669;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --nav-active: #eff6ff;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 50px rgb(2 20 40 / 0.22);
  --header-h: 4rem;
  --header-offset: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  --ai-grad: linear-gradient(120deg, #00b6d6, #00bf9a);
}
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
img, svg {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
input, textarea, select {
  font: inherit;
}
html {
  line-height: 1.5;
  color: var(--text);
  height: 100%;
  font-family:
    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
.app-body {
  margin: 0;
  height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.material-icons {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}
.material-icons.filled {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* ---------- Shell / header (layout UniConecta) ---------- */
.app-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}
.app-top-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-offset);
  padding-top: env(safe-area-inset-top, 0);
  background: var(--brand-dark);
  color: #fff;
  border-bottom: 1px solid rgb(55 65 81);
}
.app-top-header-inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  height: 100%;
  padding: 0 0.75rem;
  gap: 0.5rem;
}
.app-top-header-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.app-header-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin-left: -0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
}
.app-header-menu-btn:hover {
  background: rgb(255 255 255 / 0.1);
}
@media (min-width: 901px) {
  .app-header-menu-btn {
    display: none;
  }
}
.app-header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}
.app-header-logo {
  height: 2.1rem;
  width: auto;
}
.app-header-divider {
  width: 1px;
  height: 1.6rem;
  background: rgb(255 255 255 / 0.25);
}
.app-header-wordmark {
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.app-header-wordmark b {
  font-weight: 700;
  color: var(--brand-light);
}
.app-top-header-center {
  display: flex;
  justify-content: center;
  min-width: 0;
}
.app-top-header-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.app-header-tool-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.45rem;
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.08);
  color: #f1f5f9;
  transition: background 0.15s ease;
}
.app-header-tool-btn:hover {
  background: rgb(255 255 255 / 0.16);
}
.app-header-tool-btn .material-icons {
  font-size: 1.2rem;
}
.app-header-search-kbd {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.75;
}
.app-header-tool-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  min-width: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: var(--error);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
  border: 2px solid var(--brand-dark);
}
.app-header-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.25);
  background: var(--ai-grad);
  color: #00263f;
  font-weight: 700;
  font-size: 0.8rem;
}

/* header auth (SupabaseAuthControls) */
.app-header-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.app-header-auth--muted {
  opacity: 0.85;
}
.app-header-auth-user {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: min(14rem, 34vw);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgb(241 245 249 / 0.95);
}
.app-header-auth-user .material-icons {
  font-size: 1.35rem;
  opacity: 0.9;
  flex-shrink: 0;
}
.app-header-auth-user-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-header-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(255 255 255 / 0.08);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s ease;
}
.app-header-auth-btn .material-icons {
  font-size: 1rem;
}
.app-header-auth-btn:hover {
  background: rgb(255 255 255 / 0.16);
}
.app-header-auth-btn--accent {
  background: #fff;
  color: var(--brand-dark);
  border-color: transparent;
}
.app-header-auth-btn--accent:hover {
  background: #f1f5f9;
}
.app-header-auth-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgb(255 255 255 / 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.app-header-auth-btn--accent .app-header-auth-spinner {
  border-color: rgb(0 43 73 / 0.15);
  border-top-color: var(--brand-dark);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* persona switch */
.persona-switch {
  display: inline-flex;
  background: rgb(255 255 255 / 0.09);
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 9999px;
  padding: 0.18rem;
  gap: 0.18rem;
}
.persona-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: rgb(226 232 240 / 0.8);
  padding: 0.32rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.persona-btn .material-icons {
  font-size: 1.05rem;
}
.persona-btn.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}

/* ---------- Sidebar ---------- */
.app-below-header {
  display: flex;
  flex: 1;
  min-height: 0;
  padding-top: var(--header-offset);
}
.app-sidebar {
  width: 15.5rem;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.app-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 0.9rem 0.7rem;
}
.app-sidebar-drawer-head {
  display: none;
}
.app-sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.side-section {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0.9rem 0.55rem 0.3rem;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.12s ease;
}
.side-link .material-icons {
  font-size: 1.2rem;
  color: var(--text-muted);
}
.side-link:hover {
  background: #f1f5f9;
}
.side-link.active {
  background: var(--nav-active);
  color: var(--brand-dark);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand-primary);
}
.side-link.active .material-icons {
  color: var(--brand-primary);
}
.side-link .count {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  background: #e2e8f0;
  border-radius: 9999px;
  padding: 0.05rem 0.45rem;
  color: var(--text-muted);
}
.side-link .count.hot {
  background: #fee2e2;
  color: #b91c1c;
}
.app-sidebar-footer {
  padding: 0.8rem 0.55rem 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.app-nav-backdrop {
  display: none;
}

/* ---------- Main ---------- */
.app-main-wrap {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.view {
  width: 100%;
  padding: 1.5rem 1.75rem 5rem;
  animation: view-in 0.32s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.view-head-main {
  min-width: 0;
  flex: 1;
}
.view-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.view-head h1,
.view-title {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
  line-height: 1.2;
}
.view-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
  max-width: 38rem;
  line-height: 1.45;
}
.view-head p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  text-decoration: none;
}
.crumbs a .material-icons {
  font-size: 0.95rem;
}
.crumbs a:hover {
  color: var(--brand-primary);
}
.crumbs-current {
  font-weight: 600;
  color: var(--brand-dark);
}
.view-head--detail {
  margin-bottom: 1rem;
}
.ticket-chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.sla-risk-icon {
  font-size: 0.95rem;
  vertical-align: -0.15em;
  margin-right: 0.2rem;
}

/* stagger de cards */
.stagger > * {
  animation: view-in 0.4s cubic-bezier(0.2, 0.8, 0.25, 1) backwards;
}
.stagger > *:nth-child(2) {
  animation-delay: 0.05s;
}
.stagger > *:nth-child(3) {
  animation-delay: 0.1s;
}
.stagger > *:nth-child(4) {
  animation-delay: 0.15s;
}
.stagger > *:nth-child(5) {
  animation-delay: 0.2s;
}
.stagger > *:nth-child(6) {
  animation-delay: 0.25s;
}

/* ---------- Components ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad {
  padding: 1.1rem 1.2rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn .material-icons {
  font-size: 1.1rem;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.btn-ai {
  background: var(--ai-grad);
  color: #fff;
}
.btn-ai:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}
.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.14rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
}
.chip .material-icons {
  font-size: 0.85rem;
}
.chip-open {
  background: #dbeafe;
  color: #1d4ed8;
}
.chip-progress {
  background: #fef3c7;
  color: #b45309;
}
.chip-waiting {
  background: #ede9fe;
  color: #6d28d9;
}
.chip-done {
  background: #d1fae5;
  color: #047857;
}
.chip-cancel {
  background: #f1f5f9;
  color: #64748b;
}
.chip-crit {
  background: #fee2e2;
  color: #b91c1c;
}
.chip-high {
  background: #ffedd5;
  color: #c2410c;
}
.chip-med {
  background: #fef9c3;
  color: #a16207;
}
.chip-low {
  background: #e2e8f0;
  color: #475569;
}
.chip-ai {
  background: linear-gradient(120deg, #e0f7fb, #dcfce8);
  color: #0e7490;
  border: 1px solid #a5e8ef;
}
.chip-cat {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border);
}

/* AI shimmer / typing */
.ai-glow {
  position: relative;
}
.ai-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--ai-grad);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.typing {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem 0;
}
.typing i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--brand-light);
  animation: bounce 1s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes bounce {
  0%, 60%, 100% {
    transform: none;
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* stat tiles */
.stat {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat .lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.stat .val {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-dark);
}
.stat .delta {
  font-size: 0.72rem;
  font-weight: 600;
}
.delta.up {
  color: var(--success);
}
.delta.down {
  color: var(--error);
}

/* enhanced stat tiles (agent cockpit) */
.agent-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.stat-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  position: relative;
}
.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.stat-tile__icon {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  color: var(--brand-dark);
}
.stat-tile__icon .material-icons {
  font-size: 1.35rem;
}
.stat-tile--danger .stat-tile__icon {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #b91c1c;
}
.stat-tile--success .stat-tile__icon {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #047857;
}
.stat-tile--info .stat-tile__icon {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
}
.stat-tile--warning .stat-tile__icon {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #b45309;
}
.stat-tile__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.stat-tile__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.stat-tile__value {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-dark);
  line-height: 1.1;
}
.stat-tile--danger .stat-tile__value {
  color: var(--error);
}
.stat-tile--success .stat-tile__value {
  color: #047857;
}
.stat-tile__hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.stat-tile--interactive {
  width: 100%;
  min-width: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stat-tile--interactive:hover,
.stat-tile--interactive:focus-visible,
.stat-tile--interactive.is-selected {
  border-color: rgba(0, 191, 154, 0.55);
}
.stat-tile--interactive.is-selected {
  transform: translateY(-2px);
  background: linear-gradient(145deg, #ffffff, #f0fdfa);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.18), var(--shadow-md);
}
.stat-tile--interactive:focus-visible {
  outline: 3px solid rgba(0, 191, 154, 0.18);
  outline-offset: 2px;
}
.stat-tile__drill-icon {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  font-size: 0.95rem;
  color: #94a3b8;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.18s, transform 0.18s, color 0.18s;
}
.stat-tile--interactive:hover .stat-tile__drill-icon,
.stat-tile--interactive:focus-visible .stat-tile__drill-icon,
.stat-tile--interactive.is-selected .stat-tile__drill-icon {
  opacity: 1;
  transform: translate(0, 0);
  color: #009f83;
}

.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
}
.presence-badge__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgb(16 185 129 / 0.25);
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  50% {
    box-shadow: 0 0 0 5px rgb(16 185 129 / 0.12);
  }
}

.agent-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(16rem, 1fr);
  gap: 1rem;
  align-items: start;
}
.agent-workspace__main,
.agent-workspace__aside {
  min-width: 0;
}
.agent-workspace__aside {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.card--flush {
  overflow: hidden;
}
.card--flush:has(.empty-state) {
  min-height: 14rem;
}
.card--flush .empty-state {
  width: 100%;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem;
}
.panel-card--muted {
  background: linear-gradient(180deg, #fafbfd, #fff);
}
.panel-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.panel-card__head > .material-icons {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #e0f7fb, #dcfce8);
  color: #0e7490;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.panel-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0;
}
.panel-card__subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0.12rem 0 0;
}
.panel-card__empty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.panel-card__empty .material-icons {
  font-size: 1rem;
  opacity: 0.75;
}

.focus-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
}
.focus-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.4;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}
.focus-list .material-icons {
  font-size: 1rem;
  color: var(--brand-primary);
  margin-top: 0.05rem;
  flex-shrink: 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.2rem 1.25rem;
  gap: 0.55rem;
}
.empty-state__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #047857;
  margin-bottom: 0.25rem;
}
.empty-state__icon .material-icons {
  font-size: 1.75rem;
}
.empty-state__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.empty-state__text {
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 22rem;
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.section-title--icon h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.section-title--icon h2 .material-icons {
  font-size: 1.15rem;
  color: var(--brand-primary);
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--brand-light);
  text-decoration: none;
  font-weight: 600;
}
.section-link .material-icons {
  font-size: 1rem;
  transition: transform 0.15s ease;
}
.section-link:hover .material-icons {
  transform: translateX(2px);
}

.lia-chip.macro {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.lia-chip.macro .material-icons {
  font-size: 0.95rem;
  opacity: 0.85;
}

.org-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  max-width: min(16rem, 42vw);
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}
.org-switcher-wrap:focus-within {
  outline: 2px solid var(--brand-light);
  outline-offset: 1px;
}
.org-switcher-icon {
  font-size: 1.05rem !important;
  opacity: 0.85;
  flex-shrink: 0;
}
.org-switcher-name {
  font-size: 0.82rem;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-switcher-caret {
  font-size: 1rem !important;
  opacity: 0.8;
  flex-shrink: 0;
}
.org-switcher--overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
  max-width: none;
  background: none;
}
.org-switcher-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.org-switcher-label .material-icons {
  font-size: 1.05rem;
  opacity: 0.85;
}

/* ticket rows */
.trow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
  cursor: pointer;
}
.trow:last-child {
  border-bottom: 0;
}
.trow:hover {
  background: #f8fafc;
}
.trow .tico {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trow .tmain {
  min-width: 0;
}
.trow .ttitle {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trow .tmeta {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.25rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--text-muted);
}
.trow .tright {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}
.sla {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}
.sla .material-icons {
  font-size: 0.85rem;
}
.sla.risk {
  color: var(--error);
}
.trow-chevron {
  color: var(--text-muted);
  opacity: 0.35;
  font-size: 1.2rem !important;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.trow:hover .trow-chevron {
  opacity: 1;
  color: var(--brand-primary);
  transform: translateX(2px);
}

/* catálogo */
.svc {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  cursor: pointer;
}
.svc:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-light);
}
.svc .sico {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.svc h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.svc p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.svc-detail-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* status page */
.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.status-line:last-child {
  border-bottom: 0;
}
.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}
.dot.ok {
  background: var(--success);
  box-shadow: 0 0 0 3px #d1fae5;
}
.dot.warn {
  background: var(--warning);
  box-shadow: 0 0 0 3px #fef3c7;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px rgb(245 158 11 / 0.15);
  }
}

/* ---------- Ticket detail ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  gap: 1rem;
  align-items: start;
}
.stepper {
  display: flex;
  gap: 0;
  margin: 1rem 0;
}
.step {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.step::before {
  content: "";
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #e2e8f0;
  margin: 0 auto 0.3rem;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.step::after {
  content: "";
  position: absolute;
  top: 0.42rem;
  left: calc(50% + 0.6rem);
  right: calc(-50% + 0.6rem);
  height: 2px;
  background: #e2e8f0;
}
.step:last-child::after {
  display: none;
}
.step.done {
  color: var(--brand-primary);
}
.step.done::before {
  background: var(--brand-primary);
  box-shadow: 0 0 0 1px var(--brand-primary);
}
.step.done::after {
  background: var(--brand-primary);
}
.step.now {
  color: var(--brand-dark);
}
.step.now::before {
  background: #fff;
  box-shadow: 0 0 0 2px var(--brand-primary);
}

.msg {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.msg .mavatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.msg .mbody {
  background: #f1f5f9;
  border-radius: 0 12px 12px 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.875rem;
  max-width: 85%;
}
.msg .mwho {
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--brand-dark);
}
.msg .mtime {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.msg.me {
  flex-direction: row-reverse;
}
.msg.me .mbody {
  background: #e6f7f3;
  border-radius: 12px 0 12px 12px;
}
.msg.ai .mbody {
  background: linear-gradient(120deg, #eefcff, #edfdf5);
  border: 1px solid #c9f0ea;
}
.composer {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.composer textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.875rem;
  resize: vertical;
  min-height: 2.8rem;
}
.composer textarea:focus {
  outline: 2px solid var(--brand-light);
  outline-offset: -1px;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(52vh, 28rem);
  overflow-y: auto;
  padding: 0.25rem 0.15rem 0.75rem;
  margin-bottom: 0.25rem;
  scroll-behavior: smooth;
}
.chat-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-size: 0.85rem;
}
.chat-empty .material-icons {
  font-size: 2rem;
  opacity: 0.45;
  display: block;
  margin: 0 auto 0.5rem;
}
.msg-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}
.msg.pending .mbody {
  opacity: 0.85;
}
.chat-sending {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.typing-dots {
  display: inline-flex;
  gap: 0.15rem;
}
.typing-dots i {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: var(--text-muted);
  animation: lia-dot 1.2s infinite ease-in-out;
}
.typing-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes lia-dot {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}
.chat-composer-wrap {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.composer-ai-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.composer-ai-hint {
  font-size: 0.72rem;
  color: #0e7490;
  margin-left: auto;
}
.composer-error {
  font-size: 0.78rem;
  color: var(--error);
  margin: 0 0 0.45rem;
}

.side-block {
  padding: 0.9rem 1rem;
}
.side-block-actions {
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}
.side-block h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 0.28rem 0;
}
.kv b {
  font-weight: 600;
  text-align: right;
}

/* ---------- Wizard novo chamado ---------- */
.wizard {
  max-width: 56rem;
}
.aibox {
  border-radius: var(--radius);
  background: linear-gradient(140deg, #f0fdff, #f0fdf6);
  border: 1px solid #bfeeea;
  padding: 1rem 1.1rem;
}
.aibox h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #0e7490;
  margin-bottom: 0.5rem;
}
.kb-hit {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.kb-hit:hover {
  border-color: var(--brand-light);
}
.kb-hit .material-icons {
  color: var(--brand-light);
  font-size: 1.1rem;
  margin-top: 0.1rem;
}
.kb-hit small {
  color: var(--text-muted);
  display: block;
}
.field {
  margin-bottom: 0.9rem;
}
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--brand-dark);
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--brand-light);
  outline-offset: -1px;
}

/* ---------- Kanban ---------- */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 17rem;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.kcol {
  background: #f1f5f9;
  border-radius: var(--radius);
  padding: 0.6rem;
}
.kcol-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.35rem 0.6rem;
  color: var(--brand-dark);
}
.kcard {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.55rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.15s;
}
.kcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.kcard .kt {
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.3rem 0;
}
.kcard .kfoot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
}
.mini-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* triage */
.triage-score {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
}
.ts-hi {
  background: #fee2e2;
  color: #b91c1c;
}
.ts-md {
  background: #fef3c7;
  color: #b45309;
}
.ts-lo {
  background: #e2e8f0;
  color: #475569;
}

/* charts */
.bar-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  padding: 0.3rem 0;
}
.bar-track {
  height: 0.55rem;
  background: #eef2f7;
  border-radius: 9999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--ai-grad);
  animation: grow 1s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes grow {
  from {
    width: 0 !important;
  }
}

/* ---------- Lia (assistente flutuante) ---------- */
.lia-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 70;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 0;
  background: var(--ai-grad);
  color: #fff;
  box-shadow: 0 10px 30px rgb(0 182 214 / 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  animation: fab-in 0.5s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.lia-fab:hover {
  transform: scale(1.08) rotate(8deg);
}
@keyframes fab-in {
  from {
    transform: scale(0);
  }
}
.lia-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.4rem;
  z-index: 71;
  width: min(24rem, calc(100vw - 2rem));
  height: min(31rem, 70dvh);
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}
.lia-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--brand-dark);
  color: #fff;
}
.lia-head-id {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.lia-head small {
  opacity: 0.7;
  font-size: 0.68rem;
  display: block;
}
.lia-orb {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--ai-grad);
  box-shadow: 0 0 12px rgb(0 191 154 / 0.8);
  animation: orb 2.4s infinite;
}
@keyframes orb {
  50% {
    box-shadow: 0 0 20px rgb(0 182 214 / 0.9);
  }
}
.lia-close {
  background: transparent;
  border: 0;
  color: #fff;
  opacity: 0.8;
}
.lia-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: #f8fafc;
}
.lia-bub {
  max-width: 88%;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-size: 0.84rem;
  animation: view-in 0.25s ease;
}
.lia-bub.bot {
  background: #fff;
  border: 1px solid var(--border);
  border-top-left-radius: 3px;
  align-self: flex-start;
}
.lia-bub.user {
  background: var(--brand-dark);
  color: #fff;
  border-top-right-radius: 3px;
  align-self: flex-end;
}
.lia-bub .lia-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.lia-chip {
  border: 1px solid var(--brand-light);
  color: #0e7490;
  background: #f0fbfd;
  border-radius: 9999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 600;
  transition: all 0.15s;
}
.lia-chip:hover {
  background: var(--brand-light);
  color: #fff;
}
.lia-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
.lia-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.85rem;
}
.lia-input input:focus {
  outline: 2px solid var(--brand-light);
  outline-offset: -1px;
}
.lia-input button {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 0;
  background: var(--brand-primary);
  color: #fff;
}

/* toasts */
.toast-stack {
  position: fixed;
  top: calc(var(--header-offset) + 0.8rem);
  right: 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--brand-dark);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
  max-width: 22rem;
}
.toast .material-icons {
  color: var(--brand-primary);
  font-size: 1.1rem;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* palette */
.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgb(2 20 40 / 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  padding-top: 12vh;
}
.palette {
  width: min(36rem, calc(100vw - 2rem));
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  height: fit-content;
  animation: pop 0.2s ease;
}
.palette-input {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.palette-input input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 1rem;
}
.palette-input kbd {
  font-size: 0.65rem;
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--text-muted);
}
.palette-results {
  max-height: 20rem;
  overflow-y: auto;
  padding: 0.4rem;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}
.palette-item:hover,
.palette-item.is-active {
  background: var(--nav-active);
}
.palette-item .material-icons {
  color: var(--text-muted);
  font-size: 1.1rem;
}
.palette-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.palette-item-hint {
  color: var(--text-muted);
  font-size: 0.7rem;
  flex-shrink: 0;
}
.palette-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.lia-typing {
  color: var(--text-muted);
  font-style: italic;
}
.ai-actions {
  display: grid;
  gap: 0.45rem;
}
.ai-actions__result {
  margin-top: 0.35rem;
}
.ai-actions__result .md {
  font-size: 0.82rem;
}

/* Markdown-lite (saída da IA) */
.md {
  display: grid;
  gap: 0.5rem;
  line-height: 1.5;
  min-width: 0;
}
.md p {
  margin: 0;
}
.md .md-h {
  font-weight: 700;
  color: var(--brand-dark);
}
.md ul,
.md ol {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.3rem;
}
.md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: rgb(2 43 73 / 0.07);
  border-radius: 4px;
  padding: 0.08em 0.35em;
}
.lia-bub.bot .md {
  gap: 0.4rem;
}

/* mobile tabbar */
.mobile-tabbar {
  display: none;
}

/* hero (client home) */
.hero {
  background:
    radial-gradient(
      120% 160% at 85% -20%,
      rgb(0 182 214 / 0.35),
      transparent 55%
    ),
    var(--brand-dark);
  color: #fff;
  border-radius: 16px;
  padding: 1.8rem 1.6rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero p {
  color: rgb(226 232 240 / 0.8);
  font-size: 0.9rem;
  margin: 0.3rem 0 1rem;
}
.hero-search {
  display: flex;
  gap: 0.5rem;
  max-width: 34rem;
}
.hero-search input {
  flex: 1;
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  border-radius: 9999px;
  padding: 0.7rem 1.1rem;
  font-size: 0.9rem;
}
.hero-search input::placeholder {
  color: rgb(226 232 240 / 0.6);
}
.hero-search input:focus {
  outline: 2px solid var(--brand-light);
  background: rgb(255 255 255 / 0.16);
}
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}
.quick-chips button {
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.18);
  color: #e2e8f0;
  border-radius: 9999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 600;
}
.quick-chips button:hover {
  background: rgb(255 255 255 / 0.2);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.4rem 0 0.7rem;
}
.section-title h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.section-title a {
  font-size: 0.8rem;
  color: var(--brand-light);
  text-decoration: none;
  font-weight: 600;
}

/* ============ MOBILE-FIRST RESHAPE ============ */
@media (max-width: 900px) {
  :root {
    --header-h: 3.5rem;
  }
  .app-header-wordmark {
    display: none;
  }
  .app-header-divider {
    display: none;
  }
  .app-header-search-kbd {
    display: none;
  }
  .persona-btn span:last-child {
    display: none;
  }
  .persona-btn {
    padding: 0.32rem 0.6rem;
  }
  .app-header-logo {
    height: 1.8rem;
  }

  /* sidebar becomes drawer */
  .app-sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(18rem, 84vw);
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
    box-shadow: var(--shadow-lg);
    padding-top: env(safe-area-inset-top, 0);
  }
  #app-nav-toggle:checked ~ .app-below-header .app-sidebar {
    transform: none;
  }
  .app-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgb(2 20 40 / 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }
  #app-nav-toggle:checked ~ .app-below-header .app-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .app-sidebar-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.55rem 0.8rem;
    font-weight: 700;
    color: var(--brand-dark);
  }
  .app-sidebar-drawer-close {
    display: flex;
    padding: 0.3rem;
    cursor: pointer;
  }

  .view {
    padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .view-head h1,
  .view-title {
    font-size: 1.15rem;
  }
  .view-subtitle {
    font-size: 0.84rem;
  }
  .view-head-actions {
    width: 100%;
  }
  .presence-badge {
    width: 100%;
    justify-content: center;
  }
  .agent-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .agent-workspace {
    grid-template-columns: 1fr;
  }
  .stat-tile {
    padding: 0.85rem;
    gap: 0.65rem;
  }
  .stat-tile__hint {
    display: none;
  }
  .hero {
    padding: 1.3rem 1.1rem;
    border-radius: 14px;
  }
  .hero h1 {
    font-size: 1.2rem;
  }
  .trow {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.75rem 0.85rem;
  }
  .trow-chevron {
    display: none;
  }
  .trow .tright {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    padding-left: calc(2.4rem + 0.8rem);
  }
  .bar-row {
    grid-template-columns: 6.4rem 1fr auto;
  }
  .board {
    grid-auto-columns: 15.5rem;
  }

  /* bottom tab bar */
  .mobile-tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 65;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgb(2 20 40 / 0.08);
  }
  .mtab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.3rem 0;
    border-radius: 8px;
    transition: color 0.15s;
  }
  .mtab .material-icons {
    font-size: 1.35rem;
  }
  .mtab.active {
    color: var(--brand-primary);
  }
  .mtab.cta .material-icons {
    background: var(--ai-grad);
    color: #fff;
    border-radius: 50%;
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -1.2rem;
    box-shadow: 0 6px 18px rgb(0 191 154 / 0.5);
  }
  .lia-fab {
    bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px));
    width: 3rem;
    height: 3rem;
    right: 1rem;
  }
  .lia-panel {
    bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
    height: min(26rem, 62dvh);
  }
  .toast-stack {
    left: 1rem;
  }
}
@media (max-width: 700px) {
  .app-header-auth-user-label {
    display: none;
  }
}
@media (max-width: 480px) {
  .grid-4, .grid-3, .agent-kpi-grid {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero-search {
    flex-direction: column;
  }
}

/* ---------- Login ---------- */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--bg);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.login-screen[hidden] {
  display: none !important;
}
.login-screen.out {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}
.login-brand {
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: center;
  background:
    radial-gradient(
      110% 150% at 90% -10%,
      rgb(0 182 214 / 0.4),
      transparent 55%
    ),
    radial-gradient(
    120% 120% at -10% 110%,
    rgb(0 191 154 / 0.3),
    transparent 50%
  ),
    var(--brand-dark);
}
.login-orbs i {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: drift 14s ease-in-out infinite alternate;
}
.login-orbs i:nth-child(1) {
  width: 22rem;
  height: 22rem;
  background: #00b6d6;
  top: -6rem;
  right: -4rem;
}
.login-orbs i:nth-child(2) {
  width: 18rem;
  height: 18rem;
  background: #00bf9a;
  bottom: -5rem;
  left: -4rem;
  animation-delay: -5s;
}
.login-orbs i:nth-child(3) {
  width: 10rem;
  height: 10rem;
  background: #6366f1;
  top: 45%;
  left: 55%;
  animation-delay: -9s;
  opacity: 0.3;
}
@keyframes drift {
  to {
    transform: translate(3rem, -2.5rem) scale(1.15);
  }
}
.login-brand-inner {
  position: relative;
  padding: 3.5rem 4rem;
  max-width: 34rem;
  animation: view-in 0.7s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.login-logo {
  height: 3rem;
  width: auto;
  margin-bottom: 1.6rem;
}
.login-brand h1 {
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.login-brand h1 b {
  font-weight: 800;
  color: var(--brand-light);
}
.login-tag {
  margin: 0.8rem 0 1.8rem;
  color: rgb(226 232 240 / 0.85);
  font-size: 1rem;
  line-height: 1.65;
}
.login-feats {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}
.login-feats li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: rgb(226 232 240 / 0.9);
  animation: view-in 0.6s cubic-bezier(0.2, 0.8, 0.25, 1) backwards;
}
.login-feats li:nth-child(1) {
  animation-delay: 0.25s;
}
.login-feats li:nth-child(2) {
  animation-delay: 0.4s;
}
.login-feats li:nth-child(3) {
  animation-delay: 0.55s;
}
.login-feats .material-icons {
  font-size: 1.05rem;
  color: #fff;
  background: var(--ai-grad);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.login-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 1rem;
}
.login-card {
  width: min(26rem, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 2.2rem 2.2rem 1.8rem;
  animation: pop 0.5s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.login-card-logo {
  height: 2.1rem;
  width: auto;
  margin: 0 auto 1.2rem;
}
.login-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
  text-align: center;
}
.login-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.25rem 0 1.3rem;
}
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.25rem;
  gap: 0.25rem;
  margin-bottom: 1.3rem;
}
.login-tab {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.18s;
}
.login-tab.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}
.login-form {
  animation: view-in 0.3s ease;
}
.login-pass {
  position: relative;
}
.login-pass input {
  padding-right: 2.8rem;
}
.login-eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0.3rem;
  border-radius: 6px;
}
.login-eye:hover {
  color: var(--brand-dark);
}
.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.2rem 0 1.1rem;
  font-size: 0.78rem;
}
.login-check {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--text-muted);
}
.login-check input {
  accent-color: var(--brand-primary);
}
.login-link {
  color: var(--brand-light);
  text-decoration: none;
  font-weight: 600;
}
.login-link:hover {
  text-decoration: underline;
}
.login-cta {
  width: 100%;
  justify-content: center;
  padding: 0.7rem;
  font-size: 0.92rem;
}
.login-sso-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.1rem;
  line-height: 1.55;
}
.login-ms {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 1px solid #8c8c8c;
  background: #fff;
  color: #5e5e5e;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.18s;
}
.login-ms:hover {
  background: #f8fafc;
  border-color: var(--brand-dark);
  color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.login-ms.busy {
  pointer-events: none;
  opacity: 0.7;
}
.login-sso-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.9rem;
}
.login-sso-note .material-icons {
  font-size: 0.95rem;
  color: var(--brand-primary);
}
.login-foot {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1.4rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.login-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.login-shake {
  animation: shake 0.4s;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shake {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .login-brand {
    min-height: 34dvh;
    align-items: flex-end;
  }
  .login-brand-inner {
    padding: 1.6rem 1.4rem;
  }
  .login-logo {
    height: 2.2rem;
    margin-bottom: 0.8rem;
  }
  .login-brand h1 {
    font-size: 1.5rem;
  }
  .login-tag {
    font-size: 0.85rem;
    margin: 0.5rem 0 0.9rem;
  }
  .login-feats {
    display: none;
  }
  .login-side {
    margin-top: -1.4rem;
    padding: 0 1rem 2rem;
  }
  .login-card {
    border-radius: 18px;
    padding: 1.6rem 1.4rem 1.3rem;
  }
}

/* ---------- Dashboard interativo ---------- */
.chart-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.chart-title .material-icons {
  font-size: 1.05rem;
  color: var(--brand-primary);
}
.chart-title small {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}
.chart-wrap {
  position: relative;
}
.chart-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 1.6s cubic-bezier(0.3, 0.7, 0.3, 1) forwards 0.15s;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
.chart-area {
  opacity: 0;
  animation: fade-in 0.8s ease forwards 1s;
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}
.chart-dot {
  opacity: 0;
  animation: dot-in 0.35s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
  transition: r 0.15s ease;
  cursor: pointer;
}
@keyframes dot-in {
  from {
    opacity: 0;
    r: 0;
  }
  to {
    opacity: 1;
  }
}
.chart-dot.hot {
  r: 7;
  filter: drop-shadow(0 2px 6px rgb(0 182 214 / 0.6));
}
.chart-tip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--brand-dark);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  font-size: 0.72rem;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 5;
  text-align: center;
  line-height: 1.35;
}
.chart-tip b {
  display: block;
  color: var(--brand-light);
  font-size: 0.66rem;
}
.chart-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--brand-dark);
}
.bar-row {
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  transition: background 0.15s;
  cursor: default;
}
.bar-row.hot {
  background: #f0fbfd;
}
.bar-row.hot .bar-fill {
  filter: brightness(1.12);
  box-shadow: 0 0 8px rgb(0 191 154 / 0.5);
}
.bar-fill {
  transition: filter 0.2s, box-shadow 0.2s;
}

.donut-flex {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.donut {
  width: 8.5rem;
  flex-shrink: 0;
}
.donut-seg {
  transition: opacity 0.25s, stroke-width 0.25s;
  cursor: pointer;
  stroke-dashoffset: 0;
  animation: donut-in 1.1s cubic-bezier(0.3, 0.7, 0.3, 1) backwards 0.3s;
}
@keyframes donut-in {
  from {
    stroke-dasharray: 0 264;
  }
}
.donut-seg.dim {
  opacity: 0.22;
}
.donut-seg:hover {
  stroke-width: 17;
}
.donut-big {
  font-size: 1.35rem;
  font-weight: 800;
  fill: var(--brand-dark);
  font-family: inherit;
}
.donut-small {
  font-size: 0.6rem;
  fill: var(--text-muted);
  font-family: inherit;
}
.donut-legend {
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
}
.donut-key {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.donut-key.hot {
  background: #f0fbfd;
}
.donut-key i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
}
.donut-key b {
  margin-left: auto;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--error);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.live-pill i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--error);
  animation: blink 1.4s infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.live-feed {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 9rem;
}
.live-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  padding: 0.5rem 0.65rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  animation: feed-in 0.45s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}
.live-item .material-icons {
  font-size: 1.05rem;
  color: var(--brand-primary);
}
.live-item small {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

/* Dashboard drilldowns: one interaction language for metrics, charts and feed. */
.dashboard-data-row {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}
.bar-row.dashboard-data-row {
  grid-template-columns: 8.5rem minmax(3rem, 1fr) auto 1.15rem;
  cursor: pointer;
}
.dashboard-data-row:hover,
.dashboard-data-row:focus-visible,
.dashboard-data-row.is-selected {
  background: #f0fdfa;
  outline: none;
}
.dashboard-data-row.is-selected {
  color: #007d69;
  box-shadow: inset 3px 0 0 #00bf9a, inset 0 0 0 1px rgba(0, 191, 154, 0.2);
}
.dashboard-data-row:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(0, 191, 154, 0.35);
}
.dashboard-data-row__arrow {
  margin-left: 0.15rem;
  font-size: 1rem !important;
  color: #94a3b8 !important;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}
.dashboard-data-row:hover .dashboard-data-row__arrow,
.dashboard-data-row:focus-visible .dashboard-data-row__arrow,
.dashboard-data-row.is-selected .dashboard-data-row__arrow {
  opacity: 1;
  transform: translateX(0);
  color: #009f83 !important;
}
.donut-key.dashboard-data-row {
  background-color: transparent;
  cursor: pointer;
}
.donut-key.dashboard-data-row:hover,
.donut-key.dashboard-data-row:focus-visible {
  background: #f0fdfa;
}
.live-item.dashboard-data-row {
  cursor: pointer;
}
.live-item.dashboard-data-row:hover,
.live-item.dashboard-data-row:focus-visible {
  border-color: rgba(0, 191, 154, 0.35);
  background: #f0fdfa;
}
.dashboard-sheet-open {
  overflow: hidden;
}
.dashboard-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
}
.dashboard-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 30, 50, 0.42);
  backdrop-filter: blur(3px);
  animation: dashboard-backdrop-in 0.22s ease-out;
}
.dashboard-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(39rem, calc(100vw - 2rem));
  height: 100%;
  padding: 1.5rem;
  overflow: hidden;
  background: #fff;
  box-shadow: -20px 0 60px rgba(0, 43, 73, 0.2);
  animation: dashboard-sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes dashboard-backdrop-in {
  from {
    opacity: 0;
  }
}
@keyframes dashboard-sheet-in {
  from {
    transform: translateX(100%);
  }
}
.dashboard-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.dashboard-sheet__heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.dashboard-sheet__icon {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  flex: 0 0 auto;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #00bf9a, #00a8cf);
  box-shadow: 0 8px 22px rgba(0, 191, 154, 0.23);
}
.dashboard-sheet__eyebrow {
  display: block;
  margin-bottom: 0.18rem;
  color: #008f78;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dashboard-sheet h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.35rem;
  line-height: 1.2;
}
.dashboard-sheet__close {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}
.dashboard-sheet__close:hover,
.dashboard-sheet__close:focus-visible {
  border-color: #94a3b8;
  background: #f8fafc;
  outline: 3px solid rgba(0, 191, 154, 0.15);
}
.dashboard-sheet__description {
  margin: 1rem 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.55;
}
.dashboard-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid #e2e8f0;
}
.dashboard-sheet__action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dbe5ed;
  border-radius: 9px;
  color: #334155;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
}
.dashboard-sheet__action .material-icons {
  font-size: 1rem;
}
.dashboard-sheet__action:hover {
  border-color: #00bf9a;
  color: #007d69;
}
.dashboard-sheet__action.is-primary {
  border-color: transparent;
  color: #fff;
  background: var(--brand-dark);
  box-shadow: 0 6px 16px rgba(0, 43, 73, 0.16);
}
.dashboard-sheet__action.is-primary:hover {
  color: #fff;
  filter: brightness(1.15);
}
.dashboard-sheet__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 1rem 0 0.7rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 650;
}
.dashboard-sheet__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.65rem;
  height: 1.65rem;
  margin-right: 0.45rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  color: #007d69;
  background: #ccfbf1;
  font-weight: 850;
}
.dashboard-sheet__search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 12rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}
.dashboard-sheet__search:focus-within {
  border-color: #00bf9a;
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.12);
}
.dashboard-sheet__search .material-icons {
  font-size: 1rem;
  color: #94a3b8;
}
.dashboard-sheet__search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #334155;
  background: transparent;
  font: inherit;
}
.dashboard-sheet__tickets {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  padding: 0.15rem 0.15rem 2rem;
  overflow: auto;
}
.dashboard-ticket {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 0.65rem;
  row-gap: 0.28rem;
  padding: 0.85rem 2.7rem 0.85rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.dashboard-ticket:hover,
.dashboard-ticket:focus-visible {
  border-color: rgba(0, 191, 154, 0.6);
  outline: 0;
  box-shadow: 0 8px 22px rgba(0, 43, 73, 0.08);
  transform: translateY(-1px);
}
.dashboard-ticket__ref {
  color: #008f78;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}
.dashboard-ticket strong {
  min-width: 0;
  overflow: hidden;
  color: #172b3a;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-ticket__meta,
.dashboard-ticket__badges {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.dashboard-ticket__meta {
  color: #7c8da0;
  font-size: 0.68rem;
}
.dashboard-ticket__meta i {
  color: #cbd5e1;
  font-style: normal;
}
.dashboard-ticket__badges {
  margin-top: 0.15rem;
}
.dashboard-ticket__badges .chip {
  font-size: 0.62rem;
}
.dashboard-ticket__csat {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  color: #92400e;
  font-size: 0.65rem;
  font-weight: 800;
}
.dashboard-ticket__csat .material-icons {
  color: #f59e0b;
  font-size: 0.85rem;
}
.dashboard-ticket__badges .chip-danger {
  background: #fee2e2;
  color: #b91c1c;
}
.dashboard-ticket__arrow {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  color: #94a3b8;
  font-size: 1.05rem;
  transform: translateY(-50%);
  transition: color 0.15s, transform 0.15s;
}
.dashboard-ticket:hover .dashboard-ticket__arrow {
  color: #00a889;
  transform: translate(3px, -50%);
}
.dashboard-sheet__empty {
  display: grid;
  place-items: center;
  min-height: 13rem;
  padding: 2rem;
  border: 1px dashed #dbe5ed;
  border-radius: 14px;
  color: #64748b;
  text-align: center;
  background: #f8fafc;
}
.dashboard-sheet__empty > .material-icons {
  color: #00a889;
  font-size: 2rem;
}
.dashboard-sheet__empty strong {
  margin-top: 0.55rem;
  color: #334155;
  font-size: 0.88rem;
}
.dashboard-sheet__empty p {
  max-width: 22rem;
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .dashboard-sheet {
    align-self: flex-end;
    width: 100%;
    height: min(90dvh, 48rem);
    padding: 1.1rem;
    border-radius: 18px 18px 0 0;
    animation-name: dashboard-sheet-up;
  }
  @keyframes dashboard-sheet-up {
    from {
      transform: translateY(100%);
    }
  }
  .dashboard-sheet__list-head {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-sheet__search {
    width: 100%;
  }
  .bar-row.dashboard-data-row {
    grid-template-columns: 5rem minmax(2rem, 1fr) auto 1rem;
  }
}

/* ---------- Integração UniConecta ---------- */
.sync-spin {
  animation: spin 2.2s linear infinite;
  font-size: 1.15rem !important;
  vertical-align: -3px;
}
.uni-rules {
  display: grid;
  gap: 0.5rem;
}
.uni-rule {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.uni-arrow {
  color: var(--brand-light);
  font-size: 1rem !important;
}
.uni-row {
  cursor: default;
}
.uni-side .uni-mini {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}
.uni-side .uni-mini .material-icons {
  color: var(--brand-light);
  font-size: 1.15rem;
  margin-top: 0.1rem;
}
.uni-side .uni-mini small {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
}
@media (max-width: 900px) {
  .donut-flex {
    flex-direction: column;
    align-items: flex-start;
  }
  .uni-row {
    grid-template-columns: auto 1fr;
  }
}

/* ---------- Meu dia (operador) ---------- */
.presence {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.2rem;
  gap: 0.2rem;
}
.presence-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  border-radius: 9999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.18s;
}
.presence-btn.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}
.pdot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
}
.pdot.ok {
  background: var(--success);
}
.pdot.warn {
  background: var(--warning);
}
.pdot.off {
  background: #cbd5e1;
}
.focus-list {
  margin: 0 0 0.7rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.84rem;
}
.focus-list .chip {
  margin-left: 0.3rem;
  vertical-align: 1px;
}
.collision {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  background: #fffbeb;
  border-top: 1px solid #fde68a;
}
.collision .material-icons {
  font-size: 1rem;
  color: var(--warning);
}
.macro-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.badges {
  display: flex;
  gap: 0.6rem;
  font-size: 1.6rem;
}
.badges span {
  cursor: default;
  transition: transform 0.15s;
}
.badges span:hover {
  transform: scale(1.25) rotate(-6deg);
}

/* ---------- Equipe (gestor) ---------- */
.gauge-card {
  align-items: center;
  text-align: center;
}
.gauge {
  width: 7rem;
  margin-top: 0.2rem;
}
.gauge-fill {
  animation: donut-in 1.2s cubic-bezier(0.3, 0.7, 0.3, 1) backwards 0.2s;
}
.team-table {
  font-size: 0.8rem;
  overflow-x: auto;
}
.tt-head, .tt-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1.6fr) 0.7fr 1fr 0.8fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0.4rem;
  min-width: 22rem;
}
.tt-head {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.tt-row {
  border-bottom: 1px solid #f1f5f9;
  border-radius: 8px;
  transition: background 0.15s;
}
.tt-row:hover {
  background: #f8fafc;
}
.tt-agent {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}
.tt-load {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.tt-load .bar-track {
  flex: 1;
  display: block;
}
.tt-load .bar-fill {
  display: block;
}
.bar-fill.hotload {
  background: linear-gradient(120deg, #f59e0b, #ef4444);
}
.risk-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.risk-line:last-child {
  border-bottom: 0;
}
.risk-line span:nth-child(2) {
  flex: 1;
  color: var(--text-muted);
}

/* ---------- Fresh app data views ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.kpi-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi-value {
  margin: 0.35rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.kpi-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.ticket-list {
  display: grid;
  gap: 0.5rem;
}
.ticket-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.ticket-row:hover {
  background: #f8fafc;
}
.ticket-ref {
  font-weight: 700;
  color: var(--brand-primary);
  font-size: 0.85rem;
}
.ticket-title {
  font-size: 0.9rem;
}
.ticket-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: #e2e8f0;
}
.pill-crit {
  background: #fee2e2;
  color: #b91c1c;
}
.pill-high {
  background: #ffedd5;
  color: #c2410c;
}
.pill-med {
  background: #dbeafe;
  color: #1d4ed8;
}
.pill-low {
  background: #ecfdf5;
  color: #047857;
}
.form-stack {
  display: grid;
  gap: 0.75rem;
  max-width: 36rem;
}
.form-stack label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
}
.form-stack input, .form-stack textarea {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.form-error {
  color: #b91c1c;
  font-size: 0.85rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.org-switcher {
  padding: 0.35rem 0.55rem;
  padding-right: 1.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  max-width: min(16rem, 42vw);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23e2e8f0'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
}
.org-switcher:focus {
  outline: 2px solid var(--brand-light);
  outline-offset: 1px;
}
.org-switcher-label--empty {
  opacity: 0.75;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid #f1f5f9;
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}
.bar-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.kb-list, .service-grid {
  display: grid;
  gap: 0.75rem;
}
.service-card.status-warn {
  border-left: 4px solid var(--warning);
}
.service-card.status-ok {
  border-left: 4px solid var(--success);
}
.ticket-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.thread .msg {
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.thread .msg header {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.ai-summary {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* Fresh login page (routes/login.tsx) */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(
      110% 150% at 90% -10%,
      rgb(0 182 214 / 0.35),
      transparent 55%
    ),
    radial-gradient(
    120% 120% at -10% 110%,
    rgb(0 191 154 / 0.25),
    transparent 50%
  ),
    var(--brand-dark);
}
.login-page-card {
  width: min(26rem, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.75rem 1.5rem;
}
.login-page-brand {
  text-align: center;
  margin-bottom: 1rem;
}
.login-page-logo {
  height: 2.2rem;
  width: auto;
}
.login-page-title {
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  color: var(--brand-dark);
  margin: 0 0 0.5rem;
}
.login-page-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.login-page-actions--stack {
  display: grid;
  gap: 0.75rem;
}
.login-page-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}
.org-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #fff;
  font-size: 0.85rem;
}
.org-switcher-select {
  min-height: 2.75rem;
  min-width: 10rem;
  border-radius: 8px;
  border: 1px solid rgb(255 255 255 / 0.25);
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  padding: 0.35rem 0.5rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html, body {
  overflow-x: hidden;
}
@media (max-width: 900px) {
  .org-switcher-wrap {
    max-width: 38vw;
  }
  .app-header-tool-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }
}
@media (max-width: 480px) {
  .org-switcher-wrap {
    max-width: 34vw;
  }
  .app-header-search-kbd {
    display: none;
  }
}
@media (max-width: 320px) {
  .login-page-card {
    padding: 1.25rem 1rem;
  }
  .mtab {
    font-size: 0.55rem;
  }
}

/* =====================================================================
   FAIR / DEMO EXPERIENCES — live inbox, TV mode, Lumi agent, voice input
   ===================================================================== */

/* ---- Live inbox (triagem em tempo real) ---- */
.live-inbox-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.live-inbox-kpi {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
}
.live-inbox-kpi b {
  font-size: 0.95rem;
  color: inherit;
}
.live-inbox-kpi .material-icons {
  font-size: 1rem;
}
.live-inbox-kpi--crit {
  color: #dc2626;
}
.live-inbox-kpi--risk {
  color: #d97706;
}

@keyframes trow-arrive {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.985);
  }
  60% {
    opacity: 1;
    transform: translateY(2px) scale(1.002);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes trow-glow {
  0%,
  100% {
    box-shadow: inset 4px 0 0 #00bf9a, 0 0 0 rgba(0, 191, 154, 0);
  }
  50% {
    box-shadow: inset 4px 0 0 #00bf9a, 0 6px 22px rgba(0, 191, 154, 0.28);
  }
}
.trow-live-new {
  animation: trow-arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  border-radius: 10px;
}
.trow-live-new .trow {
  animation: trow-glow 1.6s ease-in-out 3;
  background: linear-gradient(90deg, rgba(0, 191, 154, 0.08), transparent 55%);
}

.live-toast {
  position: fixed;
  right: 1.2rem;
  bottom: 5.4rem;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #0b2239;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(2, 20, 40, 0.45);
  text-decoration: none;
  max-width: min(24rem, calc(100vw - 2.4rem));
  animation: trow-arrive 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.live-toast__pulse {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--ai-grad);
  flex: none;
}
.live-toast__pulse .material-icons {
  font-size: 1.2rem;
  animation: blink 1.2s infinite;
}
.live-toast__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.live-toast__body b {
  font-size: 0.82rem;
}
.live-toast__body small {
  font-size: 0.74rem;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-toast__go {
  opacity: 0.6;
  font-size: 1.1rem;
}

/* ---- TV / kiosk mode ---- */
.tv-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(
      1200px 600px at 80% -10%,
      rgba(0, 182, 214, 0.16),
      transparent 60%
    ),
    radial-gradient(
    900px 500px at -10% 110%,
    rgba(0, 191, 154, 0.12),
    transparent 55%
  ),
    #04101f;
  color: #e6eef7;
  font-family: inherit;
  padding: clamp(1rem, 2.2vw, 2.2rem);
  gap: clamp(0.9rem, 1.6vw, 1.6rem);
}
.tv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.tv-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  letter-spacing: 0.01em;
}
.tv-brand img {
  height: clamp(1.6rem, 2.4vw, 2.2rem);
}
.tv-brand b {
  font-weight: 800;
}
.tv-org {
  font-size: 0.62em;
  opacity: 0.65;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 0.9rem;
}
.tv-header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.live-pill--tv {
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  color: #ff6b6b;
}
.live-pill--tv i {
  background: #ff6b6b;
}
.tv-clock {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

.tv-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr;
  gap: clamp(0.9rem, 1.4vw, 1.4rem);
}
.tv-kpis {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0.9rem, 1.4vw, 1.4rem);
}
.tv-kpi {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: clamp(0.9rem, 1.6vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  backdrop-filter: blur(6px);
}
.tv-kpi__label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.72;
}
.tv-kpi__label .material-icons {
  font-size: 1.1em;
}
.tv-kpi__value {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tv-kpi--success .tv-kpi__value {
  color: #2fe3b4;
}
.tv-kpi--ai .tv-kpi__value {
  background: var(--ai-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes tv-danger-pulse {
  0%,
  100% {
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 0 0 rgba(255, 107, 107, 0);
  }
  50% {
    border-color: #ff6b6b;
    box-shadow: 0 0 34px rgba(255, 107, 107, 0.25);
  }
}
.tv-kpi--danger {
  animation: tv-danger-pulse 2s ease-in-out infinite;
}
.tv-kpi--danger .tv-kpi__value {
  color: #ff6b6b;
}

.tv-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: clamp(0.9rem, 1.6vw, 1.5rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tv-card h3 {
  margin: 0 0 0.9rem;
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tv-gauge-card {
  grid-column: span 3;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.tv-gauge {
  width: min(100%, 15rem);
}
.tv-gauge__num {
  font-size: 2.1rem;
  font-weight: 800;
}
.tv-gauge__hint {
  margin: 0.4rem 0 0;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  opacity: 0.75;
}
.tv-weeks {
  grid-column: span 5;
}
.tv-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: clamp(0.3rem, 0.7vw, 0.7rem);
  min-height: 9rem;
}
.tv-bar {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}
.tv-bar__fill {
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #00b6d6, rgba(0, 182, 214, 0.25));
  transition: height 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.tv-bar small {
  font-size: 0.62rem;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}
.tv-channels {
  grid-column: span 4;
  gap: 0.7rem;
}
.tv-channel {
  display: grid;
  grid-template-columns: 6.5rem 1fr 2rem;
  align-items: center;
  gap: 0.7rem;
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  margin-bottom: 0.55rem;
}
.tv-channel__track {
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.tv-channel__fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.tv-channel b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tv-feed {
  grid-column: 1 / -1;
}
.tv-feed__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #2fe3b4;
  animation: blink 1.4s infinite;
}
.tv-feed__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.6rem 1.4rem;
}
.tv-feed__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(0.8rem, 1.05vw, 0.95rem);
  padding: 0.45rem 0.2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  animation: trow-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tv-feed__item .material-icons {
  font-size: 1.1rem;
  color: #7dd3fc;
}
.tv-feed__text b {
  margin-left: 0.4rem;
  color: #2fe3b4;
}
.tv-feed__item small {
  margin-left: auto;
  opacity: 0.55;
  white-space: nowrap;
}
.tv-footer {
  text-align: center;
  font-size: clamp(0.7rem, 0.95vw, 0.85rem);
  opacity: 0.5;
  letter-spacing: 0.04em;
}
@media (max-width: 900px) {
  .tv-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .tv-gauge-card,
  .tv-weeks,
  .tv-channels {
    grid-column: 1 / -1;
  }
}

/* ---- Lumi agent mode ---- */
.lia-chip--action {
  background: var(--ai-grad);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}
.lia-agent-run {
  width: 100%;
}
.lia-agent-target {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(0, 182, 214, 0.1);
}
.lia-agent-target .material-icons {
  font-size: 1rem;
  color: #0891b2;
}
.lia-agent-target span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}
.lia-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.lia-step {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  background: rgba(2, 20, 40, 0.04);
  animation: trow-arrive 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lia-step__icon {
  font-size: 1.05rem;
  color: #0891b2;
  margin-top: 0.1rem;
}
.lia-step__body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}
.lia-step__body b {
  font-size: 0.78rem;
}
.lia-step__body small {
  font-size: 0.72rem;
  opacity: 0.75;
  line-height: 1.35;
}
.lia-step__check {
  font-size: 1.05rem;
  color: #10b981;
  margin-top: 0.1rem;
}
.lia-step--skipped .lia-step__check {
  color: #94a3b8;
}
.lia-step--error {
  background: rgba(220, 38, 38, 0.07);
}
.lia-step--error .lia-step__check,
.lia-step--error .lia-step__icon {
  color: #dc2626;
}
@keyframes lia-step-working {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}
.lia-step--active .lia-step__check {
  animation: lia-step-working 1s ease-in-out infinite;
}
.lia-agent-open {
  margin-top: 0.7rem;
}

/* ---- Voice input (novo chamado) ---- */
.voice-textarea {
  position: relative;
}
.voice-textarea textarea {
  width: 100%;
  padding-right: 3.2rem;
}
.voice-textarea.listening textarea {
  border-color: #00bf9a;
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.18);
}
.voice-btn {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: #334155;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.voice-btn:hover {
  transform: scale(1.06);
}
.voice-btn .material-icons {
  font-size: 1.2rem;
}
@keyframes voice-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
  }
}
.voice-btn--on {
  background: #dc2626;
  color: #fff;
  animation: voice-pulse 1.4s infinite;
}
.voice-hint {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.45rem 0 0;
  font-size: 0.76rem;
  color: #0f766e;
}
@keyframes voice-bar {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}
.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 0.9rem;
}
.voice-wave i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: #00bf9a;
  animation: voice-bar 0.9s ease-in-out infinite;
}
.voice-wave i:nth-child(2) {
  animation-delay: 0.15s;
}
.voice-wave i:nth-child(3) {
  animation-delay: 0.3s;
}
.voice-wave i:nth-child(4) {
  animation-delay: 0.45s;
}

/* ---- Admin · usuários e permissões ---- */
.admin-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #64748b;
  font-size: 0.85rem;
  padding: 1.2rem;
}
.admin-members {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.admin-member {
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.admin-member.open {
  box-shadow: 0 10px 30px rgba(2, 20, 40, 0.1);
}
.admin-member__row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.admin-member__avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--ai-grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex: none;
}
.admin-member__id {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}
.admin-member__id b {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.admin-you {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0891b2;
  background: rgba(8, 145, 178, 0.1);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}
.admin-member__id small {
  color: #64748b;
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-member__badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-role--admin {
  background: #0b2239;
  color: #fff;
}
.admin-role--gestor {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}
.admin-role--operador {
  background: rgba(0, 191, 154, 0.12);
  color: #047857;
}
.admin-auto {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.admin-auto .material-icons {
  font-size: 0.9rem;
}
.admin-saved {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  animation: trow-arrive 0.3s ease both;
}
.admin-saved .material-icons {
  font-size: 0.9rem;
}
.admin-member__chev {
  color: #94a3b8;
  transition: transform 0.2s;
}
.admin-member__chev.up {
  transform: rotate(180deg);
}
.admin-member__panel {
  border-top: 1px solid #e2e8f0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: trow-arrive 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.admin-roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.6rem;
}
.admin-role-btn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-role-btn:hover:not(:disabled) {
  border-color: #94a3b8;
}
.admin-role-btn.active {
  border-color: #00bf9a;
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.15);
}
.admin-role-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.admin-role-btn b {
  font-size: 0.84rem;
}
.admin-role-btn small {
  font-size: 0.72rem;
  color: #64748b;
}
.admin-matrix {
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
}
.admin-matrix__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 0.6rem;
}
.admin-matrix__head em {
  color: #0891b2;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
}
.admin-group {
  margin-bottom: 0.7rem;
}
.admin-group__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.5rem 0 0.3rem;
}
.admin-group__title .material-icons {
  font-size: 1rem;
  color: #0891b2;
}
.admin-perm {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}
.admin-perm:hover {
  background: #f8fafc;
}
.admin-perm input {
  margin-top: 0.2rem;
  accent-color: #00bf9a;
}
.admin-perm__body {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.admin-perm__body b {
  font-size: 0.8rem;
  font-weight: 600;
}
.admin-perm__body small {
  font-size: 0.72rem;
  color: #64748b;
}
.admin-matrix__actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
}

/* ---- Auth hero (login + convite) ---- */
.auth-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #f1f5f9;
}
.auth-hero__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  padding: clamp(2rem, 6vw, 5rem);
  color: #fff;
  background:
    radial-gradient(
      900px 500px at 85% -10%,
      rgba(0, 182, 214, 0.35),
      transparent 60%
    ),
    radial-gradient(
    700px 420px at -10% 110%,
    rgba(0, 191, 154, 0.28),
    transparent 55%
  ),
    linear-gradient(160deg, #0f172a 0%, #002b49 100%);
  overflow: hidden;
}
.auth-hero__logo {
  height: 2.2rem;
  width: auto;
  align-self: flex-start;
  margin-bottom: 0.6rem;
}
.auth-hero__panel h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.auth-hero__panel > p {
  margin: 0;
  max-width: 30rem;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  color: #cbd5e1;
}
.auth-hero__points {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.auth-hero__points li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: #e2e8f0;
}
.auth-hero__points .material-icons {
  font-size: 1.1rem;
  color: #2fe3b4;
  background: rgba(47, 227, 180, 0.12);
  border-radius: 8px;
  padding: 0.35rem;
}
.auth-hero__foot {
  position: absolute;
  bottom: 1.4rem;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.55);
}
.auth-hero__card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.6rem, 5vw, 4.5rem);
  max-width: 34rem;
  width: 100%;
  margin: 0 auto;
  background: #fff;
}
.auth-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
}
.auth-card-sub {
  margin: 0 0 1.4rem;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}
.auth-card-help {
  margin: 1.4rem 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}
.auth-invited {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font-size: 0.85rem;
  animation: trow-arrive 0.4s ease both;
}
.auth-invited .material-icons {
  font-size: 1.1rem;
}
@media (max-width: 860px) {
  .auth-hero {
    grid-template-columns: 1fr;
  }
  .auth-hero__panel {
    min-height: 38vh;
    justify-content: flex-start;
    padding-top: 2.2rem;
  }
  .auth-hero__points {
    display: none;
  }
  .auth-hero__foot {
    display: none;
  }
}

/* ---- Invite accept ---- */
.invite-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.invite-email-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
}
.invite-email-chip .material-icons {
  font-size: 1rem;
  color: #0891b2;
}
.invite-pass-wrap {
  position: relative;
}
.invite-pass-wrap .login-email-input {
  width: 100%;
  padding-right: 2.8rem;
}
.invite-pass-eye {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  color: #94a3b8;
  display: grid;
  place-items: center;
  padding: 0.3rem;
}
.invite-strength {
  display: flex;
  gap: 4px;
  margin-top: 0.4rem;
}
.invite-strength i {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: #e2e8f0;
  transition: background 0.25s;
}
.invite-strength i.on.s1 {
  background: #f59e0b;
}
.invite-strength i.on.s2 {
  background: #10b981;
}
.invite-strength i.on.s3 {
  background: #059669;
}
.invite-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}
.invite-submit {
  margin-top: 0.4rem;
  justify-content: center;
}
.invite-done,
.invite-invalid {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.invite-done__icon {
  font-size: 3rem !important;
  color: #10b981;
  animation: trow-arrive 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.invite-invalid .material-icons {
  font-size: 2.6rem;
  color: #94a3b8;
}
.invite-done h2,
.invite-invalid h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
}
.invite-done p,
.invite-invalid p {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
}

/* ---- Invites admin ---- */
.invites-card {
  margin-bottom: 1rem;
}
.invites-sub {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
}
.invites-form {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 0.6rem;
}
@media (max-width: 720px) {
  .invites-form {
    grid-template-columns: 1fr;
  }
}
.invites-notice {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: #047857;
}
.invites-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
}
.invites-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.2rem;
  border-top: 1px dashed #e2e8f0;
}
.invites-row__icon {
  color: #0891b2;
  font-size: 1.2rem;
}
.invites-row__id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.invites-row__id b {
  font-size: 0.82rem;
}
.invites-row__id small {
  font-size: 0.72rem;
  color: #64748b;
}
.chip.inv-pend {
  background: rgba(245, 158, 11, 0.13);
  color: #b45309;
}
.chip.inv-ok {
  background: rgba(16, 185, 129, 0.13);
  color: #047857;
}
.chip.inv-exp {
  background: #f1f5f9;
  color: #64748b;
}
.invites-row__when {
  color: #94a3b8;
  font-size: 0.72rem;
  white-space: nowrap;
}
.invites-row__revoke {
  border: none;
  background: none;
  cursor: pointer;
  color: #94a3b8;
  display: grid;
  place-items: center;
  padding: 0.3rem;
  border-radius: 8px;
}
.invites-row__revoke:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}
.admin-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.4rem 0 0.7rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
}
.admin-section-title .material-icons {
  font-size: 1.1rem;
  color: #0891b2;
}

/* ---- Customer portal dashboard ---- */
.cx-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 1.6fr;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
@media (max-width: 980px) {
  .cx-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .cx-kpi--wide {
    grid-column: 1 / -1;
  }
}
.cx-kpi {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
.cx-kpi > div {
  display: flex;
  flex-direction: column;
}
.cx-kpi b {
  font-size: 1.4rem;
  line-height: 1.1;
  color: #0f172a;
}
.cx-kpi small {
  font-size: 0.72rem;
  color: #64748b;
}
.cx-kpi__icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  flex: none;
}
.cx-kpi__icon .material-icons {
  font-size: 1.2rem;
}
.cx-kpi__icon--open {
  background: rgba(0, 182, 214, 0.12);
  color: #0891b2;
}
.cx-kpi__icon--progress {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}
.cx-kpi__icon--waiting {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}
.cx-kpi__icon--done {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
@keyframes cx-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
  }
}
.cx-kpi--pulse {
  border-color: rgba(245, 158, 11, 0.5);
  animation: cx-pulse 2.2s ease-in-out infinite;
}
.cx-kpi--wide {
  display: block;
}
.cx-trend__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.cx-trend__head small {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.cx-trend__delta,
.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: #f1f5f9;
  color: #475569;
}
.cx-trend__delta .material-icons,
.trend-chip .material-icons {
  font-size: 0.95rem;
}
.cx-trend__delta.up,
.trend-chip.up {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}
.cx-trend__delta.down,
.trend-chip.down {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
.trend-chip {
  margin-left: auto;
}
.cx-trend__bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 3.4rem;
}
.cx-trend__col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.2rem;
}
.cx-trend__bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #00b6d6, rgba(0, 182, 214, 0.35));
}
.cx-trend__col small {
  font-size: 0.6rem;
  color: #94a3b8;
  text-transform: capitalize;
}
.cx-trend__avg {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
}
.cx-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.cx-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cx-filter b {
  font-size: 0.72rem;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
}
.cx-filter.active {
  border-color: #00bf9a;
  background: rgba(0, 191, 154, 0.08);
  color: #047857;
}
.cx-filter.active b {
  background: rgba(0, 191, 154, 0.16);
}

/* ---- Dash AI insights ---- */
.dash-insights {
  margin-top: 1rem;
}
.dash-insights__chip {
  margin-left: 0.4rem;
}
.dash-insights__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.8rem;
}
.dash-insight {
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
}
.dash-insight--interactive {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
}
.dash-insight--interactive:hover,
.dash-insight--interactive:focus-visible,
.dash-insight--interactive.is-selected {
  border-color: #00bf9a;
  background: #f0fdfa;
  outline: none;
  transform: translateY(-1px);
}
.dash-insight__arrow {
  position: absolute;
  right: 0.8rem;
  bottom: 0.7rem;
  color: #00a889;
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.16s, transform 0.16s;
}
.dash-insight--interactive:hover .dash-insight__arrow,
.dash-insight--interactive:focus-visible .dash-insight__arrow,
.dash-insight--interactive.is-selected .dash-insight__arrow {
  opacity: 1;
  transform: translateX(0);
}
.dash-insight__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: var(--ai-grad);
  color: #fff;
}
.dash-insight__icon .material-icons {
  font-size: 1.05rem;
}
.dash-insight p {
  margin: 0;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
  flex: 1;
}
.dash-insight__loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8 !important;
}
.dash-insight small {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #94a3b8;
}

/* ---------- Support dashboard / executive cockpit ---------- */
.support-dashboard {
  --dash-ink: #062c46;
  --dash-teal: #05b89b;
  --dash-cyan: #16b9d4;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-bottom: 2rem;
}
.dashboard-hero {
  position: relative;
  min-height: 16.5rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(22rem, 0.75fr);
  align-items: center;
  gap: 2rem;
  padding: clamp(1.6rem, 3vw, 2.5rem);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 75% 10%, rgb(20 207 185 / 0.22), transparent 30%),
    linear-gradient(125deg, #032b48 0%, #073b55 54%, #075464 100%);
  box-shadow: 0 24px 60px rgb(0 43 73 / 0.2);
  isolation: isolate;
}
.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.14;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.2) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent 5%, #000 70%);
}
.dashboard-hero__glow {
  position: absolute;
  z-index: -1;
  width: 26rem;
  height: 26rem;
  right: -7rem;
  bottom: -16rem;
  border-radius: 50%;
  background: var(--ai-grad);
  filter: blur(6px);
  opacity: 0.3;
}
.dashboard-hero__content {
  max-width: 46rem;
}
.dashboard-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.68rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 999px;
  color: #a7f3e7;
  background: rgb(255 255 255 / 0.08);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dashboard-hero--danger .dashboard-hero__eyebrow {
  color: #fecaca;
}
.dashboard-hero--warning .dashboard-hero__eyebrow {
  color: #fde68a;
}
.dashboard-hero__eyebrow .material-icons {
  font-size: 1rem;
}
.dashboard-hero h2 {
  max-width: 42rem;
  margin-top: 1rem;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}
.dashboard-hero__content > p {
  max-width: 38rem;
  margin-top: 0.75rem;
  color: rgb(226 242 247 / 0.75);
  font-size: 0.9rem;
}
.dashboard-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.35rem;
}
.dashboard-hero__button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1rem;
  border-radius: 10px;
  color: #003b42;
  background: #7ff4df;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 750;
  box-shadow: 0 10px 25px rgb(0 0 0 / 0.14);
  transition: transform 0.18s, box-shadow 0.18s;
}
.dashboard-hero__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgb(0 0 0 / 0.2);
}
.dashboard-hero__button .material-icons {
  font-size: 1rem;
}
.dashboard-hero__sync {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgb(226 242 247 / 0.64);
  font-size: 0.7rem;
}
.dashboard-hero__sync i,
.dashboard-activity-panel__live i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #56e6bd;
  box-shadow: 0 0 0 4px rgb(86 230 189 / 0.12);
  animation: blink 1.8s infinite;
}
.dashboard-hero__pulse {
  position: relative;
  min-height: 12rem;
  display: grid;
  place-items: center;
}
.dashboard-hero__ring {
  width: 10.5rem;
  height: 10.5rem;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  box-shadow:
    0 0 0 14px rgb(255 255 255 / 0.035),
    0 0 0 32px rgb(255 255 255 / 0.022),
    inset 0 1px 18px rgb(255 255 255 / 0.08);
  backdrop-filter: blur(12px);
}
.dashboard-hero__ring span {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.07em;
}
.dashboard-hero__ring small {
  margin-top: 0.5rem;
  color: #a7f3e7;
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.dashboard-hero__mini {
  position: absolute;
  min-width: 8rem;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 14px;
  background: rgb(3 43 72 / 0.66);
  box-shadow: 0 14px 35px rgb(0 0 0 / 0.16);
  backdrop-filter: blur(12px);
}
.dashboard-hero__mini--top {
  top: 0;
  right: 0;
}
.dashboard-hero__mini--bottom {
  left: 0;
  bottom: 0;
}
.dashboard-hero__mini .material-icons {
  grid-row: 1 / 3;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  color: #6ee7d0;
  background: rgb(110 231 208 / 0.11);
  font-size: 1rem;
}
.dashboard-hero__mini b {
  font-size: 0.9rem;
  line-height: 1;
}
.dashboard-hero__mini small {
  margin-top: 0.2rem;
  color: rgb(226 242 247 / 0.58);
  font-size: 0.6rem;
}
.dashboard-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-top: 0.25rem;
  padding: 0 0.15rem;
}
.dashboard-section-head > div > span,
.dashboard-panel__eyebrow {
  display: block;
  color: #00a889;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.dashboard-section-head h3,
.dashboard-panel__head h3 {
  color: var(--dash-ink);
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.dashboard-section-head__note {
  color: #94a3b8;
  font-size: 0.68rem;
}
.dashboard-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}
.support-dashboard .stat-tile {
  min-height: 8.5rem;
  align-items: flex-start;
  padding: 1rem;
  border-color: #e7edf3;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgb(15 51 72 / 0.055);
}
.support-dashboard .stat-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgb(15 51 72 / 0.1);
}
.support-dashboard .stat-tile__icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 11px;
}
.support-dashboard .stat-tile__body {
  align-self: stretch;
  flex: 1;
}
.support-dashboard .stat-tile__label {
  min-height: 2rem;
  padding-right: 0.5rem;
  font-size: 0.67rem;
  font-weight: 700;
}
.support-dashboard .stat-tile__value {
  margin-top: 0.1rem;
  font-size: 1.8rem;
}
.support-dashboard .stat-tile__hint {
  margin-top: auto;
  padding-top: 0.45rem;
}
.dashboard-quality-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e7edf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(15 51 72 / 0.045);
}
.dashboard-quality-strip .stat-tile {
  min-height: 6.7rem;
  border: 0;
  border-right: 1px solid #edf2f7;
  border-radius: 0;
  box-shadow: none;
}
.dashboard-quality-strip .stat-tile:last-child {
  border-right: 0;
}
.dashboard-quality-strip .stat-tile:hover {
  z-index: 1;
  transform: none;
  border-color: transparent;
  background: #f8fffd;
  box-shadow: inset 0 -3px 0 #16c7a8;
}
.dashboard-quality-strip .stat-tile__icon {
  width: 2rem;
  height: 2rem;
}
.dashboard-quality-strip .stat-tile__label {
  min-height: auto;
}
.dashboard-quality-strip .stat-tile__value {
  font-size: 1.35rem;
}
.dashboard-analytics-grid,
.dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(19rem, 0.75fr);
  gap: 1rem;
}
.dashboard-lower-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
}
.dashboard-panel {
  min-width: 0;
  padding: 1.25rem;
  border-color: #e7edf3;
  border-radius: 18px;
  box-shadow: 0 8px 26px rgb(15 51 72 / 0.05);
}
.dashboard-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.dashboard-panel__head h3 {
  margin-top: 0.18rem;
  font-size: 1.05rem;
}
.dashboard-panel__head p {
  margin-top: 0.2rem;
  color: #8493a8;
  font-size: 0.7rem;
}
.dashboard-trend {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 0.25rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  color: #526579;
  background: #f4f7fa;
  font-size: 0.72rem;
  font-weight: 800;
}
.dashboard-trend.up {
  color: #047857;
  background: #ecfdf5;
}
.dashboard-trend.down {
  color: #b91c1c;
  background: #fef2f2;
}
.dashboard-trend .material-icons {
  font-size: 1rem;
}
.dashboard-trend small {
  grid-column: 1 / 3;
  color: #8493a8;
  font-size: 0.55rem;
  font-weight: 500;
}
.dashboard-volume-chart {
  position: relative;
  height: 15rem;
  margin-top: 1.25rem;
}
.dashboard-volume-chart__grid {
  position: absolute;
  inset: 0 0 1.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.dashboard-volume-chart__grid i {
  width: 100%;
  border-top: 1px dashed #e8eef3;
}
.dashboard-volume-chart__columns {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(1.8rem, 1fr));
  gap: clamp(0.3rem, 1vw, 0.75rem);
}
.dashboard-volume-column {
  position: relative;
  display: grid;
  grid-template-rows: 1rem 1fr 1.25rem;
  justify-items: center;
  gap: 0.25rem;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.dashboard-volume-column b {
  color: #8b9aab;
  font-size: 0.62rem;
  opacity: 0;
  transition: opacity 0.18s;
}
.dashboard-volume-column__track {
  width: min(2.25rem, 76%);
  height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(
    180deg,
    rgb(0 191 154 / 0.025),
    rgb(0 191 154 / 0.07)
  );
}
.dashboard-volume-column__track i {
  width: 100%;
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #19c8d1, #08b89a);
  box-shadow: 0 6px 14px rgb(0 191 154 / 0.16);
  animation: dashboard-bars-in 0.8s cubic-bezier(0.2, 0.8, 0.25, 1) backwards;
  transform-origin: bottom;
}
@keyframes dashboard-bars-in {
  from {
    transform: scaleY(0);
  }
}
.dashboard-volume-column small {
  color: #94a3b8;
  font-size: 0.58rem;
}
.dashboard-volume-column:hover b,
.dashboard-volume-column:focus-visible b {
  opacity: 1;
}
.dashboard-volume-column:hover .dashboard-volume-column__track,
.dashboard-volume-column:focus-visible .dashboard-volume-column__track {
  background: rgb(0 191 154 / 0.12);
}
.dashboard-volume-column:focus-visible {
  outline: 2px solid rgb(0 191 154 / 0.28);
  outline-offset: 3px;
  border-radius: 6px;
}
.dashboard-donut-wrap {
  min-height: 15rem;
  display: grid;
  grid-template-columns: minmax(8rem, 0.85fr) minmax(9rem, 1fr);
  align-items: center;
  gap: 1rem;
  margin-top: 0.35rem;
}
.dashboard-donut {
  position: relative;
  width: min(10rem, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgb(0 43 73 / 0.08);
  animation: dashboard-donut-in 0.8s cubic-bezier(0.2, 0.8, 0.25, 1) backwards;
}
@keyframes dashboard-donut-in {
  from {
    transform: rotate(-40deg) scale(0.82);
    opacity: 0;
  }
}
.dashboard-donut::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef2f6;
}
.dashboard-donut > div {
  z-index: 1;
  display: grid;
  text-align: center;
}
.dashboard-donut strong {
  color: var(--dash-ink);
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.05em;
}
.dashboard-donut span {
  color: #94a3b8;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dashboard-donut-legend {
  gap: 0.3rem;
}
.dashboard-donut-legend .donut-key {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 10px;
  background: #f8fafc;
}
.dashboard-donut-legend .donut-key:hover {
  background: #f0fdfa;
}
.dashboard-donut-legend .donut-key > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-donut-legend .donut-key b {
  margin: 0;
  color: var(--dash-ink);
}
.dashboard-donut-legend .donut-key small {
  grid-column: 2 / 4;
  color: #94a3b8;
  font-size: 0.58rem;
}
.dashboard-product-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
}
.dashboard-product-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto 1.25rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem;
  border-radius: 11px;
  background: #f8fafc;
  transition: background 0.16s, transform 0.16s;
}
.dashboard-product-row:hover,
.dashboard-product-row:focus-visible {
  background: #f0fdfa;
  transform: translateX(3px);
  outline: none;
}
.dashboard-product-row__rank {
  color: #a5b2c0;
  font-size: 0.64rem;
  font-weight: 800;
}
.dashboard-product-row > div > span {
  display: block;
  overflow: hidden;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-product-row__track {
  height: 0.3rem;
  margin-top: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
}
.dashboard-product-row__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8d4, #08b89a);
  animation: grow 1s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.dashboard-product-row > b {
  color: var(--dash-ink);
  font-size: 0.78rem;
}
.dashboard-product-row > .material-icons {
  color: #9aa8b8;
  font-size: 0.9rem;
}
.dashboard-activity-panel__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #00a889;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dashboard-live-feed {
  min-height: 0;
  margin-top: 1rem;
}
.dashboard-live-feed .live-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  padding: 0.65rem;
  border: 0;
  border-radius: 11px;
  background: #f8fafc;
}
.dashboard-live-feed .live-item:hover {
  background: #f0fdfa;
}
.dashboard-live-feed .dashboard-live-feed__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #00a889;
  background: #ddfaf3;
}
.dashboard-live-feed .live-item > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}
.dashboard-live-feed .live-item b {
  color: #334155;
  font-size: 0.72rem;
}
.dashboard-live-feed .live-item small {
  margin: 0;
  color: #94a3b8;
  font-size: 0.6rem;
}
.support-dashboard .dash-insights {
  margin-top: 0;
  padding: 1.25rem;
  border-color: #d8eee9;
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 0%, rgb(0 191 154 / 0.1), transparent 22%),
    linear-gradient(135deg, #fff, #f7fffd);
  box-shadow: 0 8px 26px rgb(15 51 72 / 0.05);
}
.support-dashboard .dash-insight {
  min-height: 8.25rem;
  padding: 1rem;
  border-style: solid;
  border-color: #e1eee9;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.82);
}
.support-dashboard .dash-insight__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 11px;
}

@media (max-width: 1180px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-quality-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-quality-strip .stat-tile:nth-child(3) {
    border-right: 0;
  }
  .dashboard-quality-strip .stat-tile:nth-child(-n+3) {
    border-bottom: 1px solid #edf2f7;
  }
}
@media (max-width: 900px) {
  .dashboard-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .dashboard-hero__pulse {
    min-height: 11rem;
  }
  .dashboard-analytics-grid,
  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .support-dashboard {
    gap: 0.85rem;
  }
  .dashboard-hero {
    padding: 1.25rem;
    border-radius: 18px;
  }
  .dashboard-hero h2 {
    font-size: 1.55rem;
  }
  .dashboard-hero__sync,
  .dashboard-section-head__note {
    display: none;
  }
  .dashboard-hero__pulse {
    transform: scale(0.92);
  }
  .dashboard-kpi-grid,
  .dashboard-quality-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-quality-strip {
    border: 0;
    gap: 0.65rem;
    background: transparent;
    box-shadow: none;
  }
  .dashboard-quality-strip .stat-tile,
  .dashboard-quality-strip .stat-tile:nth-child(-n+3),
  .dashboard-quality-strip .stat-tile:nth-child(3) {
    min-height: 7.2rem;
    border: 1px solid #e7edf3;
    border-radius: 14px;
  }
  .dashboard-kpi-grid .stat-tile:last-child,
  .dashboard-quality-strip .stat-tile:last-child {
    grid-column: 1 / 3;
  }
  .support-dashboard .stat-tile__icon {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 2rem;
    height: 2rem;
  }
  .support-dashboard .stat-tile__body {
    padding-right: 0;
  }
  .support-dashboard .stat-tile__label {
    max-width: calc(100% - 2rem);
  }
  .dashboard-panel {
    padding: 1rem;
    border-radius: 15px;
  }
  .dashboard-volume-chart {
    height: 13rem;
    overflow-x: auto;
  }
  .dashboard-volume-chart__columns,
  .dashboard-volume-chart__grid {
    min-width: 38rem;
  }
  .dashboard-donut-wrap {
    grid-template-columns: 1fr;
  }
  .dashboard-donut {
    width: 9rem;
  }
  .support-dashboard .dash-insights__grid {
    grid-template-columns: 1fr;
  }
}

/* Auth controls inside the hero card: stacked, full-width, prominent */
.auth-hero__card .app-header-auth--standalone {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  width: 100%;
}
.auth-hero__card .app-header-auth-btn {
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  border-radius: 10px;
}
.auth-hero__card .app-header-auth-btn--accent {
  background: var(--brand-primary, #002b49);
  color: #fff;
  border: none;
}
.auth-hero__card .app-header-auth-btn--accent:hover {
  filter: brightness(1.15);
}
.auth-hero__card .login-email-toggle {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #0f172a;
  font-weight: 600;
}
.auth-hero__card .login-email-toggle:hover {
  border-color: #94a3b8;
}
.auth-hero__card .login-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 100%;
}
.auth-hero__card .login-divider::before,
.auth-hero__card .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.auth-hero__card .login-email-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}
.auth-hero__card .login-email-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-hero__card .login-email-input:focus {
  outline: none;
  border-color: #00bf9a;
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.15);
}
.auth-hero__card .login-email-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  display: block;
  margin-bottom: 0.3rem;
}
.auth-hero__card .login-email-back {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

/* AI resolution loop — Lumi answer before opening a ticket */
.deflect-answer__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.55rem;
}
.deflect-answer__title .material-icons {
  font-size: 1.1rem;
  color: var(--ai, #7c5cff);
}
.deflect-answer__body {
  font-size: 0.88rem;
  line-height: 1.55;
}
.deflect-answer__body ul,
.deflect-answer__body ol {
  padding-left: 1.2rem;
  margin: 0.4rem 0;
}
.deflect-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.deflect-actions__ask {
  width: 100%;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.1rem;
}
.deflect-success {
  text-align: center;
  padding: 2.2rem 1.5rem;
}
.deflect-success__icon {
  font-size: 3rem;
  color: var(--success, #00bf9a);
}
.deflect-success h3 {
  margin: 0.6rem 0 0.4rem;
}
.deflect-success p {
  color: var(--muted, #64748b);
  font-size: 0.9rem;
  max-width: 34rem;
  margin: 0 auto;
}
.deflect-success .deflect-actions {
  justify-content: center;
  margin-top: 1.3rem;
}

/* ============================================================
   SLA engine, notas internas, CSAT, notificações, configurações
   ============================================================ */

/* Notifications bell */
.notif-bell {
  position: relative;
}
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(22rem, 86vw);
  max-height: 26rem;
  overflow: auto;
  z-index: 60;
  padding: 0.7rem;
  box-shadow: 0 16px 40px rgba(2, 8, 23, 0.18);
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.notif-list {
  display: grid;
}
.notif-item {
  display: flex;
  gap: 0.6rem;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid #f1f5f9;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}
.notif-item:hover {
  background: #f8fafc;
}
.notif-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.notif-icon.unread {
  color: var(--brand, #00bf9a);
}
.notif-body {
  display: grid;
  gap: 1px;
  font-size: 0.8rem;
}
.notif-title.unread {
  font-weight: 700;
}
.notif-sub {
  color: var(--text-muted);
  font-size: 0.74rem;
}
.notif-time {
  color: var(--text-muted);
  font-size: 0.68rem;
}
.notif-empty {
  padding: 1rem 0.4rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

/* Reassign picker */
.assign-block {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.assign-picker {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}
.assign-select {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  background: #fff;
}

/* Internal notes */
.note-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.2rem;
  user-select: none;
}
.note-toggle .material-icons {
  font-size: 0.95rem;
}
.note-toggle.on {
  color: #b45309;
  font-weight: 600;
}
.composer.internal textarea {
  background: #fffbeb;
  border-color: #fcd34d;
}
.msg.internal .mbody {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}
.note-chip {
  margin-left: 0.4rem;
  font-size: 0.6rem;
  vertical-align: middle;
}
.note-chip .material-icons {
  font-size: 0.7rem;
}

/* CSAT */
.csat-block h4 {
  margin-bottom: 0.4rem;
}
.csat-stars {
  display: flex;
  gap: 0.15rem;
}
.csat-star-btn {
  background: none;
  border: none;
  padding: 0.1rem;
  cursor: pointer;
}
.csat-star {
  color: #cbd5e1;
  font-size: 1.7rem;
  transition: color 0.12s;
}
.csat-star.on {
  color: #f59e0b;
}
.csat-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0.5rem;
}
.csat-comment {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  font-family: inherit;
  resize: vertical;
}
.csat-thanks {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Ticket links & attachments */
.link-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  border-bottom: 1px solid #f1f5f9;
}
.link-row a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.link-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.1rem;
  line-height: 1;
}
.link-remove .material-icons {
  font-size: 0.9rem;
}
.link-add {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
}
.link-add input, .link-add select {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
}
.side-block-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.attach-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0;
  font-size: 0.8rem;
}
.attach-row .material-icons {
  font-size: 1rem;
  color: var(--text-muted);
}
.attach-row a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach-meta {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Timeline (audit trail) */
.timeline {
  display: grid;
  gap: 0;
  max-height: 18rem;
  overflow: auto;
}
.timeline-item {
  display: flex;
  gap: 0.55rem;
  position: relative;
  padding: 0.32rem 0;
}
.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand, #00bf9a);
  margin-top: 5px;
  flex-shrink: 0;
}
.timeline-item:not(:last-child) .timeline-dot::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 15px;
  bottom: -4px;
  width: 1px;
  background: var(--border);
}
.timeline-body {
  display: grid;
  font-size: 0.76rem;
}
.timeline-time {
  color: var(--text-muted);
  font-size: 0.66rem;
}

/* Org settings (/i/config) */
.settings-workspace {
  --settings-ink: #072b45;
  --settings-muted: #667b8d;
  --settings-line: #dce7ed;
  max-width: 76rem;
  margin: 0 auto;
  padding-bottom: 7rem;
}
.settings-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(28rem, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: 13rem;
  padding: 2.2rem 2.5rem;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 15%, rgb(0 201 171 / 0.34), transparent 28%),
    radial-gradient(circle at 54% 130%, rgb(24 172 210 / 0.3), transparent 36%),
    linear-gradient(125deg, #062e4a 0%, #064666 55%, #075b6b 100%);
  box-shadow: 0 22px 55px rgb(4 47 73 / 0.18);
}
.settings-hero::before,
.settings-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 50%;
  pointer-events: none;
}
.settings-hero::before {
  width: 23rem;
  height: 23rem;
  right: -10rem;
  top: -16rem;
}
.settings-hero::after {
  width: 16rem;
  height: 16rem;
  right: 14rem;
  bottom: -14rem;
}
.settings-hero__copy,
.settings-hero__summary {
  position: relative;
  z-index: 1;
}
.settings-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  color: #7cf5df;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.settings-eyebrow .material-icons {
  font-size: 1rem;
}
.settings-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.settings-hero__copy p {
  max-width: 35rem;
  margin-top: 0.8rem;
  color: rgb(226 244 249 / 0.78);
  font-size: 0.94rem;
  line-height: 1.6;
}
.settings-hero__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.35rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 16px;
  background: rgb(2 35 55 / 0.32);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
  backdrop-filter: blur(12px);
}
.settings-hero__summary > div {
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  min-width: 0;
  padding: 1rem 0.45rem;
  text-align: center;
}
.settings-hero__summary > div + div {
  border-left: 1px solid rgb(255 255 255 / 0.1);
}
.settings-hero__summary .material-icons {
  color: #62e9d2;
  font-size: 1.2rem;
  margin-bottom: 0.1rem;
}
.settings-hero__summary strong {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.86rem;
  white-space: nowrap;
}
.settings-hero__summary small {
  color: rgb(218 239 244 / 0.58);
  font-size: 0.64rem;
}
.settings-layout {
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
  margin-top: 1.35rem;
}
.settings-nav {
  position: sticky;
  top: 1.2rem;
  display: grid;
  gap: 0.3rem;
  padding: 0.7rem;
  border: 1px solid var(--settings-line);
  border-radius: 16px;
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 8px 30px rgb(8 46 70 / 0.06);
  backdrop-filter: blur(14px);
}
.settings-nav__title {
  padding: 0.4rem 0.55rem 0.5rem;
  color: #8293a2;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.settings-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--settings-ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: 160ms ease;
}
.settings-nav a:hover {
  border-color: #c8e7e5;
  background: #f0fbf9;
  transform: translateX(2px);
}
.settings-nav a.is-active {
  border-color: #bce7df;
  color: #075f54;
  background: linear-gradient(135deg, #e8faf6, #f1fbfa);
  box-shadow: inset 3px 0 0 #0bb99c, 0 5px 14px rgb(7 129 111 / 0.08);
  transform: none;
}
.settings-nav a.is-active > .material-icons {
  color: #078c77;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}
.settings-nav a.is-active small {
  color: #52877f;
}
.settings-nav a > .material-icons {
  color: #0bb99c;
  font-size: 1.1rem;
}
.settings-nav a > span:last-child {
  display: grid;
  min-width: 0;
}
.settings-nav a small {
  color: #8a9aa6;
  font-size: 0.64rem;
  font-weight: 500;
}
.settings-nav__tip {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.45rem;
  padding: 0.75rem;
  border-radius: 10px;
  color: #5d7284;
  background: #f3f7f9;
  font-size: 0.67rem;
  line-height: 1.45;
}
.settings-nav__tip .material-icons {
  flex: 0 0 auto;
  color: #e4a21a;
  font-size: 1rem;
}
.settings-content {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}
.settings-panel {
  scroll-margin-top: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--settings-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 25px rgb(8 46 70 / 0.055);
}
.settings-panel__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}
.settings-panel__head h2 {
  color: var(--settings-ink);
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.settings-panel__head p {
  margin-top: 0.22rem;
  color: var(--settings-muted);
  font-size: 0.76rem;
}
.settings-kicker {
  display: block;
  margin-bottom: 0.15rem;
  color: #8da0ae;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.settings-icon {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 12px;
}
.settings-icon .material-icons {
  font-size: 1.3rem;
}
.settings-icon--mint {
  color: #078b75;
  background: #dff9f3;
}
.settings-icon--blue {
  color: #1677ae;
  background: #e3f4fc;
}
.settings-icon--violet {
  color: #7056b8;
  background: #f0ebfc;
}
.settings-icon--ai {
  color: #078f83;
  background: linear-gradient(135deg, #dcf8f1, #e6f4ff);
}
.settings-panel__badge {
  align-self: start;
  padding: 0.28rem 0.55rem;
  border: 1px solid #d6e4ea;
  border-radius: 999px;
  color: #607788;
  background: #f8fbfc;
  font-size: 0.65rem;
  font-weight: 700;
}
.settings-panel__badge--ai {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #277a73;
  border-color: #c9eae4;
  background: #f1fbf9;
}
.settings-panel__badge--ai .material-icons {
  font-size: 0.78rem;
}
.sla-editor {
  overflow: hidden;
  border: 1px solid var(--settings-line);
  border-radius: 13px;
}
.sla-editor__header,
.sla-editor__row {
  display: grid;
  grid-template-columns:
    minmax(12rem, 1.35fr) minmax(9rem, 1fr) minmax(9rem, 1fr);
  gap: 0.9rem;
  align-items: center;
}
.sla-editor__header {
  padding: 0.62rem 0.85rem;
  color: #8496a5;
  background: #f6f9fa;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sla-editor__row {
  min-height: 4.7rem;
  padding: 0.65rem 0.85rem;
  transition: background 150ms ease;
}
.sla-editor__row + .sla-editor__row {
  border-top: 1px solid #edf2f5;
}
.sla-editor__row:hover {
  background: #fbfdfd;
}
.sla-priority {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.sla-priority > .material-icons {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 9px;
  font-size: 1rem;
}
.sla-priority > div {
  display: grid;
}
.sla-priority strong {
  color: #183b53;
  font-size: 0.8rem;
}
.sla-priority small {
  color: #91a0ac;
  font-size: 0.65rem;
}
.sla-priority--critical > .material-icons {
  color: #bf3545;
  background: #fff0f1;
}
.sla-priority--high > .material-icons {
  color: #c86622;
  background: #fff4e8;
}
.sla-priority--medium > .material-icons {
  color: #b08b14;
  background: #fff9dd;
}
.sla-priority--low > .material-icons {
  color: #47748e;
  background: #edf5f8;
}
.sla-input {
  position: relative;
  display: block;
}
.sla-input input {
  width: 100%;
  height: 2.65rem;
  padding: 0 4.4rem 0 0.75rem;
  border: 1px solid #d7e2e8;
  border-radius: 9px;
  color: #17364d;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  outline: 0;
  transition: 150ms ease;
}
.sla-input input:focus {
  border-color: #16b99f;
  box-shadow: 0 0 0 3px rgb(22 185 159 / 0.11);
}
.sla-input em {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  padding-left: 0.55rem;
  border-left: 1px solid #e1e9ed;
  color: #718696;
  font-size: 0.65rem;
  font-style: normal;
  pointer-events: none;
}
.settings-switch-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #d4eee9;
  border-radius: 12px;
  background: #f3fbf9;
  cursor: pointer;
}
.settings-switch-row > span:nth-child(2) {
  display: grid;
}
.settings-switch-row strong {
  color: #173d50;
  font-size: 0.76rem;
}
.settings-switch-row small {
  color: #78909d;
  font-size: 0.66rem;
}
.settings-switch-row--soft {
  border-color: #e3e9ed;
  background: #f8fafb;
}
.settings-switch {
  position: relative;
  display: inline-flex;
  width: 2.55rem;
  height: 1.42rem;
  flex: 0 0 auto;
}
.settings-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.settings-switch i {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #bdcad2;
  transition: 180ms ease;
}
.settings-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(1.42rem - 6px);
  height: calc(1.42rem - 6px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 25 40 / 0.25);
  transition: 180ms ease;
}
.settings-switch input:checked + i {
  background: #0dbb9d;
}
.settings-switch input:checked + i::after {
  transform: translateX(1.13rem);
}
.settings-switch input:focus-visible + i {
  box-shadow: 0 0 0 3px rgb(13 187 157 / 0.18);
}
.settings-switch--small {
  width: 2rem;
  height: 1.16rem;
}
.settings-switch--small i::after {
  width: calc(1.16rem - 6px);
  height: calc(1.16rem - 6px);
}
.settings-switch--small input:checked + i::after {
  transform: translateX(0.84rem);
}
.settings-state {
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  color: #728491;
  background: #e9eef1;
  font-size: 0.62rem;
  font-weight: 800;
}
.settings-state.is-on {
  color: #087c68;
  background: #d9f5ee;
}
.settings-control {
  display: grid;
  gap: 0.4rem;
  color: #27485c;
  font-size: 0.72rem;
  font-weight: 700;
}
.settings-control > div {
  display: flex;
  align-items: center;
  height: 2.85rem;
  overflow: hidden;
  border: 1px solid #d7e2e8;
  border-radius: 10px;
  background: #fff;
  transition: 150ms ease;
}
.settings-control > div:focus-within {
  border-color: #16b99f;
  box-shadow: 0 0 0 3px rgb(22 185 159 / 0.1);
}
.settings-control > div .material-icons {
  margin-left: 0.75rem;
  color: #8296a3;
  font-size: 1.05rem;
}
.settings-control input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 0.7rem;
  border: 0;
  outline: 0;
  color: #17364d;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
}
.settings-control b {
  padding: 0 0.75rem;
  color: #82939f;
  font-size: 0.67rem;
}
.settings-control small {
  color: #8a9aa6;
  font-size: 0.64rem;
  font-weight: 500;
}
.settings-control--timezone {
  max-width: 28rem;
  margin-bottom: 1rem;
}
.settings-field-grid,
.settings-textareas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.hours-editor {
  overflow: hidden;
  border: 1px solid var(--settings-line);
  border-radius: 13px;
}
.hours-editor__head {
  display: grid;
  grid-template-columns: 10rem 1fr;
  padding: 0.6rem 0.85rem;
  color: #8798a5;
  background: #f6f9fa;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hours-row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  align-items: center;
  min-height: 3.8rem;
  padding: 0.45rem 0.85rem;
  color: #8696a2;
  background: #fbfcfd;
}
.hours-row + .hours-row {
  border-top: 1px solid #edf2f5;
}
.hours-row.is-active {
  color: var(--settings-ink);
  background: #fff;
}
.hours-day {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}
.hours-day strong {
  font-size: 0.76rem;
}
.hours-times {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
}
.hours-times > .material-icons {
  align-self: center;
  color: #a1aeb7;
  font-size: 1rem;
}
.hours-times label {
  display: grid;
  gap: 0.2rem;
}
.hours-times label span {
  color: #97a5af;
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
}
.hours-times input {
  width: 7rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d9e3e8;
  border-radius: 8px;
  color: #24465a;
  background: #fff;
  font-size: 0.72rem;
  outline: 0;
}
.hours-times input:focus {
  border-color: #16b99f;
  box-shadow: 0 0 0 3px rgb(22 185 159 / 0.1);
}
.hours-closed {
  color: #a0adb7;
  font-size: 0.7rem;
  font-weight: 600;
}
.settings-textareas textarea {
  width: 100%;
  resize: vertical;
  min-height: 8rem;
  padding: 0.8rem;
  border: 1px solid #d7e2e8;
  border-radius: 10px;
  color: #17364d;
  background: #fff;
  font: 500 0.75rem/1.55 inherit;
  outline: 0;
  transition: 150ms ease;
}
.settings-textareas textarea:focus {
  border-color: #16b99f;
  box-shadow: 0 0 0 3px rgb(22 185 159 / 0.1);
}
.settings-control > span {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.settings-control > span em {
  color: #90a0ab;
  font-size: 0.61rem;
  font-style: normal;
  font-weight: 500;
}
.settings-control--lumi textarea {
  border-color: #cce8e4;
  background: linear-gradient(135deg, #fbfffe, #f9fcff);
}
.settings-panel--lumi {
  position: relative;
  overflow: hidden;
}
.settings-panel--lumi::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -7rem;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(41 196 174 / 0.09), transparent 68%);
  pointer-events: none;
}
.settings-savebar {
  position: fixed;
  z-index: 40;
  right: 1.5rem;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(43rem, calc(100vw - 18.5rem));
  padding: 0.72rem 0.8rem 0.72rem 1rem;
  border: 1px solid rgb(193 211 220 / 0.9);
  border-radius: 15px;
  background: rgb(255 255 255 / 0.94);
  box-shadow: 0 18px 45px rgb(2 38 60 / 0.2);
  backdrop-filter: blur(18px);
  transition: 180ms ease;
}
.settings-savebar.is-dirty {
  border-color: rgb(22 185 159 / 0.45);
  box-shadow: 0 18px 45px rgb(2 38 60 / 0.2), 0 0 0 3px rgb(22 185 159 / 0.07);
}
.settings-savebar__status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.settings-savebar__status > .material-icons {
  color: #12aa91;
  font-size: 1.35rem;
}
.settings-savebar__status > span {
  display: grid;
  min-width: 0;
}
.settings-savebar__status strong {
  color: #163a50;
  font-size: 0.74rem;
}
.settings-savebar__status small {
  overflow: hidden;
  color: #8596a2;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 10.5rem;
  height: 2.65rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #09b99a, #079c87);
  box-shadow: 0 7px 16px rgb(7 156 135 / 0.2);
  font-size: 0.74rem;
  font-weight: 800;
  transition: 150ms ease;
}
.settings-save-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgb(7 156 135 / 0.28);
}
.settings-save-button:disabled {
  color: #8fa1ac;
  background: #e7edf0;
  box-shadow: none;
  cursor: default;
}
.settings-save-button .material-icons {
  font-size: 1rem;
}
.settings-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 24rem;
  color: #173d55;
}
.settings-loading > div {
  display: grid;
}
.settings-loading strong {
  font-size: 0.85rem;
}
.settings-loading span:last-child {
  color: #7e919e;
  font-size: 0.72rem;
}
.settings-spinner {
  width: 1.45rem;
  height: 1.45rem;
  border: 2px solid #d7e7e8;
  border-top-color: #0ab99c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.settings-spinner--button {
  width: 1rem;
  height: 1rem;
  border-color: rgb(255 255 255 / 0.35);
  border-top-color: #fff;
}

@media (max-width: 1120px) {
  .settings-hero {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .settings-hero__summary {
    max-width: 34rem;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 0.4rem;
  }
  .settings-nav__title, .settings-nav__tip, .settings-nav a small {
    display: none;
  }
  .settings-nav a {
    flex: 0 0 auto;
    padding-inline: 0.5rem;
  }
}
@media (max-width: 900px) {
  .settings-workspace {
    padding-bottom: 6rem;
  }
  .settings-savebar {
    right: 1rem;
    bottom: calc(4.7rem + env(safe-area-inset-bottom, 0px));
    left: 1rem;
    width: auto;
  }
}
@media (max-width: 700px) {
  .settings-hero {
    min-height: 0;
    padding: 1.5rem;
    border-radius: 17px;
  }
  .settings-hero h1 {
    font-size: 1.8rem;
  }
  .settings-hero__summary {
    grid-template-columns: 1fr;
  }
  .settings-hero__summary > div {
    grid-template-columns: auto 1fr;
    justify-items: start;
    column-gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    text-align: left;
  }
  .settings-hero__summary > div + div {
    border-top: 1px solid rgb(255 255 255 / 0.1);
    border-left: 0;
  }
  .settings-hero__summary .material-icons {
    grid-row: 1 / 3;
    align-self: center;
    margin: 0;
  }
  .settings-hero__summary strong {
    text-align: left;
  }
  .settings-panel {
    padding: 1.1rem;
    border-radius: 15px;
  }
  .settings-panel__head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .settings-panel__badge {
    display: none;
  }
  .sla-editor__header {
    display: none;
  }
  .sla-editor__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.85rem;
  }
  .sla-priority {
    grid-column: 1 / -1;
  }
  .settings-field-grid, .settings-textareas {
    grid-template-columns: 1fr;
  }
  .hours-editor__head {
    display: none;
  }
  .hours-row {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.75rem;
  }
  .hours-times input {
    width: 100%;
  }
  .hours-times label {
    flex: 1;
    min-width: 0;
  }
  .settings-savebar {
    gap: 0.7rem;
  }
  .settings-savebar__status small {
    display: none;
  }
}
@media (max-width: 480px) {
  .settings-savebar__status > span {
    display: none;
  }
  .settings-save-button {
    flex: 1;
  }
  .settings-switch-row {
    grid-template-columns: auto 1fr;
  }
  .settings-state {
    display: none;
  }
}

/* Agent metrics table variant */
.team-table--metrics .tt-head,
.team-table--metrics .tt-row {
  grid-template-columns:
    minmax(7rem, 1.6fr) 0.6fr 0.8fr 0.9fr 0.9fr 0.6fr 0.7fr;
  min-width: 36rem;
}
