* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #333;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f5f5f5;
}

.login-box {
  width: 360px;
  background: #ffffff;
  border: 1px solid #d6d6d6;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-box h1 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 600;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  padding: 6px 8px;
  background: #fff;
  font-size: 14px;
}

.login-box input {
  margin-bottom: 14px;
}

.btn {
  border: 1px solid #b6b6b6;
  background: linear-gradient(#ffffff, #e8e8e8);
  color: #333;
  border-radius: 3px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  height: 34px;
}

.btn:hover {
  background: linear-gradient(#f8f8f8, #dedede);
}

.btn.primary {
  background: linear-gradient(#2e9afe, #0b7dda);
  border-color: #0b72c6;
  color: #fff;
}

.btn.primary:hover {
  background: linear-gradient(#238ee8, #0873ca);
}

.btn.small {
  height: 30px;
  padding: 5px 12px;
}

.error {
  color: #c00;
  margin-top: 12px;
  min-height: 18px;
}

.topbar {
  height: 48px;
  background: linear-gradient(#3b3b3b, #1f1f1f);
  color: #fff;
  border-bottom: 1px solid #111;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.top-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.container {
  padding: 14px;
}

.filter-panel {
  border: 1px solid #d3d3d3;
  background: #fafafa;
  padding: 14px;
  margin-bottom: 12px;
}

.filter-row {
  display: grid;
  grid-template-columns: 170px 220px 170px minmax(260px, 1fr) 130px auto;
  gap: 12px;
  align-items: end;
}

.button-field {
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.result-header {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #f3f3f3;
  border: 1px solid #d3d3d3;
  border-bottom: none;
  padding: 8px 12px;
}

.result-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

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

.pager-btn,
.page-number {
  border: 1px solid #c8c8c8;
  background: linear-gradient(#fff, #e8e8e8);
  min-width: 28px;
  height: 28px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
}

.pager-btn:disabled,
.page-number:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-number.active {
  background: #ff7a00;
  color: white;
  border-color: #ee6f00;
}

.page-numbers {
  display: flex;
  gap: 4px;
}

#pageSizeTop {
  width: 70px;
  height: 30px;
  margin-left: 10px;
}

.table-panel {
  border: 1px solid #d3d3d3;
}

.table-wrap {
  overflow: auto;
  width: 100%;
  max-height: calc(100vh - 200px);
}

table {
  width: 100%;
  min-width: 2600px;
  border-collapse: collapse;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(#f5f5f5, #e1e1e1);
  color: #333;
  border: 1px solid #cfcfcf;
  padding: 8px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

td {
  border: 1px solid #e1e1e1;
  padding: 8px;
  vertical-align: top;
  background: #fff;
}

tbody tr:nth-child(even) td {
  background: #f7f7f7;
}

tbody tr:hover td {
  background: #fffbe8;
}

.empty {
  text-align: center;
  padding: 26px;
  color: #777;
}

.status {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 3px;
  font-weight: 600;
  white-space: nowrap;
}

.status.success {
  background: #e6f4ea;
  color: #1e7e34;
  border: 1px solid #b7dfc2;
}

.status.warning {
  background: #fff3cd;
  color: #8a6d00;
  border: 1px solid #ffe08a;
}

.status.danger {
  background: #f8d7da;
  color: #a71d2a;
  border: 1px solid #f1aeb5;
}

.status.neutral {
  background: #e9ecef;
  color: #495057;
  border: 1px solid #ced4da;
}

.title-cell {
  width: 240px;
}

.desc-cell {
  width: 210px;
}

.view-btn {
  border: none;
  background: #0088cc;
  color: #fff;
  padding: 5px 9px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
}

.modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.modal-box {
  position: relative;
  width: min(850px, calc(100% - 40px));
  max-height: 85vh;
  background: #fff;
  border: 1px solid #bbb;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.modal-head {
  background: linear-gradient(#f5f5f5, #e1e1e1);
  border-bottom: 1px solid #ccc;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-text {
  padding: 16px;
  overflow: auto;
  line-height: 1.6;
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .button-field {
    flex-wrap: wrap;
  }

  .result-header {
    grid-template-columns: 1fr;
  }
}
