:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #e5e7eb;
  --pass: #138a4d;
  --fail: #c43232;
  --error: #b85c00;
  --unknown: #556070;
  --accent: #3157d5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgb(49 87 213 / 0.22), transparent 32%),
    radial-gradient(circle at 80% 10%, rgb(18 183 106 / 0.20), transparent 30%),
    linear-gradient(135deg, #eef4ff, #f7fbff 45%, #ecfdf3);
}

.public-inquiry-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgb(136 45 230 / 0.16), transparent 30%),
    radial-gradient(circle at 78% 12%, rgb(235 55 156 / 0.14), transparent 28%),
    #f5f7fb;
}

.public-inquiry-shell {
  width: min(760px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.public-inquiry-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgb(23 32 51 / 0.08);
  padding: 26px;
}

.public-inquiry-head {
  margin-bottom: 20px;
}

.public-inquiry-head p {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.public-inquiry-head h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.public-inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.public-inquiry-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #303844;
  font-size: 14px;
  font-weight: 800;
}

.public-inquiry-form input,
.public-inquiry-form select,
.public-inquiry-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.public-inquiry-form textarea {
  min-height: 140px;
  resize: vertical;
}

.public-inquiry-form input:focus,
.public-inquiry-form select:focus,
.public-inquiry-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(49 87 213 / 0.14);
}

.public-inquiry-form button {
  align-self: flex-end;
  min-width: 116px;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.public-inquiry-form button:disabled {
  opacity: .68;
  cursor: wait;
}

.public-inquiry-alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.public-inquiry-alert.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.public-inquiry-alert.success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #067647;
}

.public-inquiry-complete-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 44px 28px;
  text-align: center;
}

.public-inquiry-complete-card .public-inquiry-head {
  margin-bottom: 0;
}

.public-inquiry-complete-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #12b76a;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}

.public-inquiry-complete-no {
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.public-inquiry-complete-copy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.inquiry-select-card {
  display: grid;
  gap: 24px;
  padding: 38px 30px 32px;
}

.inquiry-select-card .public-inquiry-head {
  margin-bottom: 0;
  text-align: center;
}

.inquiry-select-logo {
  justify-self: center;
  width: min(430px, 88%);
  height: auto;
  margin: 4px 0 2px;
}

.inquiry-select-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inquiry-type-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 18px 16px;
  border: 1px solid #d0d7e2;
  border-radius: 12px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgb(15 15 145 / 0.46), rgb(235 55 156 / 0.46), rgb(136 45 230 / 0.46)) border-box;
  color: var(--text);
  text-decoration: none;
}

.inquiry-type-button:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgb(49 87 213 / 0.12);
  text-decoration: none;
}

.inquiry-type-button strong {
  font-size: 20px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 36px;
  color: white;
  background: linear-gradient(135deg, #172033, #3157d5);
}

.topbar h1 { margin: 0; font-size: 28px; }
.topbar .eyebrow { margin: 0 0 6px; color: #cbd5ff; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.topbar .eyebrow a { color: #dfe5ff; }

.container {
  width: min(1180px, calc(100vw - 32px));
  margin: 24px auto 48px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgb(23 32 51 / 0.06);
}

.card span { display: block; color: var(--muted); font-size: 13px; }
.card strong { display: block; margin-top: 8px; font-size: 34px; line-height: 1; }
.card.pass strong { color: var(--pass); }
.card.fail strong { color: var(--fail); }
.card.error strong { color: var(--error); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-top: 18px;
  box-shadow: 0 10px 30px rgb(23 32 51 / 0.06);
}

.cx-demo-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cx-demo-entry p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}

.panel h2 { margin: 0 0 14px; font-size: 18px; }

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

select, input, button, .button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--text);
}

button, .button {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  cursor: pointer;
}

.button.secondary,
.secondary-button {
  background: #475467;
  border-color: #475467;
  color: white;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-move-button {
  display: inline-grid;
  min-width: 42px;
  padding-inline: 0;
  place-items: center;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.icon-action-button {
  display: inline-grid;
  width: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #155eef, #7a5af8);
  color: #fff;
  box-shadow: 0 12px 26px rgba(21, 94, 239, 0.22);
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
}

.icon-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(21, 94, 239, 0.28);
}

.refresh-action-button,
.issue-type-refresh-button {
  text-decoration: none;
  background: linear-gradient(135deg, #0f766e, #155eef);
  font-size: 22px;
  overflow: hidden;
  position: relative;
}

.issue-type-refresh-button {
  width: 42px;
  min-height: 42px;
  font-size: 46px;
  padding: 0;
}

.refresh-action-button:hover,
.issue-type-refresh-button:hover {
  text-decoration: none;
}

.refresh-action-button::after,
.issue-type-refresh-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.24);
  opacity: 0;
  transform: scale(0.35);
}

.refresh-action-button span,
.issue-type-refresh-button span {
  display: inline-block;
  transform-origin: 50% 50%;
  transition: transform 0.18s ease;
  line-height: 1;
}

.issue-type-refresh-button span {
  line-height: 0.72;
  margin-top: -5px;
  margin-left: -1px;
}

.refresh-action-button:hover span,
.issue-type-refresh-button:hover span {
  transform: rotate(20deg) scale(1.08);
}

.refresh-action-button.is-spinning span,
.issue-type-refresh-button.is-spinning span {
  animation: refresh-spin 0.62s cubic-bezier(.2, .9, .2, 1) both;
}

.refresh-action-button.is-spinning,
.issue-type-refresh-button.is-spinning {
  background: linear-gradient(135deg, #12b76a, #155eef);
  box-shadow: 0 0 0 7px rgba(18, 183, 106, 0.15), 0 18px 34px rgba(21, 94, 239, 0.34);
}

.refresh-action-button.is-spinning::after,
.issue-type-refresh-button.is-spinning::after {
  animation: refresh-pulse 0.62s ease-out both;
}

@keyframes refresh-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  45% {
    transform: rotate(210deg) scale(1.34);
  }
  100% {
    transform: rotate(720deg) scale(1.08);
  }
}

@keyframes refresh-pulse {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

.eyebrow.dark {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.firmware-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.firmware-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.firmware-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.firmware-status {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
}

.firmware-discovery {
  margin-top: 14px;
}

.firmware-discovery summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.discovery-list {
  margin-top: 10px;
  color: var(--muted);
}

.discovery-list ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 10px 0 0;
  padding-left: 18px;
}

.chip {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3538cd;
  font-size: 11px;
  font-weight: 800;
}

.chip.ok {
  background: #dcfae6;
  color: #067647;
}

.danger-zone {
  border-color: #fecaca;
}

.danger-zone p {
  margin: 0 0 12px;
  color: var(--muted);
}

.danger-zone form {
  display: flex;
  gap: 10px;
}

.danger-button {
  background: var(--fail);
  border-color: var(--fail);
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  background: var(--unknown);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status.passed { background: var(--pass); }
.status.failed { background: var(--fail); }
.status.error { background: var(--error); }
.status.skipped { background: #7a6a00; }
.status.cx-status-new { background: #667085; }
.status.cx-status-received { background: #155eef; }
.status.cx-status-progress { background: #f79009; }
.status.cx-status-hold { background: #7a5af8; }
.status.cx-status-done { background: #12b76a; }

.empty {
  color: var(--muted);
  text-align: center;
}

.meta dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 14px;
  margin: 0;
}

.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }

.artifact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.artifact-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.artifact-list span { color: var(--muted); }

pre {
  max-width: 720px;
  overflow-x: auto;
  padding: 12px;
  border-radius: 10px;
  background: #101828;
  color: #f9fafb;
}

.workspace-topbar {
  background: linear-gradient(135deg, #0f172a, #2563eb 55%, #12b76a);
}

.topbar-main {
  flex: 1 1 auto;
}

.topbar-subtitle {
  max-width: 760px;
  margin: 8px 0 0;
  color: #e0e7ff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-icon-button,
.gear-button {
  display: inline-grid;
  min-width: 42px;
  padding-inline: 0;
  place-items: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
  border-color: rgb(255 255 255 / 0.35);
  color: white;
  font-size: 20px;
}

.topbar-icon-button {
  flex: 0 0 auto;
}

.back-button {
  width: 42px;
  height: 42px;
}

.gear-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  text-decoration: none;
}

.topbar-text-button {
  min-height: 42px;
  border-color: rgb(255 255 255 / 0.35);
  background: rgb(255 255 255 / 0.18);
  color: white;
}

.topbar-user {
  display: grid;
  max-width: 260px;
  padding: 7px 12px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 14px;
  background: rgb(255 255 255 / 0.12);
  color: white;
  text-align: right;
}

.topbar-user strong {
  font-size: 13px;
  line-height: 1.2;
}

.topbar-user span {
  overflow: hidden;
  color: #e0e7ff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-container {
  width: min(1320px, calc(100vw - 32px));
}

.cx-form-shell {
  padding: 20px;
  border: 1px solid #dbeafe;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgb(49 87 213 / 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 20px 54px rgb(23 32 51 / 0.10);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 12px 32px rgb(23 32 51 / 0.07);
}

.login-side-actions,
.login-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.page-info-panel {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.google-login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.google-login-card {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid #dbeafe;
  border-radius: 30px;
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 24px 80px rgb(23 32 51 / 0.16);
  text-align: center;
  backdrop-filter: blur(10px);
}

.login-logo-mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #3157d5, #12b76a);
  color: white;
  font-size: 30px;
  font-weight: 900;
}

.google-login-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.login-description {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.login-current-user {
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
  color: #344054;
  font-size: 14px;
}

.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  border: 1px solid #d0d5dd;
  background: white;
  color: #344054;
  font-weight: 900;
  box-shadow: 0 8px 20px rgb(23 32 51 / 0.08);
}

.google-login-button:hover {
  background: #f8fafc;
}

.login-form {
  display: grid;
  gap: 14px;
  width: 100%;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 13px;
  font: inherit;
  color: var(--text);
  background: #ffffff;
}

.google-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #4285f4;
  color: white;
  font-size: 14px;
  font-weight: 900;
}

.login-footnote {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.oauth-config-box {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #93c5fd;
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
  text-align: left;
}

.oauth-config-box span,
.oauth-config-box small {
  color: #475467;
}

.oauth-config-box code {
  display: inline-flex;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 8px;
  background: white;
  color: #1d4ed8;
  font-weight: 900;
}

.login-panel h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.login-user {
  margin: 0;
}

.login-user strong {
  display: inline-block;
  margin-right: 8px;
}

.login-user span {
  color: var(--muted);
  font-size: 13px;
}

.login-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.login-actions select {
  min-width: 220px;
}

.cx-form-intro {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 4px 20px;
}

.cx-form-intro h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.cx-form-intro p {
  margin: 0;
  color: var(--muted);
}

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

.workspace-layout.cx-only-layout {
  margin-bottom: 0;
}

.workspace-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgb(23 32 51 / 0.07);
}

.workspace-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.workspace-card-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.workspace-card-head p {
  margin: 0;
  color: var(--muted);
}

.workspace-badge {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.workspace-badge.green { background: #dcfae6; color: #067647; }
.workspace-badge.purple { background: #ede9fe; color: #6d28d9; }
.workspace-badge.orange { background: #ffedd5; color: #c2410c; }

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.result-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  margin-bottom: 16px;
  overflow: auto;
}

.result-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.result-item:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  text-decoration: none;
}

.result-item span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.empty-box,
.selected-box {
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
}

.selected-box {
  margin: 14px 0;
  color: var(--text);
}

.selected-box p {
  margin: 6px 0 0;
}

.compact-help {
  margin: 14px 0 0;
}

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

.selected-inline-box {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
}

.selected-inline-box strong {
  color: #172033;
  font-size: 13px;
}

.step-selection-box {
  margin: 16px 0 0;
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.85);
}

.step-selection-box strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.step-selection-box strong::before {
  content: "✓";
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  color: white;
  font-size: 11px;
}

.wide-button {
  width: 100%;
  min-height: 46px;
  font-weight: 900;
  background: linear-gradient(135deg, #3157d5, #12b76a);
  border: 0;
}

.chat-preview {
  max-width: none;
  min-height: 220px;
  white-space: pre-wrap;
}

.log-preview {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
}

.log-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.log-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.log-line {
  display: grid;
  grid-template-columns: 140px 60px 160px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid #e5e7eb;
}

.log-line:first-of-type {
  border-top: 0;
}

.log-line code {
  color: #475467;
  font-size: 12px;
}

.log-line strong {
  color: var(--unknown);
  font-size: 12px;
}

.log-line.error strong { color: var(--fail); }
.log-line.warn strong { color: var(--error); }
.log-line.info strong { color: var(--pass); }

.log-line p {
  margin: 0;
  color: var(--text);
}

@media (max-width: 760px) {
  .topbar { padding: 22px 18px; align-items: flex-start; flex-direction: column; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-inquiry-shell { width: min(100vw - 24px, 760px); padding: 14px 0 28px; }
  .public-inquiry-card { padding: 20px; border-radius: 10px; }
  .public-inquiry-row { grid-template-columns: 1fr; }
  .public-inquiry-form button { width: 100%; }
  .firmware-grid { grid-template-columns: 1fr; }
  .panel-title-row { flex-direction: column; }
  .discovery-list ul { grid-template-columns: 1fr; }
  .filters { align-items: stretch; flex-direction: column; }
  select, input, button, .button { width: 100%; }
  .danger-zone form { flex-direction: column; }
  .cx-demo-entry { align-items: stretch; flex-direction: column; }
  .login-panel { align-items: stretch; flex-direction: column; }
  .login-actions { align-items: stretch; flex-direction: column; }
  .workspace-layout { grid-template-columns: 1fr; }
  .search-row { grid-template-columns: 1fr; }
  .log-line { grid-template-columns: 1fr; }
}

.secondary-wide {
  margin-top: 10px;
  background: linear-gradient(135deg, #475467, #64748b);
  border-color: #64748b;
}

.workspace-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgb(23 32 51 / 0.06);
}

.workspace-tab {
  flex: 0 0 auto;
  min-width: 150px;
  border-color: transparent;
  background: #f1f5f9;
  color: #475467;
  font-weight: 900;
}

.workspace-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.workspace-tabs-row .workspace-tabs {
  margin-bottom: 0;
}

.workspace-tab.active {
  background: linear-gradient(135deg, #3157d5, #12b76a);
  color: white;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border: 1px solid rgba(21, 94, 239, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(21, 94, 239, 0.14), transparent 38%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 34px rgb(23 32 51 / 0.08);
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #155eef, #12b76a);
  opacity: 0.9;
}

.dashboard-card span {
  display: block;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.dashboard-card strong {
  display: block;
  margin-top: 8px;
  color: #102a56;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-card p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.popup-search-actions {
  display: grid;
  margin-bottom: 14px;
}

.selection-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.selection-chips.muted { display: block; }

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
}

.selection-chip.green {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #067647;
}

.selection-chip small {
  color: var(--muted);
  font-size: 11px;
}

.selection-chip button {
  display: grid;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgb(15 23 42 / 0.12);
  color: #0f172a;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(5px);
}

.modal-backdrop[hidden] { display: none; }

.search-modal {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  padding: 20px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: white;
  box-shadow: 0 30px 90px rgb(15 23 42 / 0.28);
  overflow: hidden;
}

.quick-complete-modal {
  width: min(640px, 100%);
}

.quick-complete-form {
  display: grid;
  gap: 14px;
}

.quick-complete-form .modal-actions {
  margin-top: 2px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.modal-head h2 { margin: 0; }

.icon-button {
  display: grid;
  width: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border-radius: 12px;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
  font-size: 24px;
  line-height: 1;
}

.modal-help {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.modal-results {
  max-height: 460px;
  margin-top: 12px;
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.modal-actions button {
  min-width: 92px;
}

.history-total {
  display: grid;
  min-width: 110px;
  padding: 12px 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
  text-align: center;
}

.history-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-total strong {
  color: #1d4ed8;
  font-size: 28px;
  line-height: 1.1;
}

.history-search-panel {
  margin-bottom: 18px;
}

.history-search-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
}

.issue-type-create-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: stretch;
}

.issue-type-create-form input {
  min-width: 0;
  width: 100%;
}

.history-list {
  display: grid;
  gap: 18px;
}

.history-date-group {
  display: grid;
  gap: 10px;
}

.history-date-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.history-date-title span {
  color: #172033;
  font-size: 20px;
  font-weight: 900;
}

.history-date-title em {
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3157d5;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.history-item {
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 26px rgb(23 32 51 / 0.06);
}

.history-item.open {
  border-color: #93c5fd;
  box-shadow: 0 16px 40px rgb(49 87 213 / 0.12);
}

.history-summary {
  display: grid;
  width: 100%;
  min-height: unset;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.5fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: white;
  color: var(--text);
  text-align: left;
}

.history-main {
  display: grid;
  gap: 5px;
}

.history-main strong {
  color: #1d4ed8;
  font-size: 16px;
}

.history-main em {
  color: #172033;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.history-meta > span:not(.status) {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.history-chevron {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 18px;
  font-weight: 900;
  transition: transform .16s ease;
}

.history-summary[aria-expanded="true"] .history-chevron {
  transform: rotate(180deg);
}

.history-detail {
  padding: 0 18px 18px;
  border-top: 1px solid #eef2ff;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.history-detail dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.history-detail dl div {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}

.history-detail dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.history-detail dd {
  margin: 0;
  color: #172033;
  font-size: 13px;
  font-weight: 800;
}

.history-content,
.history-chat-preview {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
}

.history-content {
  margin-bottom: 12px;
}

.history-content strong,
.history-chat-preview strong {
  display: block;
  margin-bottom: 8px;
  color: #172033;
}

.history-content p {
  margin: 0;
  color: #475467;
  white-space: pre-wrap;
}

.history-chat-preview pre {
  overflow: auto;
  margin: 0;
  color: #334155;
  white-space: pre-wrap;
}

.admin-dashboard-grid {
  margin-top: 18px;
  grid-template-columns: minmax(220px, 320px);
}

.table-content-preview {
  display: -webkit-box;
  max-width: 360px;
  overflow: hidden;
  color: #344054;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
  white-space: normal;
}

#incident-list {
  border-color: rgba(21, 94, 239, 0.12);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.9), #ffffff);
}

#incident-list .panel-title-row h2 {
  color: #102a56;
  letter-spacing: -0.02em;
}

#incident-list .table-wrap {
  border: 1px solid #e6efff;
  border-radius: 18px;
  background: #fff;
}

#incident-list table {
  border-collapse: separate;
  border-spacing: 0;
}

#incident-list th {
  padding: 14px 14px;
  color: #475467;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

#incident-list td {
  padding: 14px;
  color: #172033;
  border-bottom-color: #edf2fb;
  font-size: 13px;
  font-weight: 650;
  vertical-align: middle;
}

.dashboard-incident-row {
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.dashboard-incident-row:hover td,
.dashboard-incident-row.open td {
  background: #f3f8ff;
}

.dashboard-incident-row.hash-focus td {
  background: #eef6ff;
  box-shadow: inset 4px 0 0 #155eef;
}

.incident-toggle-head,
.incident-toggle-cell {
  width: 54px;
  text-align: right;
}

.incident-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #155eef;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  transform: rotate(180deg);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.dashboard-incident-row.open .incident-toggle-icon {
  background: #155eef;
  color: #fff;
  transform: rotate(0deg);
}

.dashboard-incident-detail-row td {
  padding: 0;
  background: #f3f8ff;
}

.dashboard-incident-detail {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid #dbe7ff;
}

.dashboard-incident-detail dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.dashboard-incident-detail dl div {
  padding: 12px;
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 94, 239, 0.06);
}

.dashboard-incident-detail dt {
  margin-bottom: 5px;
  color: #155eef;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-incident-detail dd {
  margin: 0;
  color: #1d2939;
  font-size: 13px;
  font-weight: 700;
  white-space: pre-wrap;
}

.incident-complete-form {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  box-shadow: 0 10px 22px rgba(21, 94, 239, 0.08);
}

.incident-detail-actions {
  display: flex;
  justify-content: flex-start;
}

.incident-detail-link {
  width: auto;
  min-height: 38px;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 900;
}

.incident-complete-form textarea {
  border-color: #c7d7fe;
  background: #fff;
}

.incident-complete-form button {
  justify-self: end;
  border-radius: 999px;
  background: #155eef;
  border-color: #155eef;
  font-weight: 900;
}

.incident-detail-page {
  display: grid;
  gap: 18px;
}

.incident-detail-card {
  gap: 18px;
}

.incident-detail-grid,
.incident-detail-stack {
  display: grid;
  gap: 12px;
  margin: 0;
}

.incident-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.incident-detail-grid div,
.incident-detail-stack div,
.raw-json-grid div,
.incident-history-list div {
  padding: 14px;
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  background: #fff;
}

.incident-detail-grid dt,
.incident-detail-stack dt {
  margin-bottom: 6px;
  color: #155eef;
  font-size: 12px;
  font-weight: 900;
}

.incident-detail-grid dd,
.incident-detail-stack dd {
  margin: 0;
  color: #1d2939;
  font-size: 13px;
  font-weight: 700;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.raw-json-grid strong,
.incident-history-list strong {
  display: block;
  margin-bottom: 8px;
  color: #155eef;
  font-size: 12px;
  font-weight: 900;
}

.raw-json-grid pre {
  max-height: 360px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.incident-history-list {
  display: grid;
  gap: 10px;
}

.incident-history-list span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.incident-history-list p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.admin-oauth-state {
  display: grid;
  min-width: 130px;
  padding: 12px 16px;
  border-radius: 16px;
  text-align: center;
}

.admin-oauth-state.ok {
  border: 1px solid #bbf7d0;
  background: #ecfdf3;
  color: #067647;
}

.admin-oauth-state.warn {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #b54708;
}

.admin-oauth-state span,
.admin-oauth-state small {
  font-size: 12px;
  font-weight: 800;
}

.admin-oauth-state strong {
  font-size: 20px;
  line-height: 1.2;
}

.admin-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3157d5;
  font-size: 12px;
  font-weight: 900;
}

.admin-helper-text {
  margin: 0 0 14px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.row-actions button {
  min-width: 64px;
  padding: 10px 12px;
  border-radius: 12px;
}

.muted-cell {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.role-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.role-guide article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
}

.role-guide strong {
  color: #1d4ed8;
}

.role-guide span {
  color: var(--muted);
  font-size: 13px;
}

.admin-next-list {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #475467;
}

.function-test-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.function-test-intro p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.function-test-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 32px rgb(23 32 51 / 0.07);
}

.function-test-card h2 {
  margin: 8px 0 6px;
  font-size: 19px;
}

.function-test-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.function-test-button {
  width: fit-content;
}

.function-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.demo-version-button {
  width: fit-content;
}

.function-test-result {
  min-height: 58px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  color: #475467;
}

.function-test-result.running {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.function-test-result.passed,
.function-test-result.ready {
  border-color: #bbf7d0;
  background: #ecfdf3;
}

.function-test-result.planned,
.function-test-result.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.function-test-result.failed,
.function-test-result.error {
  border-color: #fecaca;
  background: #fef2f2;
}

.function-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.function-result-head strong {
  color: #172033;
}

.function-result-head span {
  color: var(--muted);
  font-size: 12px;
}

.function-test-result pre {
  overflow: auto;
  max-height: 220px;
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 12px;
  background: rgb(15 23 42 / 0.06);
  color: #334155;
  white-space: pre-wrap;
}

.chatbot-container {
  width: min(1180px, calc(100vw - 32px));
}

.chatbot-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  min-height: 680px;
}

.chatbot-side,
.chatbot-panel {
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 16px 42px rgb(23 32 51 / 0.08);
}

.chatbot-side {
  padding: 20px;
}

.chatbot-side h2 {
  margin: 10px 0 8px;
}

.chatbot-side p {
  color: var(--muted);
  line-height: 1.55;
}

.chatbot-suggestions {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.chatbot-suggestion-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
}

.chatbot-suggestion-group h3 {
  margin: 0 0 2px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.chatbot-suggestions button {
  justify-content: flex-start;
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  text-align: left;
  font-weight: 800;
}

.chatbot-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 0%, rgb(49 87 213 / 0.08), transparent 30%),
    #f8fbff;
}

.chat-message {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  max-width: 78%;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message.bot {
  align-self: flex-start;
}

.chat-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #3157d5;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.chat-message.user .chat-avatar {
  background: #12b76a;
}

.chat-bubble {
  padding: 13px 15px;
  border: 1px solid #dbeafe;
  border-radius: 18px 18px 18px 6px;
  background: white;
  color: #172033;
  line-height: 1.55;
  white-space: pre-wrap;
  box-shadow: 0 8px 22px rgb(23 32 51 / 0.06);
}

.chat-message.user .chat-bubble {
  border-color: #bbf7d0;
  border-radius: 18px 18px 6px 18px;
  background: #ecfdf3;
}

.chat-bubble small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.typing-bubble {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-width: 58px;
}

.typing-bubble span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3157d5;
  animation: typingDot 1s infinite ease-in-out;
}

.typing-bubble span:nth-child(2) { animation-delay: .15s; }
.typing-bubble span:nth-child(3) { animation-delay: .3s; }

@keyframes typingDot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

.chatbot-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #dbeafe;
  background: white;
}

.chatbot-input-row textarea {
  resize: vertical;
  min-height: 52px;
  max-height: 160px;
}

.result-item.selected {
  border-color: #12b76a;
  background: #ecfdf3;
  box-shadow: inset 4px 0 0 #12b76a;
}

.result-item em {
  color: #1d4ed8;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 900px) {
  .dashboard-grid,
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .workspace-tabs {
    overflow-x: auto;
  }

  .history-search-form,
  .history-summary,
  .history-detail dl,
  .role-guide,
  .function-test-grid,
  .chatbot-shell {
    grid-template-columns: 1fr;
  }

  .function-test-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .history-meta {
    justify-content: flex-start;
  }

  .chat-message {
    max-width: 92%;
  }

  .chatbot-input-row {
    grid-template-columns: 1fr;
  }
}

.dashboard-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.stats-collapse {
  margin: 18px 0;
}

.stats-collapse summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  margin-bottom: 12px;
  border: 1px solid #dbe7ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 12px 28px rgba(21, 94, 239, 0.08);
}

.stats-summary-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.stats-collapse summary::-webkit-details-marker {
  display: none;
}

.stats-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #155eef;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.stats-collapse:not([open]) summary {
  margin-bottom: 0;
}

.stats-collapse:not([open]) .stats-toggle-icon {
  background: #e0e7ff;
  color: #155eef;
  transform: rotate(180deg);
}

.stats-collapse summary span {
  font-size: 16px;
  font-weight: 900;
}

.stats-collapse summary small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-list-card {
  min-height: 190px;
}

.dashboard-list-card p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  color: var(--muted);
}

.dashboard-list-card p strong {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.chart-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.pie-chart {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: start;
  gap: 8px;
  margin-top: 2px;
}

.pie-ring {
  display: none;
}

.pie-ring strong {
  margin: 0;
  color: #0f172a;
  font-size: 25px;
  line-height: 1;
}

.pie-ring small {
  margin-top: 22px;
  margin-left: -19px;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.pie-legend {
  display: grid;
  width: 100%;
  gap: 8px;
  min-width: 0;
}

.dashboard-list-card .pie-legend p {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin: 0;
  padding: 9px 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 6px 14px rgb(23 32 51 / 0.045);
  overflow: hidden;
}

.dashboard-list-card .pie-legend p::before {
  position: absolute;
  left: 30px;
  right: 10px;
  bottom: 6px;
  height: 4px;
  border-radius: 999px;
  background: #edf2f7;
  content: "";
}

.dashboard-list-card .pie-legend p::after {
  position: absolute;
  left: 30px;
  bottom: 6px;
  width: var(--bar, 0%);
  max-width: calc(100% - 40px);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dot, #155EEF), color-mix(in srgb, var(--dot, #155EEF) 45%, white));
  content: "";
}

.pie-legend i {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--dot, #155EEF);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, #155EEF) 16%, transparent);
}

.dashboard-list-card .pie-legend p strong {
  display: block;
  margin: 0;
  color: #172033;
  font-size: 12.5px;
  line-height: 1.35;
}

.pie-legend em {
  display: block;
  grid-column: 2;
  margin-top: 1px;
  padding-bottom: 4px;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.facility-lookup-panel {
  margin-top: 18px;
}

.facility-lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 22px 18px;
}

.facility-lookup-form input,
.manual-target-box input,
.manual-target-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
  background: #fff;
}

.facility-lookup-form input:focus,
.manual-target-box input:focus,
.manual-target-box textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.history-preview-box,
.manual-target-box,
.direct-register-card {
  margin-top: 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #eff6ff;
  padding: 14px;
  color: #1e3a8a;
}

.manual-target-box {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.direct-register-card {
  margin: 12px 0 0;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.direct-register-card p,
.history-preview-box p {
  margin: 6px 0;
}

.direct-register-card button {
  margin-top: 8px;
}

.mini-history-card {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.mini-history-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-history-card strong {
  color: #0f172a;
}

.mini-history-card span,
.mini-history-card em {
  color: #64748b;
  font-size: 12px;
}

.mini-history-card p {
  color: #334155;
}

.history-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.history-stat-row span {
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.form-divider {
  height: 1px;
  margin: 10px 0;
  background: #e2e8f0;
}

.issue-type-select-grid {
  align-items: end;
}

.inline-helper-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -4px 0 8px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.inline-helper-actions small {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.inline-helper-actions button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.inline-helper-actions .issue-type-refresh-button {
  display: inline-grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  place-items: center;
  border-radius: 15px;
  font-size: 39px;
}

.inline-helper-actions .issue-type-refresh-button span {
  line-height: 0.82;
  margin-top: -2px;
  margin-left: 0;
}

.incident-form select,
.incident-form input,
.incident-form textarea,
.issue-type-row input,
.issue-type-row select,
.history-action-grid select,
.history-action-grid input,
.history-action-grid textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: #0f172a;
  outline: none;
}

.history-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.history-action-grid form {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
}

.timeline-list {
  display: grid;
  gap: 12px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-list li {
  padding: 12px 14px;
  border-left: 3px solid #3157d5;
  border-radius: 12px;
  background: #f8fafc;
}

.timeline-list span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-list strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-list p {
  margin: 0;
  color: #0f172a;
}

@media (max-width: 1100px) {
  .dashboard-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-grid-wide,
  .history-action-grid {
    grid-template-columns: 1fr;
  }
}
