* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #f3f5f8, #dbe9ff);
  color: #1f2937;
}

.page {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.badge {
  margin: 0;
  color: #b45309;
  font-weight: 700;
  font-size: 14px;
}

h1 {
  margin: 8px 0;
  font-size: clamp(24px, 3vw, 34px);
}

.subtitle {
  margin: 0;
  color: #475569;
}

.back-btn {
  text-decoration: none;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1f2937;
  border-radius: 10px;
  min-height: 40px;
  padding: 10px 14px;
  font-weight: 700;
  white-space: nowrap;
}

.table-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  padding: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

th {
  background: #f8fafc;
  position: sticky;
  top: 0;
}

.open-btn {
  border: none;
  background: #059669;
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
}

.empty-row td {
  text-align: center;
  color: #64748b;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.is-open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.modal-content {
  position: relative;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
}

.modal-image {
  width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  border-radius: 10px;
  background: #f3f4f6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-download {
  text-decoration: none;
  background: #2563eb;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .page-header {
    flex-direction: column;
  }

  .back-btn {
    align-self: flex-start;
  }

  table {
    min-width: 100%;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
  }

  td {
    border-bottom: none;
    padding: 6px 0;
  }

  td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
  }
}
