:root {
  color-scheme: light;
  /* The Mooda app's colours. --green keeps its old name so the rest of the file reads the same. */
  --green: #0c1736;
  --green-dark: #090d17;
  --brand-text: #0c1736;
  --ink: #33261f;
  --muted: #6b615a;
  --line: #e4e0d6;
  --surface: #f4f3ee;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Georgia, "Times New Roman", serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.file-button:focus-visible {
  outline: 3px solid #090d17;
  outline-offset: 2px;
}
.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(16px, 2vw, 32px);
  color: white;
  background: var(--green);
}
.brand,
.header-actions,
.store-identity {
  display: flex;
  align-items: center;
}
.brand {
  gap: 10px;
  font-size: 23px;
  font-weight: bold;
  white-space: nowrap;
}
.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.header-actions {
  gap: 18px;
}
.store-identity {
  gap: 10px;
  min-width: 0;
}
.store-identity strong,
.store-identity small {
  display: block;
  white-space: nowrap;
}
.store-identity strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-identity small {
  max-width: 220px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
  font-size: 12px;
}
.store-avatar,
.profile-photo {
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  color: white;
  background: #090d17;
  font-weight: bold;
}
.store-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}
.store-avatar img,
.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sign-out-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 2px solid white;
  border-radius: 7px;
  color: white;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.sign-out-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.seller-shell {
  display: grid;
  grid-template-columns: clamp(210px, 18vw, 250px) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
  width: 100%;
  max-width: 1680px;
  margin: clamp(16px, 2vw, 32px) auto;
  padding: 0 clamp(16px, 2vw, 32px);
}
.sidebar,
.page-content {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.sidebar {
  align-self: start;
  padding: 24px;
}
.sidebar h2 {
  margin: 0 0 20px;
  font-size: 22px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  color: #090d17;
  background: transparent;
  text-align: left;
}
.nav-button:hover,
.nav-button.is-active {
  color: var(--brand-text);
  background: #eae7df;
}
.nav-button.is-active {
  font-weight: bold;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-content {
  min-width: 0;
  min-height: 570px;
  padding: clamp(20px, 3vw, 36px);
}
.page-content h1 {
  margin: 0;
  font-size: 28px;
}
.page-description {
  margin: 12px 0 26px;
  line-height: 1.5;
}
.muted {
  color: var(--muted);
  line-height: 1.5;
}

.metric-grid,
.settlement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric-grid.without-receipts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settlement-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.metric-card,
.content-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.metric-card span,
.metric-card small {
  display: block;
}
.metric-card span {
  margin-bottom: 14px;
}
.metric-card strong {
  display: block;
  font-size: clamp(22px, 2vw, 30px);
  overflow-wrap: anywhere;
}
.metric-card small {
  margin-top: 8px;
  color: var(--muted);
}
.content-card h2 {
  margin: 0 0 16px;
  font-size: 20px;
}
.overview-panels {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
  align-items: start;
}
.trend-card {
  max-width: 560px;
}
.trend-list,
.review-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.trend-list li {
  display: grid;
  grid-template-columns: 25px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.trend-rank {
  color: var(--muted);
  font-weight: bold;
}
.trend-image {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 7px;
  color: var(--brand-text);
  background: #eae7df;
  font-weight: bold;
}
.trend-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trend-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trend-count {
  color: var(--brand-text);
  font-weight: bold;
  white-space: nowrap;
}
.review-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}
.review-heading svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #b66a00;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.review-card > .muted {
  margin: 0 0 14px;
  font-size: 14px;
}
.review-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  line-height: 1.4;
}
.review-list button,
.text-button {
  padding: 4px 0;
  border: 0;
  color: var(--brand-text);
  background: transparent;
  font-weight: bold;
  white-space: nowrap;
}

.section-heading,
.form-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.section-heading .page-description {
  margin-bottom: 26px;
}
.action-button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}
.action-button:hover,
.file-button:hover {
  background: var(--green-dark);
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  background: #f1eee8;
  white-space: nowrap;
}
td {
  line-height: 1.4;
}
td select {
  min-width: 120px;
}
.editor-form {
  margin-bottom: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid label,
.inline-form label {
  display: grid;
  gap: 8px;
  font-weight: bold;
}
.full-width {
  grid-column: 1 / -1;
}
.image-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.image-picker > span:first-child {
  width: 100%;
  font-weight: bold;
}
input:not([type="file"]),
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfc7bb;
  border-radius: 7px;
  color: var(--ink);
  background: white;
}
textarea {
  resize: vertical;
}
input[type="file"] {
  width: 100%;
  padding: 9px;
  border: 1px dashed #b5a99f;
  border-radius: 8px;
  background: white;
  font-weight: normal;
}
.editor-form > .action-button {
  margin-top: 20px;
}
.product-edit-dialog {
  width: min(700px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 60px #0005;
}
.product-edit-dialog::backdrop {
  background: #1a1512a8;
}
.product-edit-dialog .editor-form {
  margin: 0;
}
.price-preview {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f1eee8;
  line-height: 1.5;
}
.form-message {
  min-height: 0;
  margin: 12px 0 0;
  color: var(--brand-text);
  line-height: 1.5;
}
.form-message:empty {
  display: none;
}
.form-message.error {
  color: #b3261e;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.product-image {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 145px;
  overflow: hidden;
  color: var(--brand-text);
  background: #eae7df;
  font-size: 38px;
  font-weight: bold;
}
/* The whole photo at its own shape, never cropped, as tall as it needs (up to 320px). */
.product-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}
.product-sizes {
  margin: -4px 0 12px;
  color: var(--ink);
  font-size: 14px;
}
.product-copy {
  padding: 16px;
}
.product-copy h2 {
  margin: 0 0 6px;
  font-size: 19px;
}
.product-copy small {
  color: var(--muted);
}
.product-copy p {
  min-height: 44px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.product-facts {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.product-facts strong {
  color: var(--brand-text);
}
.product-copy > .table-action {
  margin: 10px 8px 0 0;
}

.settlement-card {
  margin-bottom: 20px;
}
.settlement-report-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.settlement-report-controls label {
  display: grid;
  gap: 6px;
}
.settlement-report-controls input {
  min-height: 40px;
}
.back-office-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.back-office-actions .is-active {
  color: white;
  background: var(--green);
}
.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}
.inline-form .action-button {
  min-height: 42px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
}
.profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  font-size: 34px;
}
.profile-details h2 {
  margin-bottom: 12px;
}
.profile-details p {
  margin: 8px 0;
}
.photo-card {
  margin-top: 20px;
}
.photo-card .file-button {
  cursor: pointer;
}
#store-photo-filename,
#product-image-filename {
  font-size: 14px;
}
#store-photo-filename {
  margin-left: 12px;
}
.settings-form {
  max-width: 720px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.form-grid label.check-row {
  display: flex;
}
.size-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.size-grid legend {
  padding: 0 6px;
  font-weight: bold;
}
@media (max-width: 600px) {
  .size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.check-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
}
.two-factor-card {
  margin-top: 20px;
  max-width: 720px;
}
.two-factor-card form {
  display: grid;
  gap: 14px;
}
.two-factor-card form p {
  margin: 0;
}
.two-factor-card label {
  display: grid;
  gap: 8px;
  max-width: 360px;
  font-weight: bold;
}
.two-factor-card .action-button,
.two-factor-card .table-action {
  justify-self: start;
}
.two-factor-buttons {
  display: flex;
  gap: 10px;
}
.two-factor-qr {
  width: 200px;
  height: 200px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.two-factor-secret {
  font-family: monospace;
  letter-spacing: 1px;
  word-break: break-all;
}

.week-nav {
  display: grid;
  gap: 8px;
}
.week-nav-title {
  font-weight: bold;
}
.week-nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.week-nav-controls button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  width: 36px;
  height: 36px;
  font-size: 16px;
  line-height: 1;
}
.week-nav-controls span {
  font-weight: bold;
}
.analytics-panels {
  display: grid;
  gap: 18px;
}
.chart-card {
  position: relative;
}
.analytics-chart {
  display: block;
  width: 100%;
  height: 240px;
}
.chart-bar-stop-top {
  stop-color: var(--green);
  stop-opacity: 0.7;
}
.chart-bar-stop-middle {
  stop-color: var(--green);
  stop-opacity: 0.4;
}
.chart-bar-stop-bottom {
  stop-color: var(--green);
  stop-opacity: 0.2;
}
.chart-bar {
  transition: opacity 0.15s ease-out;
}
.analytics-chart.is-hovering .chart-bar:not(.is-active) {
  opacity: 0.45;
}
.chart-axis-label {
  fill: var(--muted);
  font-size: 13px;
}
.chart-average-line {
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  pointer-events: none;
}
.chart-average-label {
  fill: var(--muted);
  font-size: 12px;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
}
.chart-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.chart-description {
  margin: 0 0 14px;
}
.trend-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
}
.trend-badge.is-up {
  background: #eae7df;
  color: var(--green-dark);
}
.trend-badge.is-down {
  background: #f6e3e1;
  color: #b3261e;
}
.chart-tooltip {
  position: absolute;
  transform: translate(-50%, -100%) translateY(-10px);
  background: var(--ink);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 950px) {
  .seller-shell {
    grid-template-columns: 1fr;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  }
  .overview-panels {
    grid-template-columns: 1fr;
  }
  .trend-card {
    max-width: none;
  }
}
@media (max-width: 600px) {
  .top-bar {
    flex-wrap: wrap;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .seller-shell {
    padding: 0 12px;
  }
  .sidebar,
  .page-content {
    padding: 16px;
  }
  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav-button {
    gap: 8px;
    padding: 9px;
    font-size: 14px;
  }
  .metric-grid,
  .settlement-grid,
  .form-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }
  .metric-grid.without-receipts {
    grid-template-columns: 1fr;
  }
  .section-heading {
    align-items: start;
    flex-wrap: wrap;
    margin-bottom: 18px;
  }
  .section-heading .page-description {
    margin-bottom: 0;
  }
  .profile-card {
    flex-wrap: wrap;
  }
  .page-content {
    min-height: 0;
  }
}
.table-action {
  padding: 8px 12px;
  border: 1px solid #0c1736;
  border-radius: 8px;
  color: #0c1736;
  background: white;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.account-actions .table-action {
  white-space: nowrap;
}
.coupon-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  white-space: nowrap;
}
.coupon-section {
  margin-top: 36px;
}
.coupon-section h3 {
  margin: 28px 0 12px;
}

.account-delete {
  color: #b3261e;
  border-color: #b3261e;
  background: white;
}

.seller-receipt-actions,
.seller-receipt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.seller-receipt-brand {
  margin-top: 24px;
}

.seller-receipt-brand h3 {
  margin: 0;
}

.seller-receipt-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: white;
  background: #0c1736;
  font-size: 24px;
  font-weight: bold;
}

.seller-receipt-panel h4 {
  margin-top: 24px;
}

@media print {
  @page {
    size: A4;
    margin: 20mm;
  }

  body {
    background: white;
  }

  .top-bar,
  .sidebar,
  .seller-receipt-actions {
    display: none !important;
  }

  .seller-shell,
  .page-content,
  #seller-receipt-panel {
    display: block;
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: white;
  }
}

.order-row-clickable {
  cursor: pointer;
}
.order-row-clickable:hover {
  background: var(--surface);
}
.order-row-clickable:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
.order-details-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 60px #0005;
}
.order-details-dialog::backdrop {
  background: #1a1512a8;
}
.order-details-content {
  padding: 24px;
}
.order-details-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.order-details-close {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.order-detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.order-detail-row:last-child {
  border-bottom: 0;
}
.order-detail-label {
  color: var(--muted);
  font-weight: bold;
}
.order-detail-value {
  word-break: break-word;
}
.order-detail-products {
  margin: 0;
  padding-left: 18px;
}
@media (max-width: 500px) {
  .order-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.measure-fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.measure-fieldset legend {
  padding: 0 6px;
  font-weight: bold;
}
.measure-table {
  width: 100%;
  border-collapse: collapse;
}
.measure-table th {
  padding: 6px 8px;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
}
.measure-table td {
  padding: 4px;
}
.measure-table input {
  min-width: 72px;
  min-height: 38px;
}