:root {
  --navy: #102c3b;
  --teal: #177a70;
  --muted: #61717b;
  --line: #dce5e7;
  --paper: #fff;
  --bg: #f4f7f7;
  --gold: #aa7020;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px/1.6 system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  background: var(--bg);
  color: #243d47;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: var(--teal);
  text-decoration: none;
}
button,
.button {
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  font-weight: 650;
  cursor: pointer;
  display: inline-block;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #edf3f3;
  color: #294c54;
  border: 1px solid #d5e1e3;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: #102c3b;
  color: #b8cdd5;
  padding: 29px 20px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: #f0f8f8;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -1px;
}
.brand-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 500;
}
.mark {
  width: 38px;
  height: 38px;
  border: 1px solid #5eaa98;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8ae0c7;
  font-style: italic;
}
.project-label {
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 38px;
  color: #7b9ba9;
}
.project-switch {
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 5px 24px;
  border-bottom: 1px solid #31505d;
}
nav {
  margin-top: 18px;
}
nav a {
  display: flex;
  gap: 12px;
  color: #b9cdd4;
  padding: 11px 13px;
  margin: 3px 0;
  border-radius: 8px;
  font-size: 13px;
}
nav a.active {
  color: #f1fff9;
  background: #205348;
  box-shadow: inset 3px 0 #77d4b8;
}
nav a:hover {
  background: #203f4d;
}
.architecture {
  font-size: 12px;
  color: #9fdbd0;
  margin-top: 24px;
  padding: 10px;
}
.sidebar-foot {
  font-size: 10px;
  line-height: 1.8;
  color: #8ca9b5;
  margin-top: auto;
  padding: 20px 10px 0;
}
.app {
  margin-left: 248px;
  min-width: 0;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #6f838c;
}
h1 {
  font-size: 25px;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin: 8px 0 0;
}
.top-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: #6d8088;
}
.connection {
  background: #e9f2ee;
  border-bottom: 1px solid #d5e5df;
  padding: 10px 40px;
  font-size: 12px;
  color: #2d6350;
}
.connection.local {
  background: #fff2dd;
  color: #7b591c;
}
.notice {
  margin: 16px 40px 0;
  padding: 13px 16px;
  background: #e7f4ed;
  color: #255d40;
  border-radius: 8px;
}
.notice.error {
  background: #fff0ec;
  color: #8a3527;
}
main {
  padding: 32px 40px;
  max-width: 1650px;
  margin: auto;
}
footer {
  padding: 15px 40px 30px;
  font-size: 11px;
  color: #788990;
}
.hero {
  padding: 32px 36px;
  background: linear-gradient(120deg, #163c47, #1e5753);
  border-radius: 16px;
  color: #eaf9f5;
  position: relative;
  overflow: hidden;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 750;
  color: #57857e;
}
.hero .eyebrow {
  color: #a3d9c7;
}
.hero h2 {
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: -1px;
  margin: 12px 0;
  max-width: 730px;
}
.hero p {
  color: #c6dfdf;
  max-width: 800px;
}
.hero .flow {
  margin-top: 27px;
}
.flow {
  display: flex;
  gap: 10px;
  align-items: center;
}
.flow > div {
  padding: 14px 17px;
  border: 1px solid #59857f;
  border-radius: 10px;
  flex: 1;
  font-size: 12px;
}
.flow b {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}
.flow i {
  font-style: normal;
  color: #b5dbcf;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.metric b {
  font-size: 29px;
  color: #1c4c50;
  display: block;
  letter-spacing: -1px;
}
.metric span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.metric small {
  font-size: 10px;
  color: #839297;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.panel,
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.panel h3 {
  margin: 0 0 14px;
  font-size: 17px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 15px;
  gap: 14px;
}
.section-title h2 {
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.5px;
}
.section-title p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 13px;
}
.mini-row {
  padding: 13px 0;
  border-bottom: 1px solid #e6edef;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.mini-row:last-child {
  border: 0;
}
.mini-row b {
  display: block;
  font-size: 13px;
}
.mini-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
}
.pill {
  padding: 4px 9px;
  border-radius: 30px;
  background: #eef3f5;
  color: #4a626d;
  font-size: 10px;
  white-space: nowrap;
}
.pill.approved,
.pill.pass {
  color: #247053;
  background: #e3f4e9;
}
.pill.blocked,
.pill.fail {
  color: #9b4230;
  background: #fff0e9;
}
.pill.in-review {
  color: #7c631c;
  background: #fff6d8;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.card h3 {
  margin: 8px 0 12px;
  font-size: 18px;
  line-height: 1.4;
}
.card p {
  font-size: 13px;
  color: #526e79;
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.card .actions {
  margin-top: 18px;
}
.meta {
  font-size: 11px;
  color: #73858c;
}
.filters {
  display: flex;
  gap: 12px;
  margin: 22px 0;
  flex-wrap: wrap;
}
.filters input {
  flex: 1;
  min-width: 180px;
}
input,
select,
textarea {
  border: 1px solid #b6c9cc;
  border-radius: 7px;
  background: #fff;
  color: #27424d;
  padding: 10px;
  max-width: 100%;
  min-width: 0;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4c656f;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #4bab9c;
  outline-offset: 3px;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.empty {
  padding: 30px;
  color: #758990;
  text-align: center;
}
.banner {
  padding: 15px 19px;
  border-left: 3px solid #ba9b52;
  background: #fff7e6;
  border-radius: 8px;
  color: #755823;
  font-size: 13px;
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th {
  text-align: left;
  padding: 13px 16px;
  background: #ecf3f3;
  color: #45616a;
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  border-top: 1px solid #e4ecee;
  vertical-align: top;
}
td b {
  display: block;
  font-size: 13px;
}
td p {
  margin: 4px 0;
  font-size: 12px;
  color: #6a8089;
}
.progressbar {
  height: 7px;
  background: #e6edef;
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.progressbar span {
  display: block;
  height: 100%;
  background: #319879;
}
dialog {
  border: 1px solid #cadade;
  border-radius: 17px;
  padding: 0;
  width: min(980px, 94vw);
  max-height: 90vh;
  color: #28444c;
  box-shadow: 0 25px 70px #102c3b44;
}
dialog::backdrop {
  background: #102c3b88;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 3;
}
.dialog-head h2 {
  font-size: 20px;
  margin: 0;
}
.dialog-head button {
  padding: 6px 12px;
}
#dialog-content {
  padding: 24px 26px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.wide {
  grid-column: 1/-1;
}
.form-grid .actions {
  margin-top: 10px;
}
.details-box {
  background: #f1f6f6;
  border-radius: 10px;
  padding: 17px;
  margin: 18px 0;
}
.details-box p {
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
details {
  margin: 10px 0;
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 10px;
  background: #fff;
}
summary {
  font-weight: 650;
  cursor: pointer;
  font-size: 13px;
}
.source {
  padding: 15px;
  background: #fff;
  border: 1px solid #d4e1e4;
  border-radius: 9px;
  margin: 10px 0;
}
.source p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.source h4 {
  font-size: 13px;
  margin: 0;
}
.answer {
  white-space: pre-wrap;
  background: #e8f4f0;
  border: 1px solid #c4e3d8;
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
}
.grid-editor {
  max-height: 50vh;
  overflow: auto;
  border: 1px solid #d5e1e3;
  margin-top: 15px;
}
.grid-editor table {
  width: max-content;
  min-width: 100%;
}
.grid-editor th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.grid-editor td {
  padding: 0;
  max-width: 280px;
}
.grid-editor input {
  border: 0;
  border-radius: 0;
  width: 210px;
  height: 42px;
  font-size: 12px;
}
.grid-editor input:disabled {
  background: #eef2f4;
  color: #536c75;
}
.grid-editor input.changed {
  background: #fff1b9;
}
.scroll-hint {
  font-size: 11px;
  color: #6b838b;
}
.text-small {
  font-size: 12px;
  color: #68808a;
}
.artifact-path {
  font:
    11px ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.qa-compose {
  display: grid;
  gap: 12px;
}
.qa-compose textarea {
  width: 100%;
  min-height: 95px;
}
.question-card {
  border-left: 3px solid #7bb9a5;
}
.question-card p {
  white-space: pre-wrap;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.timeline {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}
.timeline div {
  flex: 1;
  background: #f0f6f4;
  padding: 15px;
  border-radius: 8px;
}
.timeline b {
  display: block;
  font-size: 12px;
}
.timeline small {
  font-size: 11px;
  color: #5a7771;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 215px;
    padding: 24px 14px;
  }
  .app {
    margin-left: 215px;
  }
  main {
    padding: 25px;
  }
  .top {
    padding: 22px 25px;
  }
  .connection {
    padding: 10px 25px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .cards,
  .grid2 {
    grid-template-columns: 1fr;
  }
  .hero h2 {
    font-size: 29px;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 15px 18px;
  }
  .brand {
    font-size: 23px;
  }
  .project-label,
  .project-switch,
  .sidebar-foot,
  .architecture {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    white-space: nowrap;
    margin: 14px 0 0;
  }
  nav a {
    padding: 9px;
    margin: 0;
  }
  nav a span {
    font-size: 11px;
  }
  .app {
    margin: 0;
  }
  .top {
    padding: 20px;
  }
  .top-actions {
    gap: 8px;
  }
  #identity {
    display: none;
  }
  h1 {
    font-size: 23px;
  }
  main {
    padding: 20px 14px;
  }
  .connection {
    padding: 12px 20px;
  }
  .hero {
    padding: 24px;
  }
  .hero h2 {
    font-size: 27px;
  }
  .flow {
    flex-direction: column;
    align-items: stretch;
  }
  .flow i {
    align-self: center;
    transform: rotate(90deg);
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric b {
    font-size: 24px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .section-title {
    align-items: flex-start;
  }
  .timeline {
    flex-direction: column;
  }
  .notice {
    margin: 15px;
  }
  .dialog-head {
    padding: 18px;
  }
  #dialog-content {
    padding: 18px;
  }
  .filters {
    gap: 8px;
  }
  .filters select {
    flex: 1;
  }
  .top-actions button {
    font-size: 12px;
  }
}

.atc-picker { grid-column: 1 / -1; padding: 14px; background: #f0f6f6; border-radius: 10px; }
.atc-picker summary { cursor: pointer; font-weight: 700; color: #164958; }
.atc-choices { max-height: 260px; overflow-y: auto; margin-top: 10px; }
.atc-choice { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-bottom: 1px solid #d9e5e8; cursor: pointer; }
.atc-choice input[type=checkbox] { width: auto; flex: 0 0 auto; margin-top: 3px; }
