/* Layout and breakpoints from the approved service-console prototype. */

:root {
  color-scheme: light;
  --navy: #142637;
  --ink: #152736;
  --muted: #526674;
  --line: #dce5e9;
  --canvas: #f4f7f9;
  --white: #fff;
  --accent: #006b65;
  --tint: #e6f4f0;
  --warning: #884c19;
  --danger: #a22b29;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font: 15.5px/1.58 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#app > .outer {
  flex: 1;
}

h1, h2, h3, p, dl {
  margin: 0;
}

a {
  color: var(--accent);
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .57;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18.5px;
  font-weight: 750;
  letter-spacing: .015em;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  white-space: nowrap;
}

.mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #d1eee8;
  color: #07564e;
  font-size: 14.5px;
  font-weight: 800;
}

.top {
  min-height: 68px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.top-inner {
  width: 100%;
  margin: auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.spread {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13.5px;
}

.plain, .link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-weight: 630;
}

.link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn {
  min-height: 38px;
  border: 1px solid #cdd9df;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1.35;
}

.btn:hover:not(:disabled) {
  background: #edf5f4;
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.primary:hover:not(:disabled) {
  background: #005954;
}

.danger {
  color: var(--danger);
}

.ghost {
  border-color: transparent;
  background: none;
}

.outer {
  width: 100%;
  margin: 0 auto;
  padding: 32px 28px 45px;
}

.page-title {
  margin: 0 0 22px;
}

.page-title h1 {
  font-size: clamp(26.5px,4vw,38.5px);
  line-height: 1.22;
  letter-spacing: -.035em;
  margin: 4px 0 7px;
}

.crumb {
  margin-bottom: 8px;
}

.surface {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.pad {
  padding: 20px 22px;
}

.pad+.pad {
  border-top: 1px solid var(--line);
}

.tag {
  display: inline-block;
  background: #edf2f5;
  color: #465a67;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tag.on {
  background: var(--tint);
  color: #065b54;
}

.split {
  display: grid;
  grid-template-columns: minmax(0,1.45fr) minmax(240px,1fr);
  gap: 15px;
  align-items: start;
}

.facts {
  display: grid;
  grid-template-columns: 94px minmax(0,1fr);
  gap: 9px 13px;
  margin: 10px 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.address {
  font: 13.5px/1.5 ui-monospace,monospace;
  display: block;
  overflow-wrap: anywhere;
  background: #eef4f6;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  user-select: all;
  margin: 10px 0;
}

.actions {
  margin-top: 14px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 7px 0 0;
}

.operations {
  display: grid;
  gap: 12px;
  margin-top: 9px;
}

.operations h3 {
  font-size: 14.5px;
}

.operations small {
  color: var(--muted);
}

.shell {
  flex: 1;
  display: grid;
  grid-template-columns: 222px minmax(0,1fr);
  width: 100%;
}

.side {
  padding: 23px 13px;
  background: #eaf0f3;
  border-right: 1px solid var(--line);
}

.side .org {
  padding: 0 10px 16px;
  border-bottom: 1px solid #d6e0e6;
  margin-bottom: 13px;
  overflow-wrap: anywhere;
}

.side nav {
  display: grid;
  gap: 3px;
}

.side nav button {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  color: #294050;
  background: none;
}

.side nav button:hover, .side nav button[aria-current=page] {
  background: #d9e8ed;
}

.side nav button[aria-current=page] {
  color: #124650;
  font-weight: 700;
}

.content {
  min-width: 0;
  padding: 28px clamp(16px,4vw,40px) 42px;
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.table-wrap:focus-visible {
  outline: 2px solid var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  vertical-align: middle;
}

th {
  background: #eaf1f4;
  color: #354d5c;
  font-size: 13.5px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td .cell-note {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.tabs {
  display: flex;
  gap: 19px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.tabs button {
  padding: 7px 1px 10px;
  border: 0;
  background: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}

.tabs button[aria-selected=true] {
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.empty {
  padding: 24px;
}

.empty h2 {
  font-size: 17.5px;
}

.inputs {
  display: grid;
  gap: 13px;
}

.inputs label {
  display: grid;
  gap: 4px;
}

.inputs input, .inputs select, .rule select, .filters select {
  min-height: 35px;
  padding: 6px 8px;
  border: 1px solid #cbd9e1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

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

.message {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f1f6f7;
  border-left: 3px solid #76a6a7;
  color: var(--muted);
}

.message.bad {
  background: #f9eeee;
  border-color: #b94743;
  color: #862d28;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  max-width: 1200px;
  padding: 12px 28px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12.5px;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  max-height: 90vh;
  width: min(600px,calc(100% - 26px));
  padding: 0;
  color: var(--ink);
}

dialog::backdrop {
  background: #0e273a66;
}

.panel {
  padding: 21px 23px;
}

.panel h2 {
  font-size: 21.5px;
}

.panel footer {
  border-top: 1px solid var(--line);
  margin-top: 17px;
  padding-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.fields {
  margin: 12px 0;
}

.rule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.rule input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.rule span small {
  display: block;
  color: var(--muted);
}

.self {
  max-width: 760px;
}

.toast {
  position: fixed;
  right: 17px;
  bottom: 17px;
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 2;
  max-width: calc(100% - 34px);
}

.toast:empty {
  display: none;
}

.directory {
  padding-top: 28px;
}

.directory .page-title {
  margin-bottom: 19px;
}

.directory .page-title h1 {
  font-size: clamp(24.5px,4vw,34.5px);
  margin: 0 0 4px;
}

.directory .page-title .muted {
  font-size: 14.5px;
}

.search-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  font-size: 13.5px;
  color: var(--muted);
}

.search-wrap input {
  width: min(245px,70vw);
  min-height: 37px;
  padding: 6px 10px;
  border: 1px solid #cddbe0;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
}

.categories {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.categories button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 13.5px;
}

.categories button:hover {
  background: #edf3f5;
}

.categories button[aria-pressed=true] {
  background: #e2efed;
  color: #075d56;
  border-color: #cde2dd;
  font-weight: 700;
}

.result-count {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 9px;
}

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

.service-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: box-shadow .14s,border-color .14s;
}

.service-card:hover {
  border-color: #99bab8;
  box-shadow: 0 5px 16px #1930460e;
}

.service-card .cover {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(86px,8vw,128px);
  border: 0;
  padding: 0;
  background: #dbe9e9;
  overflow: hidden;
  text-align: left;
}

.service-card .summary {
  padding: 9px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.service-grid>.empty {
  grid-column: 1/-1;
}

@media(max-width:1180px) {

  .service-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
}

@media(max-width:910px) {

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

@media(max-width:580px) {

  .directory {
    padding-top: 17px;
  }

  .service-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
  }

  .service-card .cover {
    height: clamp(77px,24vw,130px);
  }

  .service-card .summary {
    padding: 7px 8px;
  }

  .categories {
    gap: 4px;
  }

  .categories button {
    padding: 5px 7px;
  }
}

@media(prefers-reduced-motion:reduce) {

  .service-card {
    transition: none;
  }
}

.directory .page-title {
  align-items: end;
  margin-bottom: 15px;
}

.manual {
  padding: 23px 26px;
  overflow-wrap: anywhere;
}

.manual h2, .manual h3, .manual h4 {
  margin: 19px 0 8px;
  line-height: 1.35;
}

.manual h2:first-child, .manual h3:first-child {
  margin-top: 0;
}

.manual p {
  margin: 0 0 10px;
  color: var(--ink);
}

.manual ul, .manual ol {
  margin: 5px 0 12px;
  padding-left: 21px;
}

.manual pre {
  white-space: pre-wrap;
  background: #eef3f5;
  padding: 11px;
  border-radius: 6px;
}

.manual code {
  background: #edf2f4;
  padding: 1px 3px;
  border-radius: 3px;
}

.manual pre code {
  padding: 0;
}

.manual blockquote {
  margin: 10px 0;
  border-left: 3px solid #97bbb9;
  padding: 3px 0 3px 11px;
  color: var(--muted);
}

.editor-split {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.manual-edit {
  min-height: 350px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 13.5px/1.5 ui-monospace,monospace;
  resize: vertical;
}

.editor-split .manual {
  min-height: 260px;
}

.editor-split h2 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

@media(max-width:780px) {

  .editor-split {
    grid-template-columns: 1fr;
  }

  .manual {
    padding: 15px;
  }
}

@media(max-width:780px) {

  .top-inner, .outer {
    padding-left: 15px;
    padding-right: 15px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .side {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .side .org {
    display: none;
  }

  .side nav {
    display: flex;
    flex-wrap: wrap;
  }

  .side nav button {
    width: auto;
  }

  .content {
    padding-top: 17px;
  }

  .top-inner {
    gap: 8px;
  }

  .pad {
    padding: 15px;
  }

  .spread {
    flex-wrap: wrap;
  }
}

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

.current-account {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink);
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-page {
  max-width: 490px;
}

.account-page .inputs {
  gap: 12px;
}

.account-page .inputs .primary {
  width: 100%;
}

.directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.directory-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.directory-actions .result-count { margin: 0; }
.directory-actions .btn { min-height: 32px; padding: 5px 10px; font-size: 13.5px; }

.industry-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0;
  min-width: 0;
}

.industry-tools .categories {
  margin: 0;
}

.industry-label {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
}

.industry-results {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 9px;
  flex-wrap: wrap;
}

.industry-results h2 {
  font-size: 16.5px;
}

.industry-results .result-count {
  margin: 0;
}

.directory .page-title {
  margin-bottom: 8px;
}

.manual {
  font-size: 14.5px;
  line-height: 1.56;
}

.manual h2 {
  font-size: 16.5px;
}

.manual h3, .manual h4 {
  font-size: 14.5px;
}

.service-detail .page-title {
  margin-bottom: 15px;
}

.service-detail .page-title h1 {
  font-size: 30.5px;
}

.enterprise-view .top {
  min-height: 54px;
}

.enterprise-view .top-inner {
  padding-top: 8px;
  padding-bottom: 8px;
  max-width: none;
}

.enterprise-view .shell {
  grid-template-columns: 184px minmax(0,1fr);
}

.enterprise-view .side {
  padding: 14px 9px;
}

.enterprise-view .side .org {
  padding: 0 8px 9px;
  margin-bottom: 7px;
}

.enterprise-view .side nav button {
  padding: 6px 8px;
  font-size: 13.5px;
}

.enterprise-view .content {
  padding: 13px 19px 20px;
}

.enterprise-view .content .page-title {
  margin-bottom: 12px;
}

.enterprise-view .content .page-title h1 {
  font-size: 24.5px;
  margin: 0;
}

.sheet-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 15px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.sheet-toolbar h1 {
  font-size: 20.5px;
  line-height: 1.35;
}

.sheet-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

.sheet-controls .tabs {
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

.sheet-controls .tabs button {
  padding: 4px 8px;
  border: 0;
  font-size: 12.5px;
}

.sheet-controls .tabs button[aria-selected=true] {
  background: #e1eeed;
}

.sheet-controls .filters {
  margin: 0;
  gap: 5px;
}

.sheet-controls select, .sheet-controls .btn {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 12.5px;
}

.sheet-wrap {
  border-radius: 4px;
}

.sheet-wrap th, .sheet-wrap td {
  height: 46px;
  min-width: 89px;
  padding: 4px 8px;
  border-bottom: 1px solid #dbe4e8;
  border-right: 1px solid #dbe4e8;
  font-size: 13.5px;
}

.sheet-wrap th:last-child, .sheet-wrap td:last-child {
  border-right: 0;
}

.sheet-wrap th {
  height: 46px;
  background: #edf3f5;
  color: #294451;
  font-size: 12.5px;
}

.sheet-wrap td:first-child {
  font-weight: 650;
}

.sheet-wrap tbody tr:hover td {
  background: #f6f9fa;
}

.sheet-wrap td.permission-cell {
  padding: 0;
  min-width: 130px;
}

.sheet-cell {
  min-height: 32px;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  background: none;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
}

.sheet-cell:hover, .sheet-cell:focus-visible {
  background: #e6f3f1;
  color: #075953;
  outline-offset: -2px;
}

.sheet-cell .configure-label {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 650;
}

@media(max-width:780px) {

  .enterprise-view .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .enterprise-view .content {
    padding: 10px 12px 20px;
  }

  .account-actions {
    gap: 4px;
  }

  .account-actions .btn {
    padding: 6px 8px;
    font-size: 12.5px;
    min-height: 31px;
  }

  .sheet-toolbar {
    margin-bottom: 6px;
  }
}

.top {
  min-height: 53px;
}

.top-inner {
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  font-size: 15.5px;
}

.brand .mark {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  font-size: 12.5px;
}

.outer {
  padding-top: 18px;
}

.page-title, .directory .page-title {
  margin-bottom: 10px;
}

.page-title h1, .directory .page-title h1, .service-detail .page-title h1, .enterprise-view .content .page-title h1, .sheet-toolbar h1 {
  font-size: 19.5px;
  line-height: 1.35;
  letter-spacing: 0;
  margin: 0;
}

.page-title .muted {
  font-size: 13.5px;
}

.account-page {
  padding-top: 22px;
}

.account-page .pad {
  padding: 15px 18px;
}

.account-page .account-return {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  color: var(--accent);
  font-size: 12.5px;
  text-decoration: none;
}

.account-password-action { text-align: right; font-size: 13.5px; }

.account-page .account-return:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.panel h2 {
  font-size: 17.5px;
}

.pad h2 {
  font-size: 16.5px;
}

.service-grid {
  gap: 8px;
}

.service-card {
  border-radius: 7px;
  display: block;
}

.service-tile {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  min-height: 76px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.service-tile:hover {
  background: #f7fbfa;
}

.service-tile:focus-visible {
  outline-offset: -2px;
}

.service-tile .cover {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 6px;
}

.service-tile .summary {
  min-width: 0;
  padding: 0;
  gap: 3px;
}

.tile-heading {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13.5px;
  line-height: 1.3;
}

.tile-heading .tag {
  font-size: 10.5px;
  padding: 0 4px;
}

.tile-description {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.service-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-height: 36px;
}

.service-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-name, .head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-return {
  margin-bottom: 8px;
}

.btn.catalog-return {
  gap: 6px;
  min-height: 29px;
  padding: 4px 9px;
  font-size: 12.5px;
}

.service-head h1 {
  font-size: 19.5px;
  line-height: 1.35;
  margin: 0;
}

.service-head .update-label {
  color: var(--muted);
  font-size: 12.5px;
}

.service-head .btn, .service-connection .btn {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12.5px;
}

.service-connection {
  display: grid;
  grid-template-columns: minmax(185px,max-content) minmax(0,1fr);
  align-items: center;
  gap: 12px 18px;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 15px;
  margin: 0 0 10px;
  font-size: 13.5px;
}

.connection-info {
  display: grid;
  gap: 2px;
}

.connection-info h2 {
  font-size: 14.5px;
}

.connection-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  min-width: 0;
  padding: 2px 0 2px 16px;
  border-left: 1px solid var(--line);
}

.connection-actions .address {
  flex: 1 1 240px;
  min-width: 0;
  margin: 0;
  padding: 5px 8px;
  font-size: 12.5px;
}

.service-detail .manual {
  padding: 14px 17px;
}

.service-detail .manual h2, .service-detail .manual h3, .service-detail .manual h4 {
  margin: 12px 0 5px;
}

.service-detail .manual h2:first-child, .service-detail .manual h3:first-child {
  margin-top: 0;
}

.manual-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 9px;
}

.manual-form .manual-edit {
  min-height: 250px;
}

.manual-preview-panel {
  max-height: 73vh;
  overflow: auto;
}

.manual-save-error {
  font-size: 13.5px;
}

@media(max-width:560px) {

  .service-tile {
    grid-template-columns: 31px minmax(0,1fr);
    gap: 6px;
    min-height: 73px;
    padding: 5px 6px;
  }

  .service-tile .cover {
    width: 31px;
    height: 31px;
  }

  .tile-heading {
    gap: 3px;
    font-size: 12.5px;
  }

  .tile-description {
    font-size: 11.5px;
  }

  .service-connection {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 9px 11px;
  }

  .connection-actions {
    padding: 8px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .connection-actions .address {
    flex-basis: 100%;
  }
}

.directory .page-title {
  align-items: center;
}

.directory .page-title .btn {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13.5px;
}

.service-tile .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-tile .cover-default {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
}

#editor:has(.panel[data-form="publish"]) {
  width: min(680px, calc(100% - 26px));
}

.publish-fields {
  margin-top: 0;
  gap: 12px;
}

.publish-fields label {
  min-width: 0;
}

.publish-fields label > :is(input:not([type="checkbox"]), select) {
  width: 100%;
  min-height: 36px;
  padding: 5px 9px;
  font-size: 13.5px;
}

.panel[data-form="publish"] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(90dvh - 2px);
}

.panel[data-form="publish"] > .dialog-content {
  min-height: 0;
  margin-top: 12px;
  padding: 2px;
  overflow: auto;
  overscroll-behavior: contain;
}

.publish-grid, .publish-industry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px 14px;
}

.publish-industry-grid .publish-industries {
  min-width: 0;
}

.publish-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.publish-industries legend {
  margin-bottom: 3px;
}

.publish-industries label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
}

.publish-industries input {
  min-height: auto;
  accent-color: var(--accent);
}

.publish-fields .manual-edit {
  min-height: 112px;
}

.publish-fields label > input[type=file] {
  height: 36px;
  padding-block: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.publish-fields input[type=file]::file-selector-button {
  margin-right: 8px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.publish-fields .message {
  margin: 0;
}

.service-detail .service-updates {
  margin-bottom: 10px;
}

.service-updates .update-entry {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.service-updates .update-entry p {
  white-space: pre-line;
}

.service-updates .update-entry p:last-child {
  margin-bottom: 0;
}

.update-entry time {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.manual-form .update-edit {
  min-height: 68px;
  margin: 4px 0 9px;
}

.manual-form label {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
}

@media(max-width:560px) {

  .publish-grid {
    grid-template-columns: 1fr;
  }
}

.enterprise-choice {
  min-height: 31px;
  max-width: min(190px, 53vw);
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  font-size: 12.5px;
}

.enterprise-picker > span {
  color: var(--muted);
  font-size: 12.5px;
}

.enterprise-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.service-tile {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.tile-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.sheet-cell-static {
  padding: 4px 8px;
  min-height: 32px;
}

.sheet-cell > span:first-child, .sheet-cell-static > span:first-child {
  text-align: left;
  white-space: nowrap;
}

.sheet-cell small, .sheet-cell-static small {
  margin-inline-start: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.rule select {
  max-width: 47%;
}

.form-status:not([hidden]) {
  margin: 9px 0 0;
}

.dialog-content {
  margin-top: 12px;
}

.compact-gap {
  margin-top: 8px;
}

form[data-form="permission"] footer { display: none; }
.permission-grid { max-height: 52vh; overflow: auto; scrollbar-gutter: stable; margin-top: 6px; }
.permission-grid table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.permission-grid th, .permission-grid td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.permission-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.permission-grid th:nth-child(2) { width: 46%; }
.permission-grid tbody tr:last-child td { border-bottom: 0; }
.permission-grid tbody tr { height: 39px; }
.permission-grid label { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.permission-grid label:has(input:enabled), .matrix-target:has(input:enabled) { cursor: pointer; }
.permission-grid input[type="checkbox"], .matrix-target input[type="checkbox"] {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}
.permission-grid td:has(> [data-permission-decision]) { position: relative; }
.permission-grid td:has(> [data-permission-decision])::after {
  content: "";
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  color: var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.permission-grid [data-permission-decision] {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 0 22px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-overflow: ellipsis;
}
.permission-grid [data-permission-decision]:enabled { cursor: pointer; }
.permission-grid [data-permission-decision]:enabled:hover { color: var(--accent); }
.permission-grid [data-permission-decision]:focus-visible { outline-offset: 0; }
.permission-grid [data-permission-decision]:disabled { color: var(--muted); }
@media (max-width: 560px) {
  .permission-grid th, .permission-grid td { padding-inline: 5px; }
  .permission-grid th:nth-child(2) { width: 52%; }
  .permission-grid td:has(> [data-permission-decision])::after { inset-inline-end: 9px; }
}
@media (forced-colors: active) {
  .permission-grid [data-permission-decision] { appearance: auto; padding: 0; }
  .permission-grid td:has(> [data-permission-decision])::after { content: none; }
}

.account-actions .message {
  margin: 0;
  max-width: 220px;
  padding: 4px 8px;
  font-size: 12.5px;
}

#app > .message {
  margin: 12px auto;
  max-width: 1120px;
}

textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand {
  text-decoration: none;
}

.service-management-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.service-management-toolbar h1 { margin: 0; font-size: 18.5px; }
.service-management-toolbar label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.service-management-toolbar select { width: min(210px, 42vw); min-height: 32px; }
.service-management-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.service-management-actions .btn { min-height: 32px; padding: 4px 10px; }
.managed-services { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--surface, #fff); font-size: 13.5px; }
.managed-service-name { width: 29%; }
.managed-service-status { width: 74px; }
.managed-service-actions { width: 138px; }
.managed-services tr { height: 46px; }
.managed-services thead { background: #e8eff2; }
.managed-services :is(th, td) { padding: 0 10px; border-bottom: 1px solid #dce4e8; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.managed-services tbody tr:hover { background: #f3f8f8; }
.managed-summary { color: var(--muted); }
.managed-actions { display: flex; align-items: center; gap: 6px; }
.managed-actions .btn { min-height: 28px; padding: 2px 7px; font-size: 12.5px; }
@media (max-width: 640px) {
  .managed-services .managed-summary, .managed-services col.managed-service-summary { display: none; }
  .managed-service-name { width: auto; }
  .managed-services :is(th, td) { padding-inline: 6px; }
  .managed-service-status { width: 58px; }
  .managed-service-actions { width: 120px; }
}

.industry-edit-name { cursor: text; }

.platform-view .top-inner { max-width: none; padding-inline: clamp(12px, 2vw, 28px); }
.platform-shell { width: 100%; max-width: none; grid-template-columns: 172px minmax(0, 1fr); }
.platform-shell .side { padding: 14px 10px; }
.platform-shell .side nav button { padding: 7px 10px; }
.platform-shell .platform-content { padding: 16px clamp(12px, 2vw, 28px) 24px; }
@media (max-width: 780px) {
  .platform-shell { grid-template-columns: minmax(0, 1fr); }
  .platform-shell .side nav button { width: auto; }
}
.platform-toolbar { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:8px; }
.platform-toolbar h1 { margin:0; font-size:19.5px; }
.platform-enterprise-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(390px, 100%);
  min-width: 0;
  font-size: 13.5px;
}
.platform-enterprise-picker label { flex: none; }
.enterprise-picker-control { position: relative; flex: 1; min-width: 0; }
.enterprise-picker-control input { width: 100%; min-height: 32px; padding: 4px 33px 4px 9px; }
.enterprise-picker-toggle {
  position: absolute;
  inset: 1px 1px 1px auto;
  width: 30px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.enterprise-picker-toggle span {
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.enterprise-picker-popup {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 4px) 0 auto;
  max-height: min(256px, 45vh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 5px 18px #183a4920;
}
.enterprise-picker-popup [role="option"] {
  padding: 5px 8px;
  line-height: 1.35;
  border-radius: 4px;
  cursor: pointer;
}
.enterprise-picker-popup [role="option"]:hover,
.enterprise-picker-popup [aria-selected="true"] { background: #e3f1ee; }
.enterprise-picker-popup strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.enterprise-picker-popup small { color: var(--muted); }
.enterprise-picker-popup p { margin: 0; padding: 8px; color: var(--muted); }
.platform-table-wrap { overflow:auto; border:1px solid #d6dfe6; border-radius:6px; }
.platform-table { width:100%; min-width:730px; border-collapse:collapse; table-layout:auto; }
.platform-table tr { height:46px; }
.platform-table :is(th,td) { border-bottom:1px solid #dce4e8; padding:0 8px; white-space:nowrap; line-height:1.2; }
.platform-table th { background:#e8eff2; text-align:left; }
.platform-table td { max-width:240px; overflow:hidden; text-overflow:ellipsis; }
.platform-table td :is(button,input,select) { min-height:0; height:28px; padding:2px 8px; }
.platform-table td input { width:100%; }
.platform-table td form { display:flex; gap:4px; }
.platform-table :is(th, td):last-child:not([colspan]) { position: sticky; right: 0; background: #f6fafb; width: 145px; min-width: 145px; box-shadow: inset 1px 0 #dce4e8; }
.platform-table th:last-child { background: #e8eff2; }
.platform-company-table { min-width: 960px; table-layout: fixed; }
.platform-company-table :is(th, td):nth-child(2) { width: 70px; }
.platform-company-table :is(th, td):nth-child(3) { width: 94px; }
.platform-company-table :is(th, td):nth-child(4) { width: 176px; }
.platform-company-table :is(th, td):nth-child(5) { width: 122px; }
.platform-company-table :is(th, td):nth-child(7) { width: 106px; }
.platform-company-table :is(th, td):nth-child(8) { width: 76px; }
.platform-table.platform-company-table :is(th, td):last-child:not([colspan]) { width: 74px; min-width: 74px; }
.platform-inactive { color: #a42a28; font-weight: 650; }
.roster-preview-help { margin: 0 0 8px; font-size: 13.5px; }
.roster-preview .table-wrap td:last-child { white-space: normal; overflow-wrap: anywhere; }


.industry-option { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; }
.industry-option .industry-edit-name { overflow-wrap: anywhere; }
.industry-option input[type="text"] { width: min(16rem, 48vw); }
.industry-delete { display: inline-grid; place-items: center; width: 25px; min-height: 25px; padding: 0; color: #9b3834; background: transparent; border: 1px solid transparent; border-radius: 4px; }
.industry-delete:hover:enabled { background: #faeeee; border-color: #efd3d3; }
.industry-delete:disabled { color: var(--muted); opacity: .45; }

.new-industry input:disabled { background: #edf2f5; color: var(--muted); opacity: 1; cursor: not-allowed; }
@media (max-width: 560px) {
  .publish-grid, .publish-industry-grid { grid-template-columns: minmax(0, 1fr); }
}

.permission-grid .permission-note,
.permission-grid .permission-tools small { display: block; color: var(--muted); white-space: normal; }
.permission-grid .permission-tools summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.permission-grid .permission-tools ul { margin: 4px 0; padding-inline-start: 20px; white-space: normal; overflow-wrap: anywhere; }

.permission-matrix table {
  --matrix-frozen-width: 148px;
  --matrix-profile-width: 96px;
  --matrix-service-min-width: 205px;
  width: 100%;
  min-width: calc(var(--matrix-frozen-width) + var(--matrix-extra-profile) * var(--matrix-profile-width) + var(--matrix-services) * var(--matrix-service-min-width));
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.permission-matrix th:not(.matrix-service-heading, :first-child) { width: var(--matrix-profile-width); }
.permission-matrix td { overflow: hidden; text-overflow: ellipsis; }
.permission-matrix :is(th, td):first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--matrix-frozen-width);
  background: #fff;
  box-shadow: 1px 0 #dbe4e8;
}
.permission-matrix th:first-child { background: #edf3f5; }
.permission-matrix th, .permission-matrix .matrix-name { overflow: hidden; text-overflow: ellipsis; }
.permission-matrix .matrix-name { display: block; }
.matrix-cell-actions { display: flex; align-items: center; min-width: 0; }
.matrix-cell-actions .sheet-cell { flex: 1; min-width: 0; gap: 4px; }
.matrix-cell-actions .sheet-cell > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.matrix-cell-actions .configure-label { flex: none; }
.matrix-cell-actions > button:last-child { flex: none; margin: 0 6px 0 0; font-size: 11.5px; }
.matrix-target { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.matrix-target input { flex: none; }
.matrix-target span { overflow: hidden; text-overflow: ellipsis; }
.matrix-target small { flex: none; color: var(--muted); }
.permission-copy-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; }
.permission-copy-bar .btn { min-height: 29px; padding: 4px 8px; font-size: 12.5px; }

.matrix-cell-actions .sheet-cell-static { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.matrix-cell-actions > [data-action="confirm-permission-copy"] { min-height: 24px; padding: 2px 7px; }

.employee-position-picker .enterprise-picker-popup { position: static; margin-top: 4px; }
.employee-position-picker .enterprise-picker-toggle { bottom: auto; height: 32px; }

.roster-upload { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; border: 1px dashed #aac8c5; border-radius: 8px; background: #f5faf9; cursor: pointer; }
.roster-upload:hover, .roster-upload:focus-within { border-color: var(--accent); background: #eaf6f3; }
.roster-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.roster-upload-copy { display: grid; min-width: 0; gap: 2px; }
.roster-upload-copy strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; }
.roster-upload-copy small { color: var(--muted); font-size: 12.5px; }
.roster-upload > .btn { flex: none; min-height: 30px; padding: 4px 9px; color: var(--accent); }

.table-wrap tr { height: 46px; }
.material-permissions-embed #top { display: none; }
.material-permissions-embed .content { padding: 0; min-width: 0; }
