:root {
  --forest: #253b2d;
  --forest-soft: #35513e;
  --cream: #fbf8f2;
  --linen: #f1e8dc;
  --sage-pale: #dfe5d9;
  --blush: #e7a0aa;
  --blush-pale: #f6dfe2;
  --ink: #1f2a22;
  --muted: #59645c;
  --danger: #9a2f3d;
  --white: #fffdf9;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  margin: 0;
}

a { color: inherit; }

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

button,
select { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--blush);
  outline-offset: 3px;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  background: var(--white);
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: -60px;
  z-index: 100;
}

.skip-link:focus { top: 12px; }

.admin-header {
  align-items: center;
  background: var(--forest);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 60px);
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.brand strong,
.brand small { display: block; }

.brand strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand small {
  color: rgba(255, 253, 249, 0.75);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  margin-top: 3px;
  text-transform: uppercase;
}

.brand-mark {
  background: var(--blush);
  border-radius: 62% 38% 55% 45%;
  height: 25px;
  position: relative;
  transform: rotate(-8deg);
  width: 20px;
}

.brand-mark::after {
  background: #8aa178;
  content: "";
  height: 15px;
  left: 9px;
  position: absolute;
  top: 21px;
  width: 2px;
}

.admin-header nav,
.row-actions,
.heading-actions,
.form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.admin-header nav {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-header nav a,
.link-button {
  background: none;
  border: 0;
  color: inherit;
  padding: 6px 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.admin-header nav a:hover,
.admin-header nav a:focus-visible,
.link-button:hover,
.link-button:focus-visible { text-decoration-color: currentColor; }

.admin-header nav form,
.row-actions form { margin: 0; }

.admin-shell {
  margin: 0 auto;
  max-width: 1440px;
  min-height: calc(100vh - 148px);
  padding: clamp(38px, 6vw, 84px) clamp(18px, 5vw, 70px);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  margin-top: 0;
}

h1 { font-size: clamp(2.7rem, 5vw, 5rem); margin-bottom: 20px; }
h2 { font-size: clamp(1.9rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.5rem, 2vw, 2rem); }

.eyebrow {
  color: #6d3f47;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.dashboard-heading {
  align-items: end;
  border-bottom: 1px solid rgba(37, 59, 45, 0.15);
  display: flex;
  gap: 30px;
  justify-content: space-between;
  margin-bottom: 52px;
  padding-bottom: 38px;
}

.dashboard-heading p { color: var(--muted); margin-bottom: 0; }

.button-primary,
.button-secondary,
.button-danger {
  border: 1px solid var(--forest);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0.04em;
  min-height: 48px;
  padding: 13px 22px;
  text-decoration: none;
  text-transform: uppercase;
}

.button-primary { background: var(--forest); color: var(--white); }
.button-primary:hover { background: var(--forest-soft); }
.button-secondary { background: transparent; color: var(--forest); }
.button-secondary:hover { background: var(--sage-pale); }
.button-danger { background: var(--danger); border-color: var(--danger); color: white; }
.button-danger:hover { background: #7f2230; }

.section-title-row {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title-row h2 { margin-bottom: 0; }
.section-title-row span { color: var(--muted); font-size: 0.8rem; }

.category-stack { display: grid; gap: 24px; }

.category-card {
  background: var(--white);
  border: 1px solid rgba(37, 59, 45, 0.14);
}

.is-inactive { opacity: 0.66; }

.category-card-header {
  align-items: start;
  background: var(--sage-pale);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 24px 28px;
}

.category-card-header h3 { margin: 0; }
.category-card-header p { color: var(--muted); margin: 8px 0 0; }
.category-card-header small { color: var(--muted); }

.title-with-status { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }

.row-actions {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.row-actions a,
.row-actions button { white-space: nowrap; }
.row-actions-end { justify-content: end; }
.danger-link,
.danger-text { color: var(--danger); }

.drink-table-wrap { overflow-x: auto; }

table { border-collapse: collapse; min-width: 780px; width: 100%; }
th,
td { border-bottom: 1px solid rgba(37, 59, 45, 0.1); padding: 20px 24px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; }
td strong { display: block; font-family: var(--serif); font-size: 1.2rem; }
td small { color: var(--muted); display: block; margin-top: 4px; max-width: 460px; }

.item-note {
  color: #7c4650;
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  margin-top: 8px;
  text-transform: uppercase;
}

.price-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.price-chips span {
  background: var(--cream);
  border: 1px solid rgba(37, 59, 45, 0.13);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 7px;
  white-space: nowrap;
}

.status-badge {
  background: var(--linen);
  border-radius: 999px;
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 5px 9px;
  text-transform: uppercase;
}

.status-active { background: #dbe9d8; color: #29472e; }
.status-hidden { background: #eee1e1; color: #6f3a42; }
.muted { color: var(--muted); font-size: 0.78rem; }

.empty-state { color: var(--muted); margin: 0; padding: 28px; }

.activity-section { margin-top: 65px; }
.activity-list { border-top: 1px solid rgba(37, 59, 45, 0.13); list-style: none; margin: 0; padding: 0; }
.activity-list li { border-bottom: 1px solid rgba(37, 59, 45, 0.1); display: grid; gap: 4px; padding: 13px 4px; }
.activity-list time { color: var(--muted); font-size: 0.72rem; }

.auth-card,
.form-card {
  background: var(--white);
  border: 1px solid rgba(37, 59, 45, 0.14);
  margin: 0 auto;
  max-width: 860px;
  padding: clamp(30px, 6vw, 68px);
}

.auth-card { max-width: 560px; }
.narrow-card { max-width: 660px; }
.auth-card > p:not(.eyebrow),
.form-card > p:not(.eyebrow) { color: var(--muted); }

.form-stack { display: grid; gap: 23px; margin-top: 34px; }
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }

label {
  color: var(--forest);
  display: grid;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

label > span { color: var(--muted); font-size: 0.66rem; font-weight: 600; }

input,
select,
textarea {
  background: var(--cream);
  border: 1px solid rgba(37, 59, 45, 0.28);
  border-radius: 0;
  color: var(--ink);
  letter-spacing: normal;
  padding: 13px 14px;
  text-transform: none;
  width: 100%;
}

textarea { line-height: 1.55; resize: vertical; }
.price-editor { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
label > small,
.form-help { color: var(--muted); font-size: 0.75rem; font-weight: 500; letter-spacing: normal; margin: 0; text-transform: none; }

.checkbox-label {
  align-items: center;
  display: flex;
  letter-spacing: normal;
  text-transform: none;
}

.checkbox-label input { height: 20px; width: 20px; }

.flash-stack { display: grid; gap: 8px; margin: 0 auto 24px; max-width: 860px; }
.flash { border-left: 4px solid var(--forest); margin: 0; padding: 12px 15px; }
.flash-error { background: #f6e5e7; border-color: var(--danger); color: #6e2330; }
.flash-success { background: #e0ecdd; border-color: #527154; color: #29472e; }

.admin-footer {
  background: var(--linen);
  color: var(--muted);
  display: flex;
  font-size: 0.68rem;
  justify-content: space-between;
  letter-spacing: 0.08em;
  padding: 22px clamp(18px, 4vw, 60px);
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .admin-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .admin-header nav { width: 100%; }
  .dashboard-heading,
  .category-card-header { align-items: flex-start; flex-direction: column; }
  .row-actions-end { justify-content: start; }
}

@media (max-width: 620px) {
  .admin-header nav { gap: 6px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .heading-actions,
  .form-actions { align-items: stretch; flex-direction: column; }
  .button-primary,
  .button-secondary,
  .button-danger { width: 100%; }
  .admin-footer { align-items: center; flex-direction: column; gap: 8px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
