.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

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

.panel {
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.menu button {
  justify-content: center;
}

.menu-compact button {
  min-height: 28px;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

.menu button.active {
  background: var(--accent);
}

.admin-menu-panel {
  gap: 0.45rem;
}

.admin-menu-panel #menu-title {
  font-size: 0.95rem;
  margin: 0;
}

.admin-view {
  display: none;
}

.admin-view.active {
  display: block;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
}

.table th {
  background: #fff8f6;
  position: sticky;
  top: 0;
  z-index: 1;
}

.login-wrap {
  max-width: 480px;
  margin: 2rem auto;
}

.stack {
  display: grid;
  gap: 0.6rem;
}

.order-note {
  min-height: 72px;
}

.admin-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-card {
  padding: 0.75rem;
  border: 1px solid var(--line);
}

.structure-toggle {
  justify-self: start;
  min-height: 30px;
  padding: 0.2rem 0.6rem;
  font-size: 0.76rem;
}

.structure-content {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.2rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.65rem;
}

.order-docs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.inline-select {
  width: 100%;
}

#edit-product-card {
  margin-top: 0.45rem;
}

#edit-product-id {
  margin: 0.1rem 0 0.55rem;
}

.table tr.row-selected td {
  background: #fff7f3;
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .admin-subgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-grid-4 {
    grid-template-columns: 1fr;
  }
}
