@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --ivory: #FBF9F6;
  --taupe: #AFA090;
  --taupe-dark: #8f8072;
  --jade: #E4ECE7;
  --jade-deep: #8DA397;
  --ink: #222222;
  --muted: #666666;
  --line: #e6dfd8;
  --panel: #ffffff;
  --wash: #f2eee9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Inter", Helvetica, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #f6f2ee;
  border-right: 1px solid var(--line);
  padding: 26px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 34px;
}

.admin-brand img {
  height: 54px;
  object-fit: contain;
  width: 82px;
}

.admin-brand strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  line-height: 1;
}

.admin-brand span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  letter-spacing: .12em;
  margin-top: 6px;
  text-transform: uppercase;
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav a {
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 14px;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: var(--taupe);
  color: white;
}

.admin-main {
  min-width: 0;
  padding: 28px 34px 48px;
}

.admin-topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}

.admin-actions,
.row-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.admin-title h1,
.login-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 46px;
  line-height: 1;
  margin: 0 0 8px;
}

.admin-title p,
.muted {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.btn {
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  letter-spacing: .1em;
  min-height: 42px;
  padding: 0 18px;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--taupe);
  border-color: var(--taupe);
  color: white;
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.btn-soft {
  background: var(--jade);
  border-color: var(--jade);
  color: #425d50;
}

.btn-danger {
  background: #f6e2dc;
  border-color: #f0c8bf;
  color: #9b5448;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.two-col {
  grid-template-columns: 1.2fr .8fr;
}

.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.stat-value {
  font-family: "Cormorant Garamond", serif;
  font-size: 38px;
  margin: 10px 0 4px;
}

.positive {
  color: var(--jade-deep);
  font-weight: 800;
}

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

.table th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
  vertical-align: middle;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.status-live,
.status-paid,
.status-shipped {
  background: var(--jade);
  color: #425d50;
}

.status-draft,
.status-pending {
  background: #eee6df;
  color: var(--taupe-dark);
}

.status-low {
  background: #f6e2dc;
  color: #9b5448;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.search,
.field,
.textarea,
.select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row.full {
  grid-column: 1 / -1;
}

.form-row label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.image-drop {
  align-items: center;
  background: linear-gradient(145deg, #fff, #f1ece7);
  border: 1px dashed var(--taupe);
  color: var(--muted);
  display: flex;
  min-height: 220px;
  justify-content: center;
  text-align: center;
}

.login-page {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(228, 236, 231, .72), rgba(251, 249, 246, .85) 42%, rgba(246, 242, 238, .92)),
    var(--ivory);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 18px;
}

.login-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(143, 128, 114, .16);
  max-width: 420px;
  padding: 34px 34px 30px;
  text-align: center;
  width: 100%;
}

.login-card img {
  height: 66px;
  margin: 0 auto 18px;
  object-fit: contain;
  width: 128px;
}

.login-card .muted {
  font-size: 14px;
  margin: 0 auto;
  max-width: 310px;
}

.login-card form {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  text-align: left;
}

.login-card .field {
  border-radius: 6px;
  min-height: 48px;
  padding: 0 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-card .field:focus {
  background: #fff;
  border-color: var(--taupe);
  box-shadow: 0 0 0 4px rgba(175, 160, 144, .16);
  outline: none;
}

.login-card .btn {
  border-radius: 6px;
  min-height: 48px;
  width: 100%;
}

.login-card #login-error:not(:empty) {
  background: #f6e2dc;
  border: 1px solid #e8c5bd;
  border-radius: 6px;
  color: #9b5448;
  font-size: 13px;
  padding: 10px 12px;
}

.login-title {
  font-size: 36px;
  margin-bottom: 8px;
}

.mini-product {
  align-items: center;
  display: flex;
  gap: 12px;
}

.thumb {
  background: linear-gradient(145deg, #fff, #eee8e2);
  border: 1px solid var(--line);
  height: 52px;
  width: 52px;
}

.order-panel {
  display: grid;
  gap: 12px;
}

.note {
  background: var(--wash);
  border-left: 3px solid var(--taupe);
  color: var(--muted);
  line-height: 1.6;
  padding: 14px;
}

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

  .admin-sidebar {
    height: auto;
    position: static;
  }

  .admin-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-main {
    padding: 22px 18px 40px;
  }

  .admin-topbar,
  .toolbar {
    align-items: stretch;
    display: grid;
  }

  .stats-grid,
  .two-col,
  .three-col,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
