*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background: #f5f6f8;
  line-height: 1.4;
}

.app-header {
  background: #fff;
  border-bottom: 1px solid #dde1e6;
  padding: 16px 24px;
}

.app-header h1 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 600;
}

.app-subtitle {
  margin: 0;
  color: #5c6670;
  font-size: 0.875rem;
}

.app-main {
  padding: 16px 24px 32px;
  max-width: 100%;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: #005b9c;
  color: #fff;
  border-color: #005b9c;
}

.btn-primary:hover:not(:disabled) {
  background: #004a80;
}

.btn-secondary {
  background: #fff;
  color: #1a1a1a;
  border-color: #c4cad0;
}

.btn-secondary:hover:not(:disabled) {
  background: #eef1f4;
}

.status-message {
  margin-left: auto;
  font-size: 0.875rem;
  color: #5c6670;
}

.status-message.is-error {
  color: #b42318;
}

.status-message.is-success {
  color: #067647;
}

.table-wrapper {
  overflow: auto;
  max-height: calc(100vh - 180px);
  background: #fff;
  border: 1px solid #dde1e6;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  background: #eef3f8;
  color: #243447;
  font-weight: 600;
  text-align: left;
  padding: 10px 8px;
  border-bottom: 2px solid #c4d3e0;
  white-space: nowrap;
  font-size: 0.8125rem;
}

.data-table td {
  border-bottom: 1px solid #e8ebef;
  padding: 0;
  vertical-align: middle;
  background: #fff;
}

.data-table tbody tr:hover td {
  background: #fafbfc;
}

.data-table tbody tr.is-selected td {
  background: #e8f2fb;
}

.data-table input[type="text"],
.data-table input[type="checkbox"] {
  font: inherit;
}

.data-table input[type="text"] {
  width: 100%;
  border: none;
  padding: 8px;
  background: transparent;
  outline: none;
  min-width: 0;
}

.data-table input[type="text"]:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px #005b9c;
}

.col-check {
  width: 36px;
  text-align: center;
}

.col-num {
  width: 52px;
  text-align: center;
}

.data-table .cell-num {
  text-align: center;
  color: #5c6670;
  padding: 8px 4px;
  user-select: none;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) { width: 110px; }
.data-table th:nth-child(4),
.data-table td:nth-child(4) { width: 130px; }
.data-table th:nth-child(5),
.data-table td:nth-child(5) { width: 180px; }
.data-table th:nth-child(6),
.data-table td:nth-child(6) { width: 140px; }
.data-table th:nth-child(7),
.data-table td:nth-child(7) { width: 220px; }
.data-table th:nth-child(8),
.data-table td:nth-child(8) { width: 120px; }
.data-table th:nth-child(9),
.data-table td:nth-child(9) { width: 90px; }
.data-table th:nth-child(10),
.data-table td:nth-child(10) { width: 140px; }
.data-table th:nth-child(11),
.data-table td:nth-child(11) { width: 160px; }
.data-table th:nth-child(12),
.data-table td:nth-child(12) { width: 90px; }

@media (max-width: 768px) {
  .app-header,
  .app-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .status-message {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
}
