:root {
  color-scheme: light;
  --ink: #1e2430;
  --muted: #667085;
  --line: #d8dde7;
  --soft: #f6f8fb;
  --accent: #14875f;
  --accent-strong: #0a6f4b;
  --danger: #a53d32;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  width: 100%;
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #fbfcfe;
}

button,
input,
textarea,
select {
  font: inherit;
}

.panel-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: white;
  position: sticky;
  top: 0;
  z-index: 2;
}

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f4f7fb;
  border: 1px solid var(--line);
  overflow: hidden;
}

.mark img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1rem;
}

h2 {
  font-size: 0.98rem;
}

.panel-header p {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

main {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.hidden {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 10px 0;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: white;
}

textarea {
  resize: vertical;
}

.row,
.two,
.snapshot-row,
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.two {
  align-items: stretch;
}

.two label {
  flex: 1 1 0;
}

.section-title {
  justify-content: space-between;
  margin-bottom: 4px;
}

.section-subtitle,
.muted {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 3px;
}

.primary,
.outline,
.icon-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary:disabled,
.outline:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.compact {
  width: auto;
  min-height: 34px;
  padding: 0 10px;
}

.primary {
  width: 100%;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.outline,
.icon-button {
  background: white;
  color: var(--ink);
  border-color: var(--line);
  padding: 0 10px;
}

.link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.full-width {
  width: 100%;
  margin-top: 8px;
}

.connection-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  padding: 10px;
  margin: 10px 0;
}

.status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--danger);
  font-size: 0.84rem;
}

.toggle {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.toggle input {
  width: auto;
}

.snapshot-row {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 8px 0 12px;
}

.chat {
  display: grid;
  gap: 8px;
  min-height: 160px;
  max-height: 360px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.bubble {
  border-radius: 8px;
  padding: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

.bubble.user {
  background: #e6f4ef;
}

.bubble.system {
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line);
}

.message-label {
  margin-top: 12px;
}

.summary-grid,
.radar-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.summary-grid article,
.radar-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--soft);
}

.summary-grid span,
.radar-summary span,
.alert-item span,
.report-header span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-grid strong,
.radar-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  text-transform: capitalize;
}

.accounts-list,
.alerts-list,
.report-preview {
  display: grid;
  gap: 8px;
}

.account-card,
.alert-item,
.report-section,
.report-header {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: white;
}

.alert-item {
  border-left-width: 4px;
}

.account-card {
  border-left-width: 4px;
}

.severity-alta,
.severity-crítica,
.severity-critica,
.severity-critical {
  border-left-color: #d92d20;
}

.severity-media,
.severity-warning {
  border-left-color: #f79009;
}

.severity-baixa,
.severity-ok {
  border-left-color: #12b76a;
}

.account-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.account-card-head span {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 8px 0;
}

.account-card dl div {
  border-radius: 8px;
  background: var(--soft);
  padding: 7px;
}

.account-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-card dd {
  margin: 3px 0 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.alert-item strong,
.account-card strong,
.report-section strong,
.report-header strong {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
}

.alert-item p,
.alert-item small,
.account-card p,
.account-card small,
.report-section p {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
