:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #eef3f8;
  --text: #1c2733;
  --muted: #657489;
  --line: #d8e0ea;
  --success: #167b63;
  --warning: #9a6b14;
  --danger: #a43b45;
  --accent: #2467a7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1160px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0;
}

.app-header,
.app-panel {
  border: 1px solid var(--line);
  background: var(--surface);
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 8px 8px 0 0;
}

.app-panel {
  padding: 18px;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
}

h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

.read-only-note {
  margin: 0;
  max-width: 360px;
  color: var(--muted);
  text-align: right;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.status-line.success strong {
  color: var(--success);
}

.status-line.warning strong {
  color: var(--warning);
}

.status-line.danger strong {
  color: var(--danger);
}

.layout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.field {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.field span,
.muted {
  color: var(--muted);
}

.field strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recommendation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.recommendation p {
  margin-bottom: 4px;
}

#open-native-chat {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

@media (max-width: 780px) {
  .app-header,
  .status-line,
  .recommendation {
    align-items: stretch;
    flex-direction: column;
  }

  .read-only-note {
    max-width: none;
    text-align: left;
  }

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

@media (max-width: 540px) {
  .field {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
