html,
body {
  margin: 0;
}

body {
  font-family: "Inter", ystem-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
  background: #e5e7eb;
}

#json-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width, 260px) minmax(0, 1fr);
  max-width: 1920px;
  margin: 0 auto;
  background: #f8fafc;
  transition: grid-template-columns 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.layout.sidebar-collapsed {
  --sidebar-width: 50px;
}

.sidebar {
  background: #f8fafc;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  position: relative;
  justify-content: space-between;
}

.layout.sidebar-collapsed .sidebar {
  padding: 12px 0px 0px 0px;
  margin-right: -20px;
  align-items: center;
}


.sidebar-logo-panel {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform-origin: center center;
  margin-top: 0;
  transform: translateY(0) rotate(0deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-logo-panel .sidebar-logo-title {
  /* width: auto !important; */
  max-height: 62px;
  transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.layout.sidebar-collapsed .sidebar-logo-panel {
  transform: translateY(72px) rotate(-90deg) translateY(-4px);
  z-index: 2;
}

.layout.sidebar-collapsed .sidebar-logo-panel>* {
  max-height: 52px;
}

.sidebar-panel {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  padding: 10px 12px;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.25s,
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.25s,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
  gap: 8px;
}

.layout.sidebar-collapsed .sidebar-content {
  max-height: 0;
  opacity: 0;
  transform: translateY(-16px);
  transition-delay: 0s;
  pointer-events: none;
}

/* .layout.sidebar-collapsed .sidebar-logo-panel .sidebar-logo-title {
  max-height: 40px;
} */

.sidebar-compact {
  position: absolute;
  inset: 50px 0 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1) 0.25s,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}

.layout.sidebar-collapsed .sidebar-compact {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) translateX(-4px);
  transition-delay: 0.2s;
}

.sidebar-compact-menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 186px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  padding: 6px 6px;
}

.sidebar-icon-circle {
  background: #9ca3af;
}

.sidebar-compact-system {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  padding: 6px 6px;
}

.sidebar-compact-system>* {
  padding: 3px 7px;
}

.system-compact-badge {
  min-width: 26px;
  height: 22px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.system-compact-badge-critical {
  background: #b91c1c;
}

.system-compact-badge-warning {
  background: #d97706;
}

.system-compact-badge-ok {
  background: #16a34a;
}

.sidebar-compact-session {
  margin-top: auto;
  margin-bottom: 0px;
    background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
  padding: 6px 6px;
}

.sidebar-icon-logout {
  background: #ef4444;
}

.sidebar-icon-img {
  width: 26px;
  height: 26px;
  display: block;
}

.sidebar-icon-button {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: none;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-master {
  padding-bottom: 12px;
}

.sidebar-panel-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 2px;
}

.sidebar-panel-title {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.sidebar-panel-title.small {
  font-size: 12px;
  text-transform: none;
}

/* menu buttons */

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-button {
  height: 30px;
  border-radius: 15px;
  border: none;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  background: #e5e7eb;
  color: #0f172a;
}

.menu-button-primary {
  background: #2563eb;
  color: #f9fafb;
}

.menu-button-dark {
  background: #0f172a;
  color: #f9fafb;
}

/* system messages */

.sidebar-system {
  font-size: 12px;
}

.system-row {
  border-radius: 8px;
  padding: 6px 8px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.system-row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.system-row-code {
  font-weight: 600;
}

.system-row-badge {
  min-width: 26px;
  height: 22px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.system-row-label {
  font-size: 11px;
}

.system-row-critical {
  background: #fee2e2;
  color: #b91c1c;
}

.system-row-critical .system-row-badge {
  color: #ffffff;
  background: #b91c1c;
}

.system-row-warning {
  background: #fef3c7;
  color: #92400e;
}

.system-row-warning .system-row-badge {
  color: #ffffff;
  background: #d97706;
}

.system-row-ok {
  background: #dcfce7;
  color: #166534;
}

.system-row-ok .system-row-badge {
  color: #ffffff;
  background: #16a34a;
}

/* session box */

.sidebar-session {
  font-size: 12px;
}

.session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.session-label {
  font-weight: 600;
}

.session-button {
  border-radius: 14px;
  border: none;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #b91c1c;
  background: #fee2e2;
}

.session-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #4b5563;
}

.session-version {
  margin-top: 4px;
  font-size: 11px;
  color: #9ca3af;
}

/* main area */

.main {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-title {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.main-search {
  display: flex;
  align-items: center;
  border-radius: 50px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 3px 4px 3px 10px;
  min-width: 220px;
}

.main-search-input {
  border: none;
  outline: none;
  font-size: 13px;
  flex: 1;
}

.main-search-button {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: #9ca3af;
  cursor: pointer;
  position: relative;
}

.main-search-button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #f9fafb;
  position: absolute;
  left: 6px;
  top: 5px;
}

.main-search-button::after {
  content: "";
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: #f9fafb;
  position: absolute;
  right: 5px;
  bottom: 6px;
  transform: rotate(45deg);
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.table-shell {
  z-index: 1;
  flex: 1;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  padding: 10px 12px 12px;
  overflow: auto;
  min-height: 596px;
  max-height: 596px;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #0f172a;
}

.status-table thead tr {
  background: #646464;
}

.status-table th,
.status-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.status-table thead th:first-child {
  border-top-left-radius: 8px;
}

.status-table thead th:last-child {
  border-top-right-radius: 8px;
}


.status-table th {
  font-size: 12px;
  font-weight: 900;
  color: white;
  text-transform: none;
}

.col-status {
  width: 70px;
}

/* status icon */

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border-width: 2px;
  border-style: solid;
  font-size: 13px;
}

.status-ok {
  background: #dcfce7;
  border-color: #16a34a;
  color: #15803d;
}

.status-error {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b91c1c;
}

/* connection indicator */

.connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.connection-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid transparent;
}

.connection-ok {
  background: #bbf7d0;
  border-color: #16a34a;
}

.connection-error {
  background: #fee2e2;
  border-color: #dc2626;
}

.connection-off {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* detail button */

.detail-button {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: #0f172a;
  color: #f9fafb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.detail-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease-in-out;
}

/* hidden JSON box */

.json-hidden#json-box {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.table-title {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0 16px;
  color: #111827;
  text-decoration: solid underline #bcbcbccc;
  margin-right: 16px
}

/* column widths */

.col-detail {
  width: 50px;
  max-width: 50px;
  text-align: center;
}

.col-decision {
  width: 96px;
  text-align: center;
  min-width: 96px;
  /* width:100% */
}

td.col-decision {
  padding: 0px 2px;
}

.col-confirm {
  width: 40px;
  min-width: 40px;
  text-align: center;
}

/* decision select */

.decision-select {
  width: 96px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 4px 8px;
  font-size: 13px;
  color: #0f172a;
  appearance: none;
  cursor: pointer;
}

/* .decision-confirm-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: #d1d5db;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
} */

/* .decision-confirm-button img {
  width: 24px;
  height: 24px;
  display: block;
} */


.detail-row {
  background: #f9fafb;
}

.detail-row td {
  border-top: none;
  padding: 6px 8px;
}

.detail-subtable {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

.detail-questions-row {
  background: #cccccc;
}

.detail-questions-row th {
  color: black;
}


.detail-questions-row th:first-child {
  border-top-left-radius: 8px;
}

.detail-questions-row th:last-child {
  border-top-right-radius: 8px;
}

.detail-answers-row {
  background: white;
}

.detail-subtable th,
.detail-subtable td {
  word-wrap: break-word;
  white-space: normal;
}

.detail-subtable tr {
  font-size: 13px;
  padding: 4px 6px;
  /* border-bottom: 1px solid #d1d5db; */
}

.detail-questions-row th {
  font-weight: 900;
}

.detail-row[hidden] {
  display: none;
}

.detail-button[aria-expanded="false"] .detail-icon {
  transform: rotate(0deg);
}

.filter-button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: #111827;
}

.filter-button[disabled] {
  cursor: default;
  opacity: 0.5;
  background: #e5e7eb;
  color: #6b7280;
}

.icon-hide {
  width: 24px;
  height: 24px;
  display: block;
}

.row-status-button .row-status-icon {
  width: 24px;
  height: 24px;
}

.row-status-button .row-status-icon[src=""],
.row-status-button .row-status-icon:not([src]) {
  display: none;
}

td.col-confirm,
td.col-answer {
  padding: 0;
}

.col-confirm-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.col-answer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.decision-confirm-button,
.row-archive-button,
.row-status-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #d1d5db;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.row-archive-button,
.row-status-button {
  margin-left: 0;
}

.decision-confirm-button img,
.row-archive-button img,
.row-status-button img {
  width: 24px;
  height: 24px;
  display: block;
}

.decision-confirm-button.confirmed {
  background: #59da88;
  color: #ffffff;
  cursor: default;
}


.row-archive-button .icon-unarchive {
  display: none;
}

.row-archive-button.is-unarchive .icon-archive {
  display: none;
}

.row-archive-button.is-unarchive .icon-unarchive {
  display: inline-block;
}

th {
  white-space: nowrap;
  /* text-align: center !important; */
}

.col-answer {
  width: 50px;
  min-width: 50px;
}

.col-confirm-actions,
.col-answer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin: 0 auto;
}