:root {
  --ink: #12222c;
  --muted: #6d7981;
  --line: #e2e6e8;
  --bg: #f4f6f7;
  --accent: #39b9e5;
  --dark: #132430;
  --font: "Instrument Sans", Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: inherit;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 2.25rem;
  letter-spacing: -1.1px;
  margin-bottom: 10px;
  font-weight: 600;
}
h2 {
  font-size: 1.15rem;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.6;
}
small {
  font-size: 0.8rem;
}
strong {
  font-weight: 600;
}
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 1000;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  background: var(--dark);
  color: #edf1f4;
  display: flex;
  flex-direction: column;
  padding: 42px 24px 20px;
  z-index: 10;
}
.brand {
  font-size: 3.6rem;
  font-weight: 700;
  letter-spacing: -3px;
  text-decoration: none;
  line-height: 0.85;
  display: block;
  margin: 0 10px 62px;
}
.brand > span {
  color: var(--accent);
}
.brand > small {
  display: block;
  letter-spacing: 1.7px;
  font-size: 0.66rem;
  font-weight: 400;
  margin-top: 15px;
  text-transform: uppercase;
}
.workspace-label {
  font-size: 0.65rem;
  letter-spacing: 1.8px;
  color: #8c9eaa;
  margin: 0 13px 17px;
}
.nav {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b5c0c8;
  padding: 14px 12px;
  margin-bottom: 7px;
  font-size: 0.88rem;
  text-align: left;
  gap: 13px;
}
.nav.active {
  background: #293a46;
  color: #f1f5f7;
}
.nav-symbol {
  font-size: 1.2rem;
  color: #57a6db;
  width: 18px;
}
.nav-count {
  background: #3a4b56;
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  font-size: 0.75rem;
  padding: 2px;
  border-radius: 3px;
}
.side-note {
  margin-top: auto;
  padding: 30px 12px 35px;
}
.side-note-line {
  height: 2px;
  background: var(--accent);
  width: 28px;
  margin-bottom: 18px;
}
.side-note strong {
  font-size: 1.13rem;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.2px;
}
.side-note p {
  color: #8e9faa;
  font-size: 0.79rem;
  margin-top: 14px;
  margin-bottom: 0;
}
.sidebar-bottom {
  border-top: 1px solid #30414d;
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.avatar {
  background: #40525e;
  border-radius: 50%;
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 600;
}
.sidebar-bottom strong {
  font-size: 0.8rem;
  display: block;
}
.sidebar-bottom small {
  font-size: 0.68rem;
  color: #9dabb5;
  display: block;
  margin-top: 4px;
}
.legacy {
  margin-left: auto;
  text-decoration: none;
  font-size: 1.3rem;
  color: #acb9c1;
}
main {
  margin-left: 246px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 83px;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}
.breadcrumb {
  font-size: 0.83rem;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 14px;
  color: #acb5bb;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.topbar-right {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 0.76rem;
  color: var(--muted);
}
.environment {
  border: 1px solid #dfe4e7;
  background: #f8fafb;
  padding: 7px 10px;
  border-radius: 4px;
  color: #455661;
}
.page-content {
  padding: 42px;
  flex: 1;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 34px;
}
.eyebrow {
  font-size: 0.67rem;
  letter-spacing: 1.7px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #6a7881;
}
.lead {
  font-size: 0.94rem;
  color: var(--muted);
  margin-bottom: 0;
}
.button {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 17px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  min-height: 42px;
}
.button.primary {
  background: var(--dark);
  color: #fff;
}
.button.primary:hover {
  background: #233948;
}
.button.primary > span {
  font-size: 1.3rem;
  font-weight: 400;
}
.button.secondary {
  background: white;
  border-color: #d7dce0;
  color: #374751;
}
.button.secondary:hover {
  background: #f3f5f7;
}
.button.yellow {
  background: #facc15;
  border-color: #d1a90a;
  color: #29230b;
  white-space: normal;
}
.button.yellow:hover:not(:disabled) { background: #eab308; }
.button.yellow:focus-visible { outline: 3px solid #655009; outline-offset: 3px; }
.button.yellow:disabled { background: #facc15; color: #514719; cursor: not-allowed; }
.text-button {
  background: none;
  border: 0;
  padding: 3px;
  color: #495c68;
  font-size: 0.78rem;
  text-decoration: none;
  font-weight: 600;
}
.text-button:hover {
  text-decoration: underline;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  padding: 22px 0;
  box-shadow: 0 2px 3px #14253010;
}
.metric {
  padding: 0 25px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border: 0;
}
.metric > span {
  display: block;
  color: #66747d;
  font-size: 0.8rem;
  margin-bottom: 15px;
}
.metric strong {
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: -1px;
  display: block;
  margin-bottom: 9px;
}
.metric small {
  color: #8b9297;
  font-size: 0.72rem;
}
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 25px;
}
.cases-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  align-self: start;
  min-height: 480px;
  box-shadow: 0 2px 3px #14253006;
}
.card-toolbar {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.card-toolbar h2 {
  margin: 0;
  font-size: 0.99rem;
  font-weight: 600;
}
.card-toolbar h2 span {
  font-size: 0.75rem;
  color: #6e7a82;
  background: #f1f3f5;
  padding: 3px 7px;
  border-radius: 4px;
  margin-left: 6px;
}
.table-tools {
  display: flex;
  gap: 9px;
  margin-left: auto;
}
.search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  gap: 8px;
  padding: 7px 9px;
  color: #97a1a7;
}
.search span {
  font-size: 1.2rem;
  line-height: 1;
}
.search input {
  width: 150px;
  font-size: 0.75rem;
  border: 0;
  outline: 0;
  padding: 0;
  min-width: 0;
}
.search:focus-within {
  outline: 2px solid #5f7686;
}
select {
  appearance: none;
  background: #fff;
  padding: 9px 30px 9px 10px;
  border: 1px solid #dfe4e7;
  border-radius: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' stroke='%23677973' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  font-size: 0.76rem;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
thead {
  background: #f8f9fa;
}
th {
  font-size: 0.69rem;
  letter-spacing: 0.2px;
  color: #77838b;
  padding: 14px 18px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 17px 18px;
  border-bottom: 1px solid #edeff1;
  font-size: 0.8rem;
}
td small {
  display: block;
  color: #7d878d;
  margin-top: 5px;
  font-size: 0.7rem;
}
td strong {
  font-size: 0.85rem;
}
tbody tr:hover {
  background: #fafbfc;
}
.empty {
  text-align: center;
  padding: 62px 25px 55px;
}
.paper-icon {
  width: 40px;
  height: 48px;
  border: 1px solid #bbc4ca;
  border-radius: 4px;
  background: #f1f5f8;
  padding: 15px 9px;
  position: relative;
  margin: 0 auto 25px;
  box-shadow: 6px -5px 0 -1px #e7ecf0;
}
.paper-icon i {
  height: 1px;
  background: #9cadb8;
  margin: 4px 0;
  display: block;
}
.empty h3 {
  font-size: 1.09rem;
  letter-spacing: -0.2px;
  margin-bottom: 10px;
}
.empty p {
  font-size: 0.82rem;
  line-height: 1.8;
  color: #7d878d;
}
.empty .button {
  margin-top: 5px;
}
.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 22px;
  font-size: 0.71rem;
  color: #848d93;
  border-top: 1px solid #edeff1;
}
.workflow-card {
  padding: 26px 25px 10px;
  border: 1px solid #cddce6;
  background: #e8f0f5;
  border-radius: 7px;
}
.workflow-card h2 {
  font-size: 1.55rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.6px;
  margin-bottom: 26px;
}
.workflow-card .eyebrow {
  color: #546e7f;
}
.workflow-list {
  padding: 0;
  list-style: none;
}
.workflow-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}
.workflow-icon {
  flex: 0 0 28px;
  height: 28px;
  border: 1px solid #c1d0da;
  background: #d9e6ef;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #3d5f76;
  font-size: 1rem;
}
.workflow-list strong {
  font-size: 0.83rem;
}
.workflow-list p {
  font-size: 0.74rem;
  color: #72828c;
  line-height: 1.7;
  margin: 5px 0 0;
}
.connection-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-top: 20px;
  padding: 21px;
}
.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.card-title h3 {
  font-size: 0.85rem;
  margin: 0;
}
.service-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid #edeff1;
  font-size: 0.8rem;
}
.service-line strong {
  font-size: 0.8rem;
}
.service-line:last-of-type {
  border-bottom: 0;
}
.status {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 0.68rem;
  white-space: nowrap;
  font-weight: 500;
}
.status.neutral {
  background: #eff1f3;
  color: #758087;
}
.status.good {
  background: #dce9f2;
  color: #305b77;
}
.status.warn {
  background: #fff0d9;
  color: #956827;
}
.status.error {
  background: #fbe9e6;
  color: #a44d43;
}
.subtle {
  font-size: 0.76rem;
  color: #828b91;
  line-height: 1.7;
}
.connection-card > .subtle {
  font-size: 0.68rem;
  margin: 12px 0 0;
}
.page-footer {
  padding: 19px 42px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 0.69rem;
  color: #8c9499;
}
.rules-intro {
  background: #e4edf3;
  border: 1px solid #ccdce7;
  padding: 24px;
  border-radius: 6px;
  margin-bottom: 25px;
}
.rules-intro p {
  margin-bottom: 0;
  margin-top: 8px;
  color: #677782;
  font-size: 0.86rem;
  max-width: 900px;
}
.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.rule-card {
  background: white;
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 6px;
}
.rule-card h3 {
  margin-bottom: 9px;
}
.rule-card p {
  font-size: 0.83rem;
  color: #7b858b;
  margin: 0;
  line-height: 1.8;
}
.rule-card .status {
  margin-bottom: 17px;
}
.rule-details {
  background: white;
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 6px;
  margin-top: 25px;
}
.rule-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 25px;
}
.rule-columns p {
  font-size: 0.8rem;
  color: #7c868d;
  line-height: 1.8;
}
.version-label {
  font-size: 0.75rem;
  color: #818b91;
  border: 1px solid var(--line);
  padding: 10px;
  background: white;
  border-radius: 4px;
}
.connection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 7px;
}
.panel > p {
  font-size: 0.85rem;
  color: #7f878d;
}
.panel > h2 {
  margin-top: 22px;
}
.integration-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #d5e0e7;
  background: #edf3f7;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #4d6d82;
}
.domain-panel {
  margin-top: 24px;
}
.domain-panel h2 {
  margin-top: 0;
}
.alert {
  padding: 13px 16px;
  margin-bottom: 20px;
  border: 1px solid #efcbbd;
  background: #fff5ed;
  color: #95532e;
  border-radius: 5px;
  font-size: 0.85rem;
  line-height: 1.65;
}
dialog {
  border: 1px solid #e0e4e7;
  border-radius: 10px;
  box-shadow: 0 25px 90px #11283840;
  width: min(650px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  max-height: 92vh;
}
dialog::backdrop {
  background: #12243080;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 26px 30px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 500;
}
.dialog-head .eyebrow {
  font-size: 0.6rem;
  margin-bottom: 8px;
}
.icon-button {
  font-size: 1.7rem;
  line-height: 1;
  background: none;
  border: 0;
  color: #8b959b;
  padding: 0 6px;
}
.dialog-body {
  padding: 28px 30px;
}
.dialog-body label,
.details-grid label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #495761;
}
.dialog-body input:not([type="file"]),
.details-grid input,
.details-grid select,
.details-grid textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dce1e5;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  margin-top: 8px;
}
.dialog-body small {
  display: block;
  font-weight: 400;
  color: #899197;
  line-height: 1.6;
  font-size: 0.72rem;
  margin-top: 7px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0;
}
.form-grid select {
  width: 100%;
  margin-top: 8px;
  height: 43px;
  font-size: 0.85rem;
}
.dropzone {
  border: 1px dashed #b0c0cb;
  border-radius: 7px;
  background: #f4f8fb;
  text-align: center;
  padding: 28px 20px;
  cursor: pointer;
  margin-top: 24px;
}
.dropzone.drag {
  border-color: #3a637e;
  background: #dce9f1;
}
.dropzone > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.dropzone:focus-within {
  outline: 2px solid #3c6581;
}
.dropzone > strong,
.dropzone > span {
  display: block;
}
.dropzone > strong {
  margin: 8px 0;
  font-size: 0.97rem;
}
.dropzone > span:not(.upload-icon) {
  font-weight: 400;
  font-size: 0.8rem;
  color: #72828d;
}
.upload-icon {
  font-size: 1.8rem;
  color: #4e6d81;
}
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  gap: 10px;
}
.file-item small {
  color: #858e94;
}
.file-item button {
  background: none;
  border: 0;
  color: #818b91;
}
.dialog-actions {
  padding: 19px 30px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f9fbfc;
  border-top: 1px solid var(--line);
}
.case-dialog {
  width: min(1220px, calc(100% - 28px));
  max-height: 94vh;
}
.case-dialog .dialog-head {
  padding: 23px 28px;
}
.case-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 16px 28px;
  background: #f7f9fb;
  font-size: 0.77rem;
  color: #768690;
}
.case-meta-strip strong {
  color: #42525d;
  margin-left: 6px;
}
.detail-tabs {
  display: flex;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.detail-tabs > button {
  border: 0;
  background: none;
  padding: 18px 0;
  font-size: 0.83rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  color: #828a90;
}
.detail-tabs > button.selected {
  color: #233b4b;
  border-bottom-color: #477ca0;
  font-weight: 600;
}
.detail-tabs span {
  font-size: 0.7rem;
  background: #e8eff3;
  padding: 2px 6px;
  margin-left: 6px;
  border-radius: 3px;
}
.case-body {
  padding: 24px 28px;
  min-height: 300px;
  max-height: 55vh;
  overflow: auto;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.section-header h3 {
  margin: 0;
}
.section-header > label {
  font-size: 0.75rem;
  color: #7a848b;
}
.section-header select {
  margin-left: 10px;
  max-width: 320px;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.details-grid .wide {
  grid-column: span 2;
}
.details-grid small {
  color: #8b959b;
  font-size: 0.7rem;
  display: block;
  margin-top: 5px;
  font-weight: 400;
  line-height: 1.6;
}
.details-grid label.check {
  display: flex;
  align-items: center;
  gap: 9px;
}
.details-grid label.check input {
  width: auto;
  margin: 0;
}
.detail-actions {
  justify-content: space-between;
  align-items: center;
}
.detail-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-actions .button {
  font-size: 0.77rem;
  padding: 10px 12px;
}
.position-summary {
  padding: 13px 17px;
  background: #eef3f7;
  border: 1px solid #d6e1e8;
  border-radius: 5px;
  font-size: 0.76rem;
  line-height: 1.8;
  color: #687985;
  margin-bottom: 20px;
}
.positions-table {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.positions-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.positions-table td {
  padding: 9px 10px;
  vertical-align: top;
}
.positions-table input,
.positions-table textarea {
  border: 1px solid #dfe3e6;
  border-radius: 3px;
  padding: 7px;
  font-size: 0.76rem;
  width: 100%;
  min-width: 70px;
  background: #fff;
}
.positions-table textarea {
  min-width: 210px;
  min-height: 67px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}
.positions-table .code-input {
  min-width: 93px;
}
.positions-table small {
  font-size: 0.63rem;
}
.positions-table td.number {
  min-width: 47px;
  padding-top: 17px;
}
.positions-table td.source {
  min-width: 72px;
}
.positions-table .check input {
  width: auto;
  min-width: 0;
}
.issue {
  padding: 15px 17px;
  border: 1px solid #e1e6e9;
  border-left: 3px solid #8bb1cb;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  font-size: 0.83rem;
  line-height: 1.65;
}
.issue.error {
  border-left-color: #cd8a64;
  background: #fffaf5;
}
.issue.warning {
  background: #f6fafc;
}
.issue .issue-content {
  flex: 1;
}
.issue small {
  display: block;
  color: #8b959b;
  margin-top: 4px;
}
.issue button {
  border: 0;
  background: none;
  text-decoration: underline;
  color: #4e6d81;
  font-size: 0.73rem;
  padding: 3px;
}
.validation-success {
  padding: 30px;
  background: #e4eff6;
  border: 1px solid #c4dae8;
  border-radius: 6px;
}
.validation-success h3 {
  color: #3b6078;
}
.validation-success p {
  font-size: 0.83rem;
  color: #6c8290;
  margin: 0;
}
.doc-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-bottom: 13px;
}
.doc-card .paper-icon {
  flex-shrink: 0;
  width: 30px;
  height: 37px;
  margin: 0;
  padding: 9px 6px;
  box-shadow: none;
}
.doc-card div:nth-child(2) {
  flex: 1;
}
.doc-card p {
  font-size: 0.75rem;
  color: #828c93;
  margin: 4px 0 0;
}
.doc-card strong {
  font-size: 0.85rem;
}
.progress-area {
  padding: 15px 17px;
  background: #e8f0f6;
  border-radius: 5px;
  border: 1px solid #c7dbe8;
  font-size: 0.83rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.progress-area progress {
  width: 100%;
  accent-color: #3f6e8d;
  margin-top: 10px;
  height: 7px;
}
.toast {
  position: fixed;
  bottom: 25px;
  right: 30px;
  background: var(--dark);
  color: #e5f0f8;
  border: 1px solid #435662;
  box-shadow: 0 5px 20px #13243025;
  padding: 15px 22px;
  border-radius: 6px;
  z-index: 1000;
  font-size: 0.86rem;
}
.edit-badge {
  background: #f5efdf;
  color: #917b40;
  padding: 2px 4px;
  display: inline-block;
  margin-top: 5px;
}
.note-item {
  font-size: 0.79rem;
  color: #7d858b;
  line-height: 1.7;
  margin: 9px 0;
}
.check {
  font-size: 0.75rem;
}
.note-label {
  display: block;
  font-size: 0.71rem;
  margin-bottom: 4px;
}
.button.loading {
  opacity: 0.7;
}
.case-open {
  border: 0;
  background: none;
  font-size: 1.2rem;
  color: #7b858c;
}
.rule-mrns {
  font-family: monospace;
  font-size: 0.72rem;
}
.version-label,
.date {
  white-space: nowrap;
}
@media (min-width: 1600px) {
  .page-content {
    padding: 48px 60px;
  }
  .topbar {
    padding: 0 60px;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .cases-card {
    min-height: 530px;
  }
  .empty {
    padding: 82px 25px;
  }
  .side-note {
    padding-bottom: 45px;
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 215px;
    padding-left: 18px;
    padding-right: 18px;
  }
  main {
    margin-left: 215px;
  }
  .page-content {
    padding: 30px;
  }
  .topbar {
    padding: 0 30px;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .right-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .connection-card {
    margin-top: 0;
  }
  .workflow-card h2 br {
    display: none;
  }
  .workflow-list li {
    margin-bottom: 15px;
  }
  .metrics {
    margin-bottom: 24px;
  }
  .connection-grid {
    grid-template-columns: 1fr;
  }
  .rule-grid {
    grid-template-columns: 1fr 1fr;
  }
  .date {
    display: none;
  }
}
@media (max-width: 850px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 20px;
    display: block;
  }
  .brand {
    font-size: 2.8rem;
    margin: 0 0 20px;
  }
  .brand small {
    margin-top: 10px;
  }
  .workspace-label,
  .side-note,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 5px;
  }
  .nav {
    margin: 0;
    font-size: 0.78rem;
    padding: 10px;
  }
  .nav-symbol {
    display: none;
  }
  .nav-count {
    display: none;
  }
  main {
    margin-left: 0;
  }
  .topbar {
    height: 60px;
    padding: 0 20px;
  }
  .environment {
    font-size: 0.65rem;
  }
  .breadcrumb {
    font-size: 0.72rem;
  }
  .breadcrumb span {
    margin: 0 8px;
  }
  .page-content {
    padding: 25px 20px;
  }
  h1 {
    font-size: 1.85rem;
  }
  .page-heading {
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
  }
  .page-heading .button {
    font-size: 0.8rem;
  }
  .lead {
    font-size: 0.85rem;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    padding: 0;
  }
  .metric {
    padding: 18px;
    border-bottom: 1px solid var(--line);
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric strong {
    font-size: 1.65rem;
    margin-bottom: 5px;
  }
  .metric > span {
    margin-bottom: 9px;
  }
  .metric:nth-child(3),
  .metric:nth-child(4) {
    border-bottom: 0;
  }
  .metric small {
    font-size: 0.65rem;
  }
  .right-panel {
    grid-template-columns: 1fr;
  }
  .rule-grid,
  .rule-columns {
    grid-template-columns: 1fr;
  }
  .card-toolbar {
    padding: 18px;
  }
  .table-tools {
    margin-left: 0;
    width: 100%;
  }
  .search {
    flex: 1;
  }
  .search input {
    width: 100%;
  }
  .empty {
    padding: 45px 20px;
  }
  .page-footer {
    padding: 17px 20px;
    gap: 15px;
    line-height: 1.6;
  }
  .page-footer span:last-child {
    display: none;
  }
  .form-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }
  .details-grid .wide {
    grid-column: auto;
  }
  .case-body {
    max-height: 52vh;
    padding: 20px;
  }
  .dialog-actions {
    padding: 17px 20px;
  }
  .dialog-head {
    padding: 22px 20px;
  }
  .detail-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .detail-tabs {
    gap: 20px;
    padding: 0 20px;
  }
  .detail-tabs > button {
    font-size: 0.75rem;
  }
  .case-meta-strip {
    padding: 13px 20px;
    gap: 9px 20px;
  }
  .panel {
    padding: 23px;
  }
  .table-wrap th,
  .table-wrap td {
    padding-left: 13px;
    padding-right: 13px;
  }
  .version-label {
    font-size: 0.68rem;
  }
}

.key-form {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.key-form label {
  font-size: 0.8rem;
  display: block;
  color: #606d76;
}
.key-form input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  padding: 11px;
  margin: 9px 0 12px;
  border-radius: 4px;
  font-size: 0.85rem;
}
.key-form .button {
  white-space: normal;
  text-align: left;
  font-size: 0.78rem;
}

.repair-panel {display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 24px;padding:20px;border:1px solid var(--line);border-radius:6px;background:#f5f7f8;}
.repair-panel > div,.repair-panel > p {grid-column:1/-1;}
.repair-panel h3 {margin:0 0 8px;}
.repair-panel p {margin:0;color:#525d64;font-size:.9rem;line-height:1.5;}
.repair-panel label {display:grid;gap:8px;font-size:.9rem;}
.repair-panel select,.repair-panel input {width:100%;min-width:0;padding:10px;border:1px solid var(--line);border-radius:4px;background:white;font:inherit;}
@media(max-width:700px){.repair-panel {grid-template-columns:1fr;}}

.button.orange {background:#fb923c;border-color:#c75b0a;color:#2e1908;white-space:normal;}
.button.orange:hover:not(:disabled) {background:#f97316;}
.button.orange:focus-visible {outline:3px solid #9a3412;outline-offset:3px;}
#duplicate-dialog {width:min(600px,calc(100% - 32px));}
#duplicate-reference {display:block;width:100%;margin-top:8px;padding:11px;border:1px solid var(--line);border-radius:4px;font:inherit;}

/* fast. customs light-blue workspace */
.sidebar {background:#123556;color:#edf6fd;border-right:1px solid #294e6c;}
.brand {margin:0 0 34px;letter-spacing:normal;line-height:1;}
.brand img {display:block;width:100%;height:auto;max-height:108px;object-fit:contain;}
.workspace-label,.side-note p,.sidebar-bottom small {color:#b9cede;}
.nav {color:#d6e8f5;}
.nav.active {background:#275b80;color:#fff;}
.nav:hover:not(.active) {background:#1d4664;}
.nav-symbol {color:#64c8f1;}
.nav-count,.avatar {background:#2c6388;color:#fff;}
.sidebar-bottom {border-color:#31516a;}
.account-button {width:100%;background:none;border-right:0;border-left:0;border-bottom:0;padding-bottom:0;text-align:left;cursor:pointer;}
.account-button:hover {color:#8bdbfa;}
.account-name {flex:1;min-width:0;}
.account-name strong,.account-name small {overflow-wrap:anywhere;}
.avatar {flex-shrink:0;}
.team-grid {display:grid;grid-template-columns:minmax(290px,360px) minmax(0,1fr);gap:24px;align-items:start;}
.account-panel {padding:24px;margin-bottom:24px;}
.team-editor,.team-list-panel {padding:24px;}
.member-form {display:grid;gap:18px;}
.member-form label {display:grid;gap:8px;font-size:1rem;}
.member-form label.check {display:flex;align-items:center;gap:10px;}
.member-form input:not([type=checkbox]),.member-form select {display:block;width:100%;min-width:0;padding:11px;border:1px solid #bed6e6;border-radius:5px;background:#fff;font:inherit;color:#173d58;}
.member-form input[type=checkbox] {width:18px;height:18px;accent-color:#1683b5;}
.member-actions {display:flex;flex-wrap:wrap;gap:10px;}
.rights-description {padding:14px;border-radius:5px;background:#edf7fd;color:#315c77;font-size:.9rem;line-height:1.6;}
.rights-chips {display:flex;gap:8px;flex-wrap:wrap;}
.rights-chips span {padding:7px 12px;border-radius:5px;background:#dff1fb;color:#155c81;font-size:.9rem;}
.member-row {display:flex;align-items:center;gap:16px;justify-content:space-between;padding:18px 0;border-bottom:1px solid #dfebf3;}
.member-row>div {min-width:0;}
.member-row strong,.member-row small,.member-row span:not(.status) {display:block;overflow-wrap:anywhere;}
.member-row small,.member-row div>span {font-size:.88rem;line-height:1.5;color:#526c7e;margin-top:4px;}
.owner-row {background:#f0f8fd;border:1px solid #d4e9f6;border-radius:5px;padding:16px;margin-bottom:8px;}
@media(max-width:1050px){.team-grid {grid-template-columns:1fr;}}
@media(max-width:700px){.brand img {max-height:65px;width:auto;max-width:180px;}.member-row{align-items:start;flex-wrap:wrap;}.account-panel,.team-editor,.team-list-panel{padding:18px;}}

.brand {background:#123f60;padding:12px;border-radius:7px;}
.nav-count {flex-shrink:0;}

.nav-count {display:none;}

.button.send-action {background:#18833a;border-color:#126c2f;color:#fff;}
.button.send-action:hover:not(:disabled) {background:#12692e;}
.button.send-action:focus-visible {outline:3px solid #6bcf88;outline-offset:3px;}
.button.send-action:disabled {background:#18833a;color:#fff;}

/* Explicit action colour, including disabled state; permissions remain unchanged. */
#send-case.button {background:#15803d !important;border-color:#166534 !important;color:#fff !important;opacity:1 !important;}
#send-case.button:hover:not(:disabled) {background:#166534 !important;}
#send-case.button:disabled {background:#15803d !important;cursor:not-allowed;}
.workflow-card {background:linear-gradient(145deg,#fff3c7,#ffe1ae);border-color:#e6bd62;box-shadow:0 5px 18px #b7831514;}
.workflow-card h2,.workflow-list strong {color:#4a3515;}
.workflow-card .eyebrow {color:#89500b;font-weight:700;}
.workflow-list p {color:#70542b;}
.workflow-icon {background:#ffd178;border-color:#d9a535;color:#64400a;}

.status.transferred {background:#15803d;color:#fff;border:1px solid #166534;}

.connection-card .status.good,.connection-grid .status.good {background:#15803d;color:#fff;border:1px solid #166534;}
