@import url("/static/theme.66644b2fa0b0.css");
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 15px;
  color: var(--text);
  background: var(--surface2);
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #343632;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: var(--gold);
  color: #171610;
  border-color: var(--gold);
  font-weight: 650;
}
button.primary:hover {
  background: #e9d49d;
}
button.danger {
  color: #ffadad;
  border-color: #694447;
}
button.ghost {
  background: transparent;
}
a {
  color: var(--gold);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  background: #111419;
  color: var(--text);
  border: 1px solid #3b3e43;
  padding: 11px 12px;
  border-radius: 8px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}
textarea {
  min-height: 86px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  color: #ced0d4;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 2rem;
  font-weight: 560;
  letter-spacing: -0.04em;
  margin-bottom: 7px;
}
h2 {
  font-size: 1.12rem;
  font-weight: 600;
}
h3 {
  font-size: 1rem;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.8125rem;
}
.layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 29px 18px 16px;
  background: #111418;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 14px 25px;
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.brand img {
  width: 30px;
}
.brand small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}
.nav {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  text-align: left;
  color: #adb1b9;
  padding: 10px 13px;
  font-size: 0.9rem;
}
.nav button.active {
  background: #c4a86616;
  color: var(--gold);
}
.nav button:hover {
  background: #ffffff08;
  color: var(--text);
}
.nav .symbol {
  width: 22px;
  font-size: 18px;
  text-align: center;
}
.side-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.68rem;
  color: #777d88;
  margin: 22px 14px 12px;
}
.account {
  margin-top: auto;
  padding: 20px 10px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.875rem;
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c4a86620;
  color: var(--gold);
}
.account button {
  margin-left: auto;
  padding: 6px 8px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #101318;
}
.topbar .search {
  max-width: 430px;
  flex: 1;
}
.topbar input {
  border: none;
  background: #1b1e24;
  font-size: 0.875rem;
}
.quote {
  margin-left: auto;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--muted);
}
.quote strong {
  color: var(--gold);
  font-weight: 500;
}
.mobile-menu {
  display: none;
}
.content {
  padding: 34px 36px;
  max-width: 1660px;
  margin: auto;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 9px;
}
.pagehead p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 13px;
  padding: 23px;
  margin-bottom: 22px;
  min-width: 0;
}
.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.card-title h2 {
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat {
  background: linear-gradient(120deg, #1b1f25, #171a20);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 21px;
}
.stat:first-child {
  border-color: #6e5f3e;
  background: linear-gradient(125deg, #3d3421, #211f1a);
}
.stat .value {
  font-size: clamp(1.2rem, 2vw, 1.9rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  margin: 13px 0 7px;
  overflow-wrap: anywhere;
}
.stat .label {
  font-size: 0.875rem;
  color: #c4c8cf;
}
.stat small {
  font-size: 0.75rem;
}
.columns {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}
.fields.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wide {
  grid-column: 1/-1;
}
.toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar input,
.toolbar select {
  width: auto;
  max-width: 220px;
}
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 22px;
}
.tabs button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.tabs button.active {
  color: var(--gold);
  background: #c4a86613;
  border-color: #6e5f3e;
}
.badge {
  display: inline-block;
  border: 1px solid #3b4643;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  color: #9dd8bf;
  background: #1d322a;
}
.badge.pending,
.badge.requested,
.badge.processing,
.badge.received,
.badge.searching {
  color: #e3c98e;
  background: #332e21;
  border-color: #544832;
}
.badge.void {
  background: #361f25;
  color: #eea3ac;
  border-color: #5e313b;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
th {
  color: var(--muted);
  font-weight: 450;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  white-space: nowrap;
}
td {
  padding: 14px 10px;
  border-bottom: 1px solid #252931;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td button {
  padding: 6px 10px;
  font-size: 0.8rem;
}
.empty {
  padding: 35px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.empty strong {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 450;
}
.product {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 18px;
  min-height: 156px;
  background: #1b1e24;
}
.product .piece-icon {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 12px;
}
.product strong {
  font-weight: 550;
}
.product small {
  margin-top: 7px;
}
.product b {
  color: var(--gold);
  font-weight: 450;
  font-size: 0.875rem;
  margin-top: auto;
  padding-top: 12px;
}
.sale-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 1fr);
  gap: 22px;
}
.cart {
  position: sticky;
  top: 18px;
  align-self: start;
}
.cart-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
  margin-bottom: 15px;
}
.cart-row header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cart-row header button {
  padding: 1px 8px;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.35rem;
  margin: 20px 0;
  color: var(--gold);
}
.payment-panel {
  padding: 15px;
  background: #111418;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0;
}
.payment-panel .fields {
  margin-bottom: 10px;
}
.payment-panel summary {
  cursor: pointer;
  font-size: 0.875rem;
}
.alert {
  border-left: 2px solid var(--gold);
  padding: 10px 15px;
  background: #ffffff03;
  margin-bottom: 12px;
}
.alert button {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--text);
  font-size: 0.9rem;
}
.alert small {
  display: block;
  margin-top: 4px;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  min-height: 70px;
}
.quick-link span {
  color: var(--gold);
  font-size: 1.3rem;
}
.quick-link b {
  font-size: 0.875rem;
  font-weight: 450;
}
.amount-strip {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.amount-strip strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.range {
  padding: 18px;
  border: 1px solid #6e5f3e;
  background: #c4a86612;
  border-radius: 9px;
  color: var(--gold);
  margin-bottom: 20px;
}
.timeline {
  padding-left: 18px;
  border-left: 1px solid #66583a;
}
.timeline-item {
  padding: 0 0 22px;
  position: relative;
}
.timeline-item:before {
  content: "";
  position: absolute;
  left: -23px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}
.timeline-item pre {
  white-space: pre-wrap;
  font-size: 0.8125rem;
  color: var(--muted);
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
  background:
    radial-gradient(ellipse at 20% 20%, #bfa16415, transparent 50%), #101216;
}
.login-card {
  width: min(100%, 440px);
  padding: 38px;
  border: 1px solid #494234;
  border-radius: 17px;
  background: #171a20;
  box-shadow: 0 30px 120px #0007;
}
.login .brand {
  padding-left: 0;
}
.login h1 {
  font-size: 1.8rem;
}
.login label {
  margin-top: 18px;
}
.login button {
  width: 100%;
  margin-top: 26px;
}
.login .foot {
  font-size: 0.75rem;
  text-align: center;
  margin-top: 24px;
  color: var(--muted);
}
.error {
  color: #ffb7b7;
  font-size: 0.875rem;
  margin: 14px 0;
}
dialog {
  border: 1px solid #555044;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  width: min(760px, calc(100% - 28px));
  max-height: 90vh;
  padding: 26px;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(5px);
}
dialog .dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
dialog h2 {
  margin: 0;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  padding: 14px 20px;
  border-radius: 10px;
  background: #e2ca90;
  color: #171610;
  box-shadow: 0 10px 50px #0009;
  z-index: 100;
  display: none;
}
#toast.show {
  display: block;
}
.loading {
  padding: 60px;
  color: var(--gold);
}
.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.screen-error {
  border: 1px solid #6e3b42;
  padding: 25px;
  border-radius: 12px;
}
.receipt {
  background: white;
  color: #111;
  max-width: 800px;
  margin: 30px auto;
  padding: 35px;
}
.receipt header {
  text-align: center;
  border-bottom: 2px solid #222;
  padding-bottom: 20px;
}
.receipt .logo {
  max-height: 70px;
  max-width: 200px;
}
.receipt table {
  color: #111;
}
.receipt th,
.receipt td {
  border-color: #ddd;
}
.receipt small,
.receipt .muted {
  color: #555;
}
.receipt .badge {
  color: #111;
  background: #eee;
}
.receipt-footer {
  font-size: 0.8rem;
  margin-top: 30px;
  white-space: pre-wrap;
}
.receipt .print-controls {
  margin-top: 30px;
}
.receipt-number {
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.nowrap {
  white-space: nowrap;
}
@media (min-width: 1500px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1150px) {
  .layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sale-layout {
    grid-template-columns: 1fr;
  }
  .cart {
    position: static;
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    width: 250px;
    z-index: 20;
    box-shadow: 15px 0 60px #000a;
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    padding: 12px 16px;
    gap: 10px;
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
  }
  .quote {
    font-size: 0.75rem;
  }
  .content {
    padding: 23px 16px;
  }
  .pagehead {
    align-items: flex-start;
    gap: 10px;
  }
  .pagehead h1 {
    font-size: 1.6rem;
  }
  .pagehead p {
    font-size: 0.8125rem;
  }
  .pagehead > button {
    font-size: 0.8rem;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat .value {
    font-size: 1.35rem;
  }
  .card {
    padding: 17px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fields,
  .fields.two {
    grid-template-columns: 1fr;
  }
  .payment-panel .fields {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar input {
    max-width: 100%;
    width: 100%;
  }
  .toolbar label {
    flex: 1;
    min-width: 130px;
  }
  .tabs {
    overflow: auto;
  }
  .tabs button {
    white-space: nowrap;
  }
  .login-card {
    padding: 28px;
  }
  .receipt {
    margin: 0;
    padding: 18px;
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .sale-layout {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  .sidebar,
  .topbar,
  .no-print,
  .print-controls,
  button,
  #toast,
  dialog {
    display: none !important;
  }
  .layout,
  .columns,
  .sale-layout {
    display: block;
  }
  .content {
    padding: 0;
  }
  .card,
  .stat {
    background: white;
    color: black;
    break-inside: avoid;
    border-color: #ccc;
  }
  .receipt {
    padding: 0;
    margin: 0;
    max-width: none;
  }
  .muted,
  small {
    color: #555;
  }
  table {
    font-size: 10pt;
  }
  th,
  td {
    color: black;
  }
  .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  a {
    color: black;
  }
}
/* Compact shared forms. */
.fields {
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  align-items: start;
}
.fields.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field,
input,
select,
textarea {
  min-width: 0;
}
input,
select {
  min-height: 44px;
  padding: 10px 12px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid #e6c77c;
  outline-offset: 3px;
}
.number-field input {
  font-variant-numeric: tabular-nums;
}
.market-quotes {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.market-quotes small {
  display: block;
  font-size: 10px;
}
.quote {
  max-width: 480px;
}
.tabs {
  overflow-x: auto;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .fields.two {
    grid-template-columns: 1fr;
  }
  .quote {
    font-size: 11px;
    max-width: 220px;
  }
  .market-quotes {
    gap: 8px;
  }
  .card {
    padding: 16px;
  }
  .topbar {
    flex-wrap: wrap;
  }
  .search {
    min-width: 180px;
  }
}

.quote {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 16px;
  line-height: 1.45;
}
.quote-item {
  display: grid;
  gap: 1px;
  max-width: 240px;
}
.quote-item > span {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.quote-item > strong {
  display: block;
  font-size: 12px;
}
.quote-item > small {
  display: block;
  font-size: 9px;
}
.rate-source {
  width: 100%;
  font-size: 9px;
}
.topbar {
  height: auto;
  min-height: 84px;
  padding-top: 10px;
  padding-bottom: 10px;
}
@media (max-width: 600px) {
  .quote {
    max-width: 100%;
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }
  .quote-item {
    max-width: 48%;
  }
  .rate-source {
    text-align: right;
  }
}
/* JOYERI compact workspace: full width, module home, no navigation rail. */
.layout {
  display: block;
}
.main {
  margin-left: 0;
  width: 100%;
  min-width: 0;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(300px, 1fr) auto;
  gap: 16px;
  padding: 10px 20px;
  height: auto;
  min-height: 76px;
}
.top-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 0;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-size: 22px;
  font-weight: 700;
}
.top-brand img {
  width: 30px;
  height: 30px;
}
.search {
  width: 100%;
  max-width: 430px;
}
.quote {
  justify-self: end;
  margin: 0;
}
.content {
  padding: 18px 24px;
  max-width: 1800px;
  margin: auto;
}
.pagehead {
  margin-bottom: 12px;
  gap: 10px;
}
.pagehead h1 {
  font-size: 25px;
  margin: 0;
}
.pagehead p {
  margin: 2px 0 0;
  font-size: 13px;
}
.eyebrow {
  display: none;
}
.home-button {
  margin-bottom: 8px;
  padding: 6px 12px;
  min-height: 36px;
}
.card {
  padding: 14px;
  margin-bottom: 12px;
}
h2 {
  font-size: 17px;
  margin: 0 0 10px;
}
h3 {
  font-size: 14px;
  margin: 8px 0;
}
.fields {
  gap: 10px 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.fields.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
label {
  gap: 3px;
  font-size: 13px;
}
input,
select {
  min-height: 38px;
  padding: 7px 10px;
}
textarea {
  padding: 8px;
  min-height: 68px;
}
button {
  min-height: 38px;
  padding: 7px 12px;
}
.toolbar {
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tabs {
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.stat {
  padding: 12px;
}
.stat .value {
  font-size: 23px;
}
th,
td {
  padding: 8px 10px;
  font-size: 13px;
}
.payment-panel {
  padding: 10px 0;
  margin: 8px 0;
}
.cart-row {
  padding: 9px 0;
}
.cart-total {
  padding: 12px 0;
}
.module-menu {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.module-tile {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 600;
}
.module-tile svg {
  width: 36px;
  height: 36px;
  color: var(--gold);
}
.module-tile:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.settings-submodules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.settings-panel {
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.settings-panel > summary {
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.settings-panel > .card {
  border: 0;
  margin: 0;
  background: transparent;
}
.settings-panel .card > h2 {
  display: none;
}
.settings-panel textarea {
  min-height: 60px;
}
.report-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.ledger-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
  align-items: start;
}
.ledger-detail {
  min-width: 0;
}
.ledger-summary {
  position: sticky;
  top: 10px;
}
.ledger-summary .stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 0 10px;
}
.ledger-summary .stat {
  padding: 10px 12px;
}
.ledger-summary .stat .value {
  font-size: 22px;
}
.ledger-summary .stat small {
  font-size: 11px;
}
#filtered-total {
  font-size: 12px;
  padding: 12px;
}
#filtered-total h2 {
  font-size: 14px;
}
#filtered-total p {
  margin: 5px 0;
}
.product-tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  min-width: 0;
}
.product-tile .product {
  border: 0;
  width: 100%;
  padding: 0;
  min-height: 100px;
  background: transparent;
  text-align: left;
  align-items: start;
  padding-right: 55px;
}
.photo-button {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}
.photo-button svg {
  width: 23px;
  height: 23px;
  color: var(--gold);
}
.photo-button img {
  object-fit: cover;
  display: block;
}
#photo-video {
  width: 100%;
  max-height: 320px;
  border-radius: 10px;
  background: #000;
}
@media (max-width: 1150px) {
  .module-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .topbar {
    grid-template-columns: 1fr auto 1fr auto;
    gap: 8px;
  }
  .top-brand {
    font-size: 18px;
  }
  .content {
    padding: 14px;
  }
}
@media (max-width: 800px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 10px 12px;
  }
  .top-brand {
    grid-row: 1;
    grid-column: 1;
    justify-self: start;
  }
  #logout {
    grid-row: 1;
    grid-column: 2;
  }
  .search {
    grid-column: 1 / -1;
    max-width: none;
  }
  .quote {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .module-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .module-tile {
    min-height: 105px;
    font-size: 13px;
  }
  .ledger-columns {
    grid-template-columns: 1fr;
  }
  .ledger-summary {
    position: static;
    grid-row: 1;
  }
  .ledger-summary .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .module-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content {
    padding: 12px;
  }
  .fields,
  .fields.two {
    grid-template-columns: 1fr;
  }
  .module-tile {
    min-height: 100px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 44px;
  }
  button {
    min-height: 44px;
  }
  .report-summary {
    grid-template-columns: 1fr;
  }
  .top-brand {
    justify-self: start;
  }
}
@media print {
  .topbar,
  .home-button,
  .module-menu,
  .settings-submodules {
    display: none;
  }
  .main,
  .content {
    margin: 0;
    padding: 0;
    max-width: none;
  }
  .ledger-columns {
    display: block;
  }
  .ledger-summary {
    position: static;
  }
}
.ledger-summary .stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  padding: 8px 10px;
}
.ledger-summary .stat .label {
  font-size: 12px;
}
.ledger-summary .stat .value {
  font-size: 18px;
  margin: 0;
}
.ledger-summary .stat small {
  grid-column: 1 / -1;
  line-height: 1.35;
}
.ledger-summary .stat button {
  padding: 4px 8px;
  font-size: 12px;
}
@media (max-width: 800px) {
  .ledger-summary .stat {
    grid-template-columns: 1fr;
  }
  .ledger-summary .stat .value {
    font-size: 20px;
  }
}

/* Compact module headings: retain a comfortable touch target. */
.compact-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.compact-heading h1 {
  font-size: 1.4rem;
  margin: 0;
}
.compact-heading .home-button {
  margin: 0;
  min-height: 40px;
}
.compact-heading .actions {
  margin-left: auto;
}
#view > .module-menu:first-child {
  margin-top: 0;
}
.ledger-detail > .toolbar {
  margin-top: 0;
}
.reference-panel {
  padding: 10px 12px;
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.reference-panel p {
  margin: 4px 0;
}

.photo-preview {
  display: block;
  width: 160px;
  max-height: 160px;
  object-fit: contain;
  margin: 8px auto;
}
.photo-preview[hidden] {
  display: none;
}

.payment-panel label[hidden] {
  display: none;
}
