.shop-shell,
.student-shop-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.shop-tenant-picker,
.student-shop-header,
.student-shop-nav,
.student-shop-section-heading,
.student-shop-balance,
.shop-card-heading,
.shop-card-actions,
.shop-request-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-tenant-picker select {
  min-width: 220px;
}

.shop-admin-workspace,
.student-shop-section {
  display: grid;
  gap: 20px;
}

.shop-admin-workspace {
  margin-top: 20px;
}

.shop-editor,
.shop-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.shop-editor label,
.shop-policy-grid label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 700;
}

.shop-editor input,
.shop-editor select,
.shop-editor textarea {
  width: 100%;
}

.shop-wide {
  grid-column: 1 / -1;
}

.shop-policy-details {
  padding: 14px 16px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #f8fafc;
}

.shop-image-editor {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #f8fafc;
}

.shop-image-editor legend {
  padding: 0 6px;
  color: #1e3a8a;
  font-weight: 800;
}

.shop-image-current {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shop-image-current p {
  margin: 0;
  color: #475569;
}

.shop-image-preview,
.shop-image-current img {
  width: 100%;
  max-height: 180px;
  border-radius: 14px;
  background: #f1f5f9;
  object-fit: cover;
}

.shop-image-current img {
  width: 112px;
  height: 84px;
}

.shop-policy-details summary {
  cursor: pointer;
  color: #1e3a8a;
  font-weight: 800;
}

.shop-policy-grid {
  margin-top: 16px;
}

.shop-policy-grid .shop-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-policy-grid .shop-check input {
  width: auto;
}

.shop-product-grid,
.student-purchase-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.shop-product-card,
.student-purchase-card,
.student-shop-balance,
.student-shop-section {
  border: 1px solid #dbe4f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .07);
}

.shop-product-card,
.student-purchase-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.shop-product-card h3,
.student-purchase-card h3,
.student-shop-section h2 {
  margin: 0;
}

.shop-card-heading {
  justify-content: space-between;
  align-items: flex-start;
}

.shop-card-price {
  color: #1d4ed8;
  font-size: 1.2rem;
  font-weight: 900;
  white-space: nowrap;
}

.shop-card-description {
  min-height: 2.8em;
  margin: 0;
  color: #475569;
  white-space: pre-wrap;
}

.shop-policy-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: #475569;
  list-style: none;
}

.shop-status-badge {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: .8rem;
  font-weight: 800;
}

.shop-status-badge[data-status="active"],
.shop-status-badge[data-status="purchased"],
.shop-status-badge[data-status="approved"] {
  background: #dcfce7;
  color: #166534;
}

.shop-status-badge[data-status="requested"] {
  background: #fef3c7;
  color: #92400e;
}

.shop-status-badge[data-status="rejected"],
.shop-status-badge[data-status="cancelled"] {
  background: #fee2e2;
  color: #991b1b;
}

.shop-card-actions,
.shop-request-actions {
  flex-wrap: wrap;
}

.shop-request-table td {
  vertical-align: top;
}

.student-shop-header {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.student-shop-header h1 {
  margin: 4px 0 10px;
}

.student-shop-header p {
  margin: 0;
  color: #475569;
}

.student-shop-balance {
  justify-content: space-between;
  margin: 22px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
}

.student-shop-balance strong {
  color: #1d4ed8;
  font-size: 1.45rem;
}

.student-shop-section {
  margin-top: 20px;
  padding: 22px;
}

.student-shop-section-heading {
  justify-content: space-between;
}

.student-shop-section-heading span {
  color: #4f46e5;
  font-size: .78rem;
  font-weight: 900;
}

.student-catalog-grid {
  margin-top: 18px;
}

.student-use-form {
  display: grid;
  gap: 8px;
}

.student-use-form input {
  width: 100%;
}

.shop-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 26px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 720px) {
  .shop-shell,
  .student-shop-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .shop-editor,
  .shop-policy-grid {
    grid-template-columns: 1fr;
  }

  .shop-wide {
    grid-column: auto;
  }

  .student-shop-header,
  .student-shop-balance {
    align-items: stretch;
    flex-direction: column;
  }
}
