:root {
  font-family: Arial, sans-serif;
  color: #222;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 2px;
}
a {
  color: #245c98;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button,
.secondary {
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  padding: 6px 11px;
  background: #f5f5f5;
  color: #333;
  line-height: 1.4;
}
button:hover,
.secondary:hover {
  background: #e9e9e9;
}
button.primary {
  background: #28639e;
  border-color: #28639e;
  color: #fff;
}
button.primary:hover {
  background: #215182;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #28639e;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 22px;
  margin-bottom: 8px;
}
h2 {
  font-size: 18px;
  margin-bottom: 14px;
}
h3 {
  font-size: 15px;
  margin: 22px 0 10px;
}
.muted,
small {
  color: #666;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
}
.brand {
  color: #222;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
}
.brand span {
  font-weight: normal;
  color: #666;
  font-size: 14px;
}
.header-links {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 13px;
}
.main-nav {
  display: flex;
  gap: 6px;
  padding: 12px 24px;
  border-bottom: 1px solid #ddd;
  overflow-x: auto;
}
.nav {
  white-space: nowrap;
  background: #fff;
}
.nav.active {
  background: #e9e9e9;
  border-color: #999;
  font-weight: bold;
}
.nav-badge {
  font-size: 12px;
  color: #666;
  margin-left: 4px;
}
#main-content {
  padding: 24px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.page-heading p {
  margin: 0;
  color: #666;
  font-size: 13px;
}
.heading-actions {
  flex-shrink: 0;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 10px 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  margin-bottom: 18px;
  font-size: 13px;
}
.stats span {
  white-space: nowrap;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  margin-bottom: 14px;
  padding-bottom: 1px;
}
.tab {
  white-space: nowrap;
  background: #fff;
}
.tab.active {
  background: #e9e9e9;
  border-color: #999;
}
.tab span {
  color: #666;
  font-size: 12px;
  margin-left: 3px;
}
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.filters input {
  flex: 1.5;
  min-width: 180px;
}
.filters select {
  flex: 1;
  width: 150px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  color: #222;
  border: 1px solid #bbb;
  background: #fff;
  padding: 7px 9px;
  border-radius: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #9bb9da;
  border-color: #28639e;
}
input::placeholder,
textarea::placeholder {
  color: #777;
}
textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}
select {
  cursor: pointer;
}
.list-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d8d8d8;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.data-table th {
  background: #f2f2f2;
  font-weight: bold;
  white-space: nowrap;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #fafafa;
}
.data-table .author-cell {
  min-width: 155px;
}
.data-table .review-cell {
  min-width: 230px;
  width: 40%;
}
.data-table .specialist-cell {
  min-width: 145px;
}
.data-table .action-cell {
  min-width: 185px;
}
.data-table small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.review-text {
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
}
.rating {
  white-space: nowrap;
}
.badge {
  display: inline-block;
  font-size: 12px;
  color: #666;
  padding: 2px 5px;
  background: #eee;
  border: 1px solid #ddd;
  border-radius: 2px;
  white-space: nowrap;
}
.badge.published {
  background: #edf5ed;
  border-color: #cedfce;
  color: #356439;
}
.badge.pending {
  background: #fff7e3;
  border-color: #eadab4;
  color: #85651f;
}
.badge.rejected {
  background: #f8eeee;
  border-color: #e7d3d3;
  color: #914a4a;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.action {
  font-size: 12px;
  padding: 4px 7px;
}
.action.approve {
  color: #356439;
}
.action.danger {
  color: #914a4a;
}
.text-link {
  font-size: 13px;
}
.action.text-link {
  display: inline-block;
  border: 0;
  padding-left: 0;
}
.source-label {
  white-space: nowrap;
}
.empty {
  border: 1px solid #ddd;
  background: #fafafa;
  padding: 26px 20px;
}
.empty h2 {
  font-size: 16px;
  margin-bottom: 8px;
}
.empty p {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}
.empty p:last-child {
  margin-bottom: 0;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  font-size: 13px;
}
.panels {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.panel {
  border: 1px solid #ddd;
  padding: 18px;
  min-width: 0;
}
.panel p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.panel > .badge {
  margin-bottom: 12px;
}
.integration-logos {
  display: flex;
  gap: 12px;
  font-size: 13px;
  margin: 0 0 16px;
}
.notice {
  border-left: 3px solid #ccc;
  background: #f5f5f5;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.code-block {
  font-family: monospace;
  font-size: 12px;
  line-height: 1.6;
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
}
.sync-item {
  border-bottom: 1px solid #ddd;
  padding: 12px 0;
  font-size: 12px;
}
.sync-item:last-child {
  border: 0;
  padding-bottom: 0;
}
.sync-item p {
  font-size: 12px;
  margin: 8px 0 0;
}
.review-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.endpoint {
  padding: 12px 0;
  border-bottom: 1px solid #ddd;
}
.endpoint code {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.endpoint small {
  line-height: 1.5;
}
.login-page {
  padding: 70px 16px 30px;
}
.login-form {
  width: 340px;
  max-width: 100%;
  margin: auto;
  border: 1px solid #ccc;
  padding: 24px;
}
.login-form h1 {
  font-size: 20px;
}
.login-form p {
  font-size: 13px;
}
form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
}
form label.check-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}
.check-row input {
  width: auto;
  margin-top: 3px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.error {
  color: #a32929;
  font-size: 13px;
}
.error:empty {
  display: none;
}
.loading {
  padding: 30px;
  color: #666;
}
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  border: 1px solid #999;
  background: #f2f2f2;
  color: #222;
  font-size: 13px;
  z-index: 99;
}
dialog {
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: 22px;
  width: 570px;
  max-width: calc(100vw - 24px);
  max-height: 90vh;
  overflow-y: auto;
  color: #222;
}
dialog::backdrop {
  background: #0005;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.dialog-head h2 {
  margin: 0;
}
.icon-button {
  padding: 0 7px;
  font-size: 22px;
  line-height: 1.2;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #ddd;
  padding-top: 16px;
}
@media (max-width: 900px) {
  .filters {
    flex-wrap: wrap;
  }
  .filters input {
    flex-basis: 100%;
  }
  .panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .app-header {
    align-items: flex-start;
    padding: 12px;
    gap: 10px;
  }
  .brand {
    font-size: 14px;
  }
  .brand span {
    display: block;
    font-size: 12px;
    margin-top: 2px;
  }
  .header-links {
    gap: 10px;
    font-size: 12px;
  }
  .main-nav {
    padding: 10px 12px;
  }
  .nav {
    font-size: 12px;
  }
  #main-content {
    padding: 18px 12px;
  }
  .page-heading {
    flex-wrap: wrap;
  }
  h1 {
    font-size: 20px;
  }
  .stats {
    gap: 7px 18px;
  }
  .tab {
    font-size: 12px;
  }
  .filters select {
    flex-basis: calc(50% - 8px);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  dialog {
    padding: 18px;
  }
  .login-page {
    padding-top: 35px;
  }
}
