:root {
  --forest-950: #0a1c2e;
  --forest-900: #0a1c2e;
  --forest-800: #102a43;
  --forest-700: #102a43;
  --forest-600: #16324f;
  --forest-500: #1d4e89;
  --moss: #5b6775;
  --gold-300: #e4d39a;
  --gold-400: #d4b45c;
  --gold-500: #c6a03a;
  --gold-700: #8a7020;
  --ivory: #f4f6f8;
  --parchment: #e8edf2;
  --paper: #ffffff;
  --ink: #102a43;
  --muted: #5b6775;
  --line: rgba(16, 42, 67, 0.12);
  --danger: #c23b4a;
  --danger-soft: rgba(194, 59, 74, 0.12);
  --ok: #3e9b6e;
  --ok-soft: rgba(62, 155, 110, 0.12);
  --warn: #8a7020;
  --shadow: 0 1px 3px rgba(16, 42, 67, 0.08);
  --radius: 10px;
  --sidebar: 260px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--forest-600);
  text-decoration: none;
}

a:hover {
  color: var(--gold-700);
}

h1,
h2,
h3,
.eyebrow {
  font-family: 'Source Sans 3', sans-serif;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
}

h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1rem;
}

p {
  margin: 0 0 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sr-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.hidden {
  display: none;
}

.muted {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
}

.admin-shell {
  min-height: 100vh;
  display: flex;
  background: var(--ivory);
}

.admin-backdrop {
  display: none;
}

.admin-sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 1.4rem 1rem 1.8rem;
  background: var(--forest-800);
  color: #fff;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: #fff;
  margin-bottom: 1.5rem;
}

.brand:hover {
  color: var(--gold-300);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  box-shadow: 0 0 0 2px var(--gold-500);
}

.brand-name {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-sub,
.topbar-kicker,
.eyebrow,
.nav-label,
.login-kicker,
.rate-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 700;
}

.brand-sub {
  color: var(--gold-400);
}

.nav-label {
  margin: 1.1rem 0.4rem 0.4rem;
  color: var(--gold-400);
}

.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
  font-size: 0.94rem;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-300);
}

.nav-link-featured {
  background: rgba(198, 160, 58, 0.16);
}

.admin-frame {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.topbar-kicker {
  margin: 0;
  color: var(--gold-700);
  flex: 1;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.topbar-name {
  font-weight: 600;
}

.admin-content {
  flex: 1;
  padding: 1.7rem 1.8rem 2.4rem;
}

.admin-footer {
  padding: 0 1.8rem 1.4rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--gold-700);
}

.lede {
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.55;
}

.banner {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
  font-weight: 600;
}

.banner-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.banner-warn {
  background: rgba(184, 134, 11, 0.12);
  color: var(--gold-700);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-gold {
  background: var(--gold-500);
  color: var(--forest-950);
}

.btn-forest {
  background: var(--forest-700);
  color: var(--ivory);
}

.btn-ghost {
  background: #fff;
  color: var(--forest-700);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.42rem 0.8rem;
  font-size: 0.84rem;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--parchment);
  cursor: pointer;
}

.nav-toggle {
  display: none;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--forest-700);
  margin: 0 auto;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -5px;
}

.nav-toggle-bars::after {
  top: 5px;
}

.form-card,
.stat-card,
.dash-link,
.table-wrap,
.post-card,
.rate-hero {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.3rem 1.4rem;
  margin-bottom: 1.15rem;
}

.form-card-head {
  margin-bottom: 1rem;
}

.form-card-head p,
.empty-panel p {
  color: var(--muted);
}

.field {
  margin-bottom: 0.95rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-size: 0.86rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 0.72rem 0.85rem;
  font: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(198, 160, 58, 0.35);
  border-color: var(--gold-500);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.field-error {
  min-height: 1.1rem;
  margin: 0.3rem 0 0;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.form-message {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-weight: 600;
}

.form-message.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.form-message.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.field-control {
  position: relative;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.sticky-actions {
  position: sticky;
  bottom: 0.8rem;
  padding: 0.9rem 0 0.2rem;
  background: linear-gradient(180deg, transparent, var(--ivory) 28%);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
  margin-bottom: 1.2rem;
}

.filter-bar .field {
  min-width: 220px;
  margin-bottom: 0;
}

.table-wrap {
  overflow: auto;
  padding: 0.2rem;
}

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

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.9rem 0.85rem;
  border-bottom: 1px solid rgba(20, 32, 26, 0.06);
  vertical-align: middle;
}

.data-table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.table-primary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}

.table-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--parchment);
  flex-shrink: 0;
}

.table-thumb-empty {
  box-shadow: inset 0 0 0 1px var(--line);
}

.table-actions {
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--parchment);
  color: var(--forest-700);
}

.status-active,
.status-paid,
.status-delivered,
.status-available {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-draft,
.status-pending,
.status-processing,
.status-hidden {
  background: rgba(201, 162, 39, 0.16);
  color: var(--gold-700);
}

.status-archived,
.status-cancelled,
.status-refunded,
.status-removed,
.status-suspended,
.status-failed,
.status-reversed {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-shipped {
  background: rgba(61, 106, 82, 0.12);
  color: var(--forest-500);
}

.empty-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 3rem 1.5rem;
  margin-bottom: 1.15rem;
}

.empty-panel-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef3f7;
  color: var(--forest-700);
}

.empty-panel-mark svg {
  width: 32px;
  height: 32px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
}

.pager-link {
  font-weight: 700;
}

.pager-link.is-disabled {
  color: var(--muted);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--forest-700);
  color: var(--gold-300);
  font-weight: 800;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 1.3rem;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--parchment);
  cursor: pointer;
  font-weight: 600;
}

.image-board,
.variant-list,
.attr-list,
.override-list {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.image-chip {
  position: relative;
  width: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0;
}

.image-board {
  grid-template-columns: repeat(auto-fill, minmax(120px, 120px));
}

.image-chip img {
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.image-remove {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  background: rgba(7, 17, 13, 0.72);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.variant-row,
.attr-row,
.override-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
  gap: 0.65rem;
  align-items: end;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: var(--parchment);
}

.attr-row,
.override-row {
  grid-template-columns: 1fr 1fr auto;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.modal-root[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 46, 0.55);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.modal-card-wide {
  width: min(640px, 100%);
}

.modal-title {
  margin-bottom: 0.4rem;
}

.modal-copy {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}

.totals {
  margin: 1rem 0 0;
}

.totals div {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.totals-grand {
  font-weight: 800;
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.7rem;
}

.ship-block {
  font-style: normal;
  line-height: 1.55;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(20, 32, 26, 0.05);
}

.meta-list dt {
  color: var(--muted);
}

.pet-list,
.address-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pet-list li,
.address-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(20, 32, 26, 0.05);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.segment {
  border: 0;
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  background: var(--parchment);
  color: var(--forest-700);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.segment.is-active {
  background: var(--forest-700);
  color: var(--gold-300);
}

.auth-shell {
  min-height: 100vh;
  background: var(--forest-800);
}
