.login-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: #234d39;
  color: #f5edcf;
  padding: 15vh 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-story h1 {
  font: 45px/1.7 var(--serif);
  letter-spacing: 4px;
  margin: 25px 0;
}
.login-story p {
  color: #b8c7a9;
  font-size: 13px;
}
.login-form {
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-form form {
  width: 340px;
}
.login-form h2 {
  font: 28px var(--serif);
  margin-bottom: 15px;
}
.login-form small {
  display: block;
  margin-bottom: 30px;
}
.page-error {
  padding: 45px;
  text-align: center;
}
.input-note {
  font-size: 11px;
  color: #708367;
  margin: 12px 0;
}
.pending-bar {
  padding: 12px 24px;
  background: #fcf0dc;
  color: #8c622a;
  display: flex;
  gap: 20px;
  align-items: center;
}
.pending-bar button {
  font-size: 12px;
}
.pending-bar .spacer {
  flex: 1;
}
.table-actions a,
.table-actions button {
  white-space: nowrap;
}
.product-placeholder {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  background: #e8ecdf;
  border-radius: 7px;
  color: #70835b;
}
.product-image {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 7px;
}
.kv dd {
  word-break: break-word;
}
.admin-loading {
  padding: 70px;
  text-align: center;
  color: #78896e;
}
.error-message {
  color: #a64a37;
  font-size: 12px;
  margin-top: 12px;
}
.head-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-head .secondary {
  font-size: 11px;
}
dialog {
  width: min(620px, calc(100% - 32px));
}
.form-grid textarea {
  grid-column: 1/-1;
}
.empty-text {
  padding: 45px;
  text-align: center;
  color: #88957d;
}
.panel-body .primary {
  font-size: 12px;
}
.image-preview {
  max-width: 100%;
  border-radius: 8px;
}
.detail-copy {
  font-size: 12px;
  white-space: pre-wrap;
}
.loading-button {
  opacity: 0.5;
  pointer-events: none;
}
@media (max-width: 700px) {
  .login-stage {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px;
  }
  .login-story h1 {
    font-size: 25px;
    line-height: 1.4;
    margin: 10px 0;
  }
  .login-form {
    padding: 30px;
  }
  .login-form form {
    width: 100%;
  }
  .login-story p {
    font-size: 11px;
  }
}
.admin-shell {
  align-items: start;
}
.admin-main {
  align-self: start;
  margin: 0 auto;
}
.admin-side {
  min-height: calc(100vh - 80px);
}
.metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.workbench {
  min-height: 80px;
}
@media (max-width: 800px) {
  .admin-shell {
    grid-template-rows: auto 1fr;
  }
  .admin-side {
    min-height: 0;
    align-self: start;
  }
  .admin-side a {
    align-self: center;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
}
/* Catalogue editing keeps the existing green workbench and gives long image sets their own space. */
.catalog-section {
  margin: 24px 0;
  border-top: 1px solid #dce3d3;
  padding-top: 18px;
}
.catalog-section h3 {
  font-size: 17px;
  margin: 0 0 12px;
}
.sku-row {
  border: 1px solid #dce3d3;
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
.sku-row legend {
  color: #65765b;
  font-size: 12px;
}
.sku-row label {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.sku-row input,
.sku-row select {
  width: 100%;
  box-sizing: border-box;
}
.sku-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sku-foot small {
  color: #65765b;
}
.media-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.media-card {
  border: 1px solid #dce3d3;
  border-radius: 8px;
  padding: 6px;
  min-width: 0;
}
.media-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #f4f5ef;
}
.media-card span {
  display: block;
  color: #65765b;
  font-size: 12px;
  margin: 5px;
}
.media-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.media-card button {
  padding: 4px;
  font-size: 11px;
  background: #edf1e6;
  border: 0;
  cursor: pointer;
}
.catalog-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.catalog-title img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 7px;
}
.upload-status {
  color: #326b45;
}
form[data-kind='product'] {
  max-width: 100%;
}
dialog:has(form[data-kind='product']) {
  width: min(850px, calc(100vw - 32px));
}
@media (max-width: 600px) {
  .sku-row {
    grid-template-columns: 1fr;
  }
  .media-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sku-foot {
    align-items: start;
    flex-direction: column;
  }
}
