.admin-page {
  background: #f4f7fb;
}

.admin-topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.admin-actions a,
.admin-actions button {
  border-radius: 8px;
  font-weight: 800;
  min-height: 42px;
}

.admin-actions a {
  align-items: center;
  background: #edf2f7;
  color: var(--ink);
  display: inline-flex;
  padding: 0 14px;
}

.admin-actions button {
  background: var(--ink);
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0 14px;
}

.admin-shell {
  padding: 52px 5vw 80px;
}

.login-panel {
  display: grid;
  margin: 0 auto;
  max-width: 560px;
  min-height: calc(100vh - 180px);
  place-items: center;
}

.login-panel .admin-login {
  width: 100%;
}

.login-panel h1,
.dashboard h1 {
  color: var(--ink);
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.95;
  margin-bottom: 24px;
}

.dashboard {
  display: grid;
  gap: 24px;
}

.dashboard .section-heading {
  margin-bottom: 0;
}

.dashboard .admin-grid {
  margin-bottom: 0;
}

.dashboard .admin-console {
  align-items: start;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
}

.dashboard h2 {
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 0;
}

.admin-form p,
.orders-panel > p {
  color: var(--accent-dark);
  font-weight: 750;
  min-height: 22px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.form-actions button {
  flex: 1 1 180px;
}

.form-actions button[type="button"] {
  background: #edf2f7;
  color: var(--ink);
}

.products-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.wide-panel {
  grid-column: 1 / -1;
}

.admin-product-list {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow: auto;
}

.admin-product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 86px 1fr;
  padding: 12px;
}

.admin-product-card img,
.admin-product-card .product-thumb-fallback {
  aspect-ratio: 1;
  border-radius: 8px;
  height: 86px;
  object-fit: cover;
  width: 86px;
}

.admin-product-card .product-thumb-fallback {
  align-items: center;
  background: #edf2f7;
  color: var(--ink);
  display: flex;
  font-size: 28px;
  font-weight: 900;
  justify-content: center;
}

.admin-product-card h3 {
  margin-bottom: 6px;
}

.admin-product-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
}

.admin-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-product-actions button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  min-height: 36px;
  padding: 0 12px;
}

.admin-product-actions button:first-child {
  background: var(--accent);
  color: #fff;
}

.admin-product-actions button:last-child {
  background: #fbe9e7;
  color: var(--coral);
}

.order-card ul {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  padding-left: 18px;
}

.order-methods {
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  padding: 10px 12px;
}

.order-status-control {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) auto;
}

.order-status-control label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.order-status-control select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 0 10px;
}

.order-status-control button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 0 12px;
}

@media (max-width: 760px) {
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .admin-actions {
    flex-wrap: wrap;
  }

  .dashboard .admin-console,
  .admin-product-card,
  .order-status-control {
    grid-template-columns: 1fr;
  }
}
