.admin-body {
  min-height: 100dvh;
}
.admin-body [hidden] {
  display: none !important;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.login-card > img {
  margin-bottom: 25px;
}
.login-card h1 {
  font-size: 41px;
  margin: 18px 0;
}
.login-card > p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 25px;
}
.login-card .text-link {
  display: inline-block;
  margin: 20px 0 0;
}
.login-card form > .button {
  margin-top: 10px;
}
.admin-header {
  background: #ffffffed;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px max(24px, calc((100vw - 1360px) / 2));
  gap: 20px;
}
.admin-header .brand {
  font-size: 24px;
  letter-spacing: -0.8px;
}
.admin-header .brand small {
  font-size: 7px;
  letter-spacing: 1.5px;
}
.admin-header-actions {
  display: flex;
  gap: 25px;
  align-items: center;
}
.admin-header .text-link {
  border: 0;
}
.admin-shell {
  width: calc(100% - 48px);
  max-width: 1360px;
  margin: 35px auto;
}
.admin-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.admin-welcome h1 {
  font-size: 39px;
  margin: 12px 0 25px;
}
.shop-status {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 10px 15px;
  font-size: 11px;
  color: var(--muted);
}
.shop-status.live {
  background: #f0f6ee;
  color: #4c714b;
  border-color: #dbe9d4;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}
.stats-grid > div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 21px;
}
.stats-grid span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 12px;
}
.stats-grid strong {
  font-size: 26px;
  font-weight: 600;
  color: var(--purple-dark);
}
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow: auto;
}
.admin-tabs > button {
  border: 0;
  background: transparent;
  font-size: 13px;
  padding: 13px 21px;
  border-radius: 8px;
  white-space: nowrap;
  color: var(--muted);
}
.admin-tabs > button.selected {
  background: var(--purple);
  color: white;
}
.admin-tabs button span:not(:empty) {
  padding: 2px 6px;
  margin-left: 5px;
  border-radius: 4px;
  background: #ffffff33;
}
.admin-panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 20px;
  padding: 30px;
  min-height: 320px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.panel-heading p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 8px;
}
.admin-product-tools {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.admin-product-tools .search-field {
  flex: 1;
}
.admin-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 23px 18px;
}
.admin-product-card {
  position: relative;
}
.admin-product-card .product-art {
  aspect-ratio: 1.3;
}
.admin-product-card h3 {
  font-size: 14px;
  line-height: 1.5;
  margin-top: 11px;
}
.admin-product-card .admin-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 12px;
}
.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.status-pill {
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 9px;
  background: #f0e9f7;
  color: var(--purple);
}
.status-pill.draft {
  background: #f1efeb;
  color: #877550;
}
.status-pill.cancelled {
  background: #f7e8ec;
  color: #9b4d65;
}
.status-pill.completed {
  background: #e8f3e9;
  color: #4a7c53;
}
.status-pill.shipped {
  background: #e9eef9;
  color: #4d66a2;
}
.status-pill.confirmed {
  background: #e9f3f1;
  color: #387b70;
}
.archive-button {
  border: 0;
  background: transparent;
  color: #9c799b;
  font-size: 11px;
  padding: 6px 0;
}
.quiet-button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--purple);
}
.quiet-button:hover {
  background: #f8f4fb;
}
.admin-footer {
  display: block;
  text-align: center;
  color: #9b89a7;
  font-size: 11px;
  margin: 15px auto 25px;
}
.editor-dialog[open] {
  display: block;
  width: calc(100% - 32px);
  max-width: 1000px;
  max-height: 92dvh;
  overflow: auto;
}
.editor-dialog form {
  padding: 32px;
}
.editor-dialog h2 {
  margin: 8px 0 27px;
}
.editor-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.25fr;
  gap: 30px;
}
.editor-photos {
  background: #f9f6fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  align-self: start;
}
.editor-photos h3 {
  font-size: 14px;
}
.editor-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.editor-image {
  min-width: 0;
}
.editor-image > img,
.editor-image > svg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--lavender);
}
.editor-image-actions {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-top: 4px;
}
.editor-image-actions button {
  border: 0;
  background: transparent;
  font-size: 10px;
  padding: 5px 0;
  color: var(--purple);
}
.upload-label {
  display: flex;
  position: relative;
  border: 1px dashed #bb9ad2;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--purple);
  font-size: 12px;
  cursor: pointer;
}
.upload-label > span {
  font-size: 22px;
}
.upload-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-label:focus-within {
  outline: 3px solid #a26bce;
  outline-offset: 4px;
}
.field-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 8px 0 16px;
}
.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}
.editor-actions .quiet-button {
  padding: 12px 20px;
}
.editor-fields > label,
.editor-fields > .form-grid {
  margin-bottom: 17px;
}
.admin-panel fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin: 25px 0;
}
.admin-panel legend {
  font-size: 15px;
  font-weight: 650;
  color: var(--purple-dark);
  padding: 0 10px;
}
.admin-panel fieldset > label + label {
  margin-top: 20px;
}
.launch-setting {
  padding: 20px;
  background: var(--lavender);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 25px;
}
.launch-setting strong {
  font-size: 13px;
  display: block;
}
.launch-setting small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 4px;
}
.orders-tools {
  max-width: 280px;
  margin-bottom: 20px;
}
.order-list-row {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1fr 0.8fr auto;
  gap: 15px;
  width: 100%;
  text-align: left;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 18px 16px;
  margin-bottom: 10px;
}
.order-list-row:hover {
  background: #fcf9fe;
}
.order-list-row strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
}
.order-list-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.order-list-row > span {
  font-size: 12px;
}
.order-dialog[open] {
  display: block;
  max-width: 780px;
  max-height: 92dvh;
  overflow: auto;
}
.order-detail {
  padding: 35px;
}
.order-detail h2 {
  font-size: 26px;
  margin: 10px 0 20px;
}
.order-detail .detail-section {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}
.order-detail h3 {
  font-size: 14px;
  margin-bottom: 14px;
}
.order-detail p {
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.order-detail .order-customer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.order-detail .order-customer > div {
  background: #f8f4fb;
  padding: 13px;
  border-radius: 7px;
}
.order-detail .order-customer small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 6px;
}
.order-detail .order-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  font-size: 13px;
}
.order-detail .order-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.order-detail textarea {
  min-height: 85px;
}
.order-status-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.confirm-dialog[open] {
  display: block;
  max-width: 460px;
}
.confirm-panel {
  padding: 35px;
}
.confirm-panel p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 16px;
}
@media (max-width: 1100px) {
  .admin-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats-grid > div {
    padding: 17px;
  }
  .stats-grid strong {
    font-size: 23px;
  }
  .admin-header .brand small {
    letter-spacing: 0.7px;
  }
}
@media (max-width: 760px) {
  .admin-header {
    padding: 18px 20px;
  }
  .admin-header .brand {
    font-size: 20px;
  }
  .admin-header .brand small {
    font-size: 6px;
  }
  .admin-header-actions {
    gap: 12px;
  }
  .admin-header-actions .text-link {
    font-size: 10px;
  }
  .admin-shell {
    width: calc(100% - 28px);
    margin-top: 25px;
  }
  .admin-welcome {
    align-items: start;
  }
  .admin-welcome h1 {
    font-size: 30px;
  }
  .shop-status {
    font-size: 9px;
    padding: 8px 10px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .admin-panel {
    padding: 22px 17px;
  }
  .admin-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 15px;
  }
  .panel-heading {
    align-items: start;
  }
  .panel-heading h2 {
    font-size: 26px;
  }
  .panel-heading .button {
    font-size: 10px;
    padding: 12px;
    white-space: nowrap;
  }
  .admin-tabs > button {
    font-size: 12px;
    padding: 12px 15px;
  }
  .editor-grid {
    grid-template-columns: 1fr;
  }
  .editor-dialog form {
    padding: 27px 20px;
  }
  .editor-images {
    grid-template-columns: repeat(3, 1fr);
  }
  .order-list-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .order-list-row .order-place {
    display: none;
  }
  .order-list-row > span:last-child {
    grid-column: 2;
    text-align: right;
  }
  .admin-panel fieldset {
    padding: 17px;
  }
  .order-detail {
    padding: 30px 22px;
  }
  .order-detail h2 {
    font-size: 23px;
  }
  .admin-welcome .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
}
@media (max-width: 440px) {
  .admin-header .brand img {
    display: none;
  }
  .admin-header .brand {
    font-size: 18px;
  }
  .admin-header .brand small {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .admin-header-actions {
    gap: 8px;
  }
  .admin-header-actions .quiet-button {
    font-size: 10px;
    padding: 9px;
  }
  .admin-header-actions .text-link {
    font-size: 9px;
  }
  .login-card {
    padding: 30px 25px;
  }
  .login-card h1 {
    font-size: 36px;
  }
  .admin-welcome {
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 18px;
  }
  .admin-welcome h1 {
    margin-bottom: 15px;
  }
  .admin-products {
    gap: 22px 12px;
  }
  .admin-product-tools {
    flex-direction: column;
    gap: 8px;
  }
  .admin-product-tools input,
  .admin-product-tools select {
    width: 100%;
  }
  .admin-panel .panel-heading {
    flex-wrap: wrap;
    gap: 12px;
  }
  .admin-card-actions {
    flex-wrap: wrap;
  }
  .admin-product-card h3 {
    font-size: 12px;
  }
  .admin-product-card .admin-card-meta {
    font-size: 11px;
  }
  .editor-images {
    grid-template-columns: repeat(2, 1fr);
  }
  .order-detail .order-customer {
    grid-template-columns: 1fr;
  }
  .confirm-panel {
    padding: 30px 23px;
  }
}
