:root {
  --night: #0b1020;
  --turquoise: #16d9d2;
  --clay: #e77b3c;
  --gold: #d8a84e;
  --sand: #f5f5f3;
  --gray: #6b6f76;
  --line: #deded8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--night);
  font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--night);
  color: var(--white);
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
}

button:hover {
  background: #18223e;
}

button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--night);
}

button.danger {
  background: #8b2f20;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--night);
  padding: 0 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--gray);
  font-size: 12px;
  font-weight: 600;
}

.shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 24px;
  align-items: end;
  padding: 28px 0;
}

.brand {
  margin: 0 0 12px;
  color: var(--clay);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.subtitle {
  margin: 14px 0 8px;
  color: var(--gray);
  font-size: 18px;
}

.notice {
  max-width: 760px;
  margin: 0;
  color: var(--night);
  font-weight: 600;
}

.login-panel,
.toolbar,
.bulk-panel,
.status-strip,
.table-wrap,
.pagination {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.login-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.status-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  color: var(--gray);
}

#feedback {
  color: var(--night);
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(120px, 1fr));
  gap: 10px;
  margin: 18px 0;
  overflow-x: auto;
}

.summary-grid article {
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 14px;
}

.summary-grid span {
  display: block;
  color: var(--gray);
  font-size: 12px;
  font-weight: 700;
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.toolbar {
  display: grid;
  grid-template-columns: 2fr repeat(8, minmax(120px, 1fr)) auto;
  gap: 10px;
  padding: 14px;
  align-items: end;
}

.bulk-panel {
  display: grid;
  grid-template-columns: auto 180px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--gray);
  font-size: 12px;
  font-weight: 800;
}

td {
  font-size: 13px;
}

.thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #ecece8;
}

.no-thumb {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: #ecece8;
  color: var(--gray);
  font-size: 11px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #ecece8;
  color: var(--night);
  font-size: 12px;
  font-weight: 700;
}

.pill.draft {
  background: #e7edf7;
}

.pill.review {
  background: #f4e4bd;
}

.pill.published {
  background: #cdefed;
}

.pill.archived {
  background: #e8e8e8;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions button {
  min-height: 34px;
  padding: 0 10px;
}

.actions select {
  min-height: 34px;
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  padding: 12px;
}

.pagination label {
  width: 110px;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(11, 16, 32, 0.48);
  z-index: 30;
}

.drawer.open {
  display: block;
}

.drawer-panel {
  width: min(760px, 100vw);
  height: 100%;
  margin-left: auto;
  overflow-y: auto;
  background: var(--sand);
  padding: 24px;
  box-shadow: -18px 0 44px rgba(11, 16, 32, 0.24);
}

.icon-button {
  float: right;
  width: 40px;
  min-height: 40px;
  border-radius: 50%;
  padding: 0;
  font-size: 24px;
}

.detail-section {
  clear: both;
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 14px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: #ecece8;
}

.muted {
  color: var(--gray);
}

@media (max-width: 980px) {
  .hero,
  .toolbar,
  .bulk-panel {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
