* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #f4f7fb;
  color: #111827;
  font-family: Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.topbar {
  align-items: center;
  background: #111827;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 16px 32px;
}

.topbar h1 {
  font-size: 18px;
}

.session-status {
  cursor: pointer;
}

.login-wrap {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 72px);
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .12);
  max-width: 420px;
  padding: 32px;
  width: 100%;
}

.admin-login-card {
  border: 1px solid #e5e7eb;
}

.login-brand {
  margin-bottom: 24px;
  text-align: center;
}

.login-brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #16a34a, #0f766e);
  border-radius: 14px;
  color: #fff;
  display: inline-flex;
  font-size: 26px;
  font-weight: 800;
  height: 56px;
  justify-content: center;
  margin-bottom: 12px;
  width: 56px;
}

.login-title {
  color: #111827;
  font-size: 22px;
  font-weight: 800;
}

.login-sub {
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}

.auth-message {
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.auth-message-error {
  background: rgba(239, 68, 68, .08);
  border-color: rgba(239, 68, 68, .22);
  color: #b91c1c;
}

.field {
  margin-bottom: 14px;
}

.label {
  color: #374151;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.input {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  color: #111827;
  padding: 12px 14px;
  width: 100%;
}

.input:focus {
  border-color: #111827;
  outline: none;
}

.btn-primary {
  background: #111827;
  color: #fff;
}

.auth-submit {
  margin-top: 6px;
  width: 100%;
}

.container {
  margin: 32px auto;
  max-width: 1120px;
  padding: 0 24px;
}

.toolbar {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

.toolbar-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-block {
  min-width: 260px;
}

.toolbar-label {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-tabs .tab {
  min-width: 176px;
}

.list-meta {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 18px;
}

.search-box {
  position: relative;
}

.search-input {
  padding-right: 42px;
}

.search-clear {
  align-items: center;
  background: #e5e7eb;
  border: 0;
  border-radius: 999px;
  color: #374151;
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 26px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
}

.search-clear:hover {
  background: #d1d5db;
}

.tab {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 18px;
}

.tab.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  margin-bottom: 20px;
  padding: 24px;
}

.card-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.operator-name {
  font-size: 20px;
  font-weight: 700;
}

.operator-meta {
  color: #6b7280;
  font-size: 13px;
  margin-top: 3px;
}

.badge {
  border-radius: 20px;
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  white-space: nowrap;
}

.badge-pending_review {
  background: #fef3c7;
  color: #92400e;
}

.badge-approved {
  background: #d1fae5;
  color: #065f46;
}

.badge-suspended {
  background: #fee2e2;
  color: #991b1b;
}

.badge-request_changes {
  background: #ede9fe;
  color: #5b21b6;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-neutral {
  background: #e5e7eb;
  color: #374151;
}

.badge-stack {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  margin: 16px 0 8px;
  text-transform: uppercase;
}

.info-grid {
  display: grid;
  font-size: 14px;
  gap: 10px 24px;
  grid-template-columns: 1fr 1fr;
}

.info-label {
  color: #6b7280;
  font-size: 11px;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.info-value {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.divider {
  background: #f3f4f6;
  height: 1px;
  margin: 16px 0;
}

.document-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-top: 10px;
}

.document-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
}

.document-type {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.document-meta {
  color: #6b7280;
  font-size: 11px;
  margin-bottom: 8px;
}

.check-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 12px;
}

.check-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
}

.check-detail {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
}

.status-pending {
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
}

.status-approved {
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
}

.status-rejected {
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
}

.document-notes {
  background: #fff8f0;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  color: #7c3aed;
  font-size: 12px;
  margin-top: 6px;
  padding: 6px 10px;
}

.document-link {
  color: #2563eb;
  display: inline-block;
  font-size: 13px;
  margin-top: 8px;
  text-decoration: none;
}

.empty-inline,
.no-documents {
  color: #9ca3af;
  font-size: 13px;
}

.actions {
  border-top: 1px solid #f3f4f6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
}

.btn {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
}

.btn-approve {
  background: #16a34a;
  color: #fff;
}

.btn-suspend {
  background: #dc2626;
  color: #fff;
}

.btn-changes {
  background: #7c3aed;
  color: #fff;
}

.btn-neutral {
  background: #f3f4f6;
  color: #111827;
}

.btn-delete {
  background: #fee2e2;
  color: #991b1b;
  margin-left: auto;
}

.modal {
  align-items: center;
  background: rgba(0, 0, 0, .5);
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 100;
}

.modal.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 90vw;
  padding: 28px;
  width: 520px;
}

.modal-box h3 {
  margin-bottom: 8px;
}

.modal-box p {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 14px;
}

.modal-box textarea {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  margin-bottom: 14px;
  min-height: 130px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.empty,
.loading {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 48px;
  text-align: center;
}

.empty {
  color: #9ca3af;
  font-size: 15px;
}

.loading {
  color: #6b7280;
}

@media (min-width: 900px) {
  .toolbar {
    grid-template-columns: minmax(320px, 1fr) minmax(300px, .85fr) minmax(280px, .9fr);
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
  }

  .container {
    margin: 20px auto;
    padding: 0 16px;
  }

  .login-wrap {
    min-height: calc(100vh - 96px);
    padding: 16px;
  }

  .login-card {
    padding: 24px 20px;
  }

  .card {
    padding: 18px;
  }

  .card-header {
    flex-direction: column;
  }

  .badge-stack {
    align-items: flex-start;
  }

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

  .btn-delete {
    margin-left: 0;
  }
}
