:root {
  --background: #fdf8ef;
  --background-alt: #f8f0d9;
  --paper: rgba(255, 252, 246, 0.92);
  --paper-strong: #fffdf8;
  --line: rgba(68, 76, 70, 0.14);
  --text: #2d302a;
  --muted: #667164;
  --accent: #de9f2d;
  --accent-strong: #d07837;
  --accent-soft: #f8e4a9;
  --shell: #fbf3df;
  --sage: #8ea58a;
  --teal: #7aa8a2;
  --shadow: 0 22px 70px rgba(91, 89, 61, 0.14);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Nunito", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(248, 228, 169, 0.55), transparent 28%),
    radial-gradient(circle at left center, rgba(122, 168, 162, 0.18), transparent 32%),
    linear-gradient(180deg, #fffdf7 0%, #fdf7ec 45%, #f7f0dd 100%);
}

body::before,
body::after {
  position: fixed;
  content: "";
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0;
  background-image:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.6) 0 42px, transparent 44px),
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.55) 0 54px, transparent 56px),
    radial-gradient(circle at 22% 82%, rgba(255, 255, 255, 0.45) 0 36px, transparent 38px);
  opacity: 0.7;
}

body::after {
  inset: 18px;
  border: 1px solid rgba(222, 159, 45, 0.08);
  border-radius: 28px;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.hero,
.card {
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 420px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 40px;
  overflow: hidden;
}

.hero-copy,
.card {
  border-radius: var(--radius-xl);
}

.hero-copy,
.hero-art,
.card,
.view-panel,
.layout,
.admin-layout,
.purchase-form,
.calendar-panel,
.schedule-panel {
  min-width: 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(690px, 100%);
  padding: 2.6rem;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.46), rgba(255, 253, 248, 0.26) 70%, rgba(255, 253, 248, 0.06));
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.hero-copy::before,
.hero-copy::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  opacity: 0.28;
}

.hero-copy::before {
  width: 148px;
  height: 186px;
  right: 42px;
  top: -28px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.15) 62%, transparent 63%);
}

.hero-copy::after {
  width: 210px;
  height: 210px;
  right: -54px;
  bottom: -60px;
  background: radial-gradient(circle, rgba(122, 168, 162, 0.18), rgba(122, 168, 162, 0));
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero h1,
.section-heading h2,
.calendar-panel h3,
.sub-heading h3,
.empty-state h3 {
  margin: 0;
  font-family: "Nunito", sans-serif;
  line-height: 0.98;
}

.hero-title-lockup {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1.15rem;
  align-items: center;
  max-width: 760px;
}

.hero-logo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 50%;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 10px 22px rgba(91, 89, 61, 0.16));
}

.hero h1 {
  font-size: clamp(2.45rem, 3.9vw, 3.8rem);
  font-weight: 900;
  max-width: 12.5ch;
  text-shadow: 0 2px 10px rgba(255, 253, 248, 0.7);
}

.hero-text {
  max-width: 58ch;
  margin: 1rem 0 1.5rem;
  color: var(--text);
  font-weight: 800;
  line-height: 1.75;
  text-shadow: 0 1px 8px rgba(255, 253, 248, 0.82);
}

.hero-price {
  position: absolute;
  right: 1.6rem;
  bottom: 1.35rem;
  z-index: 2;
  margin: 0;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(222, 159, 45, 0.34);
  border-radius: 999px;
  background: rgba(255, 247, 209, 0.86);
  box-shadow: 0 14px 32px rgba(91, 89, 61, 0.14);
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(255, 253, 248, 0.8);
}

.access-switch,
.schedule-preview {
  display: flex;
  flex-wrap: wrap;
}

.schedule-preview {
  gap: 0.7rem;
}

.access-button,
.status-badge,
.order-schedule-label {
  border-radius: 999px;
}

.access-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.6rem;
  width: min(58ch, 100%);
}

.access-button,
.primary-button,
.ghost-button,
.summary-card--button,
.calendar-button,
.calendar-cell {
  font: inherit;
}

.access-button {
  padding: 0.9rem 1.25rem;
  border: 1px solid rgba(122, 168, 162, 0.25);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.access-button.is-active {
  background: linear-gradient(135deg, #fff7d1, #f9df88);
  border-color: rgba(222, 159, 45, 0.42);
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 0.2rem;
  pointer-events: none;
}

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 6px);
  opacity: 0.36;
}

.view-panel {
  animation: fade-in 220ms ease;
}

.layout,
.admin-layout {
  display: grid;
  gap: 1.5rem;
}

.layout--customer {
  grid-template-columns: 1.18fr 0.82fr;
}

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

.admin-gate {
  display: grid;
  gap: 1rem;
  width: min(520px, 100%);
  margin: 0 auto;
}

.auth-view {
  margin-bottom: 1.5rem;
}

.auth-card {
  display: grid;
  gap: 1.2rem;
  width: min(560px, 100%);
  margin: 0 auto;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.admin-gate label,
.auth-form label {
  display: grid;
  gap: 0.45rem;
}

.admin-gate label span,
.auth-form label span {
  color: var(--muted);
}

.admin-gate input,
.auth-form input {
  width: 100%;
  min-height: 54px;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(68, 76, 70, 0.14);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.admin-gate input:focus,
.auth-form input:focus {
  outline: 2px solid rgba(122, 168, 162, 0.42);
  outline-offset: 2px;
}

.form-hint {
  margin: -0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-error {
  margin: 0;
  color: #a64f42;
  font-weight: 700;
}

.form-success {
  margin: 0;
  color: #2d6546;
  font-weight: 800;
}

.customer-name-line {
  margin: -0.2rem 0 0.1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
}

.admin-dashboard-actions {
  display: flex;
  justify-content: flex-end;
  margin: -0.45rem 0 1rem;
}

.purchase-actions,
.expense-actions,
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.purchase-actions .primary-button,
.purchase-actions .ghost-button,
.expense-actions .primary-button,
.expense-actions .ghost-button,
.profile-actions .primary-button,
.profile-actions .ghost-button {
  min-width: 10rem;
}

.account-status-bar {
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  align-items: center;
  justify-content: flex-end;
  max-width: min(420px, calc(100% - 2rem));
  padding: 0.36rem 0.42rem 0.36rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.76);
  box-shadow: 0 12px 32px rgba(91, 89, 61, 0.12);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.account-status-bar span {
  max-width: 24ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-logout-button,
.account-icon-button {
  padding: 0.36rem 0.62rem;
  border: 1px solid rgba(122, 168, 162, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
}

.account-icon-button {
  display: inline-grid;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  place-items: center;
}

.account-icon-button svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.account-icon-button.is-active {
  background: linear-gradient(135deg, #fff7d1, #f9df88);
  border-color: rgba(222, 159, 45, 0.42);
}

.profile-card {
  width: min(620px, 100%);
}

.card {
  padding: 1.5rem;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3.1rem);
}

.purchase-form,
.expense-form,
.schedule-panel,
.calendar-panel,
.order-card,
.mini-summary-card,
.filter-control,
.customer-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-strong);
}

.purchase-form,
.expense-form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.purchase-form label,
.expense-form label,
.preview-panel,
.summary-card,
.order-card,
.order-actions,
.mini-summary-card,
.filter-control,
.customer-summary {
  display: grid;
}

.purchase-form label,
.expense-form label,
.preview-panel,
.filter-control {
  gap: 0.45rem;
}

.purchase-form span,
.expense-form span,
.preview-label,
.order-meta,
.order-dates dt,
.muted,
.sub-heading p,
.filter-control span,
.mini-summary-card span {
  color: var(--muted);
}

.purchase-form input,
.purchase-form select,
.expense-form input,
.expense-form select,
.filter-control input,
.filter-control select {
  width: 100%;
  min-height: 54px;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(68, 76, 70, 0.14);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
}

.purchase-form input,
.purchase-form select,
.expense-form input,
.expense-form select,
.filter-control input,
.filter-control select,
.access-button,
.primary-button,
.ghost-button,
.calendar-button,
.calendar-cell {
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.filter-control input,
.filter-control select {
  height: 54px;
}

.purchase-form input:focus,
.purchase-form select:focus,
.expense-form input:focus,
.expense-form select:focus,
.filter-control input:focus,
.filter-control select:focus,
.access-button:focus,
.primary-button:focus,
.ghost-button:focus,
.calendar-button:focus,
.calendar-cell:focus {
  outline: 2px solid rgba(122, 168, 162, 0.42);
  outline-offset: 2px;
}

.form-row,
.summary-grid,
.customer-summary,
.admin-filters,
.order-dates {
  display: grid;
  gap: 1rem;
}

.form-row,
.order-dates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fixed-quantity input {
  background: linear-gradient(180deg, #fff7e5, #fff3d3);
}

.readonly-date-control input {
  pointer-events: none;
  border-color: rgba(68, 76, 70, 0.1);
  background: #f1f2ef;
  color: #667164;
}

.schedule-panel,
.calendar-panel,
.order-card,
.filter-control {
  padding: 1rem;
}

.calendar-panel {
  padding: 0.75rem;
}

.schedule-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
  margin: 0;
}

.schedule-panel legend {
  padding: 0;
  margin-bottom: 0.85rem;
  font-weight: 800;
  color: var(--muted);
}

.cadence-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.cadence-option {
  position: relative;
}

.cadence-option input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.cadence-option > span {
  display: grid;
  min-height: 54px;
  gap: 0.1rem;
  align-content: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(68, 76, 70, 0.14);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.cadence-option strong {
  color: var(--text);
  line-height: 1.15;
}

.cadence-option small {
  color: var(--muted);
  line-height: 1.2;
}

.cadence-option input:checked + span {
  border-color: rgba(222, 159, 45, 0.46);
  background: linear-gradient(180deg, #fff7d9, #fff1c7);
}

.cadence-option input:focus + span {
  outline: 2px solid rgba(122, 168, 162, 0.42);
  outline-offset: 2px;
}

.cadence-option input:hover + span {
  transform: translateY(-1px);
}

.schedule-preview {
  list-style: none;
  padding: 0;
  margin: 0;
}

.schedule-preview li {
  padding: 0.55rem 0.8rem;
  background: rgba(248, 228, 169, 0.62);
  border-radius: 999px;
}

.calendar-header,
.order-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.calendar-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.55rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.calendar-header > div:first-child {
  min-width: 0;
  text-align: center;
}

.calendar-header h3 {
  line-height: 1.12;
}

.calendar-nav {
  display: grid;
  grid-template-columns: minmax(5.4rem, auto) minmax(0, 1fr) minmax(5.4rem, auto);
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.calendar-nav .calendar-button:first-child {
  justify-self: start;
}

.calendar-nav .calendar-button:last-child {
  justify-self: end;
}

.calendar-button,
.ghost-button {
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.calendar-button {
  padding: 0.55rem 0.8rem;
}

.calendar-button,
.primary-button,
.ghost-button {
  border-radius: 999px;
}

.primary-button {
  padding: 1.05rem 1.3rem;
  border: none;
  background: linear-gradient(135deg, var(--accent-strong), #e7a645);
  color: #fffef8;
  font-weight: 700;
  cursor: pointer;
}

.access-button:hover,
.primary-button:hover,
.ghost-button:hover,
.calendar-button:hover,
.calendar-cell:hover {
  transform: translateY(-1px);
}

.calendar-month {
  min-width: auto;
  margin: 0;
  text-align: center;
  font-weight: 700;
}

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

.calendar-weekdays {
  margin: 0.65rem 0 0.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
}

.calendar-cell {
  min-height: 48px;
  padding: 0.42rem 0.35rem;
  border: 1px solid rgba(68, 76, 70, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffefa, #fff7eb);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.calendar-cell--blank {
  min-height: 48px;
}

.calendar-cell.is-selected {
  background: linear-gradient(180deg, #fff1c8, #ffe0a8);
  border-color: rgba(222, 159, 45, 0.4);
}

.calendar-cell.is-today {
  box-shadow: inset 0 0 0 1px rgba(122, 168, 162, 0.4);
}

.calendar-number {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
}

.calendar-day-label {
  font-size: 0.68rem;
  color: var(--muted);
}

.tracker-card,
.admin-orders-card {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.customer-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.65rem;
}

.mini-summary-card {
  gap: 0.35rem;
  padding: 0.95rem;
  background: linear-gradient(180deg, #fffef9, #fff7e9);
}

.tracker-card .mini-summary-card {
  min-height: 82px;
  padding: 0.65rem;
  border-radius: 14px;
}

.tracker-card .mini-summary-card span {
  font-size: 0.76rem;
  line-height: 1.3;
}

.mini-summary-card strong {
  font-family: "Nunito", sans-serif;
  font-size: 1.25rem;
}

.tracker-card .mini-summary-card strong {
  font-size: 1.05rem;
  line-height: 1.05;
}

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

.summary-card {
  gap: 0.2rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 217, 0.98));
  border: 1px solid var(--line);
}

.summary-card span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.summary-card strong {
  font-family: "Nunito", sans-serif;
  font-size: 1.55rem;
  line-height: 1;
}

.summary-card--button {
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.summary-card--button:hover,
.summary-card--button:focus {
  transform: translateY(-1px);
}

.summary-card--button:focus {
  outline: 2px solid rgba(122, 168, 162, 0.42);
  outline-offset: 2px;
}

.summary-card--button.is-active {
  border-color: rgba(222, 159, 45, 0.48);
  background: linear-gradient(180deg, #fff7d9, #fff0c2);
  box-shadow: 0 10px 28px rgba(222, 159, 45, 0.12);
}

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

.admin-filter-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.admin-clear-filter {
  min-height: 54px;
  padding: 0.8rem 1rem;
  white-space: nowrap;
}

.admin-clear-filter:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.orders-list {
  display: grid;
  gap: 1rem;
}

.customer-record {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.customer-record-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}

.customer-record-header span {
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.customer-record-header strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.customer-record-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 2.35rem;
  gap: 0.65rem;
  align-items: center;
}

.customer-record-detail {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.customer-record-detail span {
  color: var(--muted);
  font-size: 0.76rem;
}

.customer-record-detail strong {
  font-size: 1rem;
  line-height: 1.2;
}

.customer-record-detail small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.customer-record-detail--payment {
  justify-items: end;
}

.customer-series-actions {
  display: grid;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.customer-series-actions .ghost-button {
  width: 100%;
  padding: 0.75rem 0.95rem;
}

.icon-button {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.icon-button:hover,
.icon-button:focus {
  transform: translateY(-1px);
}

.icon-button:focus {
  outline: 2px solid rgba(122, 168, 162, 0.42);
  outline-offset: 2px;
}

.icon-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.icon-button--danger {
  color: #a64f42;
}

.icon-button--danger:hover,
.icon-button--danger:focus {
  border-color: rgba(166, 79, 66, 0.28);
  background: rgba(255, 240, 236, 0.8);
}

.expenses-table-wrap,
.orders-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.expenses-table,
.orders-table,
.outstanding-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.expenses-table th,
.expenses-table td,
.orders-table th,
.orders-table td,
.outstanding-table th,
.outstanding-table td {
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.expenses-table th,
.orders-table th,
.outstanding-table th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(248, 228, 169, 0.42);
}

.expenses-table tr:last-child td,
.orders-table tr:last-child td,
.outstanding-table tr:last-child td {
  border-bottom: 0;
}

.expenses-table input,
.expenses-table select {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(68, 76, 70, 0.14);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.expenses-table input:focus,
.expenses-table select:focus {
  outline: 2px solid rgba(122, 168, 162, 0.42);
  outline-offset: 2px;
}

.expense-ledger,
.expense-chart-panel {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 0.9rem;
  min-height: 280px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.bar-chart-month {
  display: grid;
  grid-template-rows: minmax(150px, 1fr) auto auto auto;
  gap: 0.35rem;
  align-items: end;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.bar-chart-month strong {
  color: var(--text);
  font-size: 0.9rem;
}

.bar-chart-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: end;
  height: 150px;
  padding: 0.55rem;
  border-radius: 14px;
  background: rgba(248, 240, 217, 0.58);
}

.bar-chart-bar {
  display: block;
  min-height: 0;
  border-radius: 999px 999px 6px 6px;
}

.bar-chart-bar--expenses {
  background: linear-gradient(180deg, #d07837, #f0b56b);
}

.bar-chart-bar--revenue {
  background: linear-gradient(180deg, #7aa8a2, #aedad0);
}

.outstanding-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.outstanding-table {
  min-width: 680px;
}

.order-card {
  gap: 1rem;
}

.order-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.order-meta {
  margin: 0.35rem 0 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.status-badge--paid {
  background: rgba(174, 218, 189, 0.76);
  color: #2d5941;
}

.status-badge--unpaid {
  background: rgba(255, 224, 168, 0.88);
  color: #915b23;
}

.order-dates {
  margin: 0;
}

.order-dates div {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(251, 243, 223, 0.72);
}

.order-dates dd {
  margin: 0;
  font-weight: 700;
}

.payment-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  background: rgba(251, 243, 223, 0.72);
}

.payment-toggle-row > span {
  color: var(--muted);
  font-size: 0.88rem;
}

.payment-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}

.payment-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 224, 168, 0.88);
  border: 1px solid rgba(145, 91, 35, 0.2);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.payment-toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(68, 76, 70, 0.18);
  transition: transform 160ms ease;
}

.payment-toggle input:checked + .payment-toggle-track {
  background: rgba(174, 218, 189, 0.76);
  border-color: rgba(45, 89, 65, 0.2);
}

.payment-toggle input:checked + .payment-toggle-track::after {
  transform: translateX(18px);
}

.payment-toggle input:focus + .payment-toggle-track {
  outline: 2px solid rgba(122, 168, 162, 0.42);
  outline-offset: 2px;
}

.payment-toggle strong {
  min-width: 3.9rem;
  font-size: 0.9rem;
}

.payment-toggle--compact {
  gap: 0.45rem;
}

.payment-toggle--compact .payment-toggle-track {
  width: 38px;
  height: 22px;
}

.payment-toggle--compact .payment-toggle-track::after {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}

.payment-toggle--compact input:checked + .payment-toggle-track::after {
  transform: translateX(16px);
}

.payment-toggle--compact strong {
  min-width: 3.35rem;
  font-size: 0.84rem;
}

.order-schedule {
  display: grid;
  gap: 0.55rem;
}

.order-schedule-label {
  width: fit-content;
  padding: 0.45rem 0.75rem;
  background: rgba(122, 168, 162, 0.16);
  border: 1px solid rgba(122, 168, 162, 0.18);
  font-size: 0.84rem;
}

.order-schedule p,
.sub-heading p,
.empty-state p {
  margin: 0;
  line-height: 1.65;
}

.order-actions {
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 0.75rem;
}

.customer-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.table-icon-button {
  width: 2rem;
  height: 2rem;
}

.table-icon-button svg {
  width: 0.95rem;
  height: 0.95rem;
}

.ghost-button--danger {
  color: #a64f42;
}

.empty-state {
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 231, 0.78));
  text-align: center;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero,
  .layout--customer,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-art img {
    min-height: 340px;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .page-shell {
    width: min(1200px, calc(100% - 1rem));
    padding-top: 0.8rem;
  }

  .hero,
  .card {
    padding: 0.9rem;
  }

  .account-status-bar {
    top: 0.6rem;
    right: 0.6rem;
    max-width: calc(100% - 1.5rem);
    gap: 0.35rem;
    padding: 0.35rem;
    font-size: 0.78rem;
  }

  .account-status-bar span {
    display: none;
  }

  .account-logout-button {
    padding: 0.38rem 0.58rem;
    font-size: 0.78rem;
  }

  .account-icon-button {
    width: 1.85rem;
    height: 1.85rem;
  }

  .hero-copy {
    padding: 1.25rem;
  }

  .hero-title-lockup {
    grid-template-columns: 4.65rem minmax(0, 1fr);
    gap: 0.7rem;
    max-width: 100%;
  }

  .hero h1 {
    max-width: 10.5ch;
    font-size: 1.75rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .hero-text {
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.65;
    overflow-wrap: break-word;
  }

  .form-row,
  .summary-grid,
  .admin-filters,
  .order-dates,
  .order-actions,
  .cadence-options {
    grid-template-columns: 1fr;
  }

  .customer-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-header,
  .order-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-header {
    grid-template-columns: 1fr;
  }

  .calendar-nav {
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
  }

  .calendar-month {
    min-width: auto;
    text-align: center;
  }

  .calendar-cell {
    min-height: 46px;
  }

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

  .admin-clear-filter {
    width: 100%;
  }

  .customer-record-main {
    grid-template-columns: minmax(0, 1fr) 2.35rem;
  }

  .customer-record-detail--payment {
    grid-column: 1;
    justify-items: start;
  }

  .customer-record .icon-button {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .access-switch {
    grid-template-columns: 1fr;
  }

  .access-button {
    width: 100%;
  }
}
