/* House style: NiCE Cognigy brand (logo and Be Vietnam Pro, from the BT harness) on the NiCE Labs tokens of
   Agent Watch (frontend/src/styles/tokens.css: colours, radius, spacing). Brand colours appear only on the agent they
   belong to. Copied, not linked: the source repos stay read-only. */
@font-face { font-family: "Be Vietnam Pro"; src: url("/fonts/be-vietnam-pro-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/fonts/be-vietnam-pro-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/fonts/be-vietnam-pro-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/fonts/be-vietnam-pro-semibold.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
:root {
  --bg: #f4f4f1; /* AW --canvas */
  --paper: #fcfcfb; /* AW --surface */
  --ink: #0b0b0b; /* AW --fg */
  --soft: #52514e; /* AW --fg-2 */
  --mute: #66645f; /* AW --fg-3, AA at 12 px */
  --line: #e1e0d9; /* AW --border */
  --rule: #cccac1; /* AW --border-strong */
  --accent: #126bce; /* NiCE Labs blue */
  --accent-ink: #ffffff;
  --good: #0d8462;
  --good-soft: #e1efe8;
  --warn: #8a6500;
  --warn-soft: #f4edd3;
  --bad: #b02a2a;
  --bad-soft: #f5e3e1;
  --po: #173a87;
  --po-2: #73e5f0;
  --cunard: #111111;
  --cunard-2: #c9a96b;
  --radius: 14px; /* AW --r */
  --shadow: 0 1px 2px rgba(40, 36, 20, 0.05), 0 1px 3px rgba(40, 36, 20, 0.07);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --paper: #181b21;
    --ink: #e7eaef;
    --soft: #b9c0cb;
    --mute: #98a1af;
    --line: #2a3038;
    --rule: #38404b;
    --accent: #4f8fff;
    --accent-ink: #0d0f12;
    --good: #55d1a8;
    --good-soft: #15302a;
    --warn: #f1cf6b;
    --warn-soft: #2d2715;
    --bad: #ff6b6b;
    --bad-soft: #3a1f22;
    --po: #8fb0ff;
    --cunard: #e9e6dc;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
  }
}
* {
  box-sizing: border-box;
}
[hidden] { display: none !important; }
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.5 "Be Vietnam Pro",
    system-ui,
    Arial,
    sans-serif;
}
a {
  color: var(--accent);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

header.top {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
header.top .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
.mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mark img {
  display: block;
  height: 24px;
  width: auto;
}
.mark .logo-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .mark .logo-light { display: none; }
  .mark .logo-dark { display: block; }
}
.mark .product {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
  line-height: 1.2;
}
@media (max-width: 480px) {
  .mark img { height: 20px; }
  .mark .product { font-size: 14px; }
}
.mark small {
  display: block;
  font-weight: 400;
  color: var(--mute);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.top .spacer {
  flex: 1;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  background: var(--bg);
  white-space: nowrap;
}
.pill b {
  font-weight: 650;
}
.linkish {
  background: none;
  border: 0;
  padding: 4px 6px;
  color: var(--soft);
  cursor: pointer;
  font-size: 14px;
}
.linkish:hover {
  color: var(--ink);
  text-decoration: underline;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  font-size: 14px;
}
.seg button {
  border: 0;
  background: none;
  padding: 4px 12px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.dev-flag {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}

.banner {
  background: var(--accent);
  color: var(--accent-ink);
}
.banner .wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}
.banner button {
  background: none;
  border: 1px solid currentColor;
  color: inherit;
  border-radius: 999px;
  padding: 2px 12px;
  cursor: pointer;
}

.intro {
  padding: 36px 0 20px;
}
.intro h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  max-width: 22ch;
}
.intro p {
  margin: 0;
  color: var(--soft);
  max-width: 60ch;
}

.agents {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 20px;
}
@media (max-width: 860px) {
  .agents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.agent {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  position: relative;
  min-height: 104px;
}
.agent::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--brand);
}
.agent[data-brand="po"] {
  --brand: var(--po);
}
.agent[data-brand="cunard"] {
  --brand: var(--cunard);
}
.agent[aria-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.agent .kind {
  font-size: 12px;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  gap: 6px;
  align-items: center;
}
.agent .name {
  font-size: 18px;
  font-weight: 650;
}
.agent .state {
  font-size: 13px;
  color: var(--soft);
}
.agent .switch-warn { display: block; margin-top: 6px; font-size: 12px; line-height: 1.3; color: var(--warn); }
.agent .state.soon {
  color: var(--mute);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  display: inline-block;
}
.soon .dot {
  background: var(--rule);
}

.main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 860px) {
  .main {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h2 {
  font-size: 20px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.card .sub {
  color: var(--soft);
  margin: 0 0 16px;
}
.brandbar {
  height: 6px;
  border-radius: 6px;
  margin: -6px 0 16px;
  background: linear-gradient(90deg, var(--b1) 0 70%, var(--b2) 70%);
}
.brandbar.po {
  --b1: #173a87;
  --b2: #73e5f0;
}
.brandbar.cunard {
  --b1: #111111;
  --b2: #c9a96b;
}
.steps {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--soft);
}
.steps li {
  margin: 2px 0;
}
.note {
  font-size: 14px;
  color: var(--mute);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px;
}
#voice-mount {
  min-height: 140px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--rule);
  border-radius: 12px;
  padding: 16px;
}
.soon-box {
  border: 1px dashed var(--rule);
  border-radius: 12px;
  padding: 24px;
  color: var(--soft);
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
}
.btn.ghost {
  background: none;
  color: var(--ink);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

form.fb {
  display: grid;
  gap: 14px;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
legend {
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}
.verdicts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.verdicts label {
  position: relative;
}
.verdicts input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.verdicts span {
  display: grid;
  gap: 2px;
  place-items: center;
  text-align: center;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 10px 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  min-height: 64px;
}
.verdicts span small {
  font-weight: 400;
  color: var(--mute);
  font-size: 12px;
}
.verdicts input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.verdicts input[value="wrong"]:checked + span {
  background: var(--bad-soft);
  border-color: var(--bad);
  color: var(--bad);
}
.verdicts input[value="clunky"]:checked + span {
  background: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn);
}
.verdicts input[value="good"]:checked + span {
  background: var(--good-soft);
  border-color: var(--good);
  color: var(--good);
}
textarea,
input[type="text"],
input[type="password"],
select {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
}
textarea {
  min-height: 96px;
  resize: vertical;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.inline {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 15px;
}
.inline label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.fine {
  font-size: 13px;
  color: var(--mute);
  margin: 0;
}
.status {
  font-size: 14px;
  min-height: 1.5em;
  margin: 0;
}
.status.ok {
  color: var(--good);
}
.status.err {
  color: var(--bad);
}
details.more summary {
  cursor: pointer;
  color: var(--soft);
  font-size: 15px;
}
details.more[open] summary {
  margin-bottom: 10px;
}
details.more > div {
  display: grid;
  gap: 10px;
}

.lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 48px;
}
@media (max-width: 860px) {
  .lower {
    grid-template-columns: 1fr;
  }
}
.builds {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.builds li {
  border-left: 3px solid var(--rule);
  padding-left: 12px;
}
.builds li:first-child {
  border-left-color: var(--accent);
}
.builds h3 {
  margin: 0;
  font-size: 16px;
}
.builds time {
  color: var(--mute);
  font-size: 13px;
}
.builds ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--soft);
}
.mine {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.mine li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 15px;
}
.mine code {
  font-weight: 650;
}
.tag {
  font-size: 12px;
  border-radius: 999px;
  padding: 1px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.empty {
  color: var(--mute);
  margin: 0;
}

/* The chat window floats bottom-right; it hides while another agent is selected. */
body:not(.chat-on) [data-cognigy-webchat-root] {
  display: none !important;
}

/* Login */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.login .card {
  width: min(100%, 400px);
  display: grid;
  gap: 14px;
}
