/* CRM chrome only. Do not restyle status dots, charts, pipeline chips, or table data colors. */

:root,
[data-theme="dark"] {
  --we-shell: #070b10;
  --we-shell-2: #0b1016;
  --we-panel: #10161c;
  --we-paper: #070b10;
  --we-ink: #e8eef2;
  --we-muted: #8a97a4;
  --we-line: rgba(201, 212, 224, 0.14);
  --we-accent: #1a6b4a;
  --we-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --we-shell: #f4f1ea;
  --we-shell-2: #fbfaf6;
  --we-panel: #fbfaf6;
  --we-paper: #f4f1ea;
  --we-ink: #1c1915;
  --we-muted: #6d655c;
  --we-line: #d5cfc3;
  --we-accent: #1e4d8c;
}

html, body.we-app {
  margin: 0;
  min-height: 100%;
  background: var(--we-shell);
  color: var(--we-ink);
  font-family: var(--we-font);
}

.we-app {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.we-frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.we-side {
  background:
    linear-gradient(180deg, rgba(7,11,16,.55), rgba(7,11,16,.75)),
    var(--we-shell);
  border-right: 1px solid var(--we-line);
  padding: 0 0 24px;
}

[data-theme="light"] .we-side {
  background: var(--we-shell-2);
}

.we-brand {
  display: block;
  padding: 0 0 12px;
  text-decoration: none;
  color: var(--we-ink);
}

.we-brand img {
  width: 100%;
  height: 168px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  display: block;
}

.we-side nav {
  padding: 0 14px;
}

.we-side nav a,
.we-side nav summary {
  display: block;
  padding: 9px 10px;
  color: var(--we-muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: 0;
}

.we-side nav a:hover,
.we-side nav a.active,
.we-side nav a.is-on,
.we-side nav summary:hover,
.we-side .nav-more.active summary,
.we-side .nav-more[open] summary {
  color: var(--we-ink);
}

.we-side .nav-more-panel {
  position: static;
  display: none;
  min-width: 0;
  margin: 0;
  padding: 0 0 8px 8px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  grid-template-columns: 1fr;
  gap: 4px;
}

.we-side .nav-more[open] .nav-more-panel {
  display: grid;
}

.we-side .nav-more-label {
  color: var(--we-muted);
}

.we-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--we-line);
  background: var(--we-shell-2);
  color: var(--we-ink);
}

.we-main {
  background: var(--we-shell);
  min-width: 0;
}

.we-theme {
  border: 1px solid var(--we-line);
  background: transparent;
  color: var(--we-ink);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 10px;
  cursor: pointer;
}

[data-we-dial="cell"] .we-sip-call,
[data-we-dial="cell"] .we-sip-chrome {
  display: none !important;
}

[data-we-dial="sip"] .we-cell-call,
html:not([data-we-dial]) .we-cell-call,
[data-we-dial="sip"] .we-cell-hint,
html:not([data-we-dial]) .we-cell-hint {
  display: none !important;
}

[data-we-dial="cell"] .we-cell-hint {
  display: block;
}

.we-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  margin-left: 0.4em;
  border-radius: 50%;
  border: 1px solid var(--we-line);
  color: var(--we-muted);
  background: transparent;
  font-size: 11px;
  font-style: italic;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  cursor: help;
  position: relative;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
  flex-shrink: 0;
}

.we-info-tip {
  display: none;
  position: absolute;
  z-index: 50;
  left: 0;
  top: calc(100% + 6px);
  width: max-content;
  max-width: min(22rem, 72vw);
  padding: 8px 10px;
  background: var(--we-shell-2);
  color: var(--we-ink);
  border: 1px solid var(--we-line);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  font-family: var(--we-font);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
  white-space: normal;
  text-align: left;
}

.we-info:hover .we-info-tip,
.we-info:focus .we-info-tip,
.we-info:focus-within .we-info-tip {
  display: block;
}

h1.case-title .we-info,
.panel h2 .we-info,
.panel h3 .we-info,
details.panel > summary .we-info {
  text-transform: none;
}

/* Leave CRM widgets alone */
.we-main canvas,
.we-main .chart,
.we-main .badge,
.we-main .status,
.we-main .tag,
.we-main .chip,
.we-main .pipeline,
.we-main [class*="status-"],
.we-main [class*="stage-"] {
  /* no color overrides */
}

.list-assign-cell {
  cursor: default;
  min-width: 160px;
}

.list-assign-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 4px 0 0;
}

.list-assign-form select,
.list-assign-form button {
  background: var(--we-shell-2);
  border: 1px solid var(--we-line);
  border-radius: 6px;
  color: var(--we-ink);
  padding: 4px 8px;
  font-size: 12px;
  font-family: inherit;
}

.list-assign-form button {
  cursor: pointer;
}

.list-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.list-assignees span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.list-assignees form {
  display: inline;
  margin: 0;
}

.list-assignees button {
  background: none;
  border: none;
  color: var(--we-muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}

.members-empty {
  color: #c9a227;
}

@media (max-width: 860px) {
  .we-app {
    grid-template-columns: 1fr;
  }
}
