.admin-body {
  background:
    linear-gradient(115deg, rgba(14, 93, 85, 0.07), rgba(242, 184, 75, 0.08) 46%, rgba(36, 103, 201, 0.06)),
    #f4f7f6;
}

.admin-shell {
  min-height: 100vh;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(22, 33, 31, 0.08);
}

.admin-logo {
  width: 128px;
  height: 116px;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-panel .admin-card {
  display: grid;
  width: min(440px, 100%);
  gap: 14px;
  padding: 28px;
}

.login-panel h1 {
  margin-bottom: 4px;
  font-size: 34px;
}

.admin-app {
  padding: 24px clamp(14px, 3vw, 42px) 42px;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 48px);
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.editor-open {
  overflow: hidden;
}

.admin-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(7, 14, 24, 0.52);
  backdrop-filter: blur(4px);
}

.admin-store-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-main-stack {
  display: grid;
  gap: 18px;
}

.editor {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  padding: 22px;
}

.editor.is-focused {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 45;
  width: min(540px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border-color: rgba(217, 175, 88, 0.62);
  box-shadow: 0 26px 72px rgba(6, 14, 24, 0.32);
}

.editor-head,
.table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.editor-close:hover {
  border-color: rgba(217, 175, 88, 0.72);
  color: var(--brand);
}

.editor h2,
.table-head h2 {
  margin-bottom: 0;
}

.secondary-button {
  background: var(--soft);
  color: var(--brand);
}

.danger-button {
  background: #fff1f0;
  color: var(--danger);
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 12px;
  outline: none;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 175, 88, 0.22);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.product-table-card {
  overflow: hidden;
}

.seller-card {
  overflow: hidden;
}

.seller-form {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.seller-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.seller-admin-list {
  display: grid;
}

.seller-admin-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 100px 168px;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.seller-admin-row strong,
.seller-admin-row small {
  display: block;
}

.seller-admin-row small {
  margin-top: 3px;
  color: var(--muted);
}

.table-head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.compact-search {
  width: min(340px, 100%);
}

.admin-table {
  overflow: auto;
}

.product-row {
  display: grid;
  grid-template-columns: 68px minmax(220px, 1fr) 120px 90px 100px 168px;
  gap: 12px;
  align-items: center;
  min-width: 860px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.product-row.header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.row-image {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 900;
}

.row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-name strong,
.row-name small {
  display: block;
}

.row-name small {
  margin-top: 3px;
  color: var(--muted);
}

.status {
  display: inline-grid;
  width: fit-content;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.status.off {
  background: #f0f1f1;
  color: #6e7472;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button {
  min-height: 36px;
  padding: 0 12px;
}

@media (max-width: 920px) {
  .admin-header,
  .editor-head,
  .table-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .editor {
    position: static;
  }

  .editor.is-focused {
    position: fixed;
    top: 14px;
    left: 14px;
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    transform: none;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

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