:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090b10;
  color: #eef2ff;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #8bc5ff; }
button, input, select { font: inherit; }

.admin-shell { width: min(1180px, calc(100% - 32px)); margin: 32px auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.admin-header h1 { margin: 0; }
.admin-actions { display: flex; gap: 12px; align-items: center; }
.panel { background: #151924; border: 1px solid #2a3142; border-radius: 12px; padding: 22px; margin-bottom: 24px; }
.login-panel { max-width: 460px; margin: 12vh auto 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select { width: 100%; color: #fff; background: #0d1018; border: 1px solid #3a4358; border-radius: 7px; padding: 10px; }
.hint { color: #aeb7ca; font-size: .88rem; }
.button { display: inline-block; cursor: pointer; border: 0; border-radius: 7px; padding: 10px 15px; color: #08111c; background: #77bfff; font-weight: 700; text-decoration: none; }
.button-secondary { color: #eef2ff; background: #343d52; }
.button-danger { color: #fff; background: #a93242; }
.site-button {
  display: inline-block;
  border: 1px solid #77bfff;
  border-radius: 999px;
  padding: 9px 14px;
  color: #bfe2ff;
  background: rgba(119, 191, 255, .09);
  font-weight: 700;
  text-decoration: none;
}
.site-button:hover { color: #08111c; background: #77bfff; text-decoration: none; }
.message { padding: 12px 15px; border-radius: 7px; background: #173c2e; color: #bdf8dc; margin-bottom: 18px; }
.message-error { background: #4b2027; color: #ffd6dc; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 9px; border-bottom: 1px solid #30384a; vertical-align: middle; }
th { color: #bac5db; font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }
.thumb { display: block; width: 80px; max-height: 60px; object-fit: cover; border-radius: 4px; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.row-actions form { margin: 0; }
.empty { color: #aeb7ca; text-align: center; padding: 30px; }
.catalog-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.catalog-heading h2 { margin-bottom: 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.pagination a {
  min-width: 38px;
  border: 1px solid #3a4358;
  border-radius: 7px;
  padding: 8px 11px;
  color: #cbd6ea;
  background: #202637;
  text-align: center;
  text-decoration: none;
}
.pagination a:hover { border-color: #77bfff; color: #fff; }
.pagination a.current { border-color: #77bfff; color: #08111c; background: #77bfff; font-weight: 700; }

@media (max-width: 700px) {
  .admin-header { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
}
