/* Auto Greeter Agent dashboard — plain CSS, no external resources. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f6f8;
  color: #1c2530;
  line-height: 1.5;
}

.topbar {
  background: #0b2860;
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar h1 { margin: 0; font-size: 1.4rem; }
.subtitle { margin: 2px 0 0; opacity: 0.85; font-size: 0.9rem; }

.health { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.health-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #8a97a5; display: inline-block;
}
.health-dot.ok { background: #22c55e; }
.health-dot.fail { background: #ef4444; }
.health-dot.checking { background: #f59e0b; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.card {
  background: #ffffff;
  border: 1px solid #d8dee5;
  border-radius: 8px;
  padding: 18px 20px;
}

.card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.hint { color: #55606c; font-size: 0.92rem; margin-top: 0; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }

input[type="url"],
input[type="password"],
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #b9c2cc;
  border-radius: 6px;
  font: inherit;
  background: #ffffff;
}

textarea { resize: vertical; }

button,
a.button {
  font: inherit;
  cursor: pointer;
  background: #0b2860;
  color: #ffffff;
  border: 1px solid #0b2860;
  border-radius: 6px;
  padding: 9px 16px;
  text-decoration: none;
  display: inline-block;
}

button.secondary,
a.button.secondary {
  background: #ffffff;
  color: #0b2860;
  border-color: #0b2860;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }

.status { min-height: 1.2em; margin: 10px 0 0; }
.status.error { color: #b91c1c; }
.status.ok { color: #15803d; }

.kv { margin: 0; }
.kv div {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e8ecf0;
}
.kv div:last-child { border-bottom: none; }
.kv dt { font-weight: 600; width: 150px; flex-shrink: 0; }
.kv dd { margin: 0; word-break: break-word; }

.call {
  border: 1px solid #d8dee5;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 12px;
}

.call summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.call summary::-webkit-details-marker { display: none; }
.call summary::before { content: "▸ "; color: #0b2860; }
.call[open ] summary::before { content: "▾ "; }

.call-meta { color: #55606c; font-size: 0.9rem; margin: 4px 0 0; }

.transcript { margin-top: 12px; display: grid; gap: 8px; }

.turn {
  padding: 8px 12px;
  border-radius: 6px;
  max-width: 92%;
}
.turn.caller { background: #e8eef7; justify-self: start; }
.turn.agent { background: #e6f4ea; justify-self: end; }
.turn .who { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.turn .at { color: #55606c; font-size: 0.8rem; margin-left: 6px; font-weight: 400; text-transform: none; }
.turn p { margin: 4px 0 0; }

.empty { color: #55606c; }

.meter {
  height: 14px;
  background: #e2e8ee;
  border-radius: 7px;
  overflow: hidden;
  margin-top: 14px;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: #16a34a;
  transition: width 0.08s linear;
}

.hidden { display: none; }

footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px 28px;
  color: #55606c;
  font-size: 0.9rem;
}
