* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  overflow: hidden;
  background-color: #333;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: #f2f2f2;
  text-align: center;
  text-decoration: none;
}

.topnav a:hover {
  background-color: #ddd;
  color: black;
}

.topnav a.active {
  background-color: #4CAF50;
  color: white;
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.page-title {
  margin: 0;
  font-size: 1.7rem;
}

.page-subtitle {
  margin: 6px 0 0;
  color: #666;
}

.surface-card {
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.table-card {
  padding: 12px;
  overflow-x: auto;
}

.table-scroll {
  min-width: 1680px;
}

.data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.data-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.data-table tbody tr:hover {
  background: #fafafa;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
  width: 140px;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
  width: 130px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3),
.data-table th:nth-child(4),
.data-table td:nth-child(4) {
  width: 110px;
  text-align: center;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
  width: 110px;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
  width: 170px;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
  width: 120px;
}

.data-table th:nth-child(8),
.data-table td:nth-child(8) {
  width: 180px;
}

.data-table th:nth-child(9),
.data-table td:nth-child(9) {
  width: 150px;
}

.data-table th:nth-child(10),
.data-table td:nth-child(10) {
  width: 150px;
}

.data-table th:nth-child(11),
.data-table td:nth-child(11) {
  width: 110px;
}

.data-table th:nth-child(12),
.data-table td:nth-child(12) {
  width: 130px;
}

.data-table th:nth-child(13),
.data-table td:nth-child(13) {
  width: 160px;
}

.data-table th:nth-child(14),
.data-table td:nth-child(14) {
  width: 120px;
}

.data-table th:nth-child(15),
.data-table td:nth-child(15) {
  width: 130px;
}

.data-table th:nth-child(16),
.data-table td:nth-child(16) {
  width: 220px;
}

.table-image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #ddd;
}

.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 56px;
  padding: 0 12px;
  border: 1px dashed #ccc;
  border-radius: 12px;
  color: #777;
  background: #fafafa;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions-row .action-link {
  min-width: 92px;
  font-size: 12px;
  padding: 0 12px;
}

.action-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  background: #f7f7f7;
  color: #222;
  cursor: pointer;
}

.action-link:hover,
.button:hover {
  background: #efefef;
}

.action-link.primary {
  background: #eef6ee;
  border-color: #cfe3cf;
}

.action-link.neutral {
  background: #f7f7f7;
}

.action-link.danger {
  background: #fff2f2;
  border-color: #f1d1d1;
}

.form-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.form-card {
  padding: 24px;
}

.section-head {
  margin-bottom: 20px;
}

.section-title {
  margin: 0;
  font-size: 1.7rem;
}

.section-subtitle {
  margin: 8px 0 0;
  color: #666;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.input-group,
.input-group-create {
  display: grid;
  gap: 8px;
}

.input-group label,
.input-group-create label {
  font-weight: 700;
}

.input-group input,
.input-group textarea,
.input-group-create input,
.input-group-create textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fff;
  outline: none;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group-create input:focus,
.input-group-create textarea:focus {
  border-color: #4CAF50;
}

.input-group textarea,
.input-group-create textarea {
  min-height: 110px;
  resize: vertical;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.preview-box {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 14px;
  background: #fafafa;
}

.d-none {
  display: none;
}

.auth-layout {
  min-height: calc(100vh - 44px);
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.auth-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.auth-aside,
.auth-form {
  padding: 32px;
}

.auth-aside {
  background: #f8f8f8;
  border-right: 1px solid #e5e5e5;
}

.auth-form {
  background: #fff;
}

.auth-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4CAF50;
}

.auth-mark::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4CAF50;
}

.auth-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #ccc;
  border-radius: 12px;
}

.auth-button {
  width: 100%;
  min-height: 46px;
}

.auth-footnote {
  margin-top: 16px;
  color: #666;
}

.delete-card {
  display: grid;
  gap: 18px;
}

.delete-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid #f1d1d1;
  border-radius: 16px;
  background: #fff8f8;
}

.delete-avatar-wrap {
  flex: 0 0 auto;
}

.delete-avatar {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #ddd;
  background: #fafafa;
}

.delete-avatar-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 13px;
}

.delete-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff2f2;
  border: 1px solid #f1d1d1;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.delete-name {
  margin: 0;
  font-size: 1.4rem;
}

.delete-note {
  margin: 8px 0 0;
  color: #666;
}

.delete-details {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.delete-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  background: #fff;
}

.delete-key {
  font-weight: 700;
  color: #444;
}

.delete-value {
  color: #222;
  word-break: break-word;
}

.delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 1000px) {
  .auth-card,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .delete-banner {
    align-items: flex-start;
  }

  .delete-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topnav {
    flex-wrap: wrap;
    padding: 8px 10px;
  }

  .page-shell,
  .form-shell {
    width: min(100% - 16px, 1440px);
    margin-top: 16px;
  }

  .surface-card,
  .form-card,
  .auth-aside,
  .auth-form {
    padding: 16px;
  }

  .actions-row {
    flex-direction: column;
  }

  .action-link {
    width: 100%;
  }

  .delete-banner {
    flex-direction: column;
  }

  .delete-actions {
    flex-direction: column-reverse;
  }
}