:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --line: #d7e0eb;
  --text: #1d3248;
  --muted: #435f79;
  --blue: #2f5d93;
  --green: #138a57;
  --amber: #b56a00;
  --red: #b62121;
  --sidebar: #e6eef7;
  --sidebar-line: #d2ddeb;
  --priority-normal-bg: #e9f8ef;
  --priority-normal-line: #7eb898;
  --priority-normal-text: #1f5c3e;
  --priority-urgent-bg: #fbecec;
  --priority-urgent-line: #d39b9b;
  --priority-urgent-text: #8b3f3f;
}

body.theme-dark {
  --bg: #131d2b;
  --card: #1a2838;
  --line: #31465c;
  --text: #d6e2ef;
  --muted: #b6c4d3;
  --text-strong: #eef5fd;
  --text-soft: #c9d7e6;
  --text-dim: #a2b1c0;
  --blue: #88b1dd;
  --green: #72b894;
  --amber: #d0b066;
  --red: #cf8585;
  --sidebar: #0b1421;
  --sidebar-line: #22384f;
  --priority-normal-bg: #24473a;
  --priority-normal-line: #4e8a72;
  --priority-normal-text: #ddf4e9;
  --priority-urgent-bg: #442d2d;
  --priority-urgent-line: #8f5c5c;
  --priority-urgent-text: #f4dede;
  color-scheme: dark;
}

body:not(.theme-dark) {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.hidden {
  display: none !important;
}

body.is-modal-open {
  overflow: hidden;
}

.global-back-btn {
  position: fixed;
  top: calc(0.55rem + env(safe-area-inset-top));
  left: 0.72rem;
  z-index: 2000;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 0.8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.global-back-icon {
  width: 26px;
  height: 26px;
  display: block;
}

.global-back-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.global-back-btn:hover {
  color: color-mix(in srgb, var(--blue) 70%, var(--text));
}

.global-back-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 78%, #ffffff);
  outline-offset: 2px;
}

.global-back-btn[hidden],
.topbar-back-btn[hidden] {
  display: none !important;
}

@media (min-width: 981px) {
  .global-back-btn {
    left: calc(250px + 0.72rem);
  }
}

@media (max-width: 980px) {
  .global-back-btn {
    display: none !important;
  }
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  background: var(--sidebar);
  color: #d8e6f4;
  border-right: 1px solid var(--sidebar-line);
  padding: 0.9rem 0.7rem;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  display: block;
}

.sidebar-head h2 {
  margin: 0.45rem 0 0;
  font-size: 1.05rem;
}

.sidebar-head small {
  color: #98b5ce;
  font-size: 0.76rem;
}

.sidebar-logo {
  width: 140px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.sidebar-nav {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.35rem;
}

.sidebar-theme-controls {
  margin-top: 0.75rem;
  padding-top: 0.72rem;
  border-top: 1px solid rgba(137, 168, 198, 0.28);
  display: grid;
  gap: 0;
  min-height: 38px;
}

.sidebar-theme-controls .theme-toggle-main,
.sidebar-theme-controls .theme-style-toggle {
  width: 100%;
  text-align: left;
  margin: 0;
  border-color: #3f6386;
  background: #1c3a56;
  color: #dcedff;
  height: 38px;
  padding: 0.5rem 0.62rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-theme-controls .theme-toggle-main:hover,
.sidebar-theme-controls .theme-style-toggle:hover {
  background: #244968;
}

.nav-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d7e7f7;
  text-align: left;
  padding: 0.5rem 0.62rem;
  min-height: 38px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
}

.nav-btn:hover {
  background: #183651;
}

.nav-btn.is-active {
  border-color: #5b87b3;
  background: #28527a;
}

.nav-btn.hidden-by-role {
  display: none;
}

body:not(.theme-dark) .sidebar {
  color: #2a4762;
}

body:not(.theme-dark) .sidebar-head small {
  color: #69829a;
}

body:not(.theme-dark) .sidebar-theme-controls {
  border-top-color: #c9d8e9;
}

body:not(.theme-dark) .sidebar-theme-controls .theme-toggle-main,
body:not(.theme-dark) .sidebar-theme-controls .theme-style-toggle {
  border-color: #b9cbe0;
  background: #f1f6fc;
  color: #2a4762;
}

body:not(.theme-dark) .sidebar-theme-controls .theme-toggle-main:hover,
body:not(.theme-dark) .sidebar-theme-controls .theme-style-toggle:hover {
  background: #e6eef8;
}

body:not(.theme-dark) .nav-btn {
  color: #2b4b66;
}

body:not(.theme-dark) .nav-btn:hover {
  background: #dce8f5;
}

body:not(.theme-dark) .nav-btn.is-active {
  border-color: #9eb6cf;
  background: #cfe0f3;
  color: #1f3d58;
}

.main-area {
  min-width: 0;
}

.topbar {
  display: none;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: #2f4f6b;
  padding: 0.38rem 0.62rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.topbar-back-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8e97a3;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transform: none;
}

.topbar-back-icon {
  width: 36px;
  height: 36px;
  display: block;
}

.topbar-back-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-app-title {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.topbar-app-title-text {
  display: flex;
  align-items: center;
  gap: 0;
}

.topbar-app-title small {
  display: none;
}

.topbar-app-title strong {
  font-size: 1.12rem;
  line-height: 1;
  color: var(--text);
}

.topbar-back-btn:hover {
  color: #6d7785;
}

.topbar-alerts-btn {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  background: color-mix(in srgb, var(--card) 80%, var(--bg));
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.theme-toggle-main {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  padding: 0.38rem 0.62rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.theme-style-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  padding: 0.38rem 0.62rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  margin-left: 0;
}

body.theme-dark .theme-toggle-main {
  background: #21384f;
  border-color: #3e5d7d;
}

body.theme-dark .menu-toggle {
  color: #d6e8fb;
}

.topbar h1 {
  margin: 0;
  font-size: 1.1rem;
}

.topbar p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.topbar-role-area {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.role-pill {
  border: 1px solid #bfd0e3;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  background: #edf4fc;
  color: #2c4b68;
  font-size: 0.72rem;
  font-weight: 800;
}

.role-reset-floating {
  position: fixed;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 35;
  border-color: #79a9d8;
  background: #e7f2ff;
  color: #1f4f83;
  box-shadow: 0 8px 18px rgba(34, 74, 116, 0.2);
}

.layout {
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
}

.mobile-app-summary {
  --dash-tile-height: 72px;
  display: grid;
  gap: 0.68rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--card) 96%, #f8fbff), color-mix(in srgb, var(--card) 88%, #eef3fb));
  padding: 0.78rem;
  box-shadow: 0 10px 20px rgba(22, 48, 76, 0.06);
}

.mobile-app-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.mobile-app-summary-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.mobile-app-summary-head strong {
  margin: 0;
  font-size: 0.82rem;
  color: #b24444;
}

.mobile-summary-nav-btn {
  cursor: pointer;
  text-align: left;
}

.mobile-app-balance.mobile-summary-nav-btn {
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 90%, #eff3f8);
  padding: 0.56rem 0.62rem;
  min-height: var(--dash-tile-height);
  height: var(--dash-tile-height);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 34%, transparent);
}

.mobile-app-balance p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.mobile-app-balance strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1;
}

.mobile-app-balance-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mobile-app-balance-meta > * {
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 90%, #eff3f8);
  padding: 0.5rem 0.58rem;
  display: grid;
  gap: 0.08rem;
  min-height: var(--dash-tile-height);
  height: var(--dash-tile-height);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 34%, transparent);
}

.mobile-app-balance-meta span {
  color: var(--muted);
  font-size: 0.77rem;
}

.mobile-app-balance-meta strong {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1;
}

.mobile-app-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.mobile-shortcut-btn {
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 90%, #ecf2fa);
  padding: 0.56rem;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  min-height: var(--dash-tile-height);
  height: var(--dash-tile-height);
  width: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-content: stretch;
  gap: 0.2rem;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 34%, transparent);
  cursor: pointer;
}

.mobile-shortcut-btn span {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.15;
  align-self: start;
}

.mobile-shortcut-btn strong {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  align-self: end;
}

.mobile-shortcut-btn:focus-visible,
.mobile-summary-nav-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 78%, #ffffff);
  outline-offset: 2px;
}

@media (min-width: 761px) {
  .mobile-app-summary {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: stretch;
    padding: 0.68rem;
    gap: 0.5rem;
  }

  .mobile-app-summary-head {
    grid-column: 1 / -1;
  }

  .mobile-app-balance-meta,
  .mobile-app-shortcuts {
    display: contents;
  }

  .mobile-app-balance.mobile-summary-nav-btn,
  .mobile-app-balance-meta > *,
  .mobile-shortcut-btn {
    width: 100%;
    min-width: 0;
    min-height: var(--dash-tile-height);
    height: var(--dash-tile-height);
  }

  .mobile-shortcut-btn {
    width: 100%;
    padding: 0.45rem 0.5rem;
  }

  .dashboard-main-head,
  .dashboard-top-actions {
    display: flex;
  }
}

.mobile-bottom-nav {
  display: none;
}

.legend-notification-link {
  border: 1px solid #d4a0a0;
  border-radius: 999px;
  background: #fff6f6;
  color: #8a2424;
  padding: 0.16rem 0.44rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.legend-notification-link:hover {
  border-color: #bf7f7f;
  background: #ffecec;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 0.8rem;
}

.panel.hidden {
  display: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.7rem;
}

.dashboard-main-head {
  align-items: center;
}

.dashboard-main-title {
  margin: 0;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.panel[data-view='usuarios'] .panel-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel h2 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.team-session-badge {
  margin: 0.26rem 0 0;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #b8cde2;
  border-radius: 999px;
  background: #eef5fd;
  color: #2b4d6b;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 0.16rem 0.52rem;
}

.section-title-emphasis {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.48rem;
  border-radius: 8px;
  border: 1px solid #9ecab4;
  background: #e7f6ee;
  color: #14563d;
}

.panel small {
  color: var(--muted);
}

.dashboard-notifications {
  margin-top: 0.5rem;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 93%, #f5f9ff);
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.4rem;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 28%, transparent);
}

.dashboard-notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.dashboard-notifications-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #254663;
}

.dashboard-notifications-head [data-action='mark-dashboard-notifications-read']:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.7);
}

.dashboard-notifications-badge {
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.34rem;
  border-radius: 999px;
  border: 1px solid #d5a1a1;
  background: #fbe9e9;
  color: #8a2424;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.dashboard-notifications-list {
  display: grid;
  gap: 0.34rem;
}

.dashboard-notification-item {
  border: 1px solid #d4e1ef;
  border-left: 4px solid #7f9ebc;
  border-radius: 9px;
  background: #f7fbff;
  padding: 0.34rem 0.38rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
}

.dashboard-notification-item.is-unread {
  border-left-color: #ff3b30;
  background: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.28);
}

.dashboard-notification-item.is-read {
  border-left-color: #7f9ebc;
  opacity: 0.9;
}

.dashboard-notification-main {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.dashboard-notification-text {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #24405a;
}

.dashboard-notification-text strong {
  color: #1e3851;
}

.dashboard-notification-meta {
  margin: 0;
  font-size: 0.68rem;
  color: #58718a;
}

.dashboard-notification-action {
  min-width: 110px;
}

.dashboard-notification-empty {
  margin: 0;
  border: 1px dashed #c9d7e6;
  border-radius: 8px;
  padding: 0.42rem 0.46rem;
  font-size: 0.74rem;
  color: #4e6984;
}

.decision-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}

.panel.panel-floating-head {
  position: sticky;
  top: 0;
  z-index: 28;
  border: 0;
  background: color-mix(in srgb, var(--bg) 97%, #f5f8fd);
  backdrop-filter: blur(6px);
  margin: -1rem -1rem 0;
  padding: 0.2rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 38%, transparent);
}

.panel.panel-floating-head .decision-head {
  min-height: 52px;
  align-items: center;
  flex-wrap: nowrap;
}

.decision-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  min-width: 0;
}

.section-back-btn {
  border: 0;
  background: transparent;
  color: #4a647f;
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  transform: translateY(2px);
}

.section-back-btn[hidden] {
  display: none !important;
}

.section-back-icon {
  width: 30px;
  height: 30px;
  display: block;
}

.section-back-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.panel.panel-floating-head h2 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.panel.panel-floating-head .decision-head-actions {
  gap: 0.34rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  justify-content: flex-end;
  align-items: center;
}

.panel.panel-floating-head .btn.btn-clean {
  border: 0;
  background: color-mix(in srgb, var(--card) 86%, #eef3fb);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 32%, transparent);
  border-radius: 8px;
  min-height: 34px;
  min-width: 126px;
  padding: 0.36rem 0.86rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.panel.panel-floating-head .search-control {
  border: 0;
  background: color-mix(in srgb, var(--card) 90%, #f1f5fb);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 36%, transparent);
  flex: 0 0 250px;
  border-radius: 8px;
  min-height: 34px;
  padding-top: 0.36rem;
  padding-bottom: 0.36rem;
}

.management-route-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

.decision-route-label {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 800;
}

.btn.decision-route-btn {
  padding: 0.28rem 0.56rem;
  font-size: 0.76rem;
  line-height: 1.2;
  border-width: 1px;
  font-weight: 800;
  color: #1f344a;
  background: #eaf2fb;
  border-color: #b9cde4;
}

.btn.decision-route-btn.is-active {
  color: #fff;
}

.btn.decision-route-btn[data-route='operacao'].is-active {
  background: #1f6fa9;
  border-color: #2d83bf;
}

.btn.decision-route-btn[data-route='suporte'].is-active {
  background: #1f7f55;
  border-color: #2a9a67;
}

.btn.decision-route-btn[data-route='comercial'].is-active {
  background: #9a6327;
  border-color: #b97a38;
}

.decision-head-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-control {
  border: 1px solid #b8cbe0;
  border-radius: 8px;
  background: #ffffff;
  color: #2f4d68;
  padding: 0.34rem 0.5rem;
  font: inherit;
  font-size: 0.76rem;
  min-width: 230px;
}

.ticket-form {
  display: grid;
  gap: 0.45rem;
}

.settings-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.settings-form label {
  display: grid;
  gap: 0.25rem;
  color: #35506a;
  font-size: 0.78rem;
  font-weight: 700;
}

.settings-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.settings-checkbox {
  align-content: start;
}

.settings-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.settings-checkbox-row input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
}

.settings-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.integration-preview .meta {
  margin-top: 0.3rem;
}

.integration-simple-note {
  margin: 0;
  font-size: 0.82rem;
  color: #3a5876;
}

.integration-core-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.integration-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.integration-module-card {
  border: 1px solid #cfe0f2;
  border-radius: 10px;
  background: #f6faff;
  padding: 0.5rem;
  display: grid;
  gap: 0.45rem;
}

.integration-module-whatsapp {
  border-left: 3px solid #2a9a67;
}

.integration-module-email {
  border-left: 3px solid #8a7a56;
}

.integration-module-calendar {
  border-left: 3px solid #467eb3;
}

.integration-module-head h3 {
  margin: 0;
  font-size: 0.9rem;
  color: #223e59;
}

.integration-module-head small {
  color: #5a7794;
}

.integration-module-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.integration-module-actions .btn {
  min-width: 132px;
}

.integration-quick-steps {
  border: 1px solid #d8e4f1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.45rem 0.52rem;
}

.integration-quick-title {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #2f4f6e;
}

.integration-quick-steps ol {
  margin: 0;
  padding-left: 1rem;
  color: #3f5f7f;
  font-size: 0.78rem;
}

.integration-quick-steps li {
  margin: 0.1rem 0;
}

.integration-advanced {
  border: 1px solid #d8e4f1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.4rem 0.5rem;
}

.integration-advanced > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  color: #2f4f6e;
}

.integration-advanced[open] > summary {
  margin-bottom: 0.45rem;
}

.integration-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.integration-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #35506a;
}

.integration-flag input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.settings-preview {
  border: 1px solid #d8e4f1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.45rem 0.52rem;
}

.settings-preview p {
  margin: 0;
  line-height: 1.4;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea,
.ticket-form button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
  font: inherit;
}

.ticket-form textarea {
  resize: vertical;
}

.field-inline {
  display: grid;
  gap: 0.25rem;
  color: #35506a;
  font-size: 0.78rem;
  font-weight: 700;
}

.ticket-form button {
  width: fit-content;
  cursor: pointer;
  background: #e8f2ff;
  color: #20558f;
  font-weight: 800;
}

.dashboard-summary-grid {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.dashboard-summary-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.board-support .dashboard-summary-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-board {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.6rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-block {
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 95%, #f6f9fe);
  padding: 0.45rem 0.5rem;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 26%, transparent);
}

.dashboard-block h3 {
  margin: 0;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #244561;
}

.board-general {
  grid-column: span 12;
}

.board-support {
  grid-column: span 6;
}

.board-commercial {
  grid-column: span 6;
}

.board-chart {
  order: -1;
  grid-column: span 12;
}

.dashboard-block.support {
  background: color-mix(in srgb, var(--card) 94%, #f2f7fc);
}

.dashboard-block.commercial {
  background: color-mix(in srgb, var(--card) 94%, #f2f7ff);
}

.dashboard-block.chart {
  background: #fbfcfe;
}

.board-chart {
  background:
    radial-gradient(circle at 12% 10%, rgba(95, 177, 240, 0.16), rgba(95, 177, 240, 0) 42%),
    radial-gradient(circle at 86% 84%, rgba(130, 155, 230, 0.12), rgba(130, 155, 230, 0) 44%),
    linear-gradient(145deg, #edf4fc 0%, #e8f1fb 52%, #e3edf8 100%);
  box-shadow: inset 0 0 0 1px rgba(182, 208, 233, 0.22);
}

.board-chart h3 {
  color: #234664;
  text-shadow: none;
}

.dashboard-summary-card {
  min-height: 56px;
  padding: 0.2rem 0.38rem;
  border-radius: 7px;
  align-items: center;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.dashboard-summary-card:hover {
  transform: translateY(-1px);
}

.dashboard-summary-card strong {
  font-size: 1.2rem;
  min-width: 2ch;
  line-height: 1;
  font-weight: 900;
}

.dashboard-summary-card small {
  font-size: 0.72rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 0.35rem;
}

.dashboard-quick-actions {
  margin-top: 0.5rem;
  justify-content: flex-start;
  padding-top: 0.1rem;
}

.dashboard-top-actions {
  margin-top: 0.35rem;
  margin-bottom: 0.55rem;
  padding-top: 0;
  flex-wrap: wrap;
}

.dashboard-performance-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dashboard-performance-head h3 {
  margin: 0;
}

.dashboard-period-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
}

.dashboard-period-btn {
  min-height: 30px;
  padding: 0.16rem 0.52rem;
  font-size: 0.72rem;
}

.dashboard-period-btn.is-active {
  border-color: #7ea5cb;
  background: #dcecff;
  color: #1f4f84;
}

.dashboard-performance-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.dashboard-performance-card {
  border: 0;
  border-radius: 10px;
  background: #f3f7fc;
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.42rem;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #d6e2ee 34%, transparent);
}

.dashboard-performance-card.support {
  border-left: 0;
}

.dashboard-performance-card.commercial {
  border-left: 0;
  background: #f2f5f9;
}

.dashboard-performance-card h4 {
  margin: 0;
  font-size: 0.79rem;
  letter-spacing: 0.02em;
  color: #2a4b67;
}

.dashboard-performance-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.36rem;
}

.dashboard-performance-kpis p {
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.34rem 0.4rem;
  display: grid;
  gap: 0.1rem;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #d2deeb 34%, transparent);
}

.dashboard-performance-kpis span {
  font-size: 0.67rem;
  color: #58738e;
  font-weight: 700;
}

.dashboard-performance-kpis strong {
  font-size: 1.04rem;
  color: #1e3f5d;
  line-height: 1;
}

.dashboard-performance-bar {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid #d3deea;
  background: #edf3f9;
  min-height: 11px;
}

.performance-segment {
  display: block;
  min-width: 0;
  transition: width 0.2s ease;
}

.performance-segment.closed {
  background: #5a9c7a;
}

.performance-segment.won {
  background: #5e9b7b;
}

.performance-segment.lost {
  background: #b67a7a;
}

.performance-segment.open {
  background: #6c8aa9;
}

.dashboard-performance-foot {
  margin: 0;
  font-size: 0.72rem;
  color: #3b5975;
  font-weight: 700;
}

.dash-chart-panels {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.dash-chart-panel {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(241, 248, 255, 0.95));
  box-shadow: none;
  padding: 0.4rem 0.45rem;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #deE7f2 34%, transparent);
}

.board-chart .dash-chart-panel {
  border-color: #bed5ec;
  background: linear-gradient(150deg, rgba(246, 251, 255, 0.95), rgba(235, 244, 253, 0.96));
  box-shadow: none;
}

.dash-chart-panel::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(102, 185, 255, 0.16) 0%, rgba(102, 185, 255, 0) 68%);
  pointer-events: none;
}

.board-chart .dash-chart-panel::before {
  background: radial-gradient(circle, rgba(114, 193, 242, 0.2) 0%, rgba(114, 193, 242, 0) 68%);
}

.dash-chart-panel h4 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #1f4566;
  letter-spacing: 0.02em;
}

.board-chart .dash-chart-panel h4 {
  color: #2a4d6e;
  text-shadow: none;
}

.dash-donut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.dash-donut-card {
  border: 0;
  border-radius: 9px;
  background: linear-gradient(160deg, #f9fcff 0%, #eef7ff 100%);
  padding: 0.4rem;
  display: grid;
  gap: 0.3rem;
  box-shadow: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #dde6f1 34%, transparent);
}

.board-chart .dash-donut-card {
  border-color: #bfd6ed;
  background: linear-gradient(160deg, #f8fbff, #edf5fe);
  box-shadow: none;
}

.dash-donut-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  color: #2a4a66;
}

.board-chart .dash-donut-title {
  color: #2a4a67;
}

.dash-donut-wrap {
  position: relative;
  width: 94px;
  height: 94px;
  margin: 0 auto;
}

.dash-donut-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(#dbe7f3 0 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(149, 186, 218, 0.55),
    0 0 14px rgba(97, 170, 233, 0.18);
  transition: box-shadow 0.2s ease;
}

.dash-donut-ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #ffffff;
}

.board-chart .dash-donut-ring::after {
  background: #ffffff;
}

.dash-donut-card:hover .dash-donut-ring {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.95),
    0 0 0 1px rgba(117, 189, 246, 0.75),
    0 0 18px rgba(84, 171, 242, 0.34);
}

.dash-donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  z-index: 1;
  line-height: 1.1;
}

.dash-donut-center strong {
  font-size: 1.1rem;
  color: #1f3f5b;
}

.board-chart .dash-donut-center strong {
  color: #204360;
}

.dash-donut-center span {
  font-size: 0.67rem;
  color: #486683;
  font-weight: 700;
}

.board-chart .dash-donut-center span {
  color: #4b6b88;
}

.dash-donut-meta {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: #2d4e6c;
}

.board-chart .dash-donut-meta {
  color: #355777;
}

.dash-status-stack-track {
  margin-top: 0.25rem;
  border: 1px solid #d2dbe8;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6f9fd 0%, #eef3f9 100%);
  min-height: 12px;
  overflow: hidden;
  display: flex;
  box-shadow:
    inset 0 1px 2px rgba(31, 64, 98, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5);
}

.board-chart .dash-status-stack-track {
  border-color: #c2d7eb;
  background: #f1f6fc;
  box-shadow: inset 0 1px 2px rgba(41, 77, 113, 0.08);
}

.dash-status-segment {
  display: block;
  height: 100%;
  transition: width 0.2s ease;
}

.dash-status-segment.pending {
  background: linear-gradient(90deg, #de7c7c 0%, #c95f5f 100%);
  box-shadow: inset 0 0 6px rgba(255, 197, 197, 0.5);
}

.dash-status-segment.treatment {
  background: linear-gradient(90deg, #e0b066 0%, #c88f35 100%);
  box-shadow: inset 0 0 6px rgba(255, 228, 182, 0.5);
}

.dash-status-segment.resolved {
  background: linear-gradient(90deg, #78b893 0%, #4f9d72 100%);
  box-shadow: inset 0 0 6px rgba(206, 255, 225, 0.45);
}

.dash-status-segment.closed {
  background: linear-gradient(90deg, #74a5df 0%, #4f82c0 100%);
  box-shadow: inset 0 0 6px rgba(203, 225, 255, 0.5);
}

.dash-status-legend {
  margin-top: 0.42rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 0.55rem;
}

.dash-status-legend p {
  margin: 0;
  font-size: 0.72rem;
  color: #2f4f6c;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.board-chart .dash-status-legend p {
  color: #2e4e6a;
}

.dash-status-legend strong {
  margin-left: auto;
  font-size: 0.71rem;
  color: #244866;
  white-space: nowrap;
}

.board-chart .dash-status-legend strong {
  color: #254867;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}

.dot.pending {
  background: #d06a6a;
  box-shadow: 0 0 7px rgba(208, 106, 106, 0.6);
}

.dot.treatment {
  background: #cd9a44;
  box-shadow: 0 0 7px rgba(205, 154, 68, 0.55);
}

.dot.resolved {
  background: #5ea57d;
  box-shadow: 0 0 7px rgba(94, 165, 125, 0.58);
}

.dot.closed {
  background: #5b8fcd;
  box-shadow: 0 0 7px rgba(91, 143, 205, 0.62);
}

.kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 0.28rem 0.45rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.kpi:hover {
  border-color: #95b3d4;
  background: #f2f8ff;
}

.kpi.is-active {
  border-color: #5f8ec2;
  background: #eaf4ff;
  box-shadow: inset 0 0 0 1px #b8d1ed;
}

.kpi.kpi-waiting {
  border-color: #e1c38a;
  background: #fff6e8;
  color: #7a4b0d;
}

.kpi.kpi-returns {
  border-color: #f3d6ac;
  background: #fff4e4;
  color: #8a5300;
}

.kpi.kpi-resolved {
  border-color: #b8d7c2;
  background: #eaf7ef;
  color: #1f5c3e;
}

.kpi.kpi-closed {
  border-color: #bcdccd;
  background: #e7f6ee;
  color: #13593e;
}

.kpi.kpi-waiting.is-active {
  border-color: #c9a160;
  box-shadow: inset 0 0 0 1px #ecd4ab;
}

.kpi.kpi-returns.is-active {
  border-color: #d4a35f;
  box-shadow: inset 0 0 0 1px #efcf9f;
}

.kpi.kpi-resolved.is-active {
  border-color: #66a986;
  box-shadow: inset 0 0 0 1px #b9dcc9;
}

.kpi.kpi-closed.is-active {
  border-color: #64ac84;
  box-shadow: inset 0 0 0 1px #afd8c1;
}

.kpi.kpi-waiting small,
.kpi.kpi-returns small,
.kpi.kpi-resolved small,
.kpi.kpi-closed small {
  color: inherit;
  opacity: 0.9;
}

.kpi strong {
  font-size: 1.1rem;
  line-height: 1;
  flex: 0 0 auto;
  min-width: 2.8ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kpi small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  font-weight: 700;
}

.list {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.45rem;
}

.smart-hint {
  margin: 0.38rem 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.smart-list-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 95%, var(--bg));
  padding: 0.48rem;
  display: grid;
  gap: 0.42rem;
}

.smart-list-title {
  margin: 0;
  font-size: 0.9rem;
  color: #1f3f5b;
}

.smart-list-inner {
  margin-top: 0;
}

.smart-collapse {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 96%, var(--bg));
  padding: 0.2rem 0.45rem 0.45rem;
}

.smart-collapse > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  color: #2a4b67;
  padding: 0.2rem 0;
}

.smart-collapse > summary::-webkit-details-marker {
  display: none;
}

.smart-collapse > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.32rem;
  color: #5b7b98;
  transition: transform 0.16s ease;
}

.smart-collapse[open] > summary::before {
  transform: rotate(90deg);
}


.users-module {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.55rem;
}

.users-filter-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  border: 1px solid #c9d9eb;
  border-radius: 999px;
  background: #f3f8ff;
  padding: 0.25rem 0.4rem;
}

.users-filter-row label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #294a67;
}

.users-filter-row select {
  border: 1px solid #bfd3e8;
  border-radius: 999px;
  background: #ffffff;
  color: #224360;
  padding: 0.2rem 0.55rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}

.users-filter-row-top {
  padding: 0.2rem 0.34rem;
}

.users-filter-row-top label {
  min-width: 0;
  margin: 0;
}

body.theme-dark .users-filter-row {
  border-color: #4a6380;
  background: #24384d;
}

body.theme-dark .users-filter-row label {
  color: #d9e8f6;
}

body.theme-dark .users-filter-row select {
  background: #1c2f44;
  border-color: #486582;
  color: #e2eef9;
}

body.theme-graphite .users-filter-row {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
}

body.theme-graphite .users-filter-row label {
  color: var(--text-soft, var(--muted));
}

body.theme-graphite .users-filter-row select {
  background: color-mix(in srgb, var(--card) 95%, var(--bg));
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  color: var(--text-strong, var(--text));
}

.users-form {
  border: 1px solid #d5e0ec;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.48rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
}

.users-form-card {
  border-color: #9dc9b3;
  background: #f2fbf6;
}

.users-form.hidden {
  display: none;
}

.users-form-title {
  margin: 0;
  grid-column: 1 / -1;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1f4f3b;
}

.users-form input,
.users-form select {
  border: 1px solid #c6d5e6;
  border-radius: 8px;
  background: #ffffff;
  color: #274460;
  padding: 0.44rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
}

.users-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  grid-column: 1 / -1;
}

.users-accesses {
  margin: 0;
  border: 1px solid #c8d9ec;
  border-radius: 9px;
  padding: 0.45rem;
  background: #ffffff;
  grid-column: 1 / -1;
}

.users-accesses legend {
  font-size: 0.76rem;
  font-weight: 800;
  color: #375673;
  padding: 0 0.22rem;
}

.users-accesses label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0 0.4rem 0.28rem 0;
  font-size: 0.78rem;
  color: #24425f;
}

.users-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.user-card {
  border: 1px solid #b9d8c8;
  border-left: 4px solid #2f9a66;
  border-radius: 10px;
  background: #eef8f2;
  padding: 0.5rem 0.55rem;
}

.user-card.is-inactive {
  opacity: 0.76;
  background: #f5f7fb;
}

.user-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0.5rem;
  align-items: center;
}

.user-card-main {
  display: grid;
  gap: 0.25rem;
}

.user-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.user-card-head h3 {
  margin: 0;
  font-size: 1.02rem;
  color: #1f3f5c;
}

.user-card-meta {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #26435e;
}

.user-card-meta .sep {
  color: #7892ac;
  margin: 0 0.2rem;
}

.user-card-actions {
  justify-content: flex-end;
  align-items: center;
  min-height: 100%;
}

.user-main-action {
  min-width: 150px;
  font-size: 0.86rem;
  padding: 0.46rem 0.74rem;
  border-color: #91c1a9;
  background: #daf1e3;
  color: #15583b;
}

.ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.ticket-modal.is-open {
  display: block;
}

.analysis-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.analysis-modal.is-open {
  display: block;
}

.note-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
}

.note-modal.is-open {
  display: block;
}

.money-modal {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: none;
}

.money-modal.is-open {
  display: block;
}

.user-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.user-modal.is-open {
  display: block;
}

.integration-credentials-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: none;
}

.integration-credentials-modal.is-open {
  display: block;
}

.ticket-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 32, 0.56);
}

.ticket-modal-card {
  position: relative;
  margin: 6vh auto 0;
  width: min(680px, calc(100vw - 1.4rem));
  border-radius: 12px;
  border: 1px solid #c8d8ea;
  background: #fff;
  padding: 0.75rem;
}

.ticket-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.ticket-modal-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.ticket-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.analysis-modal-card {
  position: relative;
  margin: 4vh auto 0;
  width: min(920px, calc(100vw - 1.4rem));
  max-height: 92vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #c8d8ea;
  background: #fff;
  padding: 0.75rem;
}

.note-modal-card {
  position: relative;
  margin: 10vh auto 0;
  width: min(560px, calc(100vw - 1.4rem));
  border-radius: 12px;
  border: 1px solid #c8d8ea;
  background: #fff;
  padding: 0.75rem;
}

.money-modal-card {
  position: relative;
  margin: 11vh auto 0;
  width: min(460px, calc(100vw - 1.4rem));
  border-radius: 12px;
  border: 1px solid #c8d8ea;
  background: #fff;
  padding: 0.75rem;
}

.user-modal-card {
  position: relative;
  margin: 7vh auto 0;
  width: min(760px, calc(100vw - 1.4rem));
  border-radius: 12px;
  border: 1px solid #c8d8ea;
  background: #fff;
  padding: 0.75rem;
}

.integration-credentials-modal-card {
  position: relative;
  margin: 9vh auto 0;
  width: min(620px, calc(100vw - 1.4rem));
  border-radius: 12px;
  border: 1px solid #c8d8ea;
  background: #fff;
  padding: 0.75rem;
}

.note-modal-description {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #365473;
}

.note-modal-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2a4561;
}

.note-modal-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 132px;
  border: 1px solid #c8d8ea;
  border-radius: 10px;
  padding: 0.58rem 0.62rem;
  font: inherit;
  color: var(--text);
  background: #f9fcff;
}

.note-modal-form textarea:focus {
  outline: 2px solid #6d95ca;
  border-color: #5d84bc;
}

.money-modal-form {
  display: grid;
  gap: 0.42rem;
}

.money-modal-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2a4561;
}

.integration-credentials-modal-description {
  margin: 0 0 0.45rem;
  color: #365473;
  font-size: 0.88rem;
}

.integration-credentials-form {
  display: grid;
  gap: 0.45rem;
}

.integration-credentials-fields {
  display: grid;
  gap: 0.4rem;
}

.integration-credentials-form label {
  display: grid;
  gap: 0.25rem;
  color: #35506a;
  font-size: 0.78rem;
  font-weight: 700;
}

.integration-credentials-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.62rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.integration-credentials-error {
  margin: 0;
  min-height: 1.05rem;
  font-size: 0.8rem;
  color: #b03838;
}

.money-modal-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.44rem;
  border: 1px solid #c8d8ea;
  border-radius: 10px;
  background: #f9fcff;
  padding: 0.14rem 0.14rem 0.14rem 0.46rem;
}

.money-modal-prefix {
  font-size: 0.86rem;
  font-weight: 800;
  color: #2f4e6a;
  letter-spacing: 0.01em;
}

.money-modal-input-wrap input {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0.34rem 0.4rem;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.money-modal-input-wrap:focus-within {
  outline: 2px solid #6d95ca;
  border-color: #5d84bc;
}

.money-modal-input-wrap input:focus {
  outline: none;
}

.money-modal-error {
  margin: 0;
  min-height: 1.05em;
  font-size: 0.74rem;
  color: #9b2c2c;
  font-weight: 700;
}

.analysis-meta {
  font-size: 1.06rem;
  color: #2b4a66;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
}

.analysis-protocol-top {
  margin: 0.08rem 0 0;
  font-size: 0.82rem;
  color: #476482;
  font-weight: 700;
  line-height: 1.35;
}

.analysis-identity-highlight {
  margin-top: 0.34rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
  max-width: 560px;
}

.analysis-identity-item {
  margin: 0;
  border: 1px solid #95b9da;
  border-radius: 10px;
  background: #e9f4ff;
  padding: 0.3rem 0.42rem;
  display: grid;
  gap: 0.08rem;
}

.analysis-identity-item span {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3f6385;
}

.analysis-identity-item strong {
  font-size: 1rem;
  font-weight: 900;
  color: #10395b;
  line-height: 1.22;
}

.analysis-queue-top {
  margin: 0.12rem 0 0;
  font-size: 0.92rem;
  color: #355473;
  font-weight: 700;
}

.analysis-top-head {
  display: block;
}

.analysis-actions {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  justify-content: flex-start;
  align-items: stretch;
}

.analysis-actions .btn {
  min-height: 34px;
  padding: 0.2rem 0.42rem;
  font-size: 0.8rem;
  line-height: 1.12;
  min-width: 0;
  width: 100%;
}

.analysis-overview-row {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 0.5rem;
  align-items: start;
}

.analysis-overview {
  margin-top: 0;
  border: 1px solid #d6e1ee;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.35rem 0.44rem;
  display: grid;
  gap: 0.26rem;
  grid-template-columns: 1fr;
  max-width: 560px;
}

.analysis-line {
  margin: 0;
  font-size: 0.88rem;
  color: #284560;
  line-height: 1.3;
  border: 1px solid #d3e0ee;
  border-radius: 8px;
  background: #f2f7fd;
  padding: 0.26rem 0.4rem;
  display: block;
  width: 100%;
  max-width: none;
}

.analysis-line[hidden] {
  display: none !important;
}

.analysis-line strong {
  color: #1f3f5b;
  font-weight: 800;
}

.analysis-line span {
  font-weight: 700;
}

.analysis-line.is-status {
  background: #e9f4ff;
  border-color: #c2d7ee;
}

.analysis-line.is-priority {
  background: #f2f7fd;
  border-color: #d3e0ee;
}

.analysis-line.is-queue {
  background: #f3f8ff;
  border-color: #d1dff0;
}

.analysis-line.is-intent {
  background: #f3f8ff;
  border-color: #d1dff0;
}

.analysis-line.is-priority.is-priority-normal {
  background: var(--priority-normal-bg);
  border-color: var(--priority-normal-line);
  color: var(--priority-normal-text);
}

.analysis-line.is-priority.is-priority-urgent {
  background: var(--priority-urgent-bg);
  border-color: var(--priority-urgent-line);
  color: var(--priority-urgent-text);
}

.analysis-line.is-priority.is-priority-urgent strong {
  color: var(--priority-urgent-text);
}

.analysis-line.is-day {
  background: #f2f5ff;
  border-color: #ced7f1;
}

.analysis-line.is-hour {
  background: #f6f8fb;
  border-color: #d8e0ea;
}

.analysis-actions .meta {
  margin: 0;
  border: 1px solid #d6e3f1;
  border-radius: 8px;
  background: #f6faff;
  padding: 0.38rem 0.45rem;
  color: #375673;
  font-weight: 700;
}

.analysis-request-highlight {
  margin-top: 0;
  border: 1px solid #c8d7ea;
  border-left: 4px solid #2f5d93;
  border-radius: 10px;
  background: #f5f9ff;
  padding: 0.45rem 0.55rem;
  max-height: 210px;
  overflow: auto;
}

.analysis-request-highlight h4 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: #325375;
  letter-spacing: 0.01em;
}

.analysis-request {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #1f3850;
  font-weight: 600;
}

.analysis-attachment-wrap {
  margin-top: 0;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.45rem;
}

.analysis-attachment-wrap h4 {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: #233e57;
}

.analysis-attachment-image {
  margin-top: 0.3rem;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border: 1px solid #ccd9e7;
  border-radius: 8px;
  background: #ffffff;
}

.analysis-history-wrap {
  margin-top: 0;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.5rem;
}

.analysis-history-wrap > summary {
  list-style: none;
  cursor: pointer;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #233e57;
}

.analysis-history-wrap > summary::-webkit-details-marker {
  display: none;
}

.analysis-history-wrap > summary::after {
  content: '▾';
  float: right;
  font-size: 0.78rem;
  color: #47637f;
  transition: transform 0.16s ease;
}

.analysis-history-wrap:not([open]) > summary::after {
  transform: rotate(-90deg);
}

.analysis-history {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.38rem;
}

.analysis-detail-row {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 0.5rem;
  align-items: start;
}

.analysis-primary-stack {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
}

.analysis-history-wrap[open] {
  max-height: 360px;
  overflow: auto;
}

.analysis-event {
  border: 1px solid #d4e0ed;
  border-radius: 8px;
  background: #fff;
  padding: 0.38rem 0.45rem;
}

.analysis-event-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.45rem;
}

.analysis-event-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #21435f;
}

.analysis-event-time {
  font-size: 0.72rem;
  color: #56708b;
}

.analysis-event-note {
  margin: 0.22rem 0 0;
  font-size: 0.78rem;
  color: #2a4864;
  line-height: 1.35;
}

body.theme-dark .topbar,
body.theme-dark .panel,
body.theme-dark .dashboard-notifications,
body.theme-dark .dashboard-block,
body.theme-dark .card,
body.theme-dark .kpi,
body.theme-dark .ticket-modal-card,
body.theme-dark .analysis-modal-card,
body.theme-dark .note-modal-card,
body.theme-dark .money-modal-card,
body.theme-dark .user-modal-card,
body.theme-dark .integration-credentials-modal-card,
body.theme-dark .users-form,
body.theme-dark .users-accesses,
body.theme-dark .user-card,
body.theme-dark .smart-list-block,
body.theme-dark .smart-collapse,
body.theme-dark .analysis-request-highlight,
body.theme-dark .analysis-attachment-wrap,
body.theme-dark .analysis-history-wrap,
body.theme-dark .analysis-event,
body.theme-dark .empty {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
}

body.theme-dark .dashboard-notifications {
  border-color: #3a5673;
  background: #1e3146;
}

body.theme-dark .smart-list-title,
body.theme-dark .smart-collapse > summary {
  color: #d6e8fa;
}

body.theme-dark .smart-collapse > summary::before {
  color: #90acc8;
}

body.theme-dark .dashboard-notifications-title {
  color: #d6e7f8;
}

body.theme-dark .legend-notification-link {
  border-color: #8c5965;
  background: #4a2d35;
  color: #f7d6dd;
}

body.theme-dark .legend-notification-link:hover {
  border-color: #a66a76;
  background: #563543;
}

body.theme-dark .dashboard-notifications-badge {
  border-color: #8c5965;
  background: #4a2d35;
  color: #f7d6dd;
}

body.theme-dark .dashboard-notification-item {
  border-color: #496687;
  border-left: 4px solid #5f7f9e;
  background: #24394f;
}

body.theme-dark .dashboard-notification-item.is-unread {
  border-left-color: #ff4a3d;
  background: #24394f;
  box-shadow: inset 0 0 0 1px rgba(255, 74, 61, 0.34);
}

body.theme-dark .dashboard-notification-item.is-read {
  border-left-color: #5f7f9e;
}

body.theme-dark .dashboard-notification-text {
  color: #d8e8f8;
}

body.theme-dark .dashboard-notification-text strong {
  color: #edf6ff;
}

body.theme-dark .dashboard-notification-meta {
  color: #b4c8dc;
}

body.theme-dark .dashboard-notification-empty {
  border-color: #4c6785;
  color: #bfd2e6;
}

body.theme-dark .btn {
  background: #26394d;
  border-color: #415f7d;
  color: #d8e5f3;
}

body.theme-dark .btn.primary {
  background: #35516d;
  border-color: #55779d;
  color: #d8e7f7;
}

body.theme-dark .btn.analyze,
body.theme-dark .support-analyze-btn,
body.theme-dark .dashboard-analyze-btn {
  background: #314f43;
  border-color: #5f947c;
  color: #e2f4ea;
}

body.theme-dark .btn.urgent {
  background: #553131;
  border-color: #8c5959;
  color: #f0d7d7;
}

body.theme-dark .search-control,
body.theme-dark .ticket-form input,
body.theme-dark .ticket-form select,
body.theme-dark .ticket-form textarea,
body.theme-dark .settings-form input,
body.theme-dark .settings-form select,
body.theme-dark .note-modal-form textarea,
body.theme-dark .users-form input,
body.theme-dark .users-form select {
  background: #1f3348;
  border-color: #3b5774;
  color: #e6f1fd;
}

body.theme-dark .money-modal-form label {
  color: #bfd2e6;
}

body.theme-dark .money-modal-input-wrap {
  background: #1f3348;
  border-color: #3b5774;
}

body.theme-dark .money-modal-prefix {
  color: #d8e7f7;
}

body.theme-dark .money-modal-input-wrap input {
  color: #e6f1fd;
}

body.theme-dark .search-control::placeholder,
body.theme-dark .ticket-form input::placeholder,
body.theme-dark .ticket-form textarea::placeholder,
body.theme-dark .settings-form input::placeholder,
body.theme-dark .integration-credentials-form input::placeholder,
body.theme-dark .note-modal-form textarea::placeholder,
body.theme-dark .users-form input::placeholder {
  color: #a9bfd6;
}

body.theme-dark .money-modal-input-wrap input::placeholder {
  color: #a9bfd6;
}

body.theme-dark .money-modal-error {
  color: #f0b3b3;
}

body.theme-dark .integration-credentials-error {
  color: #f0b3b3;
}

body.theme-dark .settings-form label {
  color: #bfd2e6;
}

body.theme-dark .integration-credentials-form label {
  color: #bfd2e6;
}

body.theme-dark .integration-flag {
  color: #bfd2e6;
}

body.theme-dark .integration-simple-note {
  color: #b9cde2;
}

body.theme-dark .integration-modules-grid .integration-module-card {
  border-color: #486584;
  background: #24384d;
}

body.theme-dark .integration-module-head h3 {
  color: #d8e7f7;
}

body.theme-dark .integration-module-head small {
  color: #adc4db;
}

body.theme-dark .integration-quick-steps {
  border-color: #4f6887;
  background: #253b52;
}

body.theme-dark .integration-quick-title {
  color: #d7e6f6;
}

body.theme-dark .integration-quick-steps ol {
  color: #bfd2e5;
}

body.theme-dark .integration-advanced {
  border-color: #4f6887;
  background: #253b52;
}

body.theme-dark .integration-advanced > summary {
  color: #d7e6f6;
}

body.theme-dark .settings-preview {
  border-color: #4f6887;
  background: #253b52;
}

body.theme-dark .integration-credentials-modal-description {
  color: #bfd2e6;
}

body.theme-dark .dashboard-compact-meta,
body.theme-dark .meta,
body.theme-dark .summary,
body.theme-dark .card-summary-line,
body.theme-dark .analysis-request,
body.theme-dark .analysis-event-note {
  color: #cfdeed;
}

body.theme-dark .meta {
  color: #b8cbde;
}

body.theme-dark .summary {
  color: #dbe8f6;
}

body.theme-dark .card-summary-line,
body.theme-dark .meta-note,
body.theme-dark .dashboard-compact-meta {
  background: #24384d;
  border-color: #486486;
  color: #e4eef9;
}

body.theme-dark .card-summary-line strong,
body.theme-dark .meta-note strong,
body.theme-dark .dashboard-compact-meta strong {
  color: #f2f8ff;
}

body.theme-dark .management-note {
  border-color: #4f678a;
  background: #2a3f59;
  box-shadow: inset 0 0 0 1px rgba(124, 157, 197, 0.28);
}

body.theme-dark .management-note strong {
  color: #d8e9ff;
}

body.theme-dark .support-management-note {
  color: #e4eef8;
}

body.theme-dark .analysis-event-time,
body.theme-dark .muted,
body.theme-dark .panel small,
body.theme-dark .analysis-history-wrap > summary,
body.theme-dark .analysis-request-highlight h4 {
  color: #afc4d9;
}

body.theme-dark .analysis-history-wrap > summary::after {
  color: #afc4d9;
}

body.theme-dark .analysis-attachment-image {
  background: #0f1927;
  border-color: #36506d;
}

body.theme-dark .analysis-line.is-status {
  background: #28445e;
  border-color: #5c7fa8;
  color: #e6f1fc;
}

body.theme-dark .analysis-line.is-day,
body.theme-dark .analysis-line.is-hour,
body.theme-dark .analysis-line.is-priority,
body.theme-dark .analysis-line.is-queue,
body.theme-dark .analysis-line.is-intent {
  background: #2a3f55;
  border-color: #547091;
  color: #dce9f6;
}

body.theme-dark .analysis-line.is-priority.is-priority-normal {
  background: var(--priority-normal-bg);
  border-color: var(--priority-normal-line);
  color: var(--priority-normal-text);
}

body.theme-dark .analysis-line.is-priority.is-priority-normal strong,
body.theme-dark .analysis-line.is-priority.is-priority-normal span {
  color: var(--priority-normal-text);
}

body.theme-dark .analysis-line.is-priority.is-priority-urgent {
  background: var(--priority-urgent-bg);
  border-color: var(--priority-urgent-line);
  color: var(--priority-urgent-text);
}

body.theme-dark .analysis-line.is-priority.is-priority-urgent strong,
body.theme-dark .analysis-line.is-priority.is-priority-urgent span {
  color: var(--priority-urgent-text);
}

body.theme-dark .analysis-modal-card {
  background: #1a2b3d;
  border-color: #385371;
}

body.theme-dark .analysis-meta,
body.theme-dark .analysis-protocol-top,
body.theme-dark .analysis-queue-top {
  color: #e4f0fb;
}

body.theme-dark .analysis-overview {
  background: #1f3347;
  border-color: #4f6b8a;
}

body.theme-dark .analysis-line {
  background: #253b51;
  border-color: #547194;
  color: #deebf8;
}

body.theme-dark .analysis-line strong,
body.theme-dark .analysis-line span {
  color: #f3f9ff;
}

body.theme-dark .analysis-actions .meta {
  border-color: #4f6887;
  background: #253b52;
  color: #d7e7f8;
}

body.theme-dark .analysis-request-highlight {
  border-color: #4b6889;
  border-left-color: #7ca7d7;
  background: #20374f;
}

body.theme-dark .analysis-request-highlight h4 {
  color: #d2e6f9;
}

body.theme-dark .analysis-request {
  color: #edf6ff;
}

body.theme-dark .analysis-attachment-wrap h4,
body.theme-dark .analysis-history-wrap > summary {
  color: #d4e7fa;
}

body.theme-dark .analysis-event-title {
  color: #e6f1fc;
}

body.theme-dark .dashboard-board {
  border-color: #2a425a;
  background: linear-gradient(180deg, #17283a 0%, #152538 100%);
}

body.theme-dark .dashboard-block {
  border-color: #2f4862;
  background: #1e2a36;
  box-shadow: none;
}

body.theme-dark .dashboard-block h3 {
  color: #d4e6f7;
}

body.theme-dark .dashboard-block.support {
  border-color: #3b5065;
  background: #1f2d3a;
  border-left-color: #6c97c5;
}

body.theme-dark .dashboard-block.commercial {
  border-color: #3a4e62;
  background: #202d39;
  border-left-color: #b78a56;
}

body.theme-dark .dashboard-block.chart,
body.theme-dark .board-chart {
  border-color: #354b60;
  background: linear-gradient(150deg, #1c2b38 0%, #1d2d3b 55%, #1f3141 100%);
  box-shadow: none;
}

body.theme-dark .board-chart h3 {
  color: #d3e7fb;
  text-shadow: none;
}

body.theme-dark .board-chart .dash-chart-panel {
  border-color: rgba(98, 148, 196, 0.28);
  background: linear-gradient(145deg, rgba(26, 47, 72, 0.9), rgba(24, 43, 66, 0.92));
  box-shadow: none;
}

body.theme-dark .board-chart .dash-chart-panel::before {
  background: radial-gradient(circle, rgba(121, 180, 230, 0.16) 0%, rgba(121, 180, 230, 0) 70%);
}

body.theme-dark .board-chart .dash-chart-panel h4 {
  color: #cfe5f8;
  text-shadow: none;
}

body.theme-dark .board-chart .dash-donut-card {
  border-color: rgba(103, 155, 206, 0.24);
  background: linear-gradient(160deg, rgba(30, 54, 81, 0.82), rgba(27, 49, 73, 0.86));
  box-shadow: none;
}

body.theme-dark .board-chart .dash-donut-title {
  color: #d6e8f8;
}

body.theme-dark .board-chart .dash-donut-center strong {
  color: #edf6ff;
}

body.theme-dark .board-chart .dash-donut-center span,
body.theme-dark .board-chart .dash-donut-meta {
  color: #b7cee4;
}

body.theme-dark .board-chart .dash-status-stack-track {
  border-color: rgba(108, 151, 193, 0.3);
  background: rgba(19, 34, 52, 0.8);
  box-shadow: inset 0 1px 2px rgba(7, 14, 24, 0.3);
}

body.theme-dark .board-chart .dash-status-legend p {
  color: #cee2f4;
}

body.theme-dark .board-chart .dash-status-legend strong {
  color: #eef6ff;
}

body.theme-dark .dashboard-performance-head h3 {
  color: #c9d8e6;
}

body.theme-dark .dashboard-period-btn {
  border-color: #40566d;
  background: #202c38;
  color: #afc0d0;
}

body.theme-dark .dashboard-period-btn.is-active {
  border-color: #5d7893;
  background: #2b3f53;
  color: #d6e3ef;
}

body.theme-dark .dashboard-performance-card {
  border-color: #3d556c;
  background: #1f2e3f;
}

body.theme-dark .dashboard-performance-card.support {
  border-left-color: #6a9ad0;
  background: #203244;
}

body.theme-dark .dashboard-performance-card.commercial {
  border-left-color: #ba8d5b;
  background: #232f3c;
}

body.theme-dark .dashboard-performance-card h4 {
  color: #c8d7e6;
}

body.theme-dark .dashboard-performance-kpis p {
  border-color: #455f77;
  background: #25384b;
}

body.theme-dark .dashboard-performance-kpis span {
  color: #9db0c3;
}

body.theme-dark .dashboard-performance-kpis strong {
  color: #e3edf8;
}

body.theme-dark .dashboard-performance-bar {
  border-color: #405970;
  background: #182431;
}

body.theme-dark .dashboard-performance-foot {
  color: #c0d3e6;
}

body.theme-dark .kpi {
  border-color: #3f556a;
  background: #222f3c;
  color: #bdcedf;
}

body.theme-dark .kpi:hover {
  border-color: #5a7289;
  background: #283747;
}

body.theme-dark .kpi strong,
body.theme-dark .dashboard-summary-card strong {
  color: #d0deea;
}

body.theme-dark .kpi.kpi-waiting {
  background: #30475f;
  border-color: #7199c1;
  color: #d8ebff;
}

body.theme-dark .kpi.kpi-returns {
  background: #584229;
  border-color: #a37a47;
  color: #ffe1b2;
}

body.theme-dark .kpi.kpi-closed {
  background: #2f4d40;
  border-color: #6aa687;
  color: #d1f0e1;
}

body.theme-dark .kpi.kpi-resolved {
  background: #2d4a3b;
  border-color: #5f9a79;
  color: #d8f4e6;
}

body.theme-dark .performance-segment.closed {
  background: #67c28f;
}

body.theme-dark .performance-segment.won {
  background: #6bcb97;
}

body.theme-dark .performance-segment.lost {
  background: #d27373;
}

body.theme-dark .performance-segment.open {
  background: #73a5da;
}

body.theme-dark .card.pending-gestao {
  background: #213447;
  border-left-color: #6388b1;
}

body.theme-dark .card.in-support {
  background: #223241;
  border-left-color: #d0b066;
}

body.theme-dark .card.in-treatment {
  background: #243547;
  border-left-color: #d0b066;
}

body.theme-dark .card.in-support .card-summary-line,
body.theme-dark .card.in-treatment .card-summary-line,
body.theme-dark .card.closed .card-summary-line {
  background: #2a425a;
  border-color: #587695;
  color: #e6f0fa;
}

body.theme-dark .card.resolved-urgent {
  background: #2a3643;
  border-left-color: #a9757c;
  box-shadow: none;
}

body.theme-dark .dashboard-ticket-card.sla-attention {
  box-shadow: inset 0 0 0 1px #9b7b4b;
}

body.theme-dark .dashboard-ticket-card.sla-critical {
  box-shadow: inset 0 0 0 1px #9f5f66;
}

body.theme-dark .card.resolved-urgent .card-summary-line {
  background: #31495f;
  border-color: #5f7f9f;
  color: #e8f2fb;
}

body.theme-dark .card.resolved-urgent .meta {
  color: #c5d7ea;
}

body.theme-dark .card.closed {
  background: #2a3440;
  border-left-color: #5f8b77;
  opacity: 1;
}

body.theme-dark .badge {
  background: #2f455c;
  border-color: #5f7f9f;
  color: #e6eff8;
}

body.theme-dark .badge.urgent {
  background: #5a333b;
  border-color: #b0707e;
  color: #ffe4ea;
}

body.theme-dark .badge.normal {
  background: #315244;
  border-color: #669980;
  color: #dff4e9;
}

body.theme-dark .card-title {
  color: #d4e0ee;
  font-weight: 700;
}

body.theme-dark .support-meta-item strong,
body.theme-dark .dashboard-compact-meta strong {
  color: #d9e8f7;
}

body.theme-dark .dashboard-meta-sep {
  color: #8ea8c2;
}

body.theme-dark .kpi strong,
body.theme-dark .dashboard-summary-card strong {
  color: #d3e0ee;
}

body.theme-dark .topbar h1,
body.theme-dark .panel h2 {
  color: #d4e0ed;
}

body.theme-dark .section-title-emphasis {
  background: #284251;
  border-color: #4f768a;
  color: #d9ecf7;
}

body.theme-dark .users-form-title {
  color: #d9eafd;
}

body.theme-dark .users-accesses legend {
  color: #d1e6fb;
}

body.theme-dark .users-accesses label {
  color: #d7e9fb;
}

body.theme-dark .user-card {
  border-color: #436585;
  border-left-color: #5d8fba;
  background: #1d3043;
}

body.theme-dark .user-card.is-inactive {
  background: #1a2735;
  opacity: 0.9;
}

body.theme-dark .user-card-head h3 {
  color: #eaf4ff;
}

body.theme-dark .user-card-meta {
  color: #c8daed;
}

body.theme-dark .user-card-meta .sep {
  color: #8ea6bf;
}

body.theme-dark .user-main-action {
  border-color: #5f83a9;
  background: #2a425a;
  color: #e3effc;
}

body.theme-dark .kpi.kpi-returns small,
body.theme-dark .kpi.kpi-closed small,
body.theme-dark .dashboard-summary-card small {
  color: #b8cde2;
}

body.theme-dark .kpi.kpi-returns.is-active {
  border-color: #b28f5a;
  box-shadow: inset 0 0 0 1px #cfb183;
}

body.theme-dark .btn,
body.theme-dark .badge,
body.theme-dark .kpi small {
  font-weight: 700;
}

/* Harmonizacao geral de contraste */
body:not(.theme-dark) .topbar h1,
body:not(.theme-dark) .panel h2,
body:not(.theme-dark) .dashboard-block h3 {
  color: #203f5c;
}

body:not(.theme-dark) .panel small,
body:not(.theme-dark) .muted,
body:not(.theme-dark) .meta {
  color: #3e5a75;
}

body:not(.theme-dark) .topbar p,
body:not(.theme-dark) .dashboard-notification-meta,
body:not(.theme-dark) .dashboard-performance-kpis span,
body:not(.theme-dark) .dashboard-summary-card small,
body:not(.theme-dark) .kpi small {
  color: #405f7a;
}

body:not(.theme-dark) .dashboard-performance-foot {
  color: #345570;
}

body:not(.theme-dark) .search-control::placeholder,
body:not(.theme-dark) .ticket-form input::placeholder,
body:not(.theme-dark) .ticket-form textarea::placeholder,
body:not(.theme-dark) .settings-form input::placeholder,
body:not(.theme-dark) .note-modal-form textarea::placeholder,
body:not(.theme-dark) .users-form input::placeholder {
  color: #59728b;
}

body:not(.theme-dark) .board-chart {
  border-color: #c4d7ea;
  background:
    radial-gradient(circle at 12% 10%, rgba(95, 177, 240, 0.12), rgba(95, 177, 240, 0) 42%),
    radial-gradient(circle at 86% 84%, rgba(130, 155, 230, 0.08), rgba(130, 155, 230, 0) 44%),
    linear-gradient(145deg, #f3f8fe 0%, #edf4fc 55%, #e8f1fb 100%);
  box-shadow: inset 0 0 0 1px rgba(188, 210, 232, 0.45);
}

body:not(.theme-dark) .board-chart h3 {
  color: #234765;
}

body:not(.theme-dark) .board-chart .dash-chart-panel {
  border-color: #c9dcf0;
  background: linear-gradient(150deg, rgba(248, 252, 255, 0.98), rgba(238, 246, 254, 0.98));
}

body:not(.theme-dark) .board-chart .dash-chart-panel h4 {
  color: #2a4f70;
}

body:not(.theme-dark) .board-chart .dash-donut-card {
  border-color: #c6dcef;
  background: linear-gradient(160deg, #fbfdff, #f1f7ff);
}

body:not(.theme-dark) .board-chart .dash-donut-title {
  color: #294b69;
}

body:not(.theme-dark) .board-chart .dash-donut-ring::after {
  background: #f8fbff;
}

body:not(.theme-dark) .board-chart .dash-donut-center strong {
  color: #1f435f;
}

body:not(.theme-dark) .board-chart .dash-donut-center span {
  color: #4a6b88;
}

body:not(.theme-dark) .board-chart .dash-donut-meta,
body:not(.theme-dark) .board-chart .dash-status-legend p,
body:not(.theme-dark) .board-chart .dash-status-legend strong {
  color: #2c4f6f;
}

body:not(.theme-dark) .board-chart .dash-status-stack-track {
  border-color: #c7d9eb;
  background: #f4f8fd;
}

body.theme-dark .topbar p,
body.theme-dark .panel small,
body.theme-dark .muted,
body.theme-dark .meta {
  color: #b5c9dd;
}

body.theme-dark .ticket-detail-box,
body.theme-dark .analysis-line,
body.theme-dark .users-form input,
body.theme-dark .users-form select,
body.theme-dark .ticket-form input,
body.theme-dark .ticket-form select,
body.theme-dark .ticket-form textarea,
body.theme-dark .search-control {
  color: #e8f2fc;
}

body.theme-dark .board-chart .dash-donut-ring::after {
  background: #17304a;
}

body.theme-dark .board-chart .dash-donut-center strong {
  color: #eff7ff;
}

body.theme-dark .board-chart .dash-donut-center span {
  color: #c5d9ec;
}

body.theme-dark .board-chart .dash-donut-meta,
body.theme-dark .board-chart .dash-status-legend p,
body.theme-dark .board-chart .dash-status-legend strong {
  color: #d6e7f7;
}

/* Apple-inspired visual system (opt-in via .theme-apple) */
:root {
  --apple-radius-s: 10px;
  --apple-radius-m: 12px;
  --apple-radius-l: 14px;
  --apple-shadow-light: 0 6px 18px rgba(15, 23, 42, 0.06);
  --apple-shadow-dark: 0 10px 24px rgba(0, 0, 0, 0.3);
}

body.theme-apple {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
}

body.theme-apple:not(.theme-dark) {
  --bg: #f5f5f7;
  --card: #ffffff;
  --line: #d2d2d7;
  --text: #1d1d1f;
  --muted: #545a63;
  --blue: #0071e3;
  --green: #2e7d32;
  --amber: #b86a00;
  --red: #c62828;
  --sidebar: #f2f2f7;
  --sidebar-line: #d2d2d7;
  --priority-normal-bg: #ecf7f0;
  --priority-normal-line: #8ec39e;
  --priority-normal-text: #1e5d3c;
  --priority-urgent-bg: #fbecec;
  --priority-urgent-line: #d39b9b;
  --priority-urgent-text: #8b3f3f;
}

body.theme-apple.theme-dark {
  --bg: #0f1115;
  --card: #1c1c1e;
  --line: #3a3a3c;
  --text: #d8dce2;
  --muted: #9aa1ab;
  --text-strong: #e2e6ec;
  --text-soft: #b4bbc6;
  --text-dim: #8c939d;
  --blue: #0a84ff;
  --green: #32d74b;
  --amber: #ff9f0a;
  --red: #ff453a;
  --sidebar: #161618;
  --sidebar-line: #303033;
  --priority-normal-bg: #233d31;
  --priority-normal-line: #4e8366;
  --priority-normal-text: #d9f3e3;
  --priority-urgent-bg: #442d2d;
  --priority-urgent-line: #8f5c5c;
  --priority-urgent-text: #f4dede;
}

body.theme-apple .sidebar {
  box-shadow: inset -1px 0 0 var(--sidebar-line);
}

body.theme-apple:not(.theme-dark) .sidebar {
  color: #2f3035;
}

body.theme-apple:not(.theme-dark) .sidebar-head small {
  color: #6e6e73;
}

body.theme-apple:not(.theme-dark) .nav-btn {
  color: #2f3035;
}

body.theme-apple:not(.theme-dark) .nav-btn:hover {
  background: #e7eef8;
}

body.theme-apple:not(.theme-dark) .nav-btn.is-active {
  border-color: #9fc3ed;
  background: #e8f2ff;
  color: #0b4d90;
}

body.theme-apple:not(.theme-dark) .sidebar-theme-controls {
  border-top-color: #d4d7df;
}

body.theme-apple:not(.theme-dark) .sidebar-theme-controls .theme-toggle-main,
body.theme-apple:not(.theme-dark) .sidebar-theme-controls .theme-style-toggle {
  border-color: #cdd7e4;
  background: #f4f7fb;
  color: #2f3035;
}

body.theme-apple:not(.theme-dark) .sidebar-theme-controls .theme-toggle-main:hover,
body.theme-apple:not(.theme-dark) .sidebar-theme-controls .theme-style-toggle:hover {
  background: #eaf0f8;
}

body.theme-apple .topbar {
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(8px);
}

body.theme-apple .panel,
body.theme-apple .dashboard-block,
body.theme-apple .card,
body.theme-apple .ticket-modal-card,
body.theme-apple .analysis-modal-card,
body.theme-apple .note-modal-card,
body.theme-apple .money-modal-card,
body.theme-apple .user-modal-card,
body.theme-apple .integration-credentials-modal-card,
body.theme-apple .users-form,
body.theme-apple .users-accesses,
body.theme-apple .user-card {
  border-radius: var(--apple-radius-l);
}

body.theme-apple:not(.theme-dark) .panel,
body.theme-apple:not(.theme-dark) .dashboard-block,
body.theme-apple:not(.theme-dark) .card,
body.theme-apple:not(.theme-dark) .ticket-modal-card,
body.theme-apple:not(.theme-dark) .analysis-modal-card,
body.theme-apple:not(.theme-dark) .note-modal-card,
body.theme-apple:not(.theme-dark) .money-modal-card,
body.theme-apple:not(.theme-dark) .user-modal-card,
body.theme-apple:not(.theme-dark) .integration-credentials-modal-card,
body.theme-apple:not(.theme-dark) .users-form,
body.theme-apple:not(.theme-dark) .users-accesses,
body.theme-apple:not(.theme-dark) .user-card {
  box-shadow: var(--apple-shadow-light);
}

body.theme-apple.theme-dark .panel,
body.theme-apple.theme-dark .dashboard-block,
body.theme-apple.theme-dark .card,
body.theme-apple.theme-dark .ticket-modal-card,
body.theme-apple.theme-dark .analysis-modal-card,
body.theme-apple.theme-dark .note-modal-card,
body.theme-apple.theme-dark .money-modal-card,
body.theme-apple.theme-dark .user-modal-card,
body.theme-apple.theme-dark .integration-credentials-modal-card,
body.theme-apple.theme-dark .users-form,
body.theme-apple.theme-dark .users-accesses,
body.theme-apple.theme-dark .user-card {
  box-shadow: var(--apple-shadow-dark);
}

body.theme-apple .btn,
body.theme-apple .search-control,
body.theme-apple .ticket-form input,
body.theme-apple .ticket-form select,
body.theme-apple .ticket-form textarea,
body.theme-apple .users-form input,
body.theme-apple .users-form select,
body.theme-apple .integration-credentials-form input,
body.theme-apple .note-modal-form textarea,
body.theme-apple .badge,
body.theme-apple .role-pill {
  border-radius: var(--apple-radius-s);
}

body.theme-apple:not(.theme-dark) .btn {
  border-color: #c7c7cc;
  background: #ffffff;
  color: #1d1d1f;
}

body.theme-apple:not(.theme-dark) .btn:hover {
  background: #f5f7fb;
}

body.theme-apple:not(.theme-dark) .btn.primary {
  border-color: #9bc6f1;
  background: #e8f2ff;
  color: #0055a6;
}

body.theme-apple:not(.theme-dark) .btn.urgent {
  border-color: #d8a364;
  background: #fff4e7;
  color: #73430c;
}

body.theme-apple:not(.theme-dark) .btn.analyze,
body.theme-apple:not(.theme-dark) .support-analyze-btn,
body.theme-apple:not(.theme-dark) .dashboard-analyze-btn {
  border-color: #8ec39e;
  background: #ecf7f0;
  color: #1e5d3c;
}

body.theme-apple.theme-dark .btn {
  border-color: #505055;
  background: #2c2c2e;
  color: #f5f5f7;
}

body.theme-apple.theme-dark .btn.primary {
  border-color: #3f6ea5;
  background: #243a55;
  color: #d9eaff;
}

body.theme-apple.theme-dark .btn.urgent {
  border-color: #86683a;
  background: #45351f;
  color: #ffe4bc;
}

body.theme-apple.theme-dark .btn.analyze,
body.theme-apple.theme-dark .support-analyze-btn,
body.theme-apple.theme-dark .dashboard-analyze-btn {
  border-color: #5f9079;
  background: #314f43;
  color: #e2f4ea;
}

body.theme-apple.theme-dark .search-control,
body.theme-apple.theme-dark .ticket-form input,
body.theme-apple.theme-dark .ticket-form select,
body.theme-apple.theme-dark .ticket-form textarea,
body.theme-apple.theme-dark .users-form input,
body.theme-apple.theme-dark .users-form select,
body.theme-apple.theme-dark .integration-credentials-form input,
body.theme-apple.theme-dark .note-modal-form textarea {
  background: #232326;
  border-color: #4a4a4f;
  color: #f5f5f7;
}

body.theme-apple:not(.theme-dark) .kpi,
body.theme-apple:not(.theme-dark) .dashboard-summary-card,
body.theme-apple:not(.theme-dark) .dash-chart-panel,
body.theme-apple:not(.theme-dark) .dash-donut-card {
  border-radius: var(--apple-radius-m);
}

body.theme-apple.theme-dark .kpi,
body.theme-apple.theme-dark .dashboard-summary-card,
body.theme-apple.theme-dark .dash-chart-panel,
body.theme-apple.theme-dark .dash-donut-card {
  border-radius: var(--apple-radius-m);
}

/* Apple Clean variation (opt-in via .theme-apple-clean) */
body.theme-apple.theme-apple-clean:not(.theme-dark) {
  --bg: #f7f7f8;
  --card: #ffffff;
  --line: #e7e7ec;
  --text: #131316;
  --muted: #535861;
  --sidebar: #f7f7f8;
  --sidebar-line: #e9e9ee;
}

body.theme-apple.theme-apple-clean.theme-dark {
  --bg: #0c0d10;
  --card: #17181c;
  --line: #2f3036;
  --text: #d5dae2;
  --muted: #99a2af;
  --text-strong: #dfe4ec;
  --text-soft: #b0b8c4;
  --text-dim: #89919e;
  --sidebar: #121318;
  --sidebar-line: #262831;
}

body.theme-apple.theme-apple-clean .topbar {
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(14px);
}

body.theme-apple.theme-apple-clean:not(.theme-dark) .panel,
body.theme-apple.theme-apple-clean:not(.theme-dark) .dashboard-block,
body.theme-apple.theme-apple-clean:not(.theme-dark) .card,
body.theme-apple.theme-apple-clean:not(.theme-dark) .ticket-modal-card,
body.theme-apple.theme-apple-clean:not(.theme-dark) .analysis-modal-card,
body.theme-apple.theme-apple-clean:not(.theme-dark) .note-modal-card,
body.theme-apple.theme-apple-clean:not(.theme-dark) .money-modal-card,
body.theme-apple.theme-apple-clean:not(.theme-dark) .user-modal-card,
body.theme-apple.theme-apple-clean:not(.theme-dark) .users-form,
body.theme-apple.theme-apple-clean:not(.theme-dark) .users-accesses,
body.theme-apple.theme-apple-clean:not(.theme-dark) .user-card {
  border-color: #ececf1;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 14px 30px rgba(15, 23, 42, 0.04);
}

body.theme-apple.theme-apple-clean.theme-dark .panel,
body.theme-apple.theme-apple-clean.theme-dark .dashboard-block,
body.theme-apple.theme-apple-clean.theme-dark .card,
body.theme-apple.theme-apple-clean.theme-dark .ticket-modal-card,
body.theme-apple.theme-apple-clean.theme-dark .analysis-modal-card,
body.theme-apple.theme-apple-clean.theme-dark .note-modal-card,
body.theme-apple.theme-apple-clean.theme-dark .money-modal-card,
body.theme-apple.theme-apple-clean.theme-dark .user-modal-card,
body.theme-apple.theme-apple-clean.theme-dark .users-form,
body.theme-apple.theme-apple-clean.theme-dark .users-accesses,
body.theme-apple.theme-apple-clean.theme-dark .user-card {
  border-color: #2f3036;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.32),
    0 16px 34px rgba(0, 0, 0, 0.24);
}

body.theme-apple.theme-apple-clean:not(.theme-dark) .btn {
  border-color: #e4e4ea;
  background: #ffffff;
  color: #1a1a1f;
}

body.theme-apple.theme-apple-clean:not(.theme-dark) .btn.primary {
  border-color: #141419;
  background: #141419;
  color: #ffffff;
}

body.theme-apple.theme-apple-clean.theme-dark .btn.primary {
  border-color: #f4f5f7;
  background: #f4f5f7;
  color: #121318;
}

body.theme-apple.theme-apple-clean:not(.theme-dark) .kpi,
body.theme-apple.theme-apple-clean:not(.theme-dark) .dashboard-summary-card,
body.theme-apple.theme-apple-clean:not(.theme-dark) .dash-chart-panel,
body.theme-apple.theme-apple-clean:not(.theme-dark) .dash-donut-card {
  border-color: #ececf1;
  box-shadow: none;
}

body.theme-apple.theme-apple-clean.theme-dark .kpi,
body.theme-apple.theme-apple-clean.theme-dark .dashboard-summary-card,
body.theme-apple.theme-apple-clean.theme-dark .dash-chart-panel,
body.theme-apple.theme-apple-clean.theme-dark .dash-donut-card {
  border-color: #2d2f38;
  box-shadow: none;
}

/* Apple Pure variation (ultra minimal) */
body.theme-apple.theme-apple-pure:not(.theme-dark) {
  --bg: #f9f9fa;
  --card: #ffffff;
  --line: #ebebef;
  --text: #111214;
  --muted: #555d68;
  --sidebar: #f9f9fa;
  --sidebar-line: #ececf1;
}

body.theme-apple.theme-apple-pure.theme-dark {
  --bg: #0b0c10;
  --card: #16171b;
  --line: #2c2e36;
  --text: #d4dae3;
  --muted: #98a2ae;
  --text-strong: #dde4ed;
  --text-soft: #aeb8c5;
  --text-dim: #87919d;
  --sidebar: #101116;
  --sidebar-line: #252832;
}

body.theme-apple.theme-apple-pure .topbar {
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(16px);
}

body.theme-apple.theme-apple-pure .panel,
body.theme-apple.theme-apple-pure .dashboard-block,
body.theme-apple.theme-apple-pure .card,
body.theme-apple.theme-apple-pure .ticket-modal-card,
body.theme-apple.theme-apple-pure .analysis-modal-card,
body.theme-apple.theme-apple-pure .note-modal-card,
body.theme-apple.theme-apple-pure .money-modal-card,
body.theme-apple.theme-apple-pure .user-modal-card,
body.theme-apple.theme-apple-pure .users-form,
body.theme-apple.theme-apple-pure .users-accesses,
body.theme-apple.theme-apple-pure .user-card {
  border-color: var(--line);
  box-shadow: none;
}

body.theme-apple.theme-apple-pure:not(.theme-dark) .btn {
  border-color: #e7e7ec;
  background: #ffffff;
  color: #1a1b1f;
}

body.theme-apple.theme-apple-pure:not(.theme-dark) .btn.primary {
  border-color: #111214;
  background: #111214;
  color: #ffffff;
}

body.theme-apple.theme-apple-pure.theme-dark .btn.primary {
  border-color: #f3f4f6;
  background: #f3f4f6;
  color: #101116;
}

body.theme-apple.theme-apple-pure .analysis-request-highlight {
  border-left-width: 2px;
}

body.theme-apple.theme-apple-pure .analysis-history-wrap {
  border: 0;
  background: transparent;
  padding: 0;
}

body.theme-apple.theme-apple-pure .analysis-history-wrap > summary {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

body.theme-apple.theme-apple-pure .analysis-history {
  gap: 0.5rem;
}

body.theme-apple.theme-apple-pure .analysis-event {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: none;
  padding: 0.5rem 0.62rem;
}

body.theme-apple.theme-apple-pure .analysis-event-title {
  color: var(--text);
  font-weight: 700;
}

body.theme-apple.theme-apple-pure .analysis-event-time {
  color: var(--muted);
}

body.theme-apple.theme-apple-pure .analysis-event-note {
  color: color-mix(in srgb, var(--text) 92%, #7a7f89 8%);
  line-height: 1.42;
}

body.theme-apple.theme-apple-pure .dashboard-notifications {
  border-color: var(--line);
  box-shadow: none;
}

body.theme-apple.theme-apple-pure .dashboard-notification-item {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: none;
}

/* Graphite variation (low-blue, low-border, softer dark reading) */
body.theme-graphite:not(.theme-dark) {
  --bg: #f2f4f7;
  --card: #ffffff;
  --line: #d7dce3;
  --text: #1f252c;
  --muted: #4f5c69;
  --blue: #5f6f83;
  --green: #4f8d72;
  --amber: #a97e43;
  --red: #a16464;
  --sidebar: #e9edf2;
  --sidebar-line: #d3d9e2;
  --priority-normal-bg: #edf5f1;
  --priority-normal-line: #8cb19f;
  --priority-normal-text: #2c5b46;
  --priority-urgent-bg: #f6ecec;
  --priority-urgent-line: #c7a0a0;
  --priority-urgent-text: #724343;
}

body.theme-graphite.theme-dark {
  --bg: #0f1114;
  --card: #171b20;
  --line: #2b3139;
  --text: #c4ccd6;
  --muted: #8f99a5;
  --text-strong: #d7dee7;
  --text-soft: #aeb7c3;
  --text-dim: #7f8995;
  --blue: #7a8899;
  --green: #6a9b83;
  --amber: #b59a75;
  --red: #b07a7a;
  --sidebar: #0c0f13;
  --sidebar-line: #1d232b;
  --priority-normal-bg: #24322c;
  --priority-normal-line: #4f7767;
  --priority-normal-text: #cde3d8;
  --priority-urgent-bg: #3f2f2f;
  --priority-urgent-line: #7b5a5a;
  --priority-urgent-text: #e8d3d3;
}

body.theme-graphite .panel,
body.theme-graphite .dashboard-block,
body.theme-graphite .card,
body.theme-graphite .ticket-modal-card,
body.theme-graphite .analysis-modal-card,
body.theme-graphite .note-modal-card,
body.theme-graphite .money-modal-card,
body.theme-graphite .user-modal-card,
body.theme-graphite .integration-credentials-modal-card,
body.theme-graphite .users-form,
body.theme-graphite .users-accesses,
body.theme-graphite .user-card,
body.theme-graphite .dashboard-notifications,
body.theme-graphite .smart-list-block,
body.theme-graphite .smart-collapse {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  box-shadow: none;
}

body.theme-graphite .btn,
body.theme-graphite .search-control,
body.theme-graphite .ticket-form input,
body.theme-graphite .ticket-form select,
body.theme-graphite .ticket-form textarea,
body.theme-graphite .users-form input,
body.theme-graphite .users-form select,
body.theme-graphite .integration-credentials-form input,
body.theme-graphite .note-modal-form textarea {
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--card) 94%, var(--bg));
  color: var(--text);
}

body.theme-graphite .btn.primary {
  border-color: color-mix(in srgb, var(--line) 80%, var(--text));
  background: color-mix(in srgb, var(--card) 78%, var(--text) 22%);
  color: var(--text-strong, var(--text));
}

body.theme-graphite .btn.analyze,
body.theme-graphite .support-analyze-btn,
body.theme-graphite .dashboard-analyze-btn {
  border-color: color-mix(in srgb, var(--line) 62%, #6d9d89 38%);
  background: color-mix(in srgb, var(--card) 74%, #4f7f6c 26%);
  color: var(--text-strong, var(--text));
}

body.theme-graphite .nav-btn {
  color: color-mix(in srgb, var(--text) 86%, var(--muted));
}

body.theme-graphite .nav-btn.is-active {
  border-color: color-mix(in srgb, var(--line) 70%, var(--text));
  background: color-mix(in srgb, var(--card) 84%, var(--text) 16%);
  color: var(--text-strong, var(--text));
}

body.theme-graphite .sidebar-head small,
body.theme-graphite .panel small,
body.theme-graphite .muted,
body.theme-graphite .meta {
  color: var(--text-soft, var(--muted));
}

body.theme-graphite .card-title,
body.theme-graphite .smart-list-title,
body.theme-graphite .section-title-emphasis,
body.theme-graphite .analysis-meta {
  color: var(--text-strong, var(--text));
}

/* Graphite modal tuning: reduce blue accents and keep decision blocks neutral */
body.theme-graphite .analysis-modal-card {
  background: color-mix(in srgb, var(--card) 94%, var(--bg));
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
}

body.theme-graphite .analysis-overview,
body.theme-graphite .analysis-actions .meta,
body.theme-graphite .analysis-request-highlight,
body.theme-graphite .analysis-attachment-wrap,
body.theme-graphite .analysis-history-wrap,
body.theme-graphite .analysis-event {
  background: color-mix(in srgb, var(--card) 93%, var(--bg));
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
}

body.theme-graphite .analysis-request-highlight {
  border-left-color: color-mix(in srgb, var(--line) 48%, var(--text) 52%);
}

body.theme-graphite .analysis-line {
  background: color-mix(in srgb, var(--card) 91%, var(--bg));
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
  color: var(--text);
}

body.theme-graphite .analysis-line strong,
body.theme-graphite .analysis-line span,
body.theme-graphite .analysis-event-title {
  color: var(--text-strong, var(--text));
}

body.theme-graphite .analysis-line.is-status {
  background: color-mix(in srgb, var(--card) 82%, #6f7d8f 18%);
  border-color: color-mix(in srgb, var(--line) 72%, #667486 28%);
}

body.theme-graphite .analysis-line.is-queue,
body.theme-graphite .analysis-line.is-intent,
body.theme-graphite .analysis-line.is-day,
body.theme-graphite .analysis-line.is-hour {
  background: color-mix(in srgb, var(--card) 90%, var(--bg));
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
}

body.theme-graphite .ticket-queue-focus {
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
  color: var(--text-strong, var(--text));
}

body.theme-graphite .ticket-queue-focus strong {
  color: var(--text-strong, var(--text));
}

body.theme-graphite .ticket-identity-prominent {
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--card) 90%, var(--bg));
}

body.theme-graphite .ticket-client-label {
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--card) 95%, var(--bg));
  color: var(--text-soft, var(--muted));
}

body.theme-graphite .ticket-company-label {
  color: var(--text-soft, var(--muted));
}

body.theme-graphite .analysis-identity-item {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
}

body.theme-graphite .analysis-identity-item span {
  color: var(--text-soft, var(--muted));
}

body.theme-graphite .analysis-identity-item strong {
  color: var(--text-strong, var(--text));
}

body.theme-graphite .analysis-request,
body.theme-graphite .analysis-event-note {
  color: var(--text);
}

body.theme-graphite .analysis-event-time,
body.theme-graphite .analysis-history-wrap > summary,
body.theme-graphite .analysis-request-highlight h4 {
  color: var(--text-soft, var(--muted));
}

body.theme-graphite .dashboard-block.chart,
body.theme-graphite .board-chart {
  background: color-mix(in srgb, var(--card) 94%, var(--bg));
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
}

body.theme-graphite .dashboard-block.support,
body.theme-graphite .dashboard-block.commercial {
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
}

body.theme-graphite .dashboard-block.support {
  border-left-color: color-mix(in srgb, #7ea8d3 60%, var(--line) 40%);
}

body.theme-graphite .dashboard-block.commercial {
  border-left-color: color-mix(in srgb, #b78954 62%, var(--line) 38%);
}

body.theme-graphite .dashboard-performance-head h3 {
  color: var(--text-strong, var(--text));
}

body.theme-graphite .dashboard-period-btn {
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--card) 96%, var(--bg));
  color: var(--text-soft, var(--muted));
}

body.theme-graphite .dashboard-period-btn.is-active {
  border-color: color-mix(in srgb, var(--line) 74%, var(--text));
  background: color-mix(in srgb, var(--card) 83%, var(--text) 17%);
  color: var(--text-strong, var(--text));
}

body.theme-graphite .dashboard-performance-card {
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--card) 95%, var(--bg));
}

body.theme-graphite .dashboard-performance-card.support {
  border-left-color: color-mix(in srgb, #7ea8d3 62%, var(--line) 38%);
}

body.theme-graphite .dashboard-performance-card.commercial {
  border-left-color: color-mix(in srgb, #b98d5d 62%, var(--line) 38%);
}

body.theme-graphite .dashboard-performance-card h4,
body.theme-graphite .dashboard-performance-kpis strong {
  color: var(--text-strong, var(--text));
}

body.theme-graphite .dashboard-performance-kpis p {
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--card) 90%, var(--bg));
}

body.theme-graphite .dashboard-performance-kpis span,
body.theme-graphite .dashboard-performance-foot {
  color: var(--text-soft, var(--muted));
}

body.theme-graphite .dashboard-performance-bar {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, var(--card));
}

body.theme-graphite .dashboard-notification-item {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  border-left: 4px solid color-mix(in srgb, var(--line) 58%, var(--text) 42%);
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
}

body.theme-graphite .dashboard-notification-item.is-unread {
  border-left-color: #e74c3c;
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
  box-shadow: inset 0 0 0 1px rgba(231, 76, 60, 0.28);
}

body.theme-graphite .kpi {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  background: color-mix(in srgb, var(--card) 90%, var(--bg));
  color: var(--text);
}

body.theme-graphite .kpi:hover {
  border-color: color-mix(in srgb, var(--line) 74%, var(--text));
  background: color-mix(in srgb, var(--card) 84%, var(--bg));
}

body.theme-graphite .kpi.kpi-waiting {
  background: color-mix(in srgb, var(--card) 76%, #6f95be 24%);
  border-color: color-mix(in srgb, var(--line) 64%, #7ea2c8 36%);
  color: var(--text);
}

body.theme-graphite .kpi.kpi-returns {
  background: color-mix(in srgb, var(--card) 76%, #a77b44 24%);
  border-color: color-mix(in srgb, var(--line) 62%, #a2763d 38%);
  color: var(--text);
}

body.theme-graphite .kpi.kpi-resolved,
body.theme-graphite .kpi.kpi-closed {
  background: color-mix(in srgb, var(--card) 76%, #5f9678 24%);
  border-color: color-mix(in srgb, var(--line) 62%, #5b8f71 38%);
  color: var(--text);
}

body.theme-graphite .analysis-history-wrap > summary::after {
  color: var(--text-soft, var(--muted));
}

body.theme-graphite.theme-dark .ticket-modal-backdrop {
  background: rgba(7, 10, 14, 0.68);
  backdrop-filter: blur(1.5px);
}

body.theme-graphite.theme-dark .ticket-modal-card,
body.theme-graphite.theme-dark .analysis-modal-card,
body.theme-graphite.theme-dark .note-modal-card,
body.theme-graphite.theme-dark .money-modal-card,
body.theme-graphite.theme-dark .user-modal-card,
body.theme-graphite.theme-dark .integration-credentials-modal-card {
  background: color-mix(in srgb, var(--card) 82%, #7a8695 18%);
  border-color: color-mix(in srgb, var(--line) 58%, #7f8b9a 42%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(221, 228, 236, 0.06);
}

body.theme-graphite.theme-dark .analysis-modal-card {
  background: color-mix(in srgb, var(--card) 80%, #7d8998 20%);
  border-color: color-mix(in srgb, var(--line) 56%, #818d9d 44%);
}

body.theme-graphite.theme-dark .analysis-overview,
body.theme-graphite.theme-dark .analysis-actions .meta,
body.theme-graphite.theme-dark .analysis-request-highlight,
body.theme-graphite.theme-dark .analysis-attachment-wrap,
body.theme-graphite.theme-dark .analysis-history-wrap,
body.theme-graphite.theme-dark .analysis-event {
  background: color-mix(in srgb, var(--card) 84%, #687483 16%);
  border-color: color-mix(in srgb, var(--line) 70%, #7b8797 30%);
}

body.theme-graphite.theme-dark .analysis-line {
  background: color-mix(in srgb, var(--card) 86%, #687483 14%);
  border-color: color-mix(in srgb, var(--line) 72%, #7e8a9a 28%);
}

body.theme-graphite.theme-dark .analysis-line.is-status {
  background: color-mix(in srgb, var(--card) 68%, #728093 32%);
  border-color: color-mix(in srgb, var(--line) 56%, #738092 44%);
}

body.theme-graphite.theme-dark .analysis-line.is-queue,
body.theme-graphite.theme-dark .analysis-line.is-intent,
body.theme-graphite.theme-dark .analysis-line.is-day,
body.theme-graphite.theme-dark .analysis-line.is-hour {
  background: color-mix(in srgb, var(--card) 88%, #5f6b7a 12%);
  border-color: color-mix(in srgb, var(--line) 72%, #7a8696 28%);
}

body.theme-graphite.theme-dark .analysis-request-highlight {
  border-left-color: color-mix(in srgb, var(--line) 44%, var(--text) 56%);
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 980px) {
  body.is-sidebar-scroll-locked {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: flex;
  }

  .sidebar {
    position: fixed;
    z-index: 30;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: 250px;
    max-width: min(84vw, 250px);
    height: 100dvh;
    max-height: 100dvh;
    -webkit-overflow-scrolling: touch;
  }

  body.is-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(7, 17, 28, 0.45);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.is-sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 20% -10%, rgba(67, 132, 198, 0.14), transparent 46%),
      radial-gradient(circle at 80% -16%, rgba(30, 168, 119, 0.09), transparent 42%),
      var(--bg);
  }

  .main-area {
    min-height: 100dvh;
    overflow-x: clip;
    padding-bottom: calc(5.9rem + env(safe-area-inset-bottom));
  }

  .layout {
    padding: 0.68rem 0.62rem;
    gap: 0.62rem;
    padding-bottom: 0.35rem;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    padding: calc(0.45rem + env(safe-area-inset-top)) 0.62rem 0.55rem;
    border-bottom: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 84%, white) 0%, rgba(0, 0, 0, 0) 100%);
    backdrop-filter: blur(6px);
  }

  .panel.panel-floating-head {
    top: calc(3.15rem + env(safe-area-inset-top));
    z-index: 27;
    margin: -0.68rem -0.62rem 0;
    padding: 0.18rem 0.62rem;
  }

  .menu-toggle {
    border-radius: 999px;
    padding: 0.38rem 0.58rem;
    min-width: 2.6rem;
    background: color-mix(in srgb, var(--card) 74%, var(--bg));
    font-size: 1rem;
    line-height: 1;
  }

  .topbar-app-title {
    max-width: 70%;
  }

  .topbar-app-title strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-alerts-btn {
    margin-left: 0;
  }

  .decision-head {
    flex-direction: column;
  }

  .mobile-app-summary {
    --dash-tile-height: 72px;
    display: grid;
    gap: 0.58rem;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--card) 95%, #f7fafc), color-mix(in srgb, var(--card) 86%, #ecf1f8));
    padding: 0.72rem;
    box-shadow: 0 12px 24px rgba(21, 43, 66, 0.07);
  }

  .mobile-app-summary-head {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    align-items: center;
  }

  .mobile-app-summary-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
  }

  .mobile-app-summary-head strong {
    margin: 0;
    font-size: 0.74rem;
    color: #b24444;
  }

  .mobile-app-balance p {
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
  }

  .mobile-app-balance strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    color: var(--text);
    line-height: 1;
  }

  .mobile-summary-nav-btn {
    cursor: pointer;
    text-align: left;
  }

  .mobile-app-balance.mobile-summary-nav-btn {
    border: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--card) 90%, #eff3f8);
    padding: 0.52rem 0.58rem;
    min-height: var(--dash-tile-height);
    height: var(--dash-tile-height);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 34%, transparent);
  }

  .mobile-app-balance-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .mobile-app-balance-meta > * {
    margin: 0;
    border: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--card) 90%, #eff3f8);
    padding: 0.42rem 0.5rem;
    display: grid;
    gap: 0.08rem;
    min-height: var(--dash-tile-height);
    height: var(--dash-tile-height);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 34%, transparent);
  }

  .mobile-app-balance-meta span {
    color: var(--muted);
    font-size: 0.69rem;
  }

  .mobile-app-balance-meta strong {
    font-size: 0.7rem;
    color: var(--text);
    line-height: 1;
  }

  .mobile-app-shortcuts {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.12rem;
  }

  .mobile-shortcut-btn {
    border: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--card) 90%, #ecf2fa);
    padding: 0.5rem;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    min-height: var(--dash-tile-height);
    height: var(--dash-tile-height);
    width: 148px;
    min-width: 148px;
    flex: 0 0 148px;
    display: grid;
    grid-template-rows: 1fr auto;
    align-content: stretch;
    gap: 0.18rem;
    scroll-snap-align: start;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 34%, transparent);
  }

  .mobile-shortcut-btn span {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.12;
    align-self: start;
  }

  .mobile-shortcut-btn strong {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    align-self: end;
  }

  .mobile-shortcut-btn:focus-visible,
  .mobile-summary-nav-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--blue) 78%, #ffffff);
    outline-offset: 2px;
  }

  .dashboard-main-head,
  .dashboard-top-actions {
    display: flex;
  }

  .dashboard-main-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .smart-list-block,
  .smart-collapse {
    border-radius: 9px;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }

  .smart-list-title {
    font-size: 0.84rem;
  }

  .dashboard-notifications-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-notification-item {
    grid-template-columns: 1fr;
  }

  .dashboard-notification-action {
    width: 100%;
  }

  .decision-head-actions {
    width: 100%;
  }

  .dashboard-top-actions {
    width: 100%;
    margin-bottom: 0.45rem;
  }

  .management-route-bar {
    width: 100%;
    justify-content: flex-start;
  }

  .search-control {
    width: 100%;
    min-width: 0;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .ticket-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticket-detail-row {
    grid-template-columns: 1fr;
  }

  .ticket-inline-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .support-card-actions {
    justify-content: flex-end;
  }

  .user-card-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .user-card-actions {
    justify-content: center;
  }

  .dashboard-card-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
  }

  .dashboard-card-actions {
    justify-content: flex-end;
    min-height: auto;
  }

  .dashboard-analyze-btn {
    width: auto;
    min-width: 132px;
    min-height: 40px;
    font-size: 0.85rem;
    padding: 0.38rem 0.66rem;
  }

  .support-card-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
  }

  .support-analyze-btn {
    width: auto;
    min-width: 132px;
    min-height: 40px;
    font-size: 0.85rem;
    padding: 0.38rem 0.66rem;
    transform: none;
  }

  .card {
    padding: 0.5rem;
    gap: 0.32rem;
    border-radius: 9px;
  }

  .card-title {
    font-size: 0.9rem;
    line-height: 1.22;
  }

  .badge {
    min-height: 28px;
    font-size: 0.74rem;
    padding: 0.18rem 0.5rem;
  }

  .dashboard-compact-meta {
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 0.73rem;
    gap: 0.1rem 0.22rem;
  }

  .dashboard-meta-item-optional,
  .dashboard-meta-sep-optional {
    display: none;
  }

  .support-meta-row {
    gap: 0.1rem 0.45rem;
  }

  .support-meta-item {
    white-space: nowrap;
  }

  .support-card-main .card-summary-line,
  .dashboard-card-main .card-summary-line,
  .dashboard-card-main .meta-note,
  #list-admin-support .card .card-summary-line {
    display: none;
  }

  .ticket-detail-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-actions {
    justify-content: flex-start;
  }

  .analysis-overview-row {
    grid-template-columns: 1fr;
    gap: 0.42rem;
  }

  .analysis-detail-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .analysis-top-head {
    gap: 0.12rem;
  }

  .analysis-meta {
    font-size: 0.98rem;
  }

  .analysis-protocol-top {
    margin-top: 0.06rem;
    font-size: 0.82rem;
  }

  .analysis-identity-highlight {
    grid-template-columns: 1fr;
    gap: 0.26rem;
  }

  .analysis-queue-top {
    margin-top: 0.05rem;
    font-size: 0.84rem;
  }

  .analysis-overview {
    border: 0;
    background: transparent;
    padding: 0;
    gap: 0.2rem;
    max-width: none;
  }

  .analysis-line {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.84rem;
  }

  .analysis-line.is-status,
  .analysis-line.is-priority,
  .analysis-line.is-queue,
  .analysis-line.is-intent {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--card) 72%, var(--bg));
    padding: 0.2rem 0.5rem;
    display: inline-flex;
    align-items: baseline;
    gap: 0.18rem;
    width: fit-content;
    max-width: 100%;
  }

  .analysis-request-highlight,
  .analysis-attachment-wrap,
  .analysis-history-wrap {
    margin-top: 0.35rem;
    border-radius: 9px;
    padding: 0.42rem;
  }

  .analysis-request-highlight {
    max-height: none;
    overflow: visible;
  }

  .analysis-history-wrap[open] {
    max-height: none;
    overflow: visible;
  }

  .analysis-request {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .analysis-event {
    border-radius: 7px;
    padding: 0.34rem 0.38rem;
  }

  .analysis-event-title {
    font-size: 0.78rem;
  }

  .analysis-event-note {
    font-size: 0.75rem;
  }

  .analysis-actions .btn {
    min-width: 100%;
    min-height: 34px;
    font-size: 0.8rem;
  }

  .btn.emphasis {
    min-width: 100%;
  }

  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-grid.compact {
    grid-template-columns: 1fr;
  }

  .dashboard-board {
    grid-template-columns: 1fr;
  }

  .board-general,
  .board-support,
  .board-commercial,
  .board-chart {
    grid-column: auto;
  }

  .dash-chart-panels {
    grid-template-columns: 1fr;
  }

  .dash-donut-grid {
    grid-template-columns: 1fr;
  }

  .dash-status-legend {
    grid-template-columns: 1fr;
  }

  .card-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.42rem;
  }

  .users-form {
    grid-template-columns: 1fr;
  }

  .users-grid {
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 24;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid color-mix(in srgb, var(--line) 70%, #dce3ed);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    background: color-mix(in srgb, var(--card) 93%, #edf2f8);
    box-shadow: none;
    backdrop-filter: blur(6px);
  }

.mobile-bottom-nav-btn {
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 700;
    padding: 0.48rem 0.2rem;
    min-height: 44px;
    cursor: pointer;
  }

  .mobile-bottom-nav-btn.hidden-by-role {
    display: none;
  }

  .mobile-bottom-nav-btn.is-active {
    background: color-mix(in srgb, #2f5d93 18%, var(--card));
    color: var(--text);
  }

  .panel {
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line) 84%, #eff3f8);
    box-shadow: 0 10px 26px rgba(17, 36, 54, 0.06);
  }

  .sidebar-theme-controls {
    padding-bottom: 5.6rem;
  }
}

body.login-locked {
  overflow: hidden;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: radial-gradient(circle at top, color-mix(in srgb, var(--blue) 18%, var(--bg)) 0%, var(--bg) 60%);
}

.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 14px 40px rgba(7, 20, 34, 0.18);
}

.login-logo {
  width: 140px;
  height: auto;
  margin-bottom: 0.65rem;
}

.login-card h1 {
  margin: 0;
  font-size: 1.3rem;
}

.login-subtitle {
  margin: 0.4rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.login-form {
  display: grid;
  gap: 0.7rem;
}

.login-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.login-form input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.56rem 0.66rem;
  background: color-mix(in srgb, var(--card) 80%, var(--bg));
  color: var(--text);
}

.login-feedback {
  min-height: 1.1rem;
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.login-feedback.error {
  color: var(--red);
}

.login-feedback.success {
  color: var(--green);
}

.login-submit,
.login-forgot-toggle {
  width: 100%;
}

.login-recovery-actions {
  display: flex;
  gap: 0.45rem;
}

.login-recovery-actions .btn {
  flex: 1;
}

/* Dashboard clean mode: menos borda, cores simples, espaçamento padronizado */
.panel[data-view='dashboard'] .dashboard-board {
  border: 0;
  background: transparent;
  box-shadow: none;
  gap: 0.48rem;
}

.panel[data-view='dashboard'] .dashboard-block,
.panel[data-view='dashboard'] .dashboard-block.support,
.panel[data-view='dashboard'] .dashboard-block.commercial,
.panel[data-view='dashboard'] .dashboard-block.chart,
.panel[data-view='dashboard'] .board-chart {
  border: 0;
  box-shadow:
    0 4px 10px rgba(20, 46, 74, 0.06),
    inset 0 0 0 1px color-mix(in srgb, var(--line) 34%, transparent);
  background: color-mix(in srgb, var(--card) 93%, var(--bg));
  padding: 0.5rem 0.56rem;
}

.panel[data-view='dashboard'] .dashboard-summary-card,
.panel[data-view='dashboard'] .dashboard-performance-card,
.panel[data-view='dashboard'] .dashboard-performance-kpis p,
.panel[data-view='dashboard'] .dash-chart-panel,
.panel[data-view='dashboard'] .dash-donut-card {
  border: 0;
  box-shadow:
    0 3px 8px rgba(20, 46, 74, 0.07),
    inset 0 0 0 1px color-mix(in srgb, var(--line) 38%, transparent);
  background: color-mix(in srgb, var(--card) 91%, #eef4fb);
}

.panel[data-view='dashboard'] .dashboard-performance-bar {
  border: 0;
  box-shadow: none;
  background: #f0f5fb;
  min-height: 13px;
  border-radius: 999px;
}

.panel[data-view='dashboard'] .performance-segment.closed {
  background: #8fd8bf;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.panel[data-view='dashboard'] .performance-segment.open {
  background: #9ec4ef;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.panel[data-view='dashboard'] .performance-segment.won {
  background: #8fd8bf;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.panel[data-view='dashboard'] .performance-segment.lost {
  background: #f0b7b7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.panel[data-view='dashboard'] .dashboard-summary-grid,
.panel[data-view='dashboard'] .dashboard-performance-grid,
.panel[data-view='dashboard'] .dash-chart-panels,
.panel[data-view='dashboard'] .dash-donut-grid {
  gap: 0.42rem;
}

.panel[data-view='dashboard'] .dashboard-block h3,
.panel[data-view='dashboard'] .dashboard-performance-head h3 {
  letter-spacing: 0.02em;
}

.panel[data-view='dashboard'] .dashboard-summary-card strong,
.panel[data-view='dashboard'] .dashboard-performance-kpis strong,
.panel[data-view='dashboard'] .dash-donut-value {
  color: #143451;
  font-weight: 900;
}

/* Dashboard v2: faixa executiva + dois painéis principais */
.panel[data-view='dashboard'] .dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.44rem;
  margin: 0.15rem 0 0.55rem;
}

.panel[data-view='dashboard'] .dashboard-kpi-tile {
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 92%, #edf3fb);
  box-shadow:
    0 4px 10px rgba(20, 46, 74, 0.08),
    inset 0 0 0 1px color-mix(in srgb, var(--line) 44%, transparent);
  padding: 0.45rem 0.52rem;
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 0.12rem;
}

.panel[data-view='dashboard'] .dashboard-kpi-tile small {
  margin: 0;
  font-size: 0.74rem;
  color: #4d6985;
  font-weight: 700;
}

.panel[data-view='dashboard'] .dashboard-kpi-tile strong {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1;
  color: #163956;
  font-weight: 900;
}

/* Dashboard dark-mode readability fix */
body.theme-dark .panel[data-view='dashboard'] .dashboard-summary-card strong,
body.theme-dark .panel[data-view='dashboard'] .dashboard-performance-kpis strong,
body.theme-dark .panel[data-view='dashboard'] .dash-donut-value {
  color: var(--text-strong);
}

body.theme-dark .panel[data-view='dashboard'] .dashboard-kpi-tile {
  background: color-mix(in srgb, var(--card) 90%, #24384d);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px color-mix(in srgb, var(--line) 66%, transparent);
}

body.theme-dark .panel[data-view='dashboard'] .dashboard-kpi-tile small {
  color: var(--text-soft);
}

body.theme-dark .panel[data-view='dashboard'] .dashboard-kpi-tile strong {
  color: var(--text-strong);
}

.panel[data-view='dashboard'] .board-general,
.panel[data-view='dashboard'] .board-support,
.panel[data-view='dashboard'] .board-commercial,
.panel[data-view='dashboard'] .dash-chart-panels,
.panel[data-view='dashboard'] .dash-donut-grid {
  display: none;
}

.panel[data-view='dashboard'] .board-chart {
  order: 0;
  grid-column: span 12;
}

@media (max-width: 1200px) {
  .panel[data-view='dashboard'] .dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .panel[data-view='dashboard'] .dashboard-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Global visual harmonization (light mode): same language across all modules */
body:not(.theme-dark) {
  --ui-surface: #f9fbfe;
  --ui-surface-soft: #f3f7fc;
  --ui-stroke: #d5e1ee;
  --ui-stroke-strong: #c4d4e5;
  --ui-text-strong: #1b3a56;
  --ui-shadow-soft: 0 4px 12px rgba(23, 49, 76, 0.06);
  --ui-shadow-card: 0 8px 20px rgba(23, 49, 76, 0.07);
}

body:not(.theme-dark) .shell {
  background: linear-gradient(180deg, #f3f7fc 0%, #f7faff 100%);
}

body:not(.theme-dark) .sidebar {
  background: linear-gradient(180deg, #edf3fa 0%, #e9f0f8 100%);
  border-right-color: #d3dfec;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.4);
}

body:not(.theme-dark) .sidebar-head h2 {
  color: #24425e;
}

body:not(.theme-dark) .nav-btn {
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: #2b4b67;
  min-height: 38px;
}

body:not(.theme-dark) .nav-btn:hover {
  background: #deebf8;
  color: #20415d;
}

body:not(.theme-dark) .nav-btn.is-active {
  border-color: #b7cce2;
  background: #d8e8f8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  color: #1d3e5b;
}

body:not(.theme-dark) .topbar,
body:not(.theme-dark) .panel,
body:not(.theme-dark) .ticket-modal-card,
body:not(.theme-dark) .analysis-modal-card,
body:not(.theme-dark) .note-modal-card,
body:not(.theme-dark) .money-modal-card,
body:not(.theme-dark) .user-modal-card,
body:not(.theme-dark) .integration-credentials-modal-card,
body:not(.theme-dark) .users-form,
body:not(.theme-dark) .users-accesses,
body:not(.theme-dark) .user-card,
body:not(.theme-dark) .dashboard-notifications,
body:not(.theme-dark) .smart-list-block,
body:not(.theme-dark) .smart-collapse {
  border-color: var(--ui-stroke);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-soft);
}

body:not(.theme-dark) .panel h2,
body:not(.theme-dark) .topbar h1,
body:not(.theme-dark) .card-title,
body:not(.theme-dark) .smart-list-title {
  color: var(--ui-text-strong);
}

body:not(.theme-dark) .card,
body:not(.theme-dark) .dashboard-summary-card,
body:not(.theme-dark) .dashboard-performance-card,
body:not(.theme-dark) .dashboard-performance-kpis p,
body:not(.theme-dark) .ticket-detail-box,
body:not(.theme-dark) .card-summary-line,
body:not(.theme-dark) .meta-note,
body:not(.theme-dark) .dashboard-compact-meta,
body:not(.theme-dark) .management-assignee,
body:not(.theme-dark) .ticket-queue-focus,
body:not(.theme-dark) .integration-module-card,
body:not(.theme-dark) .integration-quick-steps,
body:not(.theme-dark) .integration-advanced,
body:not(.theme-dark) .settings-preview {
  border-color: var(--ui-stroke);
  background: var(--ui-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

body:not(.theme-dark) .card {
  background: #fbfdff;
}

body:not(.theme-dark) .card {
  border-left-width: 3px;
  border-radius: 12px;
  box-shadow: var(--ui-shadow-card);
}

body:not(.theme-dark) .kpi {
  border-color: var(--ui-stroke);
  border-radius: 10px;
  background: var(--ui-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

body:not(.theme-dark) .kpi:hover {
  border-color: #b9cee4;
  background: #eef4fb;
}

body:not(.theme-dark) .btn,
body:not(.theme-dark) .theme-toggle-main,
body:not(.theme-dark) .theme-style-toggle,
body:not(.theme-dark) .search-control,
body:not(.theme-dark) .ticket-form input,
body:not(.theme-dark) .ticket-form select,
body:not(.theme-dark) .ticket-form textarea,
body:not(.theme-dark) .settings-form input,
body:not(.theme-dark) .settings-form select,
body:not(.theme-dark) .users-form input,
body:not(.theme-dark) .users-form select,
body:not(.theme-dark) .integration-credentials-form input,
body:not(.theme-dark) .note-modal-form textarea,
body:not(.theme-dark) .login-form input {
  border-color: var(--ui-stroke-strong);
  border-radius: 10px;
  background: #fbfdff;
  color: #23435f;
}

body:not(.theme-dark) .btn:hover,
body:not(.theme-dark) .theme-toggle-main:hover,
body:not(.theme-dark) .theme-style-toggle:hover {
  border-color: #afc6dd;
  background: #edf4fb;
}

body:not(.theme-dark) .btn.primary {
  border-color: #9dbce0;
  background: #dbeafb;
  color: #1f4f82;
}

body:not(.theme-dark) .btn.btn-clean {
  border-color: #c3d4e7;
  background: #eff5fc;
  color: #2a4f73;
}

body:not(.theme-dark) .btn.analyze {
  border-color: #a9d8c2;
  background: #def4e9;
  color: #1f684a;
}

body:not(.theme-dark) .btn.urgent {
  border-color: #dcaaaa;
  background: #f7e3e3;
  color: #7d2f2f;
}

body:not(.theme-dark) .badge,
body:not(.theme-dark) .role-pill,
body:not(.theme-dark) .ticket-company,
body:not(.theme-dark) .ticket-client-label {
  border-color: #c5d6e9;
  background: #eef5fd;
  color: #2b4c6c;
}

body:not(.theme-dark) .panel.panel-floating-head {
  background: color-mix(in srgb, var(--bg) 96%, #f7fbff);
  border-bottom-color: #d5e1ee;
}

body:not(.theme-dark) .panel.panel-floating-head .btn.btn-clean,
body:not(.theme-dark) .panel.panel-floating-head .search-control {
  border-color: #c4d5e7;
  background: #f2f7fd;
}

/* Intake route buttons: keep active contrast visible in light mode */
body:not(.theme-dark) .btn.decision-route-btn.is-active {
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 2px 8px rgba(28, 56, 86, 0.22);
}

body:not(.theme-dark) .btn.decision-route-btn[data-route='operacao'].is-active {
  background: #1f6fa9;
  border-color: #2d83bf;
}

body:not(.theme-dark) .btn.decision-route-btn[data-route='suporte'].is-active {
  background: #1f7f55;
  border-color: #2a9a67;
}

body:not(.theme-dark) .btn.decision-route-btn[data-route='comercial'].is-active {
  background: #9a6327;
  border-color: #b97a38;
}

/* Remove extra outer boxes on queue sections: keep only cards as visual focus */
body:not(.theme-dark) .smart-list-block,
body:not(.theme-dark) .smart-collapse {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

body:not(.theme-dark) .smart-list-block {
  padding-top: 0;
  padding-bottom: 0;
  gap: 0.34rem;
}

body:not(.theme-dark) .smart-collapse {
  padding-top: 0;
  padding-bottom: 0;
}

/* Analysis modal visual cleanup: softer surfaces, clearer hierarchy, less border noise */
body:not(.theme-dark) .analysis-modal-card {
  border-color: #d5e0ec;
  background: linear-gradient(180deg, #f9fbfe 0%, #f4f8fc 100%);
  box-shadow: 0 12px 34px rgba(22, 46, 74, 0.14);
}

body:not(.theme-dark) .analysis-top-head > div {
  display: grid;
  gap: 0.42rem;
}

body:not(.theme-dark) .analysis-top-head {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #dbe5f0;
}

body:not(.theme-dark) .analysis-meta {
  font-size: 1.02rem;
  color: #244763;
}

body:not(.theme-dark) .analysis-protocol-top {
  margin: 0;
  font-size: 0.82rem;
  color: #4f6a85;
}

body:not(.theme-dark) .analysis-identity-highlight {
  margin-top: 0;
  gap: 0.44rem;
}

body:not(.theme-dark) .analysis-identity-item {
  border: 0;
  border-radius: 10px;
  background: #eef4fb;
  box-shadow: inset 0 0 0 1px #d8e4f0;
  padding: 0.4rem 0.52rem;
}

body:not(.theme-dark) .analysis-identity-item span {
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  color: #5a7591;
}

body:not(.theme-dark) .analysis-identity-item strong {
  font-size: 1.03rem;
  color: #1e405c;
}

body:not(.theme-dark) .analysis-overview-row {
  margin-top: 0.56rem;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 0.62rem;
}

body:not(.theme-dark) .analysis-overview {
  border: 0;
  border-radius: 12px;
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px #d8e4f0;
  padding: 0.48rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
  max-width: none;
}

body:not(.theme-dark) .analysis-line {
  border: 0;
  border-radius: 8px;
  background: #f0f6fc;
  box-shadow: inset 0 0 0 1px #d6e2ef;
  padding: 0.34rem 0.46rem;
  font-size: 0.84rem;
}

body:not(.theme-dark) .analysis-line.is-status {
  background: #eaf3ff;
  box-shadow: inset 0 0 0 1px #c8d9ee;
}

body:not(.theme-dark) .analysis-line.is-priority.is-priority-normal {
  box-shadow: inset 0 0 0 1px var(--priority-normal-line);
}

body:not(.theme-dark) .analysis-line.is-priority.is-priority-urgent {
  box-shadow: inset 0 0 0 1px var(--priority-urgent-line);
}

body:not(.theme-dark) .analysis-actions {
  background: #f7fbff;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px #d8e4f0;
  padding: 0.48rem;
  gap: 0.38rem;
}

body:not(.theme-dark) .analysis-actions .btn {
  min-height: 38px;
  font-size: 0.82rem;
  padding: 0.28rem 0.52rem;
  background: #f4f8fc;
}

body:not(.theme-dark) .analysis-actions .btn.primary {
  background: #e4eef8;
  border-color: #b6cde3;
  color: #224e78;
}

body:not(.theme-dark) .analysis-actions .btn.primary.emphasis {
  background: #d8e9fb;
  border-color: #9fbfe0;
  color: #19456e;
}

body:not(.theme-dark) .analysis-actions .btn.urgent {
  background: #f8e7e7;
  border-color: #ddbbbb;
  color: #8b3e3e;
}

body:not(.theme-dark) .analysis-actions .meta {
  border: 0;
  border-radius: 8px;
  background: #edf4fb;
  box-shadow: inset 0 0 0 1px #d4e2ef;
  padding: 0.42rem 0.5rem;
  font-size: 0.78rem;
}

body:not(.theme-dark) .analysis-detail-row {
  margin-top: 0.56rem;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 0.62rem;
}

body:not(.theme-dark) .analysis-request-highlight,
body:not(.theme-dark) .analysis-attachment-wrap,
body:not(.theme-dark) .analysis-history-wrap {
  border: 0;
  border-radius: 12px;
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px #d8e4f0;
  padding: 0.52rem 0.58rem;
}

body:not(.theme-dark) .analysis-request-highlight {
  border-left: 0;
}

body:not(.theme-dark) .analysis-request-highlight h4,
body:not(.theme-dark) .analysis-attachment-wrap h4,
body:not(.theme-dark) .analysis-history-wrap > summary {
  font-size: 0.84rem;
  color: #264965;
}

body:not(.theme-dark) .analysis-request {
  font-size: 0.9rem;
  color: #294865;
  font-weight: 600;
}

body:not(.theme-dark) .analysis-attachment-image {
  border: 0;
  box-shadow: inset 0 0 0 1px #d7e3ef;
}

body:not(.theme-dark) .analysis-history-wrap > summary::after {
  color: #5f7b96;
}

body:not(.theme-dark) .analysis-event {
  border: 0;
  border-radius: 8px;
  background: #eef4fb;
  box-shadow: inset 0 0 0 1px #d4e1ee;
}

body.theme-dark .analysis-modal-card {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
}

body.theme-dark .analysis-top-head {
  border-bottom: 1px solid #34506d;
  padding-bottom: 0.6rem;
}

body.theme-dark .analysis-overview {
  border: 0;
  box-shadow: inset 0 0 0 1px #45617f;
  background: #1e3246;
  padding: 0.48rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
}

body.theme-dark .analysis-line {
  border: 0;
  box-shadow: inset 0 0 0 1px #4c6886;
  background: #263b51;
}

body.theme-dark .analysis-actions {
  border: 0;
  box-shadow: inset 0 0 0 1px #45617f;
  border-radius: 12px;
  background: #1f3448;
  padding: 0.48rem;
}

body.theme-dark .analysis-request-highlight,
body.theme-dark .analysis-attachment-wrap,
body.theme-dark .analysis-history-wrap {
  border: 0;
  box-shadow: inset 0 0 0 1px #44627f;
  border-radius: 12px;
}

body.theme-dark .analysis-request-highlight {
  border-left: 0;
}

body.theme-dark .analysis-event {
  border: 0;
  box-shadow: inset 0 0 0 1px #43607c;
}

@media (max-width: 760px) {
  body:not(.theme-dark) .analysis-modal-card,
  body.theme-dark .analysis-modal-card {
    width: min(920px, calc(100vw - 0.8rem));
    padding: 0.58rem;
  }

  body:not(.theme-dark) .analysis-overview-row,
  body:not(.theme-dark) .analysis-detail-row,
  body.theme-dark .analysis-overview-row,
  body.theme-dark .analysis-detail-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  body:not(.theme-dark) .analysis-overview,
  body.theme-dark .analysis-overview {
    grid-template-columns: 1fr;
    padding: 0.38rem;
  }

  body:not(.theme-dark) .analysis-actions,
  body.theme-dark .analysis-actions {
    padding: 0.4rem;
  }
}
