:root {
  /* Cor oficial BarroAR. Não alterar sem aprovação expressa da proprietária. */
  --brand-primary: #8b4321;
  --clay-950: var(--brand-primary);
  --clay-900: var(--brand-primary);
  --clay-800: var(--brand-primary);
  --clay-700: var(--brand-primary);
  --clay-500: #b96535;
  --clay-300: #d6a172;
  --sand-100: #f6efe6;
  --sand-200: #ead8c2;
  --sage: #5f6d55;
  --ink: #1f1915;
  --muted: #6f5d50;
  --white: #fffaf4;
  --line: rgba(90, 43, 24, 0.16);
  --shadow: 0 18px 48px rgba(68, 35, 20, 0.1);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--sand-100);
  font-family: var(--sans);
  letter-spacing: 0;
}

body:not(.is-authenticated) .admin-sidebar,
body:not(.is-authenticated) .admin-main {
  display: none;
}

.admin-login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--sand-100);
}

body.is-authenticated .admin-login {
  display: none;
}

.admin-login-card {
  display: grid;
  gap: 16px;
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.admin-login-card img {
  width: 180px;
  margin: 0 auto 8px;
}

.admin-login-card h1 {
  margin: 0 0 8px;
  color: var(--clay-900);
  font-family: var(--serif);
  font-size: 2.7rem;
  text-align: center;
}

.admin-login-card .kicker {
  margin: 0;
  text-align: center;
}

.login-message {
  min-height: 20px;
  margin: 0;
  color: #8a2925;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.admin-logout {
  width: 100%;
  border: 0;
  text-align: left;
}

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

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

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 260px;
  padding: 24px 18px;
  color: var(--white);
  background: var(--clay-950);
}

.admin-brand img {
  width: 160px;
}

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

.admin-nav a,
.back-link {
  min-height: 44px;
  padding: 13px 14px;
  border-radius: 6px;
  color: rgba(255, 250, 244, 0.78);
  font-weight: 800;
}

.admin-nav a:hover,
.back-link:hover {
  color: var(--white);
  background: rgba(255, 250, 244, 0.08);
}

.back-link {
  margin-top: auto;
}

.admin-main {
  margin-left: 260px;
  padding: clamp(22px, 4vw, 48px);
}

.admin-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 24px;
  align-items: end;
  min-height: 310px;
  padding: clamp(26px, 5vw, 54px);
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(36, 19, 12, 0.9), rgba(36, 19, 12, 0.68)),
    url("assets/produto-kit-caixa-presente.jpeg") center / cover;
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0 0 12px;
  color: var(--clay-500);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-header .kicker,
.atelier .kicker {
  color: var(--clay-300);
}

.admin-header h1,
.section-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 0.96;
}

.admin-header h1 {
  font-size: clamp(3.8rem, 8vw, 7.4rem);
}

.admin-header p:not(.kicker),
.section-title p {
  max-width: 720px;
  margin: 16px 0 0;
  line-height: 1.7;
}

.admin-header p:not(.kicker) {
  color: rgba(255, 250, 244, 0.78);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.summary-grid article {
  padding: 18px;
  border: 1px solid rgba(255, 250, 244, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.08);
}

.summary-grid span,
.summary-grid small {
  display: block;
  color: rgba(255, 250, 244, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.summary-grid strong {
  display: block;
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
}

.panel-section {
  padding-top: clamp(54px, 7vw, 84px);
}

.section-title {
  display: grid;
  grid-template-columns: minmax(0, 900px);
  gap: 10px;
  align-items: start;
  margin-bottom: 28px;
}

.section-title h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 1;
}

.section-title p {
  max-width: 760px;
  margin: 2px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.section-title .kicker {
  margin: 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.admin-card,
.category-card,
.photo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--clay-900);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fffdf9;
  font: inherit;
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

.span-2 {
  grid-column: span 2;
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--muted);
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.catalog-photo-upload {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sand-100);
}

.catalog-photo-upload legend {
  padding: 0 6px;
  color: var(--clay-900);
  font-size: 0.82rem;
  font-weight: 800;
}

.catalog-photo-upload p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.catalog-photo-upload .upload-preview {
  min-height: 118px;
  background: #fffdf9;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 18px;
  color: var(--clay-900);
  background: var(--white);
  font: inherit;
  font-weight: 800;
}

.primary-action {
  color: var(--white);
  background: var(--clay-700);
}

.product-preview {
  overflow: hidden;
}

.product-preview img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.product-preview div {
  padding: 22px;
}

.product-preview h3 {
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1;
}

.product-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.managed-products,
.stock-products {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 22px;
}

.stock-products {
  margin-top: 0;
}

.managed-products-header,
.stock-products-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: start;
}

.managed-products-header h3,
.managed-products-header p,
.managed-products-count,
.stock-products-header h3,
.stock-products-header span {
  grid-column: 1;
}

.managed-products-header button,
.stock-products-header button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  white-space: nowrap;
}

.managed-products-count,
.stock-products-header span {
  color: var(--clay-900);
  font-size: 0.82rem;
  font-weight: 800;
}

.managed-products h3,
.stock-products h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
}

.managed-products p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.managed-list {
  display: grid;
  gap: 10px;
}

.managed-list[hidden] {
  display: none;
}

.managed-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.managed-item img {
  width: 84px;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  background: var(--sand-200);
}

.managed-item strong {
  display: block;
  color: var(--clay-950);
}

.managed-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.managed-item button {
  min-height: 38px;
  padding: 0 12px;
}

.managed-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.managed-item-actions [data-delete-product] {
  color: #8a2925;
  border-color: #d69b96;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(90, 43, 24, 0.28);
  border-radius: 8px;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #2f4a2a;
  background: #dce9d2;
  font-size: 0.72rem;
  font-weight: 900;
}

.status-pill.warning {
  color: #77510f;
  background: #f3dfb4;
}

.status-pill.muted {
  color: var(--muted);
  background: #efe4d7;
}

.table-card {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--clay-900);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-weight: 700;
}

.photo-manager {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.upload-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
}

.upload-card label {
  cursor: pointer;
}

.upload-card label span {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 140px;
  padding: 12px;
  border: 1px dashed rgba(90, 43, 24, 0.28);
  border-radius: 8px;
  color: var(--muted);
}

.upload-preview span {
  align-self: center;
  justify-self: center;
  grid-column: 1 / -1;
  text-align: center;
}

.upload-preview img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
}

.upload-preview-item {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 6px;
}

.upload-preview-item figcaption {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--white);
  background: rgba(31, 25, 21, 0.78);
  font-size: 0.68rem;
  font-weight: 800;
}

.upload-preview-item [data-remove-product-photo] {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: rgba(255, 250, 244, 0.62);
  border-radius: 50%;
  color: var(--white);
  background: rgba(31, 25, 21, 0.78);
  font-size: 1.2rem;
}

.upload-preview-item.is-main {
  outline: 3px solid var(--brand-primary);
  outline-offset: -3px;
}

.photo-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.photo-card figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--white);
  background: rgba(36, 19, 12, 0.72);
  font-size: 0.74rem;
  font-weight: 900;
}

.photo-card.is-main {
  outline: 3px solid var(--clay-500);
  outline-offset: -3px;
}

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(480px, 1.18fr);
  gap: 18px;
  align-items: start;
}

.schedule-form {
  position: sticky;
  top: 20px;
}

.capacity-message {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--sand-100);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.5;
}

.capacity-message.is-busy {
  color: #77510f;
  border-color: #d8b35e;
  background: #fff5d9;
}

.capacity-message.is-full {
  color: #8a2925;
  border-color: #d69b96;
  background: #fae4e1;
}

.production-builder {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--sand-100);
}

.production-builder[hidden] {
  display: none;
}

.production-builder legend {
  padding: 0 6px;
  color: var(--clay-900);
  font-size: 0.82rem;
  font-weight: 800;
}

.production-builder-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

[data-order-items-trigger] {
  cursor: pointer;
  color: var(--clay-900);
  background: #fffdf9;
}

[data-order-items-trigger]:hover,
[data-order-items-trigger]:focus {
  border-color: var(--clay-500);
  box-shadow: inset 0 0 0 1px var(--clay-500);
}

.production-items {
  display: grid;
  gap: 8px;
}

.production-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.production-field {
  min-width: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.production-field span {
  display: block;
}

.production-field input,
.production-field select {
  min-width: 0;
  min-height: 42px;
}

.item-name-field {
  grid-column: 2;
}

.production-row .production-field:not(.quantity-field):not(.item-name-field) {
  grid-column: 1 / -1;
}

.production-row button {
  grid-column: 2;
  justify-self: end;
  width: 42px;
  min-height: 46px;
  padding: 0;
  color: #8a2925;
  font-size: 1.25rem;
}

.add-production-item {
  justify-self: start;
  min-height: 40px;
}

.calendar-card {
  padding: 20px;
}

.calendar-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.calendar-header h3,
.order-list-header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}

.calendar-header button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 1.8rem;
  line-height: 1;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays {
  margin-bottom: 6px;
}

.calendar-weekdays span {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 78px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fffdf9;
  text-align: left;
}

.calendar-day:hover,
.calendar-day.is-selected {
  border-color: var(--clay-500);
  box-shadow: inset 0 0 0 1px var(--clay-500);
}

.calendar-day.is-outside {
  opacity: 0.34;
}

.calendar-day.is-today {
  background: #f4e2ce;
}

.calendar-day.is-available {
  border-color: #8fb482;
  background: #edf6e8;
}

.calendar-day.is-busy {
  border-color: #d8b35e;
  background: #fff5d9;
}

.calendar-day.is-full {
  border-color: #c75d54;
  background: #f8d8d4;
}

.calendar-day-number {
  font-size: 0.86rem;
  font-weight: 900;
}

.calendar-deliveries {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.calendar-deliveries:empty {
  display: none;
}

.delivery-count {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: #2f4a2a;
  background: #dce9d2;
}

.calendar-day.is-busy .delivery-count {
  color: #77510f;
  background: #f3dfb4;
}

.calendar-day.is-full .delivery-count {
  color: var(--white);
  background: #a53c34;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.capacity-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.capacity-dot.available {
  background: #7a9a69;
}

.capacity-dot.busy {
  background: #d0a23d;
}

.capacity-dot.full {
  background: #a53c34;
}

.order-list-card {
  margin-top: 18px;
  padding: 22px;
}

.order-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.order-list-header h3 {
  text-align: left;
}

.order-list-header p {
  margin: 7px 0 0;
  color: var(--muted);
}

.order-list-header > strong {
  color: var(--clay-700);
}

.order-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.order-dashboard article {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sand-100);
}

.order-dashboard span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.order-dashboard strong {
  display: block;
  margin-top: 12px;
  color: var(--clay-900);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
}

.order-dashboard .received {
  border-color: #9eb78f;
  background: #edf6e8;
}

.order-dashboard .received strong {
  color: #35612f;
}

.order-dashboard .receivable {
  border-color: #d8b35e;
  background: #fff5d9;
}

.order-dashboard .receivable strong {
  color: #77510f;
}

.production-status-panel {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

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

.production-status-header .kicker {
  margin-bottom: 6px;
}

.production-status-header h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
}

.production-status-header p {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.status-filter-clear {
  flex: 0 0 auto;
}

.production-status-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.production-status-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 118px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
}

.production-status-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--status-color, var(--brand-primary));
  content: "";
}

.production-status-card:hover,
.production-status-card.is-active {
  border-color: var(--status-color, var(--brand-primary));
  box-shadow: 0 8px 22px rgba(68, 35, 20, 0.08);
}

.production-status-card.is-active {
  outline: 2px solid color-mix(in srgb, var(--status-color, var(--brand-primary)) 28%, transparent);
}

.production-status-card > span {
  align-self: start;
  padding-left: 3px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.production-status-card > strong {
  color: var(--status-color, var(--brand-primary));
  font-family: var(--serif);
  font-size: 2.35rem;
  line-height: 0.8;
}

.production-status-card small {
  grid-column: 1 / -1;
  align-self: end;
  padding-left: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.production-status-card.is-empty {
  opacity: 0.62;
}

.status-filter-summary {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.finance-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.finance-actions strong,
.finance-actions span {
  display: block;
}

.finance-actions strong {
  color: var(--clay-900);
}

.finance-actions span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.finance-actions > div:last-child {
  display: flex;
  gap: 8px;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.order-item.is-complete {
  border-color: #9eb78f;
  background: #f5faef;
}

.order-number-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -14px -14px 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  color: var(--white);
  background: var(--brand-primary);
}

.order-number-bar span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.order-number-bar strong {
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.order-summary {
  display: grid;
  grid-template-columns: 105px minmax(180px, 1.2fr) minmax(170px, 0.8fr) minmax(190px, 0.9fr) auto;
  gap: 16px;
  align-items: center;
}

.order-date {
  color: var(--clay-700);
  font-weight: 900;
}

.order-details strong,
.order-finance strong {
  display: block;
}

.order-details span,
.order-finance span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.order-payment-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.order-payment-editor label {
  color: var(--muted);
  font-size: 0.72rem;
}

.order-payment-editor input {
  min-height: 40px;
}

.order-payment-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--sand-100);
  font-size: 0.78rem;
  font-weight: 800;
}

.order-payment-summary strong {
  color: var(--clay-900);
}

.order-status select {
  min-height: 40px;
  font-size: 0.8rem;
  font-weight: 800;
}

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

.order-actions button {
  min-height: 38px;
  padding: 0 12px;
}

.order-actions .danger-action {
  color: #8a2925;
  border-color: #d69b96;
}

.production-checklist {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--clay-900);
  font-size: 0.78rem;
  font-weight: 900;
}

.checklist-header span {
  color: var(--muted);
}

.production-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 6px;
  color: var(--ink);
  background: var(--sand-100);
  font-size: 0.84rem;
}

.production-check input {
  width: 18px;
  min-height: 18px;
}

.production-check span,
.production-check strong,
.production-check small {
  display: block;
}

.production-check small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.production-check:has(input:checked) span {
  color: var(--muted);
  text-decoration: line-through;
}

.packaging-checklist {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d8b35e;
  border-radius: 8px;
  background: #fff5d9;
}

.packaging-checklist.is-complete {
  border-color: #9eb78f;
  background: #edf6e8;
}

.packaging-checklist > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.packaging-check-item {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr) minmax(145px, auto);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(90, 43, 24, 0.14);
  border-radius: 6px;
  background: #fffdf9;
}

.packaging-check-item strong,
.packaging-check-item small {
  display: block;
}

.packaging-check-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.packaging-check-item label {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--ink);
  font-size: 0.76rem;
}

.packaging-check-item input {
  width: 18px;
  min-height: 18px;
}

.packaging-check-item .decal-check {
  color: var(--clay-900);
}

.not-applicable {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.delivered-orders-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 104px;
  margin-top: 18px;
  padding: 18px 20px;
  border-color: #9eb78f;
  color: #2f4a2a;
  background: #edf6e8;
  text-align: left;
}

.delivered-orders-card small,
.delivered-orders-card strong,
.delivered-orders-card em {
  display: block;
}

.delivered-orders-card small {
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-style: normal;
  text-transform: uppercase;
}

.delivered-orders-card strong {
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1;
}

.delivered-orders-card em {
  margin-top: 7px;
  color: #55704f;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
}

.delivered-orders-count {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--white);
  background: #477440;
  font-family: var(--serif);
  font-size: 1.8rem;
}

.delivered-orders-panel {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid #9eb78f;
  border-radius: 8px;
  background: #f7fbf4;
}

.delivered-orders-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.delivered-orders-header h4 {
  margin: 0;
  color: #2f4a2a;
  font-family: var(--serif);
  font-size: 1.8rem;
}

.delivered-orders-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.delivered-orders-header button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 1.4rem;
}

.category-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 142px;
  padding: 20px;
}

.category-card strong {
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1;
}

.category-card span {
  color: var(--muted);
  line-height: 1.55;
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.quote-form {
  padding: 22px;
}

.quote-form-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.quote-form-header > div span,
.quote-total-preview span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-form-header > div strong {
  display: block;
  margin-top: 5px;
  color: var(--brand-primary);
  font-family: var(--serif);
  font-size: 2rem;
}

.quote-form-header label {
  width: min(240px, 100%);
}

.quote-form > .form-grid {
  padding: 22px 0 0;
}

.quote-items-builder {
  margin: 4px 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-items-builder legend {
  padding: 0 8px;
  color: var(--brand-primary);
  font-weight: 800;
}

.quote-items {
  display: grid;
  gap: 10px;
}

.quote-item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 100px 145px 130px 42px;
  gap: 10px;
  align-items: end;
}

.quote-item-row label {
  margin: 0;
}

.quote-item-row output {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand-primary);
  background: var(--sand-100);
  font-weight: 800;
}

.quote-item-row > button {
  min-height: 46px;
  padding: 0;
  color: #8a2925;
  font-size: 1.4rem;
}

.quote-conditions {
  padding: 0;
}

.quote-total-preview {
  margin: 4px 0 20px;
  padding: 18px;
  border: 1px solid rgba(139, 67, 33, 0.28);
  border-radius: 8px;
  background: rgba(139, 67, 33, 0.06);
}

.quote-total-preview strong {
  display: block;
  margin: 5px 0;
  color: var(--brand-primary);
  font-family: var(--serif);
  font-size: 2.5rem;
}

.quote-total-preview small {
  color: var(--muted);
  font-weight: 700;
}

.quote-model-summary {
  position: sticky;
  top: 24px;
  padding: 22px;
}

.quote-model-summary img {
  width: min(210px, 80%);
  margin: 0 auto 22px;
}

.quote-model-summary h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
}

.quote-model-summary > p:not(.kicker) {
  color: var(--muted);
  line-height: 1.65;
}

.quote-model-summary dl {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
}

.quote-model-summary dl div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.quote-model-summary dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-model-summary dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.managed-quotes {
  margin-top: 18px;
  padding: 22px;
}

.quote-list-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.quote-list-item:first-child {
  border-top: 0;
}

.quote-list-item > strong {
  color: var(--brand-primary);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.quote-list-item div span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.quote-list-actions button {
  min-height: 40px;
}

@media (max-width: 1100px) {
  .admin-sidebar {
    position: static;
    width: auto;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
  }

  .admin-brand img {
    width: 130px;
  }

  .admin-nav {
    display: flex;
    margin-top: 0;
  }

  .back-link {
    margin-top: 0;
    margin-left: auto;
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-header,
  .section-title,
  .workspace-grid,
  .photo-manager,
  .schedule-layout,
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .schedule-form {
    position: static;
  }

  .quote-model-summary {
    position: static;
  }

  .production-status-dashboard {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-sidebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .back-link {
    margin-left: 0;
  }

  .summary-grid,
  .form-grid,
  .photo-grid,
  .category-grid,
  .order-dashboard,
  .production-status-dashboard {
    grid-template-columns: 1fr;
  }

  .calendar-card {
    padding: 12px;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    min-height: 62px;
    padding: 6px;
  }

  .calendar-deliveries span:not(.delivery-count) {
    display: none;
  }

  .order-list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .production-status-header {
    align-items: stretch;
    flex-direction: column;
  }

  .production-status-card {
    min-height: 94px;
  }

  .finance-actions,
  .finance-actions > div:last-child {
    align-items: stretch;
    flex-direction: column;
  }

  .order-summary {
    grid-template-columns: 1fr;
  }

  .order-payment-editor {
    grid-template-columns: 1fr;
  }

  .order-payment-summary {
    grid-column: 1;
  }

  .packaging-check-item {
    grid-template-columns: 1fr;
  }

  .order-actions button {
    flex: 1;
  }

  .quote-form-header,
  .quote-list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-form-header {
    display: flex;
  }

  .quote-item-row {
    grid-template-columns: 1fr 1fr;
  }

  .quote-item-row label:first-child,
  .quote-item-row output {
    grid-column: 1 / -1;
  }

  .quote-list-item {
    display: flex;
  }

  .quote-list-actions {
    flex-wrap: wrap;
  }

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

  .form-actions {
    justify-content: stretch;
  }

  .form-actions button {
    width: 100%;
  }

  .managed-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .managed-item button {
    grid-column: 1 / -1;
  }
}
